small fixes to prepare for ipv4 gen deprecation
This commit is contained in:
parent
ab8a099ff9
commit
4d5bff651f
3 changed files with 4 additions and 4 deletions
2
grid.py
2
grid.py
|
@ -173,7 +173,7 @@ def generate_vmid():
|
||||||
counter = 0
|
counter = 0
|
||||||
while True:
|
while True:
|
||||||
if counter == 50:
|
if counter == 50:
|
||||||
logger.error('grid> ip range full')
|
logger.error('grid> vmid range full')
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
counter += 1
|
counter += 1
|
||||||
|
|
|
@ -100,7 +100,7 @@ def vmcreate(req):
|
||||||
'clientemail': req['clientemail'],
|
'clientemail': req['clientemail'],
|
||||||
'recipe': req['vps_recipe'],
|
'recipe': req['vps_recipe'],
|
||||||
'iso9660': 'ubuntu-16.04.1-server-amd64.iso',
|
'iso9660': 'ubuntu-16.04.1-server-amd64.iso',
|
||||||
'ipv4': ipv4_list,
|
'ipv4list': ipv4_list,
|
||||||
'macaddr': macaddr }
|
'macaddr': macaddr }
|
||||||
|
|
||||||
proxobject = auth(slave_name)
|
proxobject = auth(slave_name)
|
||||||
|
@ -154,7 +154,7 @@ def vmcreate(req):
|
||||||
#time.sleep(7) #wait few seconds for the slave to prepare the machine for initial run
|
#time.sleep(7) #wait few seconds for the slave to prepare the machine for initial run
|
||||||
#vmstart(cubeid)
|
#vmstart(cubeid)
|
||||||
|
|
||||||
response = { 'status':'CREATE', 'cube':cubeid, 'name':vm_name, 'password':vm_pass, 'ipv4_0':ipv4_list[0] }
|
response = { 'status':'CREATE', 'cube':cubeid, 'name':vm_name, 'password':vm_pass, 'ipv4list':str(ipv4_list) }
|
||||||
grid.writedb(deploy)
|
grid.writedb(deploy)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,7 @@ class RRDResource(object):
|
||||||
@falcon.before(max_body(64 * 1024))
|
@falcon.before(max_body(64 * 1024))
|
||||||
def on_post(self, req, resp, vmid):
|
def on_post(self, req, resp, vmid):
|
||||||
""" Generate rrd pngs """
|
""" Generate rrd pngs """
|
||||||
logger.info('grid> rrd ' + str(vmid))
|
#logger.info('grid> rrd ' + str(vmid))
|
||||||
resp.status, response = selector('vmrrd', req, vmid)
|
resp.status, response = selector('vmrrd', req, vmid)
|
||||||
req.context['result'] = response
|
req.context['result'] = response
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue