fixing vmcreate
This commit is contained in:
parent
d0d3933c3e
commit
d84106f21d
1 changed files with 4 additions and 2 deletions
6
grid.py
6
grid.py
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue