diff options
| author | Joshua McKenty <jmckenty@gmail.com> | 2010-06-24 04:11:55 +0100 |
|---|---|---|
| committer | andy <github@anarkystic.com> | 2010-06-24 04:11:55 +0100 |
| commit | 8c535fae46a6944e1ca5fd8bb44db739befb0054 (patch) | |
| tree | 28b1a2f1a73c9a763b96f08d403b59d9eb751cf7 | |
| parent | 9526e1b3f14a7d9b8b2dcf7012e099a13e6fc80e (diff) | |
| download | nova-8c535fae46a6944e1ca5fd8bb44db739befb0054.tar.gz nova-8c535fae46a6944e1ca5fd8bb44db739befb0054.tar.xz nova-8c535fae46a6944e1ca5fd8bb44db739befb0054.zip | |
Adding missing default values and fixing bare Redis fetch for volume list.
| -rw-r--r-- | nova/endpoint/cloud.py | 2 | ||||
| -rw-r--r-- | nova/volume/storage.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/nova/endpoint/cloud.py b/nova/endpoint/cloud.py index f14532b97..2e5a18afd 100644 --- a/nova/endpoint/cloud.py +++ b/nova/endpoint/cloud.py @@ -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 diff --git a/nova/volume/storage.py b/nova/volume/storage.py index a409ec0db..1cf6b0343 100644 --- a/nova/volume/storage.py +++ b/nova/volume/storage.py @@ -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() |
