Add memfree to selector and use proper defaults
This commit is contained in:
parent
f8cdcb30ba
commit
b1357cafdb
|
@ -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
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue