partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
train | block_icmp | Block a specific ICMP type on a zone
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.block_icmp zone echo-reply | salt/modules/firewalld.py | def block_icmp(zone, icmp, permanent=True):
'''
Block a specific ICMP type on a zone
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.block_icmp zone echo-reply
'''
if icmp not in get_icmp_types(permanent):
log.error('Invalid ICMP type')
... | def block_icmp(zone, icmp, permanent=True):
'''
Block a specific ICMP type on a zone
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.block_icmp zone echo-reply
'''
if icmp not in get_icmp_types(permanent):
log.error('Invalid ICMP type')
... | [
"Block",
"a",
"specific",
"ICMP",
"type",
"on",
"a",
"zone"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L764-L789 | [
"def",
"block_icmp",
"(",
"zone",
",",
"icmp",
",",
"permanent",
"=",
"True",
")",
":",
"if",
"icmp",
"not",
"in",
"get_icmp_types",
"(",
"permanent",
")",
":",
"log",
".",
"error",
"(",
"'Invalid ICMP type'",
")",
"return",
"False",
"if",
"icmp",
"in",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_icmp_block | List ICMP blocks on a zone
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt '*' firewlld.list_icmp_block zone | salt/modules/firewalld.py | def list_icmp_block(zone, permanent=True):
'''
List ICMP blocks on a zone
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt '*' firewlld.list_icmp_block zone
'''
cmd = '--zone={0} --list-icmp-blocks'.format(zone)
if permanent:
cmd += ' --permanent'
... | def list_icmp_block(zone, permanent=True):
'''
List ICMP blocks on a zone
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt '*' firewlld.list_icmp_block zone
'''
cmd = '--zone={0} --list-icmp-blocks'.format(zone)
if permanent:
cmd += ' --permanent'
... | [
"List",
"ICMP",
"blocks",
"on",
"a",
"zone"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L820-L837 | [
"def",
"list_icmp_block",
"(",
"zone",
",",
"permanent",
"=",
"True",
")",
":",
"cmd",
"=",
"'--zone={0} --list-icmp-blocks'",
".",
"format",
"(",
"zone",
")",
"if",
"permanent",
":",
"cmd",
"+=",
"' --permanent'",
"return",
"__firewall_cmd",
"(",
"cmd",
")",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_interfaces | List interfaces bound to a zone
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.get_interfaces zone | salt/modules/firewalld.py | def get_interfaces(zone, permanent=True):
'''
List interfaces bound to a zone
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.get_interfaces zone
'''
cmd = '--zone={0} --list-interfaces'.format(zone)
if permanent:
cmd += ' --permanent'... | def get_interfaces(zone, permanent=True):
'''
List interfaces bound to a zone
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.get_interfaces zone
'''
cmd = '--zone={0} --list-interfaces'.format(zone)
if permanent:
cmd += ' --permanent'... | [
"List",
"interfaces",
"bound",
"to",
"a",
"zone"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L855-L872 | [
"def",
"get_interfaces",
"(",
"zone",
",",
"permanent",
"=",
"True",
")",
":",
"cmd",
"=",
"'--zone={0} --list-interfaces'",
".",
"format",
"(",
"zone",
")",
"if",
"permanent",
":",
"cmd",
"+=",
"' --permanent'",
"return",
"__firewall_cmd",
"(",
"cmd",
")",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | add_interface | Bind an interface to a zone
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.add_interface zone eth0 | salt/modules/firewalld.py | def add_interface(zone, interface, permanent=True):
'''
Bind an interface to a zone
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.add_interface zone eth0
'''
if interface in get_interfaces(zone, permanent):
log.info('Interface is already ... | def add_interface(zone, interface, permanent=True):
'''
Bind an interface to a zone
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.add_interface zone eth0
'''
if interface in get_interfaces(zone, permanent):
log.info('Interface is already ... | [
"Bind",
"an",
"interface",
"to",
"a",
"zone"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L875-L895 | [
"def",
"add_interface",
"(",
"zone",
",",
"interface",
",",
"permanent",
"=",
"True",
")",
":",
"if",
"interface",
"in",
"get_interfaces",
"(",
"zone",
",",
"permanent",
")",
":",
"log",
".",
"info",
"(",
"'Interface is already bound to zone.'",
")",
"cmd",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_sources | List sources bound to a zone
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.get_sources zone | salt/modules/firewalld.py | def get_sources(zone, permanent=True):
'''
List sources bound to a zone
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.get_sources zone
'''
cmd = '--zone={0} --list-sources'.format(zone)
if permanent:
cmd += ' --permanent'
return... | def get_sources(zone, permanent=True):
'''
List sources bound to a zone
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.get_sources zone
'''
cmd = '--zone={0} --list-sources'.format(zone)
if permanent:
cmd += ' --permanent'
return... | [
"List",
"sources",
"bound",
"to",
"a",
"zone"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L921-L938 | [
"def",
"get_sources",
"(",
"zone",
",",
"permanent",
"=",
"True",
")",
":",
"cmd",
"=",
"'--zone={0} --list-sources'",
".",
"format",
"(",
"zone",
")",
"if",
"permanent",
":",
"cmd",
"+=",
"' --permanent'",
"return",
"__firewall_cmd",
"(",
"cmd",
")",
".",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | add_source | Bind a source to a zone
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.add_source zone 192.168.1.0/24 | salt/modules/firewalld.py | def add_source(zone, source, permanent=True):
'''
Bind a source to a zone
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.add_source zone 192.168.1.0/24
'''
if source in get_sources(zone, permanent):
log.info('Source is already bound to zon... | def add_source(zone, source, permanent=True):
'''
Bind a source to a zone
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.add_source zone 192.168.1.0/24
'''
if source in get_sources(zone, permanent):
log.info('Source is already bound to zon... | [
"Bind",
"a",
"source",
"to",
"a",
"zone"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L941-L961 | [
"def",
"add_source",
"(",
"zone",
",",
"source",
",",
"permanent",
"=",
"True",
")",
":",
"if",
"source",
"in",
"get_sources",
"(",
"zone",
",",
"permanent",
")",
":",
"log",
".",
"info",
"(",
"'Source is already bound to zone.'",
")",
"cmd",
"=",
"'--zone... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_rich_rules | List rich rules bound to a zone
.. versionadded:: 2016.11.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.get_rich_rules zone | salt/modules/firewalld.py | def get_rich_rules(zone, permanent=True):
'''
List rich rules bound to a zone
.. versionadded:: 2016.11.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.get_rich_rules zone
'''
cmd = '--zone={0} --list-rich-rules'.format(zone)
if permanent:
cmd += ' --permanent... | def get_rich_rules(zone, permanent=True):
'''
List rich rules bound to a zone
.. versionadded:: 2016.11.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.get_rich_rules zone
'''
cmd = '--zone={0} --list-rich-rules'.format(zone)
if permanent:
cmd += ' --permanent... | [
"List",
"rich",
"rules",
"bound",
"to",
"a",
"zone"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L987-L1004 | [
"def",
"get_rich_rules",
"(",
"zone",
",",
"permanent",
"=",
"True",
")",
":",
"cmd",
"=",
"'--zone={0} --list-rich-rules'",
".",
"format",
"(",
"zone",
")",
"if",
"permanent",
":",
"cmd",
"+=",
"' --permanent'",
"return",
"__firewall_cmd",
"(",
"cmd",
")",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | add_rich_rule | Add a rich rule to a zone
.. versionadded:: 2016.11.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.add_rich_rule zone 'rule' | salt/modules/firewalld.py | def add_rich_rule(zone, rule, permanent=True):
'''
Add a rich rule to a zone
.. versionadded:: 2016.11.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.add_rich_rule zone 'rule'
'''
cmd = "--zone={0} --add-rich-rule='{1}'".format(zone, rule)
if permanent:
cmd +... | def add_rich_rule(zone, rule, permanent=True):
'''
Add a rich rule to a zone
.. versionadded:: 2016.11.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.add_rich_rule zone 'rule'
'''
cmd = "--zone={0} --add-rich-rule='{1}'".format(zone, rule)
if permanent:
cmd +... | [
"Add",
"a",
"rich",
"rule",
"to",
"a",
"zone"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L1007-L1024 | [
"def",
"add_rich_rule",
"(",
"zone",
",",
"rule",
",",
"permanent",
"=",
"True",
")",
":",
"cmd",
"=",
"\"--zone={0} --add-rich-rule='{1}'\"",
".",
"format",
"(",
"zone",
",",
"rule",
")",
"if",
"permanent",
":",
"cmd",
"+=",
"' --permanent'",
"return",
"__f... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | remove_rich_rule | Add a rich rule to a zone
.. versionadded:: 2016.11.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.remove_rich_rule zone 'rule' | salt/modules/firewalld.py | def remove_rich_rule(zone, rule, permanent=True):
'''
Add a rich rule to a zone
.. versionadded:: 2016.11.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.remove_rich_rule zone 'rule'
'''
cmd = "--zone={0} --remove-rich-rule='{1}'".format(zone, rule)
if permanent:
... | def remove_rich_rule(zone, rule, permanent=True):
'''
Add a rich rule to a zone
.. versionadded:: 2016.11.0
CLI Example:
.. code-block:: bash
salt '*' firewalld.remove_rich_rule zone 'rule'
'''
cmd = "--zone={0} --remove-rich-rule='{1}'".format(zone, rule)
if permanent:
... | [
"Add",
"a",
"rich",
"rule",
"to",
"a",
"zone"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L1027-L1044 | [
"def",
"remove_rich_rule",
"(",
"zone",
",",
"rule",
",",
"permanent",
"=",
"True",
")",
":",
"cmd",
"=",
"\"--zone={0} --remove-rich-rule='{1}'\"",
".",
"format",
"(",
"zone",
",",
"rule",
")",
"if",
"permanent",
":",
"cmd",
"+=",
"' --permanent'",
"return",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | mdadm | Return list of mdadm devices | salt/grains/mdadm.py | def mdadm():
'''
Return list of mdadm devices
'''
devices = set()
try:
with salt.utils.files.fopen('/proc/mdstat', 'r') as mdstat:
for line in mdstat:
line = salt.utils.stringutils.to_unicode(line)
if line.startswith('Personalities : '):
... | def mdadm():
'''
Return list of mdadm devices
'''
devices = set()
try:
with salt.utils.files.fopen('/proc/mdstat', 'r') as mdstat:
for line in mdstat:
line = salt.utils.stringutils.to_unicode(line)
if line.startswith('Personalities : '):
... | [
"Return",
"list",
"of",
"mdadm",
"devices"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/mdadm.py#L16-L38 | [
"def",
"mdadm",
"(",
")",
":",
"devices",
"=",
"set",
"(",
")",
"try",
":",
"with",
"salt",
".",
"utils",
".",
"files",
".",
"fopen",
"(",
"'/proc/mdstat'",
",",
"'r'",
")",
"as",
"mdstat",
":",
"for",
"line",
"in",
"mdstat",
":",
"line",
"=",
"s... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _get_proxy_connection_details | Returns the connection details of the following proxies: esxi | salt/modules/vsphere.py | def _get_proxy_connection_details():
'''
Returns the connection details of the following proxies: esxi
'''
proxytype = get_proxy_type()
if proxytype == 'esxi':
details = __salt__['esxi.get_details']()
elif proxytype == 'esxcluster':
details = __salt__['esxcluster.get_details']()
... | def _get_proxy_connection_details():
'''
Returns the connection details of the following proxies: esxi
'''
proxytype = get_proxy_type()
if proxytype == 'esxi':
details = __salt__['esxi.get_details']()
elif proxytype == 'esxcluster':
details = __salt__['esxcluster.get_details']()
... | [
"Returns",
"the",
"connection",
"details",
"of",
"the",
"following",
"proxies",
":",
"esxi"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L253-L277 | [
"def",
"_get_proxy_connection_details",
"(",
")",
":",
"proxytype",
"=",
"get_proxy_type",
"(",
")",
"if",
"proxytype",
"==",
"'esxi'",
":",
"details",
"=",
"__salt__",
"[",
"'esxi.get_details'",
"]",
"(",
")",
"elif",
"proxytype",
"==",
"'esxcluster'",
":",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | supports_proxies | Decorator to specify which proxy types are supported by a function
proxy_types:
Arbitrary list of strings with the supported types of proxies | salt/modules/vsphere.py | def supports_proxies(*proxy_types):
'''
Decorator to specify which proxy types are supported by a function
proxy_types:
Arbitrary list of strings with the supported types of proxies
'''
def _supports_proxies(fn):
@wraps(fn)
def __supports_proxies(*args, **kwargs):
... | def supports_proxies(*proxy_types):
'''
Decorator to specify which proxy types are supported by a function
proxy_types:
Arbitrary list of strings with the supported types of proxies
'''
def _supports_proxies(fn):
@wraps(fn)
def __supports_proxies(*args, **kwargs):
... | [
"Decorator",
"to",
"specify",
"which",
"proxy",
"types",
"are",
"supported",
"by",
"a",
"function"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L280-L297 | [
"def",
"supports_proxies",
"(",
"*",
"proxy_types",
")",
":",
"def",
"_supports_proxies",
"(",
"fn",
")",
":",
"@",
"wraps",
"(",
"fn",
")",
"def",
"__supports_proxies",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"proxy_type",
"=",
"get_proxy_t... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | gets_service_instance_via_proxy | Decorator that connects to a target system (vCenter or ESXi host) using the
proxy details and passes the connection (vim.ServiceInstance) to
the decorated function.
Supported proxies: esxi, esxcluster, esxdatacenter.
Notes:
1. The decorated function must have a ``service_instance`` parameter
... | salt/modules/vsphere.py | def gets_service_instance_via_proxy(fn):
'''
Decorator that connects to a target system (vCenter or ESXi host) using the
proxy details and passes the connection (vim.ServiceInstance) to
the decorated function.
Supported proxies: esxi, esxcluster, esxdatacenter.
Notes:
1. The decorated ... | def gets_service_instance_via_proxy(fn):
'''
Decorator that connects to a target system (vCenter or ESXi host) using the
proxy details and passes the connection (vim.ServiceInstance) to
the decorated function.
Supported proxies: esxi, esxcluster, esxdatacenter.
Notes:
1. The decorated ... | [
"Decorator",
"that",
"connects",
"to",
"a",
"target",
"system",
"(",
"vCenter",
"or",
"ESXi",
"host",
")",
"using",
"the",
"proxy",
"details",
"and",
"passes",
"the",
"connection",
"(",
"vim",
".",
"ServiceInstance",
")",
"to",
"the",
"decorated",
"function"... | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L300-L392 | [
"def",
"gets_service_instance_via_proxy",
"(",
"fn",
")",
":",
"fn_name",
"=",
"fn",
".",
"__name__",
"try",
":",
"arg_names",
",",
"args_name",
",",
"kwargs_name",
",",
"default_values",
",",
"_",
",",
"_",
",",
"_",
"=",
"inspect",
".",
"getfullargspec",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | esxcli_cmd | Run an ESXCLI command directly on the host or list of hosts.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
cmd_str
The ESXCLI command to run. Note: This should not inc... | salt/modules/vsphere.py | def esxcli_cmd(cmd_str, host=None, username=None, password=None, protocol=None, port=None, esxi_hosts=None, credstore=None):
'''
Run an ESXCLI command directly on the host or list of hosts.
host
The location of the host.
username
The username used to login to the host, such as ``root``... | def esxcli_cmd(cmd_str, host=None, username=None, password=None, protocol=None, port=None, esxi_hosts=None, credstore=None):
'''
Run an ESXCLI command directly on the host or list of hosts.
host
The location of the host.
username
The username used to login to the host, such as ``root``... | [
"Run",
"an",
"ESXCLI",
"command",
"directly",
"on",
"the",
"host",
"or",
"list",
"of",
"hosts",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L436-L505 | [
"def",
"esxcli_cmd",
"(",
"cmd_str",
",",
"host",
"=",
"None",
",",
"username",
"=",
"None",
",",
"password",
"=",
"None",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"esxi_hosts",
"=",
"None",
",",
"credstore",
"=",
"None",
")",
":"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_coredump_network_config | Retrieve information on ESXi or vCenter network dump collection and
format it into a dictionary.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
protocol
Optionally ... | salt/modules/vsphere.py | def get_coredump_network_config(host, username, password, protocol=None, port=None, esxi_hosts=None, credstore=None):
'''
Retrieve information on ESXi or vCenter network dump collection and
format it into a dictionary.
host
The location of the host.
username
The username used to lo... | def get_coredump_network_config(host, username, password, protocol=None, port=None, esxi_hosts=None, credstore=None):
'''
Retrieve information on ESXi or vCenter network dump collection and
format it into a dictionary.
host
The location of the host.
username
The username used to lo... | [
"Retrieve",
"information",
"on",
"ESXi",
"or",
"vCenter",
"network",
"dump",
"collection",
"and",
"format",
"it",
"into",
"a",
"dictionary",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L509-L581 | [
"def",
"get_coredump_network_config",
"(",
"host",
",",
"username",
",",
"password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"esxi_hosts",
"=",
"None",
",",
"credstore",
"=",
"None",
")",
":",
"cmd",
"=",
"'system coredump network get'",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | coredump_network_enable | Enable or disable ESXi core dump collection. Returns ``True`` if coredump is enabled
and returns ``False`` if core dump is not enabled. If there was an error, the error
will be the value printed in the ``Error`` key dictionary for the given host.
host
The location of the host.
username
... | salt/modules/vsphere.py | def coredump_network_enable(host, username, password, enabled, protocol=None, port=None, esxi_hosts=None, credstore=None):
'''
Enable or disable ESXi core dump collection. Returns ``True`` if coredump is enabled
and returns ``False`` if core dump is not enabled. If there was an error, the error
will be ... | def coredump_network_enable(host, username, password, enabled, protocol=None, port=None, esxi_hosts=None, credstore=None):
'''
Enable or disable ESXi core dump collection. Returns ``True`` if coredump is enabled
and returns ``False`` if core dump is not enabled. If there was an error, the error
will be ... | [
"Enable",
"or",
"disable",
"ESXi",
"core",
"dump",
"collection",
".",
"Returns",
"True",
"if",
"coredump",
"is",
"enabled",
"and",
"returns",
"False",
"if",
"core",
"dump",
"is",
"not",
"enabled",
".",
"If",
"there",
"was",
"an",
"error",
"the",
"error",
... | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L585-L659 | [
"def",
"coredump_network_enable",
"(",
"host",
",",
"username",
",",
"password",
",",
"enabled",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"esxi_hosts",
"=",
"None",
",",
"credstore",
"=",
"None",
")",
":",
"if",
"enabled",
":",
"enabl... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | enable_firewall_ruleset | Enable or disable an ESXi firewall rule set.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
ruleset_enable
True to enable the ruleset, false to disable.
ruleset_na... | salt/modules/vsphere.py | def enable_firewall_ruleset(host,
username,
password,
ruleset_enable,
ruleset_name,
protocol=None,
port=None,
esxi_hosts=Non... | def enable_firewall_ruleset(host,
username,
password,
ruleset_enable,
ruleset_name,
protocol=None,
port=None,
esxi_hosts=Non... | [
"Enable",
"or",
"disable",
"an",
"ESXi",
"firewall",
"rule",
"set",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L839-L915 | [
"def",
"enable_firewall_ruleset",
"(",
"host",
",",
"username",
",",
"password",
",",
"ruleset_enable",
",",
"ruleset_name",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"esxi_hosts",
"=",
"None",
",",
"credstore",
"=",
"None",
")",
":",
"c... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | set_syslog_config | Set the specified syslog configuration parameter. By default, this function will
reset the syslog service after the configuration is set.
host
ESXi or vCenter host to connect to.
username
User to connect as, usually root.
password
Password to connect with.
syslog_config
... | salt/modules/vsphere.py | def set_syslog_config(host,
username,
password,
syslog_config,
config_value,
protocol=None,
port=None,
firewall=True,
reset_service=True,
... | def set_syslog_config(host,
username,
password,
syslog_config,
config_value,
protocol=None,
port=None,
firewall=True,
reset_service=True,
... | [
"Set",
"the",
"specified",
"syslog",
"configuration",
"parameter",
".",
"By",
"default",
"this",
"function",
"will",
"reset",
"the",
"syslog",
"service",
"after",
"the",
"configuration",
"is",
"set",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L984-L1118 | [
"def",
"set_syslog_config",
"(",
"host",
",",
"username",
",",
"password",
",",
"syslog_config",
",",
"config_value",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"firewall",
"=",
"True",
",",
"reset_service",
"=",
"True",
",",
"esxi_hosts",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_syslog_config | Retrieve the syslog configuration.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
protocol
Optionally set to alternate protocol if the host is not using the default
... | salt/modules/vsphere.py | def get_syslog_config(host, username, password, protocol=None, port=None, esxi_hosts=None, credstore=None):
'''
Retrieve the syslog configuration.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used t... | def get_syslog_config(host, username, password, protocol=None, port=None, esxi_hosts=None, credstore=None):
'''
Retrieve the syslog configuration.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used t... | [
"Retrieve",
"the",
"syslog",
"configuration",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1122-L1185 | [
"def",
"get_syslog_config",
"(",
"host",
",",
"username",
",",
"password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"esxi_hosts",
"=",
"None",
",",
"credstore",
"=",
"None",
")",
":",
"cmd",
"=",
"'system syslog config get'",
"ret",
"="... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | reset_syslog_config | Reset the syslog service to its default settings.
Valid syslog_config values are ``logdir``, ``loghost``, ``logdir-unique``,
``default-rotate``, ``default-size``, ``default-timeout``,
or ``all`` for all of these.
host
The location of the host.
username
The username used to login t... | salt/modules/vsphere.py | def reset_syslog_config(host,
username,
password,
protocol=None,
port=None,
syslog_config=None,
esxi_hosts=None,
credstore=None):
'''
Reset the ... | def reset_syslog_config(host,
username,
password,
protocol=None,
port=None,
syslog_config=None,
esxi_hosts=None,
credstore=None):
'''
Reset the ... | [
"Reset",
"the",
"syslog",
"service",
"to",
"its",
"default",
"settings",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1189-L1283 | [
"def",
"reset_syslog_config",
"(",
"host",
",",
"username",
",",
"password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"syslog_config",
"=",
"None",
",",
"esxi_hosts",
"=",
"None",
",",
"credstore",
"=",
"None",
")",
":",
"if",
"not",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | upload_ssh_key | Upload an ssh key for root to an ESXi host via http PUT.
This function only works for ESXi, not vCenter.
Only one ssh key can be uploaded for root. Uploading a second key will
replace any existing key.
:param host: The location of the ESXi Host
:param username: Username to connect as
:param pa... | salt/modules/vsphere.py | def upload_ssh_key(host, username, password, ssh_key=None, ssh_key_file=None,
protocol=None, port=None, certificate_verify=False):
'''
Upload an ssh key for root to an ESXi host via http PUT.
This function only works for ESXi, not vCenter.
Only one ssh key can be uploaded for root. U... | def upload_ssh_key(host, username, password, ssh_key=None, ssh_key_file=None,
protocol=None, port=None, certificate_verify=False):
'''
Upload an ssh key for root to an ESXi host via http PUT.
This function only works for ESXi, not vCenter.
Only one ssh key can be uploaded for root. U... | [
"Upload",
"an",
"ssh",
"key",
"for",
"root",
"to",
"an",
"ESXi",
"host",
"via",
"http",
"PUT",
".",
"This",
"function",
"only",
"works",
"for",
"ESXi",
"not",
"vCenter",
".",
"Only",
"one",
"ssh",
"key",
"can",
"be",
"uploaded",
"for",
"root",
".",
"... | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1287-L1355 | [
"def",
"upload_ssh_key",
"(",
"host",
",",
"username",
",",
"password",
",",
"ssh_key",
"=",
"None",
",",
"ssh_key_file",
"=",
"None",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"certificate_verify",
"=",
"False",
")",
":",
"if",
"proto... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_ssh_key | Retrieve the authorized_keys entry for root.
This function only works for ESXi, not vCenter.
:param host: The location of the ESXi Host
:param username: Username to connect as
:param password: Password for the ESXi web endpoint
:param protocol: defaults to https, can be http if ssl is disabled on E... | salt/modules/vsphere.py | def get_ssh_key(host,
username,
password,
protocol=None,
port=None,
certificate_verify=False):
'''
Retrieve the authorized_keys entry for root.
This function only works for ESXi, not vCenter.
:param host: The location of th... | def get_ssh_key(host,
username,
password,
protocol=None,
port=None,
certificate_verify=False):
'''
Retrieve the authorized_keys entry for root.
This function only works for ESXi, not vCenter.
:param host: The location of th... | [
"Retrieve",
"the",
"authorized_keys",
"entry",
"for",
"root",
".",
"This",
"function",
"only",
"works",
"for",
"ESXi",
"not",
"vCenter",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1359-L1412 | [
"def",
"get_ssh_key",
"(",
"host",
",",
"username",
",",
"password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"certificate_verify",
"=",
"False",
")",
":",
"if",
"protocol",
"is",
"None",
":",
"protocol",
"=",
"'https'",
"if",
"port",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_host_datetime | Get the date/time information for a given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
protocol
Optionally set to alternate protocol if th... | salt/modules/vsphere.py | def get_host_datetime(host, username, password, protocol=None, port=None, host_names=None):
'''
Get the date/time information for a given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
... | def get_host_datetime(host, username, password, protocol=None, port=None, host_names=None):
'''
Get the date/time information for a given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
... | [
"Get",
"the",
"date",
"/",
"time",
"information",
"for",
"a",
"given",
"host",
"or",
"list",
"of",
"host_names",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1417-L1471 | [
"def",
"get_host_datetime",
"(",
"host",
",",
"username",
",",
"password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"host_names",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_service_ins... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_ntp_config | Get the NTP configuration information for a given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
protocol
Optionally set to alternate protoc... | salt/modules/vsphere.py | def get_ntp_config(host, username, password, protocol=None, port=None, host_names=None):
'''
Get the NTP configuration information for a given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
... | def get_ntp_config(host, username, password, protocol=None, port=None, host_names=None):
'''
Get the NTP configuration information for a given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
... | [
"Get",
"the",
"NTP",
"configuration",
"information",
"for",
"a",
"given",
"host",
"or",
"list",
"of",
"host_names",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1476-L1529 | [
"def",
"get_ntp_config",
"(",
"host",
",",
"username",
",",
"password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"host_names",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_service_instan... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_service_policy | Get the service name's policy for a given host or list of hosts.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
service_name
The name of the service for which to retrie... | salt/modules/vsphere.py | def get_service_policy(host, username, password, service_name, protocol=None, port=None, host_names=None):
'''
Get the service name's policy for a given host or list of hosts.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
passwor... | def get_service_policy(host, username, password, service_name, protocol=None, port=None, host_names=None):
'''
Get the service name's policy for a given host or list of hosts.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
passwor... | [
"Get",
"the",
"service",
"name",
"s",
"policy",
"for",
"a",
"given",
"host",
"or",
"list",
"of",
"hosts",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1534-L1636 | [
"def",
"get_service_policy",
"(",
"host",
",",
"username",
",",
"password",
",",
"service_name",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"host_names",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
"utils",
".",
"vmware",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_vmotion_enabled | Get the VMotion enabled status for a given host or a list of host_names. Returns ``True``
if VMotion is enabled, ``False`` if it is not enabled.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to logi... | salt/modules/vsphere.py | def get_vmotion_enabled(host, username, password, protocol=None, port=None, host_names=None):
'''
Get the VMotion enabled status for a given host or a list of host_names. Returns ``True``
if VMotion is enabled, ``False`` if it is not enabled.
host
The location of the host.
username
... | def get_vmotion_enabled(host, username, password, protocol=None, port=None, host_names=None):
'''
Get the VMotion enabled status for a given host or a list of host_names. Returns ``True``
if VMotion is enabled, ``False`` if it is not enabled.
host
The location of the host.
username
... | [
"Get",
"the",
"VMotion",
"enabled",
"status",
"for",
"a",
"given",
"host",
"or",
"a",
"list",
"of",
"host_names",
".",
"Returns",
"True",
"if",
"VMotion",
"is",
"enabled",
"False",
"if",
"it",
"is",
"not",
"enabled",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1748-L1805 | [
"def",
"get_vmotion_enabled",
"(",
"host",
",",
"username",
",",
"password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"host_names",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_service_i... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_vsan_enabled | Get the VSAN enabled status for a given host or a list of host_names. Returns ``True``
if VSAN is enabled, ``False`` if it is not enabled, and ``None`` if a VSAN Host Config
is unset, per host.
host
The location of the host.
username
The username used to login to the host, such as ``ro... | salt/modules/vsphere.py | def get_vsan_enabled(host, username, password, protocol=None, port=None, host_names=None):
'''
Get the VSAN enabled status for a given host or a list of host_names. Returns ``True``
if VSAN is enabled, ``False`` if it is not enabled, and ``None`` if a VSAN Host Config
is unset, per host.
host
... | def get_vsan_enabled(host, username, password, protocol=None, port=None, host_names=None):
'''
Get the VSAN enabled status for a given host or a list of host_names. Returns ``True``
if VSAN is enabled, ``False`` if it is not enabled, and ``None`` if a VSAN Host Config
is unset, per host.
host
... | [
"Get",
"the",
"VSAN",
"enabled",
"status",
"for",
"a",
"given",
"host",
"or",
"a",
"list",
"of",
"host_names",
".",
"Returns",
"True",
"if",
"VSAN",
"is",
"enabled",
"False",
"if",
"it",
"is",
"not",
"enabled",
"and",
"None",
"if",
"a",
"VSAN",
"Host",... | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1810-L1872 | [
"def",
"get_vsan_enabled",
"(",
"host",
",",
"username",
",",
"password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"host_names",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_service_inst... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_vsan_eligible_disks | Returns a list of VSAN-eligible disks for a given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
protocol
Optionally set to alternate protoc... | salt/modules/vsphere.py | def get_vsan_eligible_disks(host, username, password, protocol=None, port=None, host_names=None):
'''
Returns a list of VSAN-eligible disks for a given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
pas... | def get_vsan_eligible_disks(host, username, password, protocol=None, port=None, host_names=None):
'''
Returns a list of VSAN-eligible disks for a given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
pas... | [
"Returns",
"a",
"list",
"of",
"VSAN",
"-",
"eligible",
"disks",
"for",
"a",
"given",
"host",
"or",
"list",
"of",
"host_names",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1877-L1947 | [
"def",
"get_vsan_eligible_disks",
"(",
"host",
",",
"username",
",",
"password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"host_names",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_servi... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | system_info | Return system information about a VMware environment.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
protocol
Optionally set to alternate protocol if the host is not us... | salt/modules/vsphere.py | def system_info(host, username, password, protocol=None, port=None):
'''
Return system information about a VMware environment.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.... | def system_info(host, username, password, protocol=None, port=None):
'''
Return system information about a VMware environment.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.... | [
"Return",
"system",
"information",
"about",
"a",
"VMware",
"environment",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1973-L2009 | [
"def",
"system_info",
"(",
"host",
",",
"username",
",",
"password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_service_instance",
"(",
"host",
"=",
"host",
",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_datacenters | Returns a list of datacenters for the the specified host.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
protocol
Optionally set to alternate protocol if the host is no... | salt/modules/vsphere.py | def list_datacenters(host, username, password, protocol=None, port=None):
'''
Returns a list of datacenters for the the specified host.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to ... | def list_datacenters(host, username, password, protocol=None, port=None):
'''
Returns a list of datacenters for the the specified host.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to ... | [
"Returns",
"a",
"list",
"of",
"datacenters",
"for",
"the",
"the",
"specified",
"host",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L2014-L2047 | [
"def",
"list_datacenters",
"(",
"host",
",",
"username",
",",
"password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_service_instance",
"(",
"host",
"=",
"host",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_ssds | Returns a list of SSDs for the given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
protocol
Optionally set to alternate protocol if the hos... | salt/modules/vsphere.py | def list_ssds(host, username, password, protocol=None, port=None, host_names=None):
'''
Returns a list of SSDs for the given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password ... | def list_ssds(host, username, password, protocol=None, port=None, host_names=None):
'''
Returns a list of SSDs for the given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password ... | [
"Returns",
"a",
"list",
"of",
"SSDs",
"for",
"the",
"given",
"host",
"or",
"list",
"of",
"host_names",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L2424-L2480 | [
"def",
"list_ssds",
"(",
"host",
",",
"username",
",",
"password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"host_names",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_service_instance",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | set_ntp_config | Set NTP configuration for a given host of list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
ntp_servers
A list of servers that should be added to and c... | salt/modules/vsphere.py | def set_ntp_config(host, username, password, ntp_servers, protocol=None, port=None, host_names=None):
'''
Set NTP configuration for a given host of list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
... | def set_ntp_config(host, username, password, ntp_servers, protocol=None, port=None, host_names=None):
'''
Set NTP configuration for a given host of list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
... | [
"Set",
"NTP",
"configuration",
"for",
"a",
"given",
"host",
"of",
"list",
"of",
"host_names",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L2553-L2628 | [
"def",
"set_ntp_config",
"(",
"host",
",",
"username",
",",
"password",
",",
"ntp_servers",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"host_names",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
"utils",
".",
"vmware",
".... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | service_start | Start the named service for the given host or list of hosts.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
service_name
The name of the service for which to set the po... | salt/modules/vsphere.py | def service_start(host,
username,
password,
service_name,
protocol=None,
port=None,
host_names=None):
'''
Start the named service for the given host or list of hosts.
host
The location of the... | def service_start(host,
username,
password,
service_name,
protocol=None,
port=None,
host_names=None):
'''
Start the named service for the given host or list of hosts.
host
The location of the... | [
"Start",
"the",
"named",
"service",
"for",
"the",
"given",
"host",
"or",
"list",
"of",
"hosts",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L2633-L2739 | [
"def",
"service_start",
"(",
"host",
",",
"username",
",",
"password",
",",
"service_name",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"host_names",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
"utils",
".",
"vmware",
".... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | set_service_policy | Set the service name's policy for a given host or list of hosts.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
service_name
The name of the service for which to set th... | salt/modules/vsphere.py | def set_service_policy(host,
username,
password,
service_name,
service_policy,
protocol=None,
port=None,
host_names=None):
'''
Set the service name's p... | def set_service_policy(host,
username,
password,
service_name,
service_policy,
protocol=None,
port=None,
host_names=None):
'''
Set the service name's p... | [
"Set",
"the",
"service",
"name",
"s",
"policy",
"for",
"a",
"given",
"host",
"or",
"list",
"of",
"hosts",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L2966-L3090 | [
"def",
"set_service_policy",
"(",
"host",
",",
"username",
",",
"password",
",",
"service_name",
",",
"service_policy",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"host_names",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | update_host_datetime | Update the date/time on the given host or list of host_names. This function should be
used with caution since network delays and execution delays can result in time skews.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
... | salt/modules/vsphere.py | def update_host_datetime(host, username, password, protocol=None, port=None, host_names=None):
'''
Update the date/time on the given host or list of host_names. This function should be
used with caution since network delays and execution delays can result in time skews.
host
The location of the... | def update_host_datetime(host, username, password, protocol=None, port=None, host_names=None):
'''
Update the date/time on the given host or list of host_names. This function should be
used with caution since network delays and execution delays can result in time skews.
host
The location of the... | [
"Update",
"the",
"date",
"/",
"time",
"on",
"the",
"given",
"host",
"or",
"list",
"of",
"host_names",
".",
"This",
"function",
"should",
"be",
"used",
"with",
"caution",
"since",
"network",
"delays",
"and",
"execution",
"delays",
"can",
"result",
"in",
"ti... | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3095-L3157 | [
"def",
"update_host_datetime",
"(",
"host",
",",
"username",
",",
"password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"host_names",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_service_... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | update_host_password | Update the password for a given host.
.. note:: Currently only works with connections to ESXi hosts. Does not work with vCenter servers.
host
The location of the ESXi host.
username
The username used to login to the ESXi host, such as ``root``.
password
The password used to l... | salt/modules/vsphere.py | def update_host_password(host, username, password, new_password, protocol=None, port=None):
'''
Update the password for a given host.
.. note:: Currently only works with connections to ESXi hosts. Does not work with vCenter servers.
host
The location of the ESXi host.
username
The... | def update_host_password(host, username, password, new_password, protocol=None, port=None):
'''
Update the password for a given host.
.. note:: Currently only works with connections to ESXi hosts. Does not work with vCenter servers.
host
The location of the ESXi host.
username
The... | [
"Update",
"the",
"password",
"for",
"a",
"given",
"host",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3162-L3220 | [
"def",
"update_host_password",
"(",
"host",
",",
"username",
",",
"password",
",",
"new_password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_service_instance",
"(... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | vmotion_disable | Disable vMotion for a given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
protocol
Optionally set to alternate protocol if the host is not ... | salt/modules/vsphere.py | def vmotion_disable(host, username, password, protocol=None, port=None, host_names=None):
'''
Disable vMotion for a given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password use... | def vmotion_disable(host, username, password, protocol=None, port=None, host_names=None):
'''
Disable vMotion for a given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password use... | [
"Disable",
"vMotion",
"for",
"a",
"given",
"host",
"or",
"list",
"of",
"host_names",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3225-L3289 | [
"def",
"vmotion_disable",
"(",
"host",
",",
"username",
",",
"password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"host_names",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_service_insta... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | vsan_add_disks | Add any VSAN-eligible disks to the VSAN System for the given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
protocol
Optionally set to alter... | salt/modules/vsphere.py | def vsan_add_disks(host, username, password, protocol=None, port=None, host_names=None):
'''
Add any VSAN-eligible disks to the VSAN System for the given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
p... | def vsan_add_disks(host, username, password, protocol=None, port=None, host_names=None):
'''
Add any VSAN-eligible disks to the VSAN System for the given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
p... | [
"Add",
"any",
"VSAN",
"-",
"eligible",
"disks",
"to",
"the",
"VSAN",
"System",
"for",
"the",
"given",
"host",
"or",
"list",
"of",
"host_names",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3367-L3469 | [
"def",
"vsan_add_disks",
"(",
"host",
",",
"username",
",",
"password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"host_names",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_service_instan... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | vsan_disable | Disable VSAN for a given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to login to the host.
protocol
Optionally set to alternate protocol if the host is not usi... | salt/modules/vsphere.py | def vsan_disable(host, username, password, protocol=None, port=None, host_names=None):
'''
Disable VSAN for a given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to l... | def vsan_disable(host, username, password, protocol=None, port=None, host_names=None):
'''
Disable VSAN for a given host or list of host_names.
host
The location of the host.
username
The username used to login to the host, such as ``root``.
password
The password used to l... | [
"Disable",
"VSAN",
"for",
"a",
"given",
"host",
"or",
"list",
"of",
"host_names",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3474-L3554 | [
"def",
"vsan_disable",
"(",
"host",
",",
"username",
",",
"password",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
",",
"host_names",
"=",
"None",
")",
":",
"service_instance",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_service_instance... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _get_dvs_config_dict | Returns the dict representation of the DVS config
dvs_name
The name of the DVS
dvs_config
The DVS config | salt/modules/vsphere.py | def _get_dvs_config_dict(dvs_name, dvs_config):
'''
Returns the dict representation of the DVS config
dvs_name
The name of the DVS
dvs_config
The DVS config
'''
log.trace('Building the dict of the DVS \'%s\' config', dvs_name)
conf_dict = {'name': dvs_name,
... | def _get_dvs_config_dict(dvs_name, dvs_config):
'''
Returns the dict representation of the DVS config
dvs_name
The name of the DVS
dvs_config
The DVS config
'''
log.trace('Building the dict of the DVS \'%s\' config', dvs_name)
conf_dict = {'name': dvs_name,
... | [
"Returns",
"the",
"dict",
"representation",
"of",
"the",
"DVS",
"config"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3642-L3667 | [
"def",
"_get_dvs_config_dict",
"(",
"dvs_name",
",",
"dvs_config",
")",
":",
"log",
".",
"trace",
"(",
"'Building the dict of the DVS \\'%s\\' config'",
",",
"dvs_name",
")",
"conf_dict",
"=",
"{",
"'name'",
":",
"dvs_name",
",",
"'contact_email'",
":",
"dvs_config"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _get_dvs_link_discovery_protocol | Returns the dict representation of the DVS link discovery protocol
dvs_name
The name of the DVS
dvs_link_disc_protocl
The DVS link discovery protocol | salt/modules/vsphere.py | def _get_dvs_link_discovery_protocol(dvs_name, dvs_link_disc_protocol):
'''
Returns the dict representation of the DVS link discovery protocol
dvs_name
The name of the DVS
dvs_link_disc_protocl
The DVS link discovery protocol
'''
log.trace('Building the dict of the DVS \'%s\' l... | def _get_dvs_link_discovery_protocol(dvs_name, dvs_link_disc_protocol):
'''
Returns the dict representation of the DVS link discovery protocol
dvs_name
The name of the DVS
dvs_link_disc_protocl
The DVS link discovery protocol
'''
log.trace('Building the dict of the DVS \'%s\' l... | [
"Returns",
"the",
"dict",
"representation",
"of",
"the",
"DVS",
"link",
"discovery",
"protocol"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3670-L3682 | [
"def",
"_get_dvs_link_discovery_protocol",
"(",
"dvs_name",
",",
"dvs_link_disc_protocol",
")",
":",
"log",
".",
"trace",
"(",
"'Building the dict of the DVS \\'%s\\' link discovery protocol'",
",",
"dvs_name",
")",
"return",
"{",
"'operation'",
":",
"dvs_link_disc_protocol",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _get_dvs_product_info | Returns the dict representation of the DVS product_info
dvs_name
The name of the DVS
dvs_product_info
The DVS product info | salt/modules/vsphere.py | def _get_dvs_product_info(dvs_name, dvs_product_info):
'''
Returns the dict representation of the DVS product_info
dvs_name
The name of the DVS
dvs_product_info
The DVS product info
'''
log.trace('Building the dict of the DVS \'%s\' product info', dvs_name)
return {'name': ... | def _get_dvs_product_info(dvs_name, dvs_product_info):
'''
Returns the dict representation of the DVS product_info
dvs_name
The name of the DVS
dvs_product_info
The DVS product info
'''
log.trace('Building the dict of the DVS \'%s\' product info', dvs_name)
return {'name': ... | [
"Returns",
"the",
"dict",
"representation",
"of",
"the",
"DVS",
"product_info"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3685-L3698 | [
"def",
"_get_dvs_product_info",
"(",
"dvs_name",
",",
"dvs_product_info",
")",
":",
"log",
".",
"trace",
"(",
"'Building the dict of the DVS \\'%s\\' product info'",
",",
"dvs_name",
")",
"return",
"{",
"'name'",
":",
"dvs_product_info",
".",
"name",
",",
"'vendor'",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _get_dvs_capability | Returns the dict representation of the DVS product_info
dvs_name
The name of the DVS
dvs_capability
The DVS capability | salt/modules/vsphere.py | def _get_dvs_capability(dvs_name, dvs_capability):
'''
Returns the dict representation of the DVS product_info
dvs_name
The name of the DVS
dvs_capability
The DVS capability
'''
log.trace('Building the dict of the DVS \'%s\' capability', dvs_name)
return {'operation_support... | def _get_dvs_capability(dvs_name, dvs_capability):
'''
Returns the dict representation of the DVS product_info
dvs_name
The name of the DVS
dvs_capability
The DVS capability
'''
log.trace('Building the dict of the DVS \'%s\' capability', dvs_name)
return {'operation_support... | [
"Returns",
"the",
"dict",
"representation",
"of",
"the",
"DVS",
"product_info"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3701-L3715 | [
"def",
"_get_dvs_capability",
"(",
"dvs_name",
",",
"dvs_capability",
")",
":",
"log",
".",
"trace",
"(",
"'Building the dict of the DVS \\'%s\\' capability'",
",",
"dvs_name",
")",
"return",
"{",
"'operation_supported'",
":",
"dvs_capability",
".",
"dvsOperationSupported... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _get_dvs_infrastructure_traffic_resources | Returns a list of dict representations of the DVS infrastructure traffic
resource
dvs_name
The name of the DVS
dvs_infra_traffic_ress
The DVS infrastructure traffic resources | salt/modules/vsphere.py | def _get_dvs_infrastructure_traffic_resources(dvs_name,
dvs_infra_traffic_ress):
'''
Returns a list of dict representations of the DVS infrastructure traffic
resource
dvs_name
The name of the DVS
dvs_infra_traffic_ress
The DVS infrastru... | def _get_dvs_infrastructure_traffic_resources(dvs_name,
dvs_infra_traffic_ress):
'''
Returns a list of dict representations of the DVS infrastructure traffic
resource
dvs_name
The name of the DVS
dvs_infra_traffic_ress
The DVS infrastru... | [
"Returns",
"a",
"list",
"of",
"dict",
"representations",
"of",
"the",
"DVS",
"infrastructure",
"traffic",
"resource"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3718-L3741 | [
"def",
"_get_dvs_infrastructure_traffic_resources",
"(",
"dvs_name",
",",
"dvs_infra_traffic_ress",
")",
":",
"log",
".",
"trace",
"(",
"'Building the dicts of the DVS \\'%s\\' infrastructure '",
"'traffic resources'",
",",
"dvs_name",
")",
"res_dicts",
"=",
"[",
"]",
"for"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_dvss | Returns a list of distributed virtual switches (DVSs).
The list can be filtered by the datacenter or DVS names.
datacenter
The datacenter to look for DVSs in.
Default value is None.
dvs_names
List of DVS names to look for. If None, all DVSs are returned.
Default value is No... | salt/modules/vsphere.py | def list_dvss(datacenter=None, dvs_names=None, service_instance=None):
'''
Returns a list of distributed virtual switches (DVSs).
The list can be filtered by the datacenter or DVS names.
datacenter
The datacenter to look for DVSs in.
Default value is None.
dvs_names
List of... | def list_dvss(datacenter=None, dvs_names=None, service_instance=None):
'''
Returns a list of distributed virtual switches (DVSs).
The list can be filtered by the datacenter or DVS names.
datacenter
The datacenter to look for DVSs in.
Default value is None.
dvs_names
List of... | [
"Returns",
"a",
"list",
"of",
"distributed",
"virtual",
"switches",
"(",
"DVSs",
")",
".",
"The",
"list",
"can",
"be",
"filtered",
"by",
"the",
"datacenter",
"or",
"DVS",
"names",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3747-L3807 | [
"def",
"list_dvss",
"(",
"datacenter",
"=",
"None",
",",
"dvs_names",
"=",
"None",
",",
"service_instance",
"=",
"None",
")",
":",
"ret_list",
"=",
"[",
"]",
"proxy_type",
"=",
"get_proxy_type",
"(",
")",
"if",
"proxy_type",
"==",
"'esxdatacenter'",
":",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _apply_dvs_config | Applies the values of the config dict dictionary to a config spec
(vim.VMwareDVSConfigSpec) | salt/modules/vsphere.py | def _apply_dvs_config(config_spec, config_dict):
'''
Applies the values of the config dict dictionary to a config spec
(vim.VMwareDVSConfigSpec)
'''
if config_dict.get('name'):
config_spec.name = config_dict['name']
if config_dict.get('contact_email') or config_dict.get('contact_name'):
... | def _apply_dvs_config(config_spec, config_dict):
'''
Applies the values of the config dict dictionary to a config spec
(vim.VMwareDVSConfigSpec)
'''
if config_dict.get('name'):
config_spec.name = config_dict['name']
if config_dict.get('contact_email') or config_dict.get('contact_name'):
... | [
"Applies",
"the",
"values",
"of",
"the",
"config",
"dict",
"dictionary",
"to",
"a",
"config",
"spec",
"(",
"vim",
".",
"VMwareDVSConfigSpec",
")"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3810-L3839 | [
"def",
"_apply_dvs_config",
"(",
"config_spec",
",",
"config_dict",
")",
":",
"if",
"config_dict",
".",
"get",
"(",
"'name'",
")",
":",
"config_spec",
".",
"name",
"=",
"config_dict",
"[",
"'name'",
"]",
"if",
"config_dict",
".",
"get",
"(",
"'contact_email'... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _apply_dvs_product_info | Applies the values of the product_info_dict dictionary to a product info
spec (vim.DistributedVirtualSwitchProductSpec) | salt/modules/vsphere.py | def _apply_dvs_product_info(product_info_spec, product_info_dict):
'''
Applies the values of the product_info_dict dictionary to a product info
spec (vim.DistributedVirtualSwitchProductSpec)
'''
if product_info_dict.get('name'):
product_info_spec.name = product_info_dict['name']
if produ... | def _apply_dvs_product_info(product_info_spec, product_info_dict):
'''
Applies the values of the product_info_dict dictionary to a product info
spec (vim.DistributedVirtualSwitchProductSpec)
'''
if product_info_dict.get('name'):
product_info_spec.name = product_info_dict['name']
if produ... | [
"Applies",
"the",
"values",
"of",
"the",
"product_info_dict",
"dictionary",
"to",
"a",
"product",
"info",
"spec",
"(",
"vim",
".",
"DistributedVirtualSwitchProductSpec",
")"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3851-L3861 | [
"def",
"_apply_dvs_product_info",
"(",
"product_info_spec",
",",
"product_info_dict",
")",
":",
"if",
"product_info_dict",
".",
"get",
"(",
"'name'",
")",
":",
"product_info_spec",
".",
"name",
"=",
"product_info_dict",
"[",
"'name'",
"]",
"if",
"product_info_dict",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _apply_dvs_capability | Applies the values of the capability_dict dictionary to a DVS capability
object (vim.vim.DVSCapability) | salt/modules/vsphere.py | def _apply_dvs_capability(capability_spec, capability_dict):
'''
Applies the values of the capability_dict dictionary to a DVS capability
object (vim.vim.DVSCapability)
'''
if 'operation_supported' in capability_dict:
capability_spec.dvsOperationSupported = \
capability_dict[... | def _apply_dvs_capability(capability_spec, capability_dict):
'''
Applies the values of the capability_dict dictionary to a DVS capability
object (vim.vim.DVSCapability)
'''
if 'operation_supported' in capability_dict:
capability_spec.dvsOperationSupported = \
capability_dict[... | [
"Applies",
"the",
"values",
"of",
"the",
"capability_dict",
"dictionary",
"to",
"a",
"DVS",
"capability",
"object",
"(",
"vim",
".",
"vim",
".",
"DVSCapability",
")"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3864-L3877 | [
"def",
"_apply_dvs_capability",
"(",
"capability_spec",
",",
"capability_dict",
")",
":",
"if",
"'operation_supported'",
"in",
"capability_dict",
":",
"capability_spec",
".",
"dvsOperationSupported",
"=",
"capability_dict",
"[",
"'operation_supported'",
"]",
"if",
"'port_... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _apply_dvs_infrastructure_traffic_resources | Applies the values of the resource dictionaries to infra traffic resources,
creating the infra traffic resource if required
(vim.DistributedVirtualSwitchProductSpec) | salt/modules/vsphere.py | def _apply_dvs_infrastructure_traffic_resources(infra_traffic_resources,
resource_dicts):
'''
Applies the values of the resource dictionaries to infra traffic resources,
creating the infra traffic resource if required
(vim.DistributedVirtualSwitchProductSp... | def _apply_dvs_infrastructure_traffic_resources(infra_traffic_resources,
resource_dicts):
'''
Applies the values of the resource dictionaries to infra traffic resources,
creating the infra traffic resource if required
(vim.DistributedVirtualSwitchProductSp... | [
"Applies",
"the",
"values",
"of",
"the",
"resource",
"dictionaries",
"to",
"infra",
"traffic",
"resources",
"creating",
"the",
"infra",
"traffic",
"resource",
"if",
"required",
"(",
"vim",
".",
"DistributedVirtualSwitchProductSpec",
")"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3880-L3911 | [
"def",
"_apply_dvs_infrastructure_traffic_resources",
"(",
"infra_traffic_resources",
",",
"resource_dicts",
")",
":",
"for",
"res_dict",
"in",
"resource_dicts",
":",
"filtered_traffic_resources",
"=",
"[",
"r",
"for",
"r",
"in",
"infra_traffic_resources",
"if",
"r",
".... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _apply_dvs_network_resource_pools | Applies the values of the resource dictionaries to network resource pools,
creating the resource pools if required
(vim.DVSNetworkResourcePoolConfigSpec) | salt/modules/vsphere.py | def _apply_dvs_network_resource_pools(network_resource_pools, resource_dicts):
'''
Applies the values of the resource dictionaries to network resource pools,
creating the resource pools if required
(vim.DVSNetworkResourcePoolConfigSpec)
'''
for res_dict in resource_dicts:
ress = [r for r... | def _apply_dvs_network_resource_pools(network_resource_pools, resource_dicts):
'''
Applies the values of the resource dictionaries to network resource pools,
creating the resource pools if required
(vim.DVSNetworkResourcePoolConfigSpec)
'''
for res_dict in resource_dicts:
ress = [r for r... | [
"Applies",
"the",
"values",
"of",
"the",
"resource",
"dictionaries",
"to",
"network",
"resource",
"pools",
"creating",
"the",
"resource",
"pools",
"if",
"required",
"(",
"vim",
".",
"DVSNetworkResourcePoolConfigSpec",
")"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3914-L3937 | [
"def",
"_apply_dvs_network_resource_pools",
"(",
"network_resource_pools",
",",
"resource_dicts",
")",
":",
"for",
"res_dict",
"in",
"resource_dicts",
":",
"ress",
"=",
"[",
"r",
"for",
"r",
"in",
"network_resource_pools",
"if",
"r",
".",
"key",
"==",
"res_dict",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_dvs | Creates a distributed virtual switch (DVS).
Note: The ``dvs_name`` param will override any name set in ``dvs_dict``.
dvs_dict
Dict representation of the new DVS (example in salt.states.dvs)
dvs_name
Name of the DVS to be created.
service_instance
Service instance (vim.Service... | salt/modules/vsphere.py | def create_dvs(dvs_dict, dvs_name, service_instance=None):
'''
Creates a distributed virtual switch (DVS).
Note: The ``dvs_name`` param will override any name set in ``dvs_dict``.
dvs_dict
Dict representation of the new DVS (example in salt.states.dvs)
dvs_name
Name of the DVS to ... | def create_dvs(dvs_dict, dvs_name, service_instance=None):
'''
Creates a distributed virtual switch (DVS).
Note: The ``dvs_name`` param will override any name set in ``dvs_dict``.
dvs_dict
Dict representation of the new DVS (example in salt.states.dvs)
dvs_name
Name of the DVS to ... | [
"Creates",
"a",
"distributed",
"virtual",
"switch",
"(",
"DVS",
")",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3943-L4008 | [
"def",
"create_dvs",
"(",
"dvs_dict",
",",
"dvs_name",
",",
"service_instance",
"=",
"None",
")",
":",
"log",
".",
"trace",
"(",
"'Creating dvs \\'%s\\' with dict = %s'",
",",
"dvs_name",
",",
"dvs_dict",
")",
"proxy_type",
"=",
"get_proxy_type",
"(",
")",
"if",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | update_dvs | Updates a distributed virtual switch (DVS).
Note: Updating the product info, capability, uplinks of a DVS is not
supported so the corresponding entries in ``dvs_dict`` will be
ignored.
dvs_dict
Dictionary with the values the DVS should be update with
(example in salt.states... | salt/modules/vsphere.py | def update_dvs(dvs_dict, dvs, service_instance=None):
'''
Updates a distributed virtual switch (DVS).
Note: Updating the product info, capability, uplinks of a DVS is not
supported so the corresponding entries in ``dvs_dict`` will be
ignored.
dvs_dict
Dictionary with the va... | def update_dvs(dvs_dict, dvs, service_instance=None):
'''
Updates a distributed virtual switch (DVS).
Note: Updating the product info, capability, uplinks of a DVS is not
supported so the corresponding entries in ``dvs_dict`` will be
ignored.
dvs_dict
Dictionary with the va... | [
"Updates",
"a",
"distributed",
"virtual",
"switch",
"(",
"DVS",
")",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4014-L4086 | [
"def",
"update_dvs",
"(",
"dvs_dict",
",",
"dvs",
",",
"service_instance",
"=",
"None",
")",
":",
"# Remove ignored properties",
"log",
".",
"trace",
"(",
"'Updating dvs \\'%s\\' with dict = %s'",
",",
"dvs",
",",
"dvs_dict",
")",
"for",
"prop",
"in",
"[",
"'pro... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _get_dvportgroup_out_shaping | Returns the out shaping policy of a distributed virtual portgroup
pg_name
The name of the portgroup
pg_default_port_config
The dafault port config of the portgroup | salt/modules/vsphere.py | def _get_dvportgroup_out_shaping(pg_name, pg_default_port_config):
'''
Returns the out shaping policy of a distributed virtual portgroup
pg_name
The name of the portgroup
pg_default_port_config
The dafault port config of the portgroup
'''
log.trace('Retrieving portgroup\'s \'%s... | def _get_dvportgroup_out_shaping(pg_name, pg_default_port_config):
'''
Returns the out shaping policy of a distributed virtual portgroup
pg_name
The name of the portgroup
pg_default_port_config
The dafault port config of the portgroup
'''
log.trace('Retrieving portgroup\'s \'%s... | [
"Returns",
"the",
"out",
"shaping",
"policy",
"of",
"a",
"distributed",
"virtual",
"portgroup"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4089-L4106 | [
"def",
"_get_dvportgroup_out_shaping",
"(",
"pg_name",
",",
"pg_default_port_config",
")",
":",
"log",
".",
"trace",
"(",
"'Retrieving portgroup\\'s \\'%s\\' out shaping config'",
",",
"pg_name",
")",
"out_shaping_policy",
"=",
"pg_default_port_config",
".",
"outShapingPolicy... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _get_dvportgroup_security_policy | Returns the security policy of a distributed virtual portgroup
pg_name
The name of the portgroup
pg_default_port_config
The dafault port config of the portgroup | salt/modules/vsphere.py | def _get_dvportgroup_security_policy(pg_name, pg_default_port_config):
'''
Returns the security policy of a distributed virtual portgroup
pg_name
The name of the portgroup
pg_default_port_config
The dafault port config of the portgroup
'''
log.trace('Retrieving portgroup\'s \'%... | def _get_dvportgroup_security_policy(pg_name, pg_default_port_config):
'''
Returns the security policy of a distributed virtual portgroup
pg_name
The name of the portgroup
pg_default_port_config
The dafault port config of the portgroup
'''
log.trace('Retrieving portgroup\'s \'%... | [
"Returns",
"the",
"security",
"policy",
"of",
"a",
"distributed",
"virtual",
"portgroup"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4109-L4125 | [
"def",
"_get_dvportgroup_security_policy",
"(",
"pg_name",
",",
"pg_default_port_config",
")",
":",
"log",
".",
"trace",
"(",
"'Retrieving portgroup\\'s \\'%s\\' security policy config'",
",",
"pg_name",
")",
"sec_policy",
"=",
"pg_default_port_config",
".",
"securityPolicy",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _get_dvportgroup_teaming | Returns the teaming of a distributed virtual portgroup
pg_name
The name of the portgroup
pg_default_port_config
The dafault port config of the portgroup | salt/modules/vsphere.py | def _get_dvportgroup_teaming(pg_name, pg_default_port_config):
'''
Returns the teaming of a distributed virtual portgroup
pg_name
The name of the portgroup
pg_default_port_config
The dafault port config of the portgroup
'''
log.trace('Retrieving portgroup\'s \'%s\' teaming conf... | def _get_dvportgroup_teaming(pg_name, pg_default_port_config):
'''
Returns the teaming of a distributed virtual portgroup
pg_name
The name of the portgroup
pg_default_port_config
The dafault port config of the portgroup
'''
log.trace('Retrieving portgroup\'s \'%s\' teaming conf... | [
"Returns",
"the",
"teaming",
"of",
"a",
"distributed",
"virtual",
"portgroup"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4128-L4161 | [
"def",
"_get_dvportgroup_teaming",
"(",
"pg_name",
",",
"pg_default_port_config",
")",
":",
"log",
".",
"trace",
"(",
"'Retrieving portgroup\\'s \\'%s\\' teaming config'",
",",
"pg_name",
")",
"teaming_policy",
"=",
"pg_default_port_config",
".",
"uplinkTeamingPolicy",
"if"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _get_dvportgroup_dict | Returns a dictionary with a distributed virutal portgroup data
pg_ref
Portgroup reference | salt/modules/vsphere.py | def _get_dvportgroup_dict(pg_ref):
'''
Returns a dictionary with a distributed virutal portgroup data
pg_ref
Portgroup reference
'''
props = salt.utils.vmware.get_properties_of_managed_object(
pg_ref, ['name', 'config.description', 'config.numPorts',
'config.type',... | def _get_dvportgroup_dict(pg_ref):
'''
Returns a dictionary with a distributed virutal portgroup data
pg_ref
Portgroup reference
'''
props = salt.utils.vmware.get_properties_of_managed_object(
pg_ref, ['name', 'config.description', 'config.numPorts',
'config.type',... | [
"Returns",
"a",
"dictionary",
"with",
"a",
"distributed",
"virutal",
"portgroup",
"data"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4164-L4198 | [
"def",
"_get_dvportgroup_dict",
"(",
"pg_ref",
")",
":",
"props",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_properties_of_managed_object",
"(",
"pg_ref",
",",
"[",
"'name'",
",",
"'config.description'",
",",
"'config.numPorts'",
",",
"'config.type'",
","... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_dvportgroups | Returns a list of distributed virtual switch portgroups.
The list can be filtered by the portgroup names or by the DVS.
dvs
Name of the DVS containing the portgroups.
Default value is None.
portgroup_names
List of portgroup names to look for. If None, all portgroups are
ret... | salt/modules/vsphere.py | def list_dvportgroups(dvs=None, portgroup_names=None, service_instance=None):
'''
Returns a list of distributed virtual switch portgroups.
The list can be filtered by the portgroup names or by the DVS.
dvs
Name of the DVS containing the portgroups.
Default value is None.
portgroup_... | def list_dvportgroups(dvs=None, portgroup_names=None, service_instance=None):
'''
Returns a list of distributed virtual switch portgroups.
The list can be filtered by the portgroup names or by the DVS.
dvs
Name of the DVS containing the portgroups.
Default value is None.
portgroup_... | [
"Returns",
"a",
"list",
"of",
"distributed",
"virtual",
"switch",
"portgroups",
".",
"The",
"list",
"can",
"be",
"filtered",
"by",
"the",
"portgroup",
"names",
"or",
"by",
"the",
"DVS",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4204-L4253 | [
"def",
"list_dvportgroups",
"(",
"dvs",
"=",
"None",
",",
"portgroup_names",
"=",
"None",
",",
"service_instance",
"=",
"None",
")",
":",
"ret_dict",
"=",
"[",
"]",
"proxy_type",
"=",
"get_proxy_type",
"(",
")",
"if",
"proxy_type",
"==",
"'esxdatacenter'",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_uplink_dvportgroup | Returns the uplink portgroup of a distributed virtual switch.
dvs
Name of the DVS containing the portgroup.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
Default is None.
.. code-block:: bash
salt '*' vsphere.list_uplink_dvportgroup dvs=dvs_name | salt/modules/vsphere.py | def list_uplink_dvportgroup(dvs, service_instance=None):
'''
Returns the uplink portgroup of a distributed virtual switch.
dvs
Name of the DVS containing the portgroup.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
Default is None.
.. code-block::... | def list_uplink_dvportgroup(dvs, service_instance=None):
'''
Returns the uplink portgroup of a distributed virtual switch.
dvs
Name of the DVS containing the portgroup.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
Default is None.
.. code-block::... | [
"Returns",
"the",
"uplink",
"portgroup",
"of",
"a",
"distributed",
"virtual",
"switch",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4259-L4286 | [
"def",
"list_uplink_dvportgroup",
"(",
"dvs",
",",
"service_instance",
"=",
"None",
")",
":",
"proxy_type",
"=",
"get_proxy_type",
"(",
")",
"if",
"proxy_type",
"==",
"'esxdatacenter'",
":",
"datacenter",
"=",
"__salt__",
"[",
"'esxdatacenter.get_details'",
"]",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _apply_dvportgroup_out_shaping | Applies the values in out_shaping_conf to an out_shaping object
pg_name
The name of the portgroup
out_shaping
The vim.DVSTrafficShapingPolicy to apply the config to
out_shaping_conf
The out shaping config | salt/modules/vsphere.py | def _apply_dvportgroup_out_shaping(pg_name, out_shaping, out_shaping_conf):
'''
Applies the values in out_shaping_conf to an out_shaping object
pg_name
The name of the portgroup
out_shaping
The vim.DVSTrafficShapingPolicy to apply the config to
out_shaping_conf
The out sha... | def _apply_dvportgroup_out_shaping(pg_name, out_shaping, out_shaping_conf):
'''
Applies the values in out_shaping_conf to an out_shaping object
pg_name
The name of the portgroup
out_shaping
The vim.DVSTrafficShapingPolicy to apply the config to
out_shaping_conf
The out sha... | [
"Applies",
"the",
"values",
"in",
"out_shaping_conf",
"to",
"an",
"out_shaping",
"object"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4289-L4315 | [
"def",
"_apply_dvportgroup_out_shaping",
"(",
"pg_name",
",",
"out_shaping",
",",
"out_shaping_conf",
")",
":",
"log",
".",
"trace",
"(",
"'Building portgroup\\'s \\'%s\\' out shaping policy'",
",",
"pg_name",
")",
"if",
"out_shaping_conf",
".",
"get",
"(",
"'average_ba... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _apply_dvportgroup_security_policy | Applies the values in sec_policy_conf to a security policy object
pg_name
The name of the portgroup
sec_policy
The vim.DVSTrafficShapingPolicy to apply the config to
sec_policy_conf
The out shaping config | salt/modules/vsphere.py | def _apply_dvportgroup_security_policy(pg_name, sec_policy, sec_policy_conf):
'''
Applies the values in sec_policy_conf to a security policy object
pg_name
The name of the portgroup
sec_policy
The vim.DVSTrafficShapingPolicy to apply the config to
sec_policy_conf
The out s... | def _apply_dvportgroup_security_policy(pg_name, sec_policy, sec_policy_conf):
'''
Applies the values in sec_policy_conf to a security policy object
pg_name
The name of the portgroup
sec_policy
The vim.DVSTrafficShapingPolicy to apply the config to
sec_policy_conf
The out s... | [
"Applies",
"the",
"values",
"in",
"sec_policy_conf",
"to",
"a",
"security",
"policy",
"object"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4318-L4341 | [
"def",
"_apply_dvportgroup_security_policy",
"(",
"pg_name",
",",
"sec_policy",
",",
"sec_policy_conf",
")",
":",
"log",
".",
"trace",
"(",
"'Building portgroup\\'s \\'%s\\' security policy '",
",",
"pg_name",
")",
"if",
"'allow_promiscuous'",
"in",
"sec_policy_conf",
":"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _apply_dvportgroup_teaming | Applies the values in teaming_conf to a teaming policy object
pg_name
The name of the portgroup
teaming
The vim.VmwareUplinkPortTeamingPolicy to apply the config to
teaming_conf
The teaming config | salt/modules/vsphere.py | def _apply_dvportgroup_teaming(pg_name, teaming, teaming_conf):
'''
Applies the values in teaming_conf to a teaming policy object
pg_name
The name of the portgroup
teaming
The vim.VmwareUplinkPortTeamingPolicy to apply the config to
teaming_conf
The teaming config
'''
... | def _apply_dvportgroup_teaming(pg_name, teaming, teaming_conf):
'''
Applies the values in teaming_conf to a teaming policy object
pg_name
The name of the portgroup
teaming
The vim.VmwareUplinkPortTeamingPolicy to apply the config to
teaming_conf
The teaming config
'''
... | [
"Applies",
"the",
"values",
"in",
"teaming_conf",
"to",
"a",
"teaming",
"policy",
"object"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4344-L4410 | [
"def",
"_apply_dvportgroup_teaming",
"(",
"pg_name",
",",
"teaming",
",",
"teaming_conf",
")",
":",
"log",
".",
"trace",
"(",
"'Building portgroup\\'s \\'%s\\' teaming'",
",",
"pg_name",
")",
"if",
"'notify_switches'",
"in",
"teaming_conf",
":",
"teaming",
".",
"not... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _apply_dvportgroup_config | Applies the values in conf to a distributed portgroup spec
pg_name
The name of the portgroup
pg_spec
The vim.DVPortgroupConfigSpec to apply the config to
pg_conf
The portgroup config | salt/modules/vsphere.py | def _apply_dvportgroup_config(pg_name, pg_spec, pg_conf):
'''
Applies the values in conf to a distributed portgroup spec
pg_name
The name of the portgroup
pg_spec
The vim.DVPortgroupConfigSpec to apply the config to
pg_conf
The portgroup config
'''
log.trace('Build... | def _apply_dvportgroup_config(pg_name, pg_spec, pg_conf):
'''
Applies the values in conf to a distributed portgroup spec
pg_name
The name of the portgroup
pg_spec
The vim.DVPortgroupConfigSpec to apply the config to
pg_conf
The portgroup config
'''
log.trace('Build... | [
"Applies",
"the",
"values",
"in",
"conf",
"to",
"a",
"distributed",
"portgroup",
"spec"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4413-L4464 | [
"def",
"_apply_dvportgroup_config",
"(",
"pg_name",
",",
"pg_spec",
",",
"pg_conf",
")",
":",
"log",
".",
"trace",
"(",
"'Building portgroup\\'s \\'%s\\' spec'",
",",
"pg_name",
")",
"if",
"'name'",
"in",
"pg_conf",
":",
"pg_spec",
".",
"name",
"=",
"pg_conf",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_dvportgroup | Creates a distributed virtual portgroup.
Note: The ``portgroup_name`` param will override any name already set
in ``portgroup_dict``.
portgroup_dict
Dictionary with the config values the portgroup should be created with
(example in salt.states.dvs).
portgroup_name
Name of the ... | salt/modules/vsphere.py | def create_dvportgroup(portgroup_dict, portgroup_name, dvs,
service_instance=None):
'''
Creates a distributed virtual portgroup.
Note: The ``portgroup_name`` param will override any name already set
in ``portgroup_dict``.
portgroup_dict
Dictionary with the config val... | def create_dvportgroup(portgroup_dict, portgroup_name, dvs,
service_instance=None):
'''
Creates a distributed virtual portgroup.
Note: The ``portgroup_name`` param will override any name already set
in ``portgroup_dict``.
portgroup_dict
Dictionary with the config val... | [
"Creates",
"a",
"distributed",
"virtual",
"portgroup",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4470-L4515 | [
"def",
"create_dvportgroup",
"(",
"portgroup_dict",
",",
"portgroup_name",
",",
"dvs",
",",
"service_instance",
"=",
"None",
")",
":",
"log",
".",
"trace",
"(",
"'Creating portgroup\\'%s\\' in dvs \\'%s\\' '",
"'with dict = %s'",
",",
"portgroup_name",
",",
"dvs",
","... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | update_dvportgroup | Updates a distributed virtual portgroup.
portgroup_dict
Dictionary with the values the portgroup should be update with
(example in salt.states.dvs).
portgroup
Name of the portgroup to be updated.
dvs
Name of the DVS containing the portgroups.
service_instance
... | salt/modules/vsphere.py | def update_dvportgroup(portgroup_dict, portgroup, dvs, service_instance=True):
'''
Updates a distributed virtual portgroup.
portgroup_dict
Dictionary with the values the portgroup should be update with
(example in salt.states.dvs).
portgroup
Name of the portgroup to be updated.... | def update_dvportgroup(portgroup_dict, portgroup, dvs, service_instance=True):
'''
Updates a distributed virtual portgroup.
portgroup_dict
Dictionary with the values the portgroup should be update with
(example in salt.states.dvs).
portgroup
Name of the portgroup to be updated.... | [
"Updates",
"a",
"distributed",
"virtual",
"portgroup",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4521-L4575 | [
"def",
"update_dvportgroup",
"(",
"portgroup_dict",
",",
"portgroup",
",",
"dvs",
",",
"service_instance",
"=",
"True",
")",
":",
"log",
".",
"trace",
"(",
"'Updating portgroup\\'%s\\' in dvs \\'%s\\' '",
"'with dict = %s'",
",",
"portgroup",
",",
"dvs",
",",
"portg... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | remove_dvportgroup | Removes a distributed virtual portgroup.
portgroup
Name of the portgroup to be removed.
dvs
Name of the DVS containing the portgroups.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
Default is None.
.. code-block:: bash
salt '*' vsphe... | salt/modules/vsphere.py | def remove_dvportgroup(portgroup, dvs, service_instance=None):
'''
Removes a distributed virtual portgroup.
portgroup
Name of the portgroup to be removed.
dvs
Name of the DVS containing the portgroups.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.... | def remove_dvportgroup(portgroup, dvs, service_instance=None):
'''
Removes a distributed virtual portgroup.
portgroup
Name of the portgroup to be removed.
dvs
Name of the DVS containing the portgroups.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.... | [
"Removes",
"a",
"distributed",
"virtual",
"portgroup",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4581-L4617 | [
"def",
"remove_dvportgroup",
"(",
"portgroup",
",",
"dvs",
",",
"service_instance",
"=",
"None",
")",
":",
"log",
".",
"trace",
"(",
"'Removing portgroup\\'%s\\' in dvs \\'%s\\''",
",",
"portgroup",
",",
"dvs",
")",
"proxy_type",
"=",
"get_proxy_type",
"(",
")",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _get_policy_dict | Returns a dictionary representation of a policy | salt/modules/vsphere.py | def _get_policy_dict(policy):
'''Returns a dictionary representation of a policy'''
profile_dict = {'name': policy.name,
'description': policy.description,
'resource_type': policy.resourceType.resourceType}
subprofile_dicts = []
if isinstance(policy, pbm.profile.C... | def _get_policy_dict(policy):
'''Returns a dictionary representation of a policy'''
profile_dict = {'name': policy.name,
'description': policy.description,
'resource_type': policy.resourceType.resourceType}
subprofile_dicts = []
if isinstance(policy, pbm.profile.C... | [
"Returns",
"a",
"dictionary",
"representation",
"of",
"a",
"policy"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4620-L4654 | [
"def",
"_get_policy_dict",
"(",
"policy",
")",
":",
"profile_dict",
"=",
"{",
"'name'",
":",
"policy",
".",
"name",
",",
"'description'",
":",
"policy",
".",
"description",
",",
"'resource_type'",
":",
"policy",
".",
"resourceType",
".",
"resourceType",
"}",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_storage_policies | Returns a list of storage policies.
policy_names
Names of policies to list. If None, all policies are listed.
Default is None.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
Default is None.
.. code-block:: bash
salt '*' vsphere.list_stora... | salt/modules/vsphere.py | def list_storage_policies(policy_names=None, service_instance=None):
'''
Returns a list of storage policies.
policy_names
Names of policies to list. If None, all policies are listed.
Default is None.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
... | def list_storage_policies(policy_names=None, service_instance=None):
'''
Returns a list of storage policies.
policy_names
Names of policies to list. If None, all policies are listed.
Default is None.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
... | [
"Returns",
"a",
"list",
"of",
"storage",
"policies",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4660-L4685 | [
"def",
"list_storage_policies",
"(",
"policy_names",
"=",
"None",
",",
"service_instance",
"=",
"None",
")",
":",
"profile_manager",
"=",
"salt",
".",
"utils",
".",
"pbm",
".",
"get_profile_manager",
"(",
"service_instance",
")",
"if",
"not",
"policy_names",
":"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_default_vsan_policy | Returns the default vsan storage policy.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
Default is None.
.. code-block:: bash
salt '*' vsphere.list_storage_policies
salt '*' vsphere.list_storage_policy policy_names=[policy_name] | salt/modules/vsphere.py | def list_default_vsan_policy(service_instance=None):
'''
Returns the default vsan storage policy.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
Default is None.
.. code-block:: bash
salt '*' vsphere.list_storage_policies
salt '*' vsphere.list... | def list_default_vsan_policy(service_instance=None):
'''
Returns the default vsan storage policy.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
Default is None.
.. code-block:: bash
salt '*' vsphere.list_storage_policies
salt '*' vsphere.list... | [
"Returns",
"the",
"default",
"vsan",
"storage",
"policy",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4691-L4713 | [
"def",
"list_default_vsan_policy",
"(",
"service_instance",
"=",
"None",
")",
":",
"profile_manager",
"=",
"salt",
".",
"utils",
".",
"pbm",
".",
"get_profile_manager",
"(",
"service_instance",
")",
"policies",
"=",
"salt",
".",
"utils",
".",
"pbm",
".",
"get_... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_capability_definitions | Returns a list of the metadata of all capabilities in the vCenter.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
Default is None.
.. code-block:: bash
salt '*' vsphere.list_capabilities | salt/modules/vsphere.py | def list_capability_definitions(service_instance=None):
'''
Returns a list of the metadata of all capabilities in the vCenter.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
Default is None.
.. code-block:: bash
salt '*' vsphere.list_capabilities
'... | def list_capability_definitions(service_instance=None):
'''
Returns a list of the metadata of all capabilities in the vCenter.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
Default is None.
.. code-block:: bash
salt '*' vsphere.list_capabilities
'... | [
"Returns",
"a",
"list",
"of",
"the",
"metadata",
"of",
"all",
"capabilities",
"in",
"the",
"vCenter",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4730-L4745 | [
"def",
"list_capability_definitions",
"(",
"service_instance",
"=",
"None",
")",
":",
"profile_manager",
"=",
"salt",
".",
"utils",
".",
"pbm",
".",
"get_profile_manager",
"(",
"service_instance",
")",
"ret_list",
"=",
"[",
"_get_capability_definition_dict",
"(",
"c... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _apply_policy_config | Applies a policy dictionary to a policy spec | salt/modules/vsphere.py | def _apply_policy_config(policy_spec, policy_dict):
'''Applies a policy dictionary to a policy spec'''
log.trace('policy_dict = %s', policy_dict)
if policy_dict.get('name'):
policy_spec.name = policy_dict['name']
if policy_dict.get('description'):
policy_spec.description = policy_dict['d... | def _apply_policy_config(policy_spec, policy_dict):
'''Applies a policy dictionary to a policy spec'''
log.trace('policy_dict = %s', policy_dict)
if policy_dict.get('name'):
policy_spec.name = policy_dict['name']
if policy_dict.get('description'):
policy_spec.description = policy_dict['d... | [
"Applies",
"a",
"policy",
"dictionary",
"to",
"a",
"policy",
"spec"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4748-L4794 | [
"def",
"_apply_policy_config",
"(",
"policy_spec",
",",
"policy_dict",
")",
":",
"log",
".",
"trace",
"(",
"'policy_dict = %s'",
",",
"policy_dict",
")",
"if",
"policy_dict",
".",
"get",
"(",
"'name'",
")",
":",
"policy_spec",
".",
"name",
"=",
"policy_dict",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_storage_policy | Creates a storage policy.
Supported capability types: scalar, set, range.
policy_name
Name of the policy to create.
The value of the argument will override any existing name in
``policy_dict``.
policy_dict
Dictionary containing the changes to apply to the policy.
(... | salt/modules/vsphere.py | def create_storage_policy(policy_name, policy_dict, service_instance=None):
'''
Creates a storage policy.
Supported capability types: scalar, set, range.
policy_name
Name of the policy to create.
The value of the argument will override any existing name in
``policy_dict``.
... | def create_storage_policy(policy_name, policy_dict, service_instance=None):
'''
Creates a storage policy.
Supported capability types: scalar, set, range.
policy_name
Name of the policy to create.
The value of the argument will override any existing name in
``policy_dict``.
... | [
"Creates",
"a",
"storage",
"policy",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4800-L4835 | [
"def",
"create_storage_policy",
"(",
"policy_name",
",",
"policy_dict",
",",
"service_instance",
"=",
"None",
")",
":",
"log",
".",
"trace",
"(",
"'create storage policy \\'%s\\', dict = %s'",
",",
"policy_name",
",",
"policy_dict",
")",
"profile_manager",
"=",
"salt"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | update_storage_policy | Updates a storage policy.
Supported capability types: scalar, set, range.
policy
Name of the policy to update.
policy_dict
Dictionary containing the changes to apply to the policy.
(example in salt.states.pbm)
service_instance
Service instance (vim.ServiceInstance) of... | salt/modules/vsphere.py | def update_storage_policy(policy, policy_dict, service_instance=None):
'''
Updates a storage policy.
Supported capability types: scalar, set, range.
policy
Name of the policy to update.
policy_dict
Dictionary containing the changes to apply to the policy.
(example in salt.... | def update_storage_policy(policy, policy_dict, service_instance=None):
'''
Updates a storage policy.
Supported capability types: scalar, set, range.
policy
Name of the policy to update.
policy_dict
Dictionary containing the changes to apply to the policy.
(example in salt.... | [
"Updates",
"a",
"storage",
"policy",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4841-L4877 | [
"def",
"update_storage_policy",
"(",
"policy",
",",
"policy_dict",
",",
"service_instance",
"=",
"None",
")",
":",
"log",
".",
"trace",
"(",
"'updating storage policy, dict = %s'",
",",
"policy_dict",
")",
"profile_manager",
"=",
"salt",
".",
"utils",
".",
"pbm",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_default_storage_policy_of_datastore | Returns a list of datastores assign the the storage policies.
datastore
Name of the datastore to assign.
The datastore needs to be visible to the VMware entity the proxy
points to.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
Default is None.
... | salt/modules/vsphere.py | def list_default_storage_policy_of_datastore(datastore, service_instance=None):
'''
Returns a list of datastores assign the the storage policies.
datastore
Name of the datastore to assign.
The datastore needs to be visible to the VMware entity the proxy
points to.
service_insta... | def list_default_storage_policy_of_datastore(datastore, service_instance=None):
'''
Returns a list of datastores assign the the storage policies.
datastore
Name of the datastore to assign.
The datastore needs to be visible to the VMware entity the proxy
points to.
service_insta... | [
"Returns",
"a",
"list",
"of",
"datastores",
"assign",
"the",
"the",
"storage",
"policies",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4883-L4911 | [
"def",
"list_default_storage_policy_of_datastore",
"(",
"datastore",
",",
"service_instance",
"=",
"None",
")",
":",
"log",
".",
"trace",
"(",
"'Listing the default storage policy of datastore \\'%s\\''",
",",
"datastore",
")",
"# Find datastore",
"target_ref",
"=",
"_get_p... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | assign_default_storage_policy_to_datastore | Assigns a storage policy as the default policy to a datastore.
policy
Name of the policy to assign.
datastore
Name of the datastore to assign.
The datastore needs to be visible to the VMware entity the proxy
points to.
service_instance
Service instance (vim.Service... | salt/modules/vsphere.py | def assign_default_storage_policy_to_datastore(policy, datastore,
service_instance=None):
'''
Assigns a storage policy as the default policy to a datastore.
policy
Name of the policy to assign.
datastore
Name of the datastore to assign.
... | def assign_default_storage_policy_to_datastore(policy, datastore,
service_instance=None):
'''
Assigns a storage policy as the default policy to a datastore.
policy
Name of the policy to assign.
datastore
Name of the datastore to assign.
... | [
"Assigns",
"a",
"storage",
"policy",
"as",
"the",
"default",
"policy",
"to",
"a",
"datastore",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4917-L4957 | [
"def",
"assign_default_storage_policy_to_datastore",
"(",
"policy",
",",
"datastore",
",",
"service_instance",
"=",
"None",
")",
":",
"log",
".",
"trace",
"(",
"'Assigning policy %s to datastore %s'",
",",
"policy",
",",
"datastore",
")",
"profile_manager",
"=",
"salt... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_datacenters_via_proxy | Returns a list of dict representations of VMware datacenters.
Connection is done via the proxy details.
Supported proxies: esxdatacenter
datacenter_names
List of datacenter names.
Default is None.
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
... | salt/modules/vsphere.py | def list_datacenters_via_proxy(datacenter_names=None, service_instance=None):
'''
Returns a list of dict representations of VMware datacenters.
Connection is done via the proxy details.
Supported proxies: esxdatacenter
datacenter_names
List of datacenter names.
Default is None.
... | def list_datacenters_via_proxy(datacenter_names=None, service_instance=None):
'''
Returns a list of dict representations of VMware datacenters.
Connection is done via the proxy details.
Supported proxies: esxdatacenter
datacenter_names
List of datacenter names.
Default is None.
... | [
"Returns",
"a",
"list",
"of",
"dict",
"representations",
"of",
"VMware",
"datacenters",
".",
"Connection",
"is",
"done",
"via",
"the",
"proxy",
"details",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L4963-L4996 | [
"def",
"list_datacenters_via_proxy",
"(",
"datacenter_names",
"=",
"None",
",",
"service_instance",
"=",
"None",
")",
":",
"if",
"not",
"datacenter_names",
":",
"dc_refs",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_datacenters",
"(",
"service_instance",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_datacenter | Creates a datacenter.
Supported proxies: esxdatacenter
datacenter_name
The datacenter name
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
Default is None.
.. code-block:: bash
salt '*' vsphere.create_datacenter dc1 | salt/modules/vsphere.py | def create_datacenter(datacenter_name, service_instance=None):
'''
Creates a datacenter.
Supported proxies: esxdatacenter
datacenter_name
The datacenter name
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
Default is None.
.. code-block:: bash
... | def create_datacenter(datacenter_name, service_instance=None):
'''
Creates a datacenter.
Supported proxies: esxdatacenter
datacenter_name
The datacenter name
service_instance
Service instance (vim.ServiceInstance) of the vCenter.
Default is None.
.. code-block:: bash
... | [
"Creates",
"a",
"datacenter",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5002-L5020 | [
"def",
"create_datacenter",
"(",
"datacenter_name",
",",
"service_instance",
"=",
"None",
")",
":",
"salt",
".",
"utils",
".",
"vmware",
".",
"create_datacenter",
"(",
"service_instance",
",",
"datacenter_name",
")",
"return",
"{",
"'create_datacenter'",
":",
"Tru... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _get_cluster_dict | Returns a cluster dict representation from
a vim.ClusterComputeResource object.
cluster_name
Name of the cluster
cluster_ref
Reference to the cluster | salt/modules/vsphere.py | def _get_cluster_dict(cluster_name, cluster_ref):
'''
Returns a cluster dict representation from
a vim.ClusterComputeResource object.
cluster_name
Name of the cluster
cluster_ref
Reference to the cluster
'''
log.trace('Building a dictionary representation of cluster \'%s\'... | def _get_cluster_dict(cluster_name, cluster_ref):
'''
Returns a cluster dict representation from
a vim.ClusterComputeResource object.
cluster_name
Name of the cluster
cluster_ref
Reference to the cluster
'''
log.trace('Building a dictionary representation of cluster \'%s\'... | [
"Returns",
"a",
"cluster",
"dict",
"representation",
"from",
"a",
"vim",
".",
"ClusterComputeResource",
"object",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5023-L5101 | [
"def",
"_get_cluster_dict",
"(",
"cluster_name",
",",
"cluster_ref",
")",
":",
"log",
".",
"trace",
"(",
"'Building a dictionary representation of cluster \\'%s\\''",
",",
"cluster_name",
")",
"props",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_properties_of_... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_cluster | Returns a dict representation of an ESX cluster.
datacenter
Name of datacenter containing the cluster.
Ignored if already contained by proxy details.
Default value is None.
cluster
Name of cluster.
Ignored if already contained by proxy details.
Default value is ... | salt/modules/vsphere.py | def list_cluster(datacenter=None, cluster=None, service_instance=None):
'''
Returns a dict representation of an ESX cluster.
datacenter
Name of datacenter containing the cluster.
Ignored if already contained by proxy details.
Default value is None.
cluster
Name of clust... | def list_cluster(datacenter=None, cluster=None, service_instance=None):
'''
Returns a dict representation of an ESX cluster.
datacenter
Name of datacenter containing the cluster.
Ignored if already contained by proxy details.
Default value is None.
cluster
Name of clust... | [
"Returns",
"a",
"dict",
"representation",
"of",
"an",
"ESX",
"cluster",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5107-L5147 | [
"def",
"list_cluster",
"(",
"datacenter",
"=",
"None",
",",
"cluster",
"=",
"None",
",",
"service_instance",
"=",
"None",
")",
":",
"proxy_type",
"=",
"get_proxy_type",
"(",
")",
"if",
"proxy_type",
"==",
"'esxdatacenter'",
":",
"dc_ref",
"=",
"_get_proxy_targ... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _apply_cluster_dict | Applies the values of cluster_dict dictionary to a cluster spec
(vim.ClusterConfigSpecEx).
All vsan values (cluster_dict['vsan']) will be applied to
vsan_spec (vim.vsan.cluster.ConfigInfoEx). Can be not omitted
if not required.
VSAN 6.1 config needs to be applied differently than the post VSAN 6.1... | salt/modules/vsphere.py | def _apply_cluster_dict(cluster_spec, cluster_dict, vsan_spec=None,
vsan_61=True):
'''
Applies the values of cluster_dict dictionary to a cluster spec
(vim.ClusterConfigSpecEx).
All vsan values (cluster_dict['vsan']) will be applied to
vsan_spec (vim.vsan.cluster.ConfigInfoE... | def _apply_cluster_dict(cluster_spec, cluster_dict, vsan_spec=None,
vsan_61=True):
'''
Applies the values of cluster_dict dictionary to a cluster spec
(vim.ClusterConfigSpecEx).
All vsan values (cluster_dict['vsan']) will be applied to
vsan_spec (vim.vsan.cluster.ConfigInfoE... | [
"Applies",
"the",
"values",
"of",
"cluster_dict",
"dictionary",
"to",
"a",
"cluster",
"spec",
"(",
"vim",
".",
"ClusterConfigSpecEx",
")",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5150-L5278 | [
"def",
"_apply_cluster_dict",
"(",
"cluster_spec",
",",
"cluster_dict",
",",
"vsan_spec",
"=",
"None",
",",
"vsan_61",
"=",
"True",
")",
":",
"log",
".",
"trace",
"(",
"'Applying cluster dict %s'",
",",
"cluster_dict",
")",
"if",
"cluster_dict",
".",
"get",
"(... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_cluster | Creates a cluster.
Note: cluster_dict['name'] will be overridden by the cluster param value
config_dict
Dictionary with the config values of the new cluster.
datacenter
Name of datacenter containing the cluster.
Ignored if already contained by proxy details.
Default value ... | salt/modules/vsphere.py | def create_cluster(cluster_dict, datacenter=None, cluster=None,
service_instance=None):
'''
Creates a cluster.
Note: cluster_dict['name'] will be overridden by the cluster param value
config_dict
Dictionary with the config values of the new cluster.
datacenter
N... | def create_cluster(cluster_dict, datacenter=None, cluster=None,
service_instance=None):
'''
Creates a cluster.
Note: cluster_dict['name'] will be overridden by the cluster param value
config_dict
Dictionary with the config values of the new cluster.
datacenter
N... | [
"Creates",
"a",
"cluster",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5285-L5374 | [
"def",
"create_cluster",
"(",
"cluster_dict",
",",
"datacenter",
"=",
"None",
",",
"cluster",
"=",
"None",
",",
"service_instance",
"=",
"None",
")",
":",
"# Validate cluster dictionary",
"schema",
"=",
"ESXClusterConfigSchema",
".",
"serialize",
"(",
")",
"try",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | update_cluster | Updates a cluster.
config_dict
Dictionary with the config values of the new cluster.
datacenter
Name of datacenter containing the cluster.
Ignored if already contained by proxy details.
Default value is None.
cluster
Name of cluster.
Ignored if already cont... | salt/modules/vsphere.py | def update_cluster(cluster_dict, datacenter=None, cluster=None,
service_instance=None):
'''
Updates a cluster.
config_dict
Dictionary with the config values of the new cluster.
datacenter
Name of datacenter containing the cluster.
Ignored if already contained... | def update_cluster(cluster_dict, datacenter=None, cluster=None,
service_instance=None):
'''
Updates a cluster.
config_dict
Dictionary with the config values of the new cluster.
datacenter
Name of datacenter containing the cluster.
Ignored if already contained... | [
"Updates",
"a",
"cluster",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5381-L5486 | [
"def",
"update_cluster",
"(",
"cluster_dict",
",",
"datacenter",
"=",
"None",
",",
"cluster",
"=",
"None",
",",
"service_instance",
"=",
"None",
")",
":",
"# Validate cluster dictionary",
"schema",
"=",
"ESXClusterConfigSchema",
".",
"serialize",
"(",
")",
"try",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_datastores_via_proxy | Returns a list of dict representations of the datastores visible to the
proxy object. The list of datastores can be filtered by datastore names,
backing disk ids (canonical names) or backing disk scsi addresses.
Supported proxy types: esxi, esxcluster, esxdatacenter
datastore_names
List of the... | salt/modules/vsphere.py | def list_datastores_via_proxy(datastore_names=None, backing_disk_ids=None,
backing_disk_scsi_addresses=None,
service_instance=None):
'''
Returns a list of dict representations of the datastores visible to the
proxy object. The list of datastores ca... | def list_datastores_via_proxy(datastore_names=None, backing_disk_ids=None,
backing_disk_scsi_addresses=None,
service_instance=None):
'''
Returns a list of dict representations of the datastores visible to the
proxy object. The list of datastores ca... | [
"Returns",
"a",
"list",
"of",
"dict",
"representations",
"of",
"the",
"datastores",
"visible",
"to",
"the",
"proxy",
"object",
".",
"The",
"list",
"of",
"datastores",
"can",
"be",
"filtered",
"by",
"datastore",
"names",
"backing",
"disk",
"ids",
"(",
"canoni... | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5492-L5571 | [
"def",
"list_datastores_via_proxy",
"(",
"datastore_names",
"=",
"None",
",",
"backing_disk_ids",
"=",
"None",
",",
"backing_disk_scsi_addresses",
"=",
"None",
",",
"service_instance",
"=",
"None",
")",
":",
"target",
"=",
"_get_proxy_target",
"(",
"service_instance",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_vmfs_datastore | Creates a ESXi host disk group with the specified cache and capacity disks.
datastore_name
The name of the datastore to be created.
disk_id
The disk id (canonical name) on which the datastore is created.
vmfs_major_version
The VMFS major version.
safety_checks
Specify... | salt/modules/vsphere.py | def create_vmfs_datastore(datastore_name, disk_id, vmfs_major_version,
safety_checks=True, service_instance=None):
'''
Creates a ESXi host disk group with the specified cache and capacity disks.
datastore_name
The name of the datastore to be created.
disk_id
T... | def create_vmfs_datastore(datastore_name, disk_id, vmfs_major_version,
safety_checks=True, service_instance=None):
'''
Creates a ESXi host disk group with the specified cache and capacity disks.
datastore_name
The name of the datastore to be created.
disk_id
T... | [
"Creates",
"a",
"ESXi",
"host",
"disk",
"group",
"with",
"the",
"specified",
"cache",
"and",
"capacity",
"disks",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5578-L5625 | [
"def",
"create_vmfs_datastore",
"(",
"datastore_name",
",",
"disk_id",
",",
"vmfs_major_version",
",",
"safety_checks",
"=",
"True",
",",
"service_instance",
"=",
"None",
")",
":",
"log",
".",
"debug",
"(",
"'Validating vmfs datastore input'",
")",
"schema",
"=",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | rename_datastore | Renames a datastore. The datastore needs to be visible to the proxy.
datastore_name
Current datastore name.
new_datastore_name
New datastore name.
service_instance
Service instance (vim.ServiceInstance) of the vCenter/ESXi host.
Default is None.
.. code-block:: bash
... | salt/modules/vsphere.py | def rename_datastore(datastore_name, new_datastore_name,
service_instance=None):
'''
Renames a datastore. The datastore needs to be visible to the proxy.
datastore_name
Current datastore name.
new_datastore_name
New datastore name.
service_instance
Ser... | def rename_datastore(datastore_name, new_datastore_name,
service_instance=None):
'''
Renames a datastore. The datastore needs to be visible to the proxy.
datastore_name
Current datastore name.
new_datastore_name
New datastore name.
service_instance
Ser... | [
"Renames",
"a",
"datastore",
".",
"The",
"datastore",
"needs",
"to",
"be",
"visible",
"to",
"the",
"proxy",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5631-L5662 | [
"def",
"rename_datastore",
"(",
"datastore_name",
",",
"new_datastore_name",
",",
"service_instance",
"=",
"None",
")",
":",
"# Argument validation",
"log",
".",
"trace",
"(",
"'Renaming datastore %s to %s'",
",",
"datastore_name",
",",
"new_datastore_name",
")",
"targe... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | remove_datastore | Removes a datastore. If multiple datastores an error is raised.
datastore
Datastore name
service_instance
Service instance (vim.ServiceInstance) of the vCenter/ESXi host.
Default is None.
.. code-block:: bash
salt '*' vsphere.remove_datastore ds_name | salt/modules/vsphere.py | def remove_datastore(datastore, service_instance=None):
'''
Removes a datastore. If multiple datastores an error is raised.
datastore
Datastore name
service_instance
Service instance (vim.ServiceInstance) of the vCenter/ESXi host.
Default is None.
.. code-block:: bash
... | def remove_datastore(datastore, service_instance=None):
'''
Removes a datastore. If multiple datastores an error is raised.
datastore
Datastore name
service_instance
Service instance (vim.ServiceInstance) of the vCenter/ESXi host.
Default is None.
.. code-block:: bash
... | [
"Removes",
"a",
"datastore",
".",
"If",
"multiple",
"datastores",
"an",
"error",
"is",
"raised",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5668-L5696 | [
"def",
"remove_datastore",
"(",
"datastore",
",",
"service_instance",
"=",
"None",
")",
":",
"log",
".",
"trace",
"(",
"'Removing datastore \\'%s\\''",
",",
"datastore",
")",
"target",
"=",
"_get_proxy_target",
"(",
"service_instance",
")",
"datastores",
"=",
"sal... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_licenses | Lists all licenses on a vCenter.
service_instance
Service instance (vim.ServiceInstance) of the vCenter/ESXi host.
Default is None.
.. code-block:: bash
salt '*' vsphere.list_licenses | salt/modules/vsphere.py | def list_licenses(service_instance=None):
'''
Lists all licenses on a vCenter.
service_instance
Service instance (vim.ServiceInstance) of the vCenter/ESXi host.
Default is None.
.. code-block:: bash
salt '*' vsphere.list_licenses
'''
log.trace('Retrieving all licenses'... | def list_licenses(service_instance=None):
'''
Lists all licenses on a vCenter.
service_instance
Service instance (vim.ServiceInstance) of the vCenter/ESXi host.
Default is None.
.. code-block:: bash
salt '*' vsphere.list_licenses
'''
log.trace('Retrieving all licenses'... | [
"Lists",
"all",
"licenses",
"on",
"a",
"vCenter",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5702-L5723 | [
"def",
"list_licenses",
"(",
"service_instance",
"=",
"None",
")",
":",
"log",
".",
"trace",
"(",
"'Retrieving all licenses'",
")",
"licenses",
"=",
"salt",
".",
"utils",
".",
"vmware",
".",
"get_licenses",
"(",
"service_instance",
")",
"ret_dict",
"=",
"[",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | add_license | Adds a license to the vCenter or ESXi host
key
License key.
description
License description added in as a label.
safety_checks
Specify whether to perform safety check or to skip the checks and try
performing the required task
service_instance
Service instance ... | salt/modules/vsphere.py | def add_license(key, description, safety_checks=True,
service_instance=None):
'''
Adds a license to the vCenter or ESXi host
key
License key.
description
License description added in as a label.
safety_checks
Specify whether to perform safety check or to sk... | def add_license(key, description, safety_checks=True,
service_instance=None):
'''
Adds a license to the vCenter or ESXi host
key
License key.
description
License description added in as a label.
safety_checks
Specify whether to perform safety check or to sk... | [
"Adds",
"a",
"license",
"to",
"the",
"vCenter",
"or",
"ESXi",
"host"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5729-L5754 | [
"def",
"add_license",
"(",
"key",
",",
"description",
",",
"safety_checks",
"=",
"True",
",",
"service_instance",
"=",
"None",
")",
":",
"log",
".",
"trace",
"(",
"'Adding license \\'%s\\''",
",",
"key",
")",
"salt",
".",
"utils",
".",
"vmware",
".",
"add_... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _get_entity | Returns the entity associated with the entity dict representation
Supported entities: cluster, vcenter
Expected entity format:
.. code-block:: python
cluster:
{'type': 'cluster',
'datacenter': <datacenter_name>,
'cluster': <cluster_name>}
vcenter:
... | salt/modules/vsphere.py | def _get_entity(service_instance, entity):
'''
Returns the entity associated with the entity dict representation
Supported entities: cluster, vcenter
Expected entity format:
.. code-block:: python
cluster:
{'type': 'cluster',
'datacenter': <datacenter_name>,
... | def _get_entity(service_instance, entity):
'''
Returns the entity associated with the entity dict representation
Supported entities: cluster, vcenter
Expected entity format:
.. code-block:: python
cluster:
{'type': 'cluster',
'datacenter': <datacenter_name>,
... | [
"Returns",
"the",
"entity",
"associated",
"with",
"the",
"entity",
"dict",
"representation"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5757-L5789 | [
"def",
"_get_entity",
"(",
"service_instance",
",",
"entity",
")",
":",
"log",
".",
"trace",
"(",
"'Retrieving entity: %s'",
",",
"entity",
")",
"if",
"entity",
"[",
"'type'",
"]",
"==",
"'cluster'",
":",
"dc_ref",
"=",
"salt",
".",
"utils",
".",
"vmware",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _validate_entity | Validates the entity dict representation
entity
Dictionary representation of an entity.
See ``_get_entity`` docstrings for format. | salt/modules/vsphere.py | def _validate_entity(entity):
'''
Validates the entity dict representation
entity
Dictionary representation of an entity.
See ``_get_entity`` docstrings for format.
'''
#Validate entity:
if entity['type'] == 'cluster':
schema = ESXClusterEntitySchema.serialize()
eli... | def _validate_entity(entity):
'''
Validates the entity dict representation
entity
Dictionary representation of an entity.
See ``_get_entity`` docstrings for format.
'''
#Validate entity:
if entity['type'] == 'cluster':
schema = ESXClusterEntitySchema.serialize()
eli... | [
"Validates",
"the",
"entity",
"dict",
"representation"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5792-L5812 | [
"def",
"_validate_entity",
"(",
"entity",
")",
":",
"#Validate entity:",
"if",
"entity",
"[",
"'type'",
"]",
"==",
"'cluster'",
":",
"schema",
"=",
"ESXClusterEntitySchema",
".",
"serialize",
"(",
")",
"elif",
"entity",
"[",
"'type'",
"]",
"==",
"'vcenter'",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_assigned_licenses | Lists the licenses assigned to an entity
entity
Dictionary representation of an entity.
See ``_get_entity`` docstrings for format.
entity_display_name
Entity name used in logging
license_keys:
List of license keys to be retrieved. Default is None.
service_instance
... | salt/modules/vsphere.py | def list_assigned_licenses(entity, entity_display_name, license_keys=None,
service_instance=None):
'''
Lists the licenses assigned to an entity
entity
Dictionary representation of an entity.
See ``_get_entity`` docstrings for format.
entity_display_name
... | def list_assigned_licenses(entity, entity_display_name, license_keys=None,
service_instance=None):
'''
Lists the licenses assigned to an entity
entity
Dictionary representation of an entity.
See ``_get_entity`` docstrings for format.
entity_display_name
... | [
"Lists",
"the",
"licenses",
"assigned",
"to",
"an",
"entity"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5819-L5858 | [
"def",
"list_assigned_licenses",
"(",
"entity",
",",
"entity_display_name",
",",
"license_keys",
"=",
"None",
",",
"service_instance",
"=",
"None",
")",
":",
"log",
".",
"trace",
"(",
"'Listing assigned licenses of entity %s'",
",",
"entity",
")",
"_validate_entity",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | assign_license | Assigns a license to an entity
license_key
Key of the license to assign
See ``_get_entity`` docstrings for format.
license_name
Display name of license
entity
Dictionary representation of an entity
entity_display_name
Entity name used in logging
safety_ch... | salt/modules/vsphere.py | def assign_license(license_key, license_name, entity, entity_display_name,
safety_checks=True, service_instance=None):
'''
Assigns a license to an entity
license_key
Key of the license to assign
See ``_get_entity`` docstrings for format.
license_name
Display ... | def assign_license(license_key, license_name, entity, entity_display_name,
safety_checks=True, service_instance=None):
'''
Assigns a license to an entity
license_key
Key of the license to assign
See ``_get_entity`` docstrings for format.
license_name
Display ... | [
"Assigns",
"a",
"license",
"to",
"an",
"entity"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5865-L5908 | [
"def",
"assign_license",
"(",
"license_key",
",",
"license_name",
",",
"entity",
",",
"entity_display_name",
",",
"safety_checks",
"=",
"True",
",",
"service_instance",
"=",
"None",
")",
":",
"log",
".",
"trace",
"(",
"'Assigning license %s to entity %s'",
",",
"l... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_hosts_via_proxy | Returns a list of hosts for the the specified VMware environment. The list
of hosts can be filtered by datacenter name and/or cluster name
hostnames
Hostnames to filter on.
datacenter_name
Name of datacenter. Only hosts in this datacenter will be retrieved.
Default is None.
cl... | salt/modules/vsphere.py | def list_hosts_via_proxy(hostnames=None, datacenter=None,
cluster=None, service_instance=None):
'''
Returns a list of hosts for the the specified VMware environment. The list
of hosts can be filtered by datacenter name and/or cluster name
hostnames
Hostnames to filter o... | def list_hosts_via_proxy(hostnames=None, datacenter=None,
cluster=None, service_instance=None):
'''
Returns a list of hosts for the the specified VMware environment. The list
of hosts can be filtered by datacenter name and/or cluster name
hostnames
Hostnames to filter o... | [
"Returns",
"a",
"list",
"of",
"hosts",
"for",
"the",
"the",
"specified",
"VMware",
"environment",
".",
"The",
"list",
"of",
"hosts",
"can",
"be",
"filtered",
"by",
"datacenter",
"name",
"and",
"/",
"or",
"cluster",
"name"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5914-L5958 | [
"def",
"list_hosts_via_proxy",
"(",
"hostnames",
"=",
"None",
",",
"datacenter",
"=",
"None",
",",
"cluster",
"=",
"None",
",",
"service_instance",
"=",
"None",
")",
":",
"if",
"cluster",
":",
"if",
"not",
"datacenter",
":",
"raise",
"salt",
".",
"exceptio... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_disks | Returns a list of dict representations of the disks in an ESXi host.
The list of disks can be filtered by disk canonical names or
scsi addresses.
disk_ids:
List of disk canonical names to be retrieved. Default is None.
scsi_addresses
List of scsi addresses of disks to be retrieved. Def... | salt/modules/vsphere.py | def list_disks(disk_ids=None, scsi_addresses=None, service_instance=None):
'''
Returns a list of dict representations of the disks in an ESXi host.
The list of disks can be filtered by disk canonical names or
scsi addresses.
disk_ids:
List of disk canonical names to be retrieved. Default is... | def list_disks(disk_ids=None, scsi_addresses=None, service_instance=None):
'''
Returns a list of dict representations of the disks in an ESXi host.
The list of disks can be filtered by disk canonical names or
scsi addresses.
disk_ids:
List of disk canonical names to be retrieved. Default is... | [
"Returns",
"a",
"list",
"of",
"dict",
"representations",
"of",
"the",
"disks",
"in",
"an",
"ESXi",
"host",
".",
"The",
"list",
"of",
"disks",
"can",
"be",
"filtered",
"by",
"disk",
"canonical",
"names",
"or",
"scsi",
"addresses",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L5964-L6008 | [
"def",
"list_disks",
"(",
"disk_ids",
"=",
"None",
",",
"scsi_addresses",
"=",
"None",
",",
"service_instance",
"=",
"None",
")",
":",
"host_ref",
"=",
"_get_proxy_target",
"(",
"service_instance",
")",
"hostname",
"=",
"__proxy__",
"[",
"'esxi.get_details'",
"]... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | erase_disk_partitions | Erases the partitions on a disk.
The disk can be specified either by the canonical name, or by the
scsi_address.
disk_id
Canonical name of the disk.
Either ``disk_id`` or ``scsi_address`` needs to be specified
(``disk_id`` supersedes ``scsi_address``.
scsi_address
Scsi ... | salt/modules/vsphere.py | def erase_disk_partitions(disk_id=None, scsi_address=None,
service_instance=None):
'''
Erases the partitions on a disk.
The disk can be specified either by the canonical name, or by the
scsi_address.
disk_id
Canonical name of the disk.
Either ``disk_id`` or... | def erase_disk_partitions(disk_id=None, scsi_address=None,
service_instance=None):
'''
Erases the partitions on a disk.
The disk can be specified either by the canonical name, or by the
scsi_address.
disk_id
Canonical name of the disk.
Either ``disk_id`` or... | [
"Erases",
"the",
"partitions",
"on",
"a",
"disk",
".",
"The",
"disk",
"can",
"be",
"specified",
"either",
"by",
"the",
"canonical",
"name",
"or",
"by",
"the",
"scsi_address",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L6014-L6063 | [
"def",
"erase_disk_partitions",
"(",
"disk_id",
"=",
"None",
",",
"scsi_address",
"=",
"None",
",",
"service_instance",
"=",
"None",
")",
":",
"if",
"not",
"disk_id",
"and",
"not",
"scsi_address",
":",
"raise",
"ArgumentValueError",
"(",
"'Either \\'disk_id\\' or ... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_disk_partitions | Lists the partitions on a disk.
The disk can be specified either by the canonical name, or by the
scsi_address.
disk_id
Canonical name of the disk.
Either ``disk_id`` or ``scsi_address`` needs to be specified
(``disk_id`` supersedes ``scsi_address``.
scsi_address`
Scsi ... | salt/modules/vsphere.py | def list_disk_partitions(disk_id=None, scsi_address=None,
service_instance=None):
'''
Lists the partitions on a disk.
The disk can be specified either by the canonical name, or by the
scsi_address.
disk_id
Canonical name of the disk.
Either ``disk_id`` or `... | def list_disk_partitions(disk_id=None, scsi_address=None,
service_instance=None):
'''
Lists the partitions on a disk.
The disk can be specified either by the canonical name, or by the
scsi_address.
disk_id
Canonical name of the disk.
Either ``disk_id`` or `... | [
"Lists",
"the",
"partitions",
"on",
"a",
"disk",
".",
"The",
"disk",
"can",
"be",
"specified",
"either",
"by",
"the",
"canonical",
"name",
"or",
"by",
"the",
"scsi_address",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L6069-L6132 | [
"def",
"list_disk_partitions",
"(",
"disk_id",
"=",
"None",
",",
"scsi_address",
"=",
"None",
",",
"service_instance",
"=",
"None",
")",
":",
"if",
"not",
"disk_id",
"and",
"not",
"scsi_address",
":",
"raise",
"ArgumentValueError",
"(",
"'Either \\'disk_id\\' or \... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_diskgroups | Returns a list of disk group dict representation on an ESXi host.
The list of disk groups can be filtered by the cache disks
canonical names. If no filtering is applied, all disk groups are returned.
cache_disk_ids:
List of cache disk canonical names of the disk groups to be retrieved.
Defa... | salt/modules/vsphere.py | def list_diskgroups(cache_disk_ids=None, service_instance=None):
'''
Returns a list of disk group dict representation on an ESXi host.
The list of disk groups can be filtered by the cache disks
canonical names. If no filtering is applied, all disk groups are returned.
cache_disk_ids:
List o... | def list_diskgroups(cache_disk_ids=None, service_instance=None):
'''
Returns a list of disk group dict representation on an ESXi host.
The list of disk groups can be filtered by the cache disks
canonical names. If no filtering is applied, all disk groups are returned.
cache_disk_ids:
List o... | [
"Returns",
"a",
"list",
"of",
"disk",
"group",
"dict",
"representation",
"on",
"an",
"ESXi",
"host",
".",
"The",
"list",
"of",
"disk",
"groups",
"can",
"be",
"filtered",
"by",
"the",
"cache",
"disks",
"canonical",
"names",
".",
"If",
"no",
"filtering",
"... | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L6138-L6172 | [
"def",
"list_diskgroups",
"(",
"cache_disk_ids",
"=",
"None",
",",
"service_instance",
"=",
"None",
")",
":",
"host_ref",
"=",
"_get_proxy_target",
"(",
"service_instance",
")",
"hostname",
"=",
"__proxy__",
"[",
"'esxi.get_details'",
"]",
"(",
")",
"[",
"'esxi_... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_diskgroup | Creates disk group on an ESXi host with the specified cache and
capacity disks.
cache_disk_id
The canonical name of the disk to be used as a cache. The disk must be
ssd.
capacity_disk_ids
A list containing canonical names of the capacity disks. Must contain at
least one id.... | salt/modules/vsphere.py | def create_diskgroup(cache_disk_id, capacity_disk_ids, safety_checks=True,
service_instance=None):
'''
Creates disk group on an ESXi host with the specified cache and
capacity disks.
cache_disk_id
The canonical name of the disk to be used as a cache. The disk must be
... | def create_diskgroup(cache_disk_id, capacity_disk_ids, safety_checks=True,
service_instance=None):
'''
Creates disk group on an ESXi host with the specified cache and
capacity disks.
cache_disk_id
The canonical name of the disk to be used as a cache. The disk must be
... | [
"Creates",
"disk",
"group",
"on",
"an",
"ESXi",
"host",
"with",
"the",
"specified",
"cache",
"and",
"capacity",
"disks",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L6179-L6241 | [
"def",
"create_diskgroup",
"(",
"cache_disk_id",
",",
"capacity_disk_ids",
",",
"safety_checks",
"=",
"True",
",",
"service_instance",
"=",
"None",
")",
":",
"log",
".",
"trace",
"(",
"'Validating diskgroup input'",
")",
"schema",
"=",
"DiskGroupsDiskIdSchema",
".",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | remove_diskgroup | Remove the diskgroup with the specified cache disk.
cache_disk_id
The canonical name of the cache disk.
data_accessibility
Specifies whether to ensure data accessibility. Default value is True.
service_instance
Service instance (vim.ServiceInstance) of the vCenter/ESXi host.
... | salt/modules/vsphere.py | def remove_diskgroup(cache_disk_id, data_accessibility=True,
service_instance=None):
'''
Remove the diskgroup with the specified cache disk.
cache_disk_id
The canonical name of the cache disk.
data_accessibility
Specifies whether to ensure data accessibility. Defau... | def remove_diskgroup(cache_disk_id, data_accessibility=True,
service_instance=None):
'''
Remove the diskgroup with the specified cache disk.
cache_disk_id
The canonical name of the cache disk.
data_accessibility
Specifies whether to ensure data accessibility. Defau... | [
"Remove",
"the",
"diskgroup",
"with",
"the",
"specified",
"cache",
"disk",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L6380-L6413 | [
"def",
"remove_diskgroup",
"(",
"cache_disk_id",
",",
"data_accessibility",
"=",
"True",
",",
"service_instance",
"=",
"None",
")",
":",
"log",
".",
"trace",
"(",
"'Validating diskgroup input'",
")",
"host_ref",
"=",
"_get_proxy_target",
"(",
"service_instance",
")"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_host_cache | Returns the host cache configuration on the proxy host.
service_instance
Service instance (vim.ServiceInstance) of the vCenter/ESXi host.
Default is None.
.. code-block:: bash
salt '*' vsphere.get_host_cache | salt/modules/vsphere.py | def get_host_cache(service_instance=None):
'''
Returns the host cache configuration on the proxy host.
service_instance
Service instance (vim.ServiceInstance) of the vCenter/ESXi host.
Default is None.
.. code-block:: bash
salt '*' vsphere.get_host_cache
'''
# Default ... | def get_host_cache(service_instance=None):
'''
Returns the host cache configuration on the proxy host.
service_instance
Service instance (vim.ServiceInstance) of the vCenter/ESXi host.
Default is None.
.. code-block:: bash
salt '*' vsphere.get_host_cache
'''
# Default ... | [
"Returns",
"the",
"host",
"cache",
"configuration",
"on",
"the",
"proxy",
"host",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L6419-L6444 | [
"def",
"get_host_cache",
"(",
"service_instance",
"=",
"None",
")",
":",
"# Default to getting all disks if no filtering is done",
"ret_dict",
"=",
"{",
"}",
"host_ref",
"=",
"_get_proxy_target",
"(",
"service_instance",
")",
"hostname",
"=",
"__proxy__",
"[",
"'esxi.ge... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | configure_host_cache | Configures the host cache on the selected host.
enabled
Boolean flag specifying whether the host cache is enabled.
datastore
Name of the datastore that contains the host cache. Must be set if
enabled is ``true``.
swap_size_MiB
Swap size in Mibibytes. Needs to be set if ena... | salt/modules/vsphere.py | def configure_host_cache(enabled, datastore=None, swap_size_MiB=None,
service_instance=None):
'''
Configures the host cache on the selected host.
enabled
Boolean flag specifying whether the host cache is enabled.
datastore
Name of the datastore that contains th... | def configure_host_cache(enabled, datastore=None, swap_size_MiB=None,
service_instance=None):
'''
Configures the host cache on the selected host.
enabled
Boolean flag specifying whether the host cache is enabled.
datastore
Name of the datastore that contains th... | [
"Configures",
"the",
"host",
"cache",
"on",
"the",
"selected",
"host",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L6451-L6502 | [
"def",
"configure_host_cache",
"(",
"enabled",
",",
"datastore",
"=",
"None",
",",
"swap_size_MiB",
"=",
"None",
",",
"service_instance",
"=",
"None",
")",
":",
"log",
".",
"debug",
"(",
"'Validating host cache input'",
")",
"schema",
"=",
"SimpleHostCacheSchema",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.