Alphabetize the methods in the db layer.
There are enough of them in there that it is probably useful to keep them organized. Also moved the NoMoreBlades to db, it is likely to be shared by any implementation.
This commit is contained in:
@@ -179,7 +179,7 @@ class Instance(Base, NovaBase):
|
|||||||
def project(self):
|
def project(self):
|
||||||
return auth.manager.AuthManager().get_project(self.project_id)
|
return auth.manager.AuthManager().get_project(self.project_id)
|
||||||
|
|
||||||
# FIXME: make this opaque somehow
|
# TODO(vish): make this opaque somehow
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
return "i-%s" % self.id
|
return "i-%s" % self.id
|
||||||
@@ -237,12 +237,12 @@ class Volume(Base, NovaBase):
|
|||||||
|
|
||||||
node_name = Column(String(255)) #, ForeignKey('physical_node.id'))
|
node_name = Column(String(255)) #, ForeignKey('physical_node.id'))
|
||||||
size = Column(Integer)
|
size = Column(Integer)
|
||||||
alvailability_zone = Column(String(255)) # FIXME foreign key?
|
availability_zone = Column(String(255)) # TODO(vish) foreign key?
|
||||||
instance_id = Column(Integer, ForeignKey('instances.id'), nullable=True)
|
instance_id = Column(Integer, ForeignKey('instances.id'), nullable=True)
|
||||||
mountpoint = Column(String(255))
|
mountpoint = Column(String(255))
|
||||||
attach_time = Column(String(255)) # FIXME datetime
|
attach_time = Column(String(255)) # TODO(vish) datetime
|
||||||
status = Column(String(255)) # FIXME enum?
|
status = Column(String(255)) # TODO(vish) enum?
|
||||||
attach_status = Column(String(255)) # FIXME enum
|
attach_status = Column(String(255)) # TODO(vish) enum
|
||||||
|
|
||||||
class ExportDevice(Base, NovaBase):
|
class ExportDevice(Base, NovaBase):
|
||||||
__tablename__ = 'export_devices'
|
__tablename__ = 'export_devices'
|
||||||
@@ -254,7 +254,7 @@ class ExportDevice(Base, NovaBase):
|
|||||||
uselist=False))
|
uselist=False))
|
||||||
|
|
||||||
|
|
||||||
#FIXME can these both come from the same baseclass?
|
# TODO(vish): can these both come from the same baseclass?
|
||||||
class FixedIp(Base, NovaBase):
|
class FixedIp(Base, NovaBase):
|
||||||
__tablename__ = 'fixed_ips'
|
__tablename__ = 'fixed_ips'
|
||||||
id = Column(Integer, primary_key=True)
|
id = Column(Integer, primary_key=True)
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class VolumeTestCase(test.TrialTestCase):
|
|||||||
self.assertFailure(self.volume.create_volume(vol_size,
|
self.assertFailure(self.volume.create_volume(vol_size,
|
||||||
user_id,
|
user_id,
|
||||||
project_id),
|
project_id),
|
||||||
db.sqlalchemy.api.NoMoreBlades)
|
db.NoMoreBlades)
|
||||||
for id in vols:
|
for id in vols:
|
||||||
yield self.volume.delete_volume(id)
|
yield self.volume.delete_volume(id)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user