From 796fa4692f79941f76d264890caa89bd9159e1e9 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Thu, 19 Dec 2019 11:53:24 -0500 Subject: [PATCH] Pass remaining required args to vm_define --- client-api/api_lib/pvcapi_helper.py | 4 ++-- client-api/pvc-api.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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