small fixes to prepare for ipv4 gen deprecation

This commit is contained in:
deflax 2017-06-01 18:48:05 +03:00
parent ab8a099ff9
commit 4d5bff651f
3 changed files with 4 additions and 4 deletions

View file

@ -173,7 +173,7 @@ def generate_vmid():
counter = 0
while True:
if counter == 50:
logger.error('grid> ip range full')
logger.error('grid> vmid range full')
return None
else:
counter += 1

View file

@ -100,7 +100,7 @@ def vmcreate(req):
'clientemail': req['clientemail'],
'recipe': req['vps_recipe'],
'iso9660': 'ubuntu-16.04.1-server-amd64.iso',
'ipv4': ipv4_list,
'ipv4list': ipv4_list,
'macaddr': macaddr }
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
#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)
return response

View file

@ -204,7 +204,7 @@ class RRDResource(object):
@falcon.before(max_body(64 * 1024))
def on_post(self, req, resp, vmid):
""" Generate rrd pngs """
logger.info('grid> rrd ' + str(vmid))
#logger.info('grid> rrd ' + str(vmid))
resp.status, response = selector('vmrrd', req, vmid)
req.context['result'] = response