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):
|
def querydb(cubeid):
|
||||||
""" open a metadata file """
|
""" open a metadata file """
|
||||||
try:
|
try:
|
||||||
dbfile = 'db/vm.{}.json'.format(src_data['cube'])
|
dbfile = 'db/vm.{}.json'.format(cube)
|
||||||
dbf = open(dbfile, 'r')
|
dbf = open(dbfile, 'r')
|
||||||
data = json.load(dbf)
|
data = json.load(dbf)
|
||||||
dbf.close()
|
dbf.close()
|
||||||
logger.info('grid> {} --> {}'.format(dbfile, data))
|
logger.info('grid> {} --> {}'.format(dbfile, data))
|
||||||
|
return data
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.critical('grid> {}'.format(e))
|
logger.critical('grid> {}'.format(e))
|
||||||
pass
|
pass
|
||||||
return data
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def writedb(src_data):
|
def writedb(src_data):
|
||||||
|
|
Loading…
Reference in a new issue