Pass remaining required args to vm_define
This commit is contained in:
parent
78089afb4e
commit
796fa4692f
|
@ -272,12 +272,12 @@ def vm_list(node=None, state=None, limit=None, is_fuzzy=True):
|
||||||
pvc_common.stopZKConnection(zk_conn)
|
pvc_common.stopZKConnection(zk_conn)
|
||||||
return flask.jsonify(retdata), retcode
|
return flask.jsonify(retdata), retcode
|
||||||
|
|
||||||
def vm_define(xml, node, selector):
|
def vm_define(xml, node, limit, selector, autostart):
|
||||||
"""
|
"""
|
||||||
Define a VM from Libvirt XML in the PVC cluster.
|
Define a VM from Libvirt XML in the PVC cluster.
|
||||||
"""
|
"""
|
||||||
zk_conn = pvc_common.startZKConnection(config['coordinators'])
|
zk_conn = pvc_common.startZKConnection(config['coordinators'])
|
||||||
retflag, retdata = pvc_vm.define_vm(zk_conn, xml, node, selector)
|
retflag, retdata = pvc_vm.define_vm(zk_conn, xml, node, limit, selector, autostart, profile=None)
|
||||||
if retflag:
|
if retflag:
|
||||||
retcode = 200
|
retcode = 200
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -296,7 +296,7 @@ def api_vm_root():
|
||||||
else:
|
else:
|
||||||
autostart = False
|
autostart = False
|
||||||
|
|
||||||
return api_helper.vm_define(libvirt_xml, node, selector)
|
return api_helper.vm_define(libvirt_xml, node, limit, selector, autostart)
|
||||||
|
|
||||||
@api.route('/api/v1/vm/<vm>', methods=['GET', 'POST', 'PUT', 'DELETE'])
|
@api.route('/api/v1/vm/<vm>', methods=['GET', 'POST', 'PUT', 'DELETE'])
|
||||||
@authenticator
|
@authenticator
|
||||||
|
|
Loading…
Reference in New Issue