SM volume driver: DB changes and tests

Fixes the storage manager db api code in minor ways
like checking for duplicates during creation.
Adds tests for the storage manager db api.

Change-Id: I00f431ed9137b140f46b4e30cb953792d7307d22
This commit is contained in:
Renuka Apte
2012-05-29 16:36:54 -07:00
parent eecab74b40
commit 096a6b1f58
3 changed files with 196 additions and 1 deletions

View File

@@ -1367,7 +1367,7 @@ class StorageManagerCommands(object):
sys.exit(2)
try:
flavors = db.sm_flavor_get(ctxt, flavor_label)
flavors = db.sm_flavor_get_by_label(ctxt, flavor_label)
except exception.NotFound as ex:
print "error: %s" % ex
sys.exit(2)