~nova-coresec/nova/ppa-lucid

« back to all changes in this revision

Viewing changes to nova/volume/manager.py

  • Committer: Soren Hansen
  • Date: 2010-10-14 21:26:14 UTC
  • mfrom: (195.1.85 ubuntu-packaging)
  • Revision ID: soren.hansen@rackspace.com-20101014212614-ioz32fe7oleepk4j
Merge ubuntu packaging branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
 
78
78
        size = volume_ref['size']
79
79
        logging.debug("volume %s: creating lv of size %sG", volume_id, size)
80
 
        yield self.driver.create_volume(volume_ref['str_id'], size)
 
80
        yield self.driver.create_volume(volume_ref['ec2_id'], size)
81
81
 
82
82
        logging.debug("volume %s: allocating shelf & blade", volume_id)
83
83
        self._ensure_blades(context)
87
87
        logging.debug("volume %s: exporting shelf %s & blade %s", volume_id,
88
88
                      shelf_id, blade_id)
89
89
 
90
 
        yield self.driver.create_export(volume_ref['str_id'],
 
90
        yield self.driver.create_export(volume_ref['ec2_id'],
91
91
                                        shelf_id,
92
92
                                        blade_id)
93
93
 
111
111
            raise exception.Error("Volume is not local to this node")
112
112
        shelf_id, blade_id = self.db.volume_get_shelf_and_blade(context,
113
113
                                                                volume_id)
114
 
        yield self.driver.remove_export(volume_ref['str_id'],
 
114
        yield self.driver.remove_export(volume_ref['ec2_id'],
115
115
                                        shelf_id,
116
116
                                        blade_id)
117
 
        yield self.driver.delete_volume(volume_ref['str_id'])
 
117
        yield self.driver.delete_volume(volume_ref['ec2_id'])
118
118
        self.db.volume_destroy(context, volume_id)
119
119
        defer.returnValue(True)
120
120
 
125
125
        Returns path to device.
126
126
        """
127
127
        volume_ref = self.db.volume_get(context, volume_id)
128
 
        yield self.driver.discover_volume(volume_ref['str_id'])
 
128
        yield self.driver.discover_volume(volume_ref['ec2_id'])
129
129
        shelf_id, blade_id = self.db.volume_get_shelf_and_blade(context,
130
130
                                                                volume_id)
131
131
        defer.returnValue("/dev/etherd/e%s.%s" % (shelf_id, blade_id))