diff --git a/api-daemon/pvcapid/flaskapi.py b/api-daemon/pvcapid/flaskapi.py index fbb43db3..38e16f82 100755 --- a/api-daemon/pvcapid/flaskapi.py +++ b/api-daemon/pvcapid/flaskapi.py @@ -1252,7 +1252,7 @@ class API_VM_Root(Resource): {"name": "node"}, { "name": "selector", - "choices": ("mem", "vcpus", "load", "vms", "none"), + "choices": ("mem", "memfree", "vcpus", "load", "vms", "none"), "helptext": "A valid selector must be specified", }, {"name": "autostart"}, @@ -1298,12 +1298,14 @@ class API_VM_Root(Resource): type: string required: false description: The selector used to determine candidate nodes during migration - default: mem + default: none enum: - mem + - memfree - vcpus - load - vms + - none (cluster default) - in: query name: autostart type: boolean @@ -1397,7 +1399,7 @@ class API_VM_Element(Resource): {"name": "node"}, { "name": "selector", - "choices": ("mem", "vcpus", "load", "vms", "none"), + "choices": ("mem", "memfree", "vcpus", "load", "vms", "none"), "helptext": "A valid selector must be specified", }, {"name": "autostart"}, @@ -1445,9 +1447,10 @@ class API_VM_Element(Resource): type: string required: false description: The selector used to determine candidate nodes during migration - default: mem + default: none enum: - mem + - memfree - vcpus - load - vms @@ -1646,7 +1649,7 @@ class API_VM_Metadata(Resource): {"name": "limit"}, { "name": "selector", - "choices": ("mem", "vcpus", "load", "vms", "none"), + "choices": ("mem", "memfree", "vcpus", "load", "vms", "none"), "helptext": "A valid selector must be specified", }, {"name": "autostart"}, @@ -1678,9 +1681,11 @@ class API_VM_Metadata(Resource): description: The selector used to determine candidate nodes during migration enum: - mem + - memfree - vcpus - load - vms + - none (cluster default) - in: query name: autostart type: boolean diff --git a/client-cli/pvc/pvc.py b/client-cli/pvc/pvc.py index b7a759ed..d6ff502f 100755 --- a/client-cli/pvc/pvc.py +++ b/client-cli/pvc/pvc.py @@ -805,9 +805,9 @@ def cli_vm(): "-s", "--selector", "node_selector", - default="mem", + default="none", show_default=True, - type=click.Choice(["mem", "load", "vcpus", "vms", "none"]), + type=click.Choice(["mem", "memfree", "load", "vcpus", "vms", "none"]), help='Method to determine optimal target node during autoselect; "none" will use the default for the cluster.', ) @click.option( @@ -902,7 +902,7 @@ def vm_define( "node_selector", default=None, show_default=False, - type=click.Choice(["mem", "load", "vcpus", "vms", "none"]), + type=click.Choice(["mem", "memfree", "load", "vcpus", "vms", "none"]), help='Method to determine optimal target node during autoselect; "none" will use the default for the cluster.', ) @click.option( @@ -4102,7 +4102,9 @@ def provisioner_template_system_list(limit): @click.option( "--node-selector", "node_selector", - type=click.Choice(["mem", "vcpus", "vms", "load", "none"], case_sensitive=False), + type=click.Choice( + ["mem", "memfree", "vcpus", "vms", "load", "none"], case_sensitive=False + ), default="none", help='Method to determine optimal target node during autoselect; "none" will use the default for the cluster.', ) @@ -4194,7 +4196,9 @@ def provisioner_template_system_add( @click.option( "--node-selector", "node_selector", - type=click.Choice(["mem", "vcpus", "vms", "load", "none"], case_sensitive=False), + type=click.Choice( + ["mem", "memfree", "vcpus", "vms", "load", "none"], case_sensitive=False + ), help='Method to determine optimal target node during autoselect; "none" will use the default for the cluster.', ) @click.option( diff --git a/docs/manuals/swagger.json b/docs/manuals/swagger.json index 055ded6d..f063598e 100644 --- a/docs/manuals/swagger.json +++ b/docs/manuals/swagger.json @@ -6173,13 +6173,15 @@ "type": "string" }, { - "default": "mem", + "default": "none", "description": "The selector used to determine candidate nodes during migration", "enum": [ "mem", + "memfree", "vcpus", "load", - "vms" + "vms", + "none (cluster default)" ], "in": "query", "name": "selector", @@ -6330,10 +6332,11 @@ "type": "string" }, { - "default": "mem", + "default": "none", "description": "The selector used to determine candidate nodes during migration", "enum": [ "mem", + "memfree", "vcpus", "load", "vms", @@ -6594,9 +6597,11 @@ "description": "The selector used to determine candidate nodes during migration", "enum": [ "mem", + "memfree", "vcpus", "load", - "vms" + "vms", + "none (cluster default)" ], "in": "query", "name": "selector",