fixing vmcreate

This commit is contained in:
deflax 2016-11-03 07:10:38 +02:00
parent d0d3933c3e
commit d84106f21d

View file

@ -28,15 +28,17 @@ def query_vm(req_cube_id):
def querydb(cubeid):
""" open a metadata file """
try:
dbfile = 'db/vm.{}.json'.format(src_data['cube'])
dbfile = 'db/vm.{}.json'.format(cube)
dbf = open(dbfile, 'r')
data = json.load(dbf)
dbf.close()
logger.info('grid> {} --> {}'.format(dbfile, data))
return data
except Exception as e:
logger.critical('grid> {}'.format(e))
pass
return data
return None
def writedb(src_data):