diff --git a/client-api/api_lib/pvcapi_helper.py b/client-api/api_lib/pvcapi_helper.py index 1735c412..b6c08785 100755 --- a/client-api/api_lib/pvcapi_helper.py +++ b/client-api/api_lib/pvcapi_helper.py @@ -272,12 +272,12 @@ def vm_list(node=None, state=None, limit=None, is_fuzzy=True): pvc_common.stopZKConnection(zk_conn) 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. """ 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: retcode = 200 else: diff --git a/client-api/pvc-api.py b/client-api/pvc-api.py index 67cd807e..280ce98c 100755 --- a/client-api/pvc-api.py +++ b/client-api/pvc-api.py @@ -296,7 +296,7 @@ def api_vm_root(): else: 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/', methods=['GET', 'POST', 'PUT', 'DELETE']) @authenticator