Adding missing default values and fixing bare Redis fetch for volume list.
This commit is contained in:
@@ -72,7 +72,7 @@ class CloudController(object):
|
||||
@property
|
||||
def volumes(self):
|
||||
""" returns a list of all volumes """
|
||||
for volume_id in datastore.Redis.instance().smembers("volumes"):
|
||||
for volume_id in datastore.Redis.instance().smembers("storage-volumes"):
|
||||
volume = storage.Volume(volume_id=volume_id)
|
||||
yield volume
|
||||
|
||||
|
||||
@@ -165,9 +165,11 @@ class Volume(datastore.RedisModel):
|
||||
vol['availability_zone'] = FLAGS.storage_availability_zone
|
||||
vol["instance_id"] = 'none'
|
||||
vol["mountpoint"] = 'none'
|
||||
vol['attachTime'] = 'none'
|
||||
vol["create_time"] = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime())
|
||||
vol['status'] = "creating" # creating | available | in-use
|
||||
vol['attachStatus'] = "detached" # attaching | attached | detaching | detached
|
||||
vol['deleteOnTermination'] = 'False'
|
||||
vol.save()
|
||||
vol.create_lv()
|
||||
vol.setup_export()
|
||||
|
||||
Reference in New Issue
Block a user