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 | getfacl | Return (extremely verbose) map of FACLs on specified file(s)
CLI Examples:
.. code-block:: bash
salt '*' acl.getfacl /tmp/house/kitchen
salt '*' acl.getfacl /tmp/house/kitchen /tmp/house/livingroom
salt '*' acl.getfacl /tmp/house/kitchen /tmp/house/livingroom recursive=True | salt/modules/linux_acl.py | def getfacl(*args, **kwargs):
'''
Return (extremely verbose) map of FACLs on specified file(s)
CLI Examples:
.. code-block:: bash
salt '*' acl.getfacl /tmp/house/kitchen
salt '*' acl.getfacl /tmp/house/kitchen /tmp/house/livingroom
salt '*' acl.getfacl /tmp/house/kitchen /tmp/... | def getfacl(*args, **kwargs):
'''
Return (extremely verbose) map of FACLs on specified file(s)
CLI Examples:
.. code-block:: bash
salt '*' acl.getfacl /tmp/house/kitchen
salt '*' acl.getfacl /tmp/house/kitchen /tmp/house/livingroom
salt '*' acl.getfacl /tmp/house/kitchen /tmp/... | [
"Return",
"(",
"extremely",
"verbose",
")",
"map",
"of",
"FACLs",
"on",
"specified",
"file",
"(",
"s",
")"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/linux_acl.py#L48-L121 | [
"def",
"getfacl",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"recursive",
"=",
"kwargs",
".",
"pop",
"(",
"'recursive'",
",",
"False",
")",
"_raise_on_no_files",
"(",
"*",
"args",
")",
"ret",
"=",
"{",
"}",
"cmd",
"=",
"'getfacl --absolute-na... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _parse_acl | Parse a single ACL rule | salt/modules/linux_acl.py | def _parse_acl(acl, user, group):
'''
Parse a single ACL rule
'''
comps = acl.split(':')
vals = {}
# What type of rule is this?
vals['type'] = 'acl'
if comps[0] == 'default':
vals['type'] = 'default'
comps.pop(0)
# If a user is not specified, use the owner of the fi... | def _parse_acl(acl, user, group):
'''
Parse a single ACL rule
'''
comps = acl.split(':')
vals = {}
# What type of rule is this?
vals['type'] = 'acl'
if comps[0] == 'default':
vals['type'] = 'default'
comps.pop(0)
# If a user is not specified, use the owner of the fi... | [
"Parse",
"a",
"single",
"ACL",
"rule"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/linux_acl.py#L124-L164 | [
"def",
"_parse_acl",
"(",
"acl",
",",
"user",
",",
"group",
")",
":",
"comps",
"=",
"acl",
".",
"split",
"(",
"':'",
")",
"vals",
"=",
"{",
"}",
"# What type of rule is this?",
"vals",
"[",
"'type'",
"]",
"=",
"'acl'",
"if",
"comps",
"[",
"0",
"]",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | wipefacls | Remove all FACLs from the specified file(s)
CLI Examples:
.. code-block:: bash
salt '*' acl.wipefacls /tmp/house/kitchen
salt '*' acl.wipefacls /tmp/house/kitchen /tmp/house/livingroom
salt '*' acl.wipefacls /tmp/house/kitchen /tmp/house/livingroom recursive=True | salt/modules/linux_acl.py | def wipefacls(*args, **kwargs):
'''
Remove all FACLs from the specified file(s)
CLI Examples:
.. code-block:: bash
salt '*' acl.wipefacls /tmp/house/kitchen
salt '*' acl.wipefacls /tmp/house/kitchen /tmp/house/livingroom
salt '*' acl.wipefacls /tmp/house/kitchen /tmp/house/liv... | def wipefacls(*args, **kwargs):
'''
Remove all FACLs from the specified file(s)
CLI Examples:
.. code-block:: bash
salt '*' acl.wipefacls /tmp/house/kitchen
salt '*' acl.wipefacls /tmp/house/kitchen /tmp/house/livingroom
salt '*' acl.wipefacls /tmp/house/kitchen /tmp/house/liv... | [
"Remove",
"all",
"FACLs",
"from",
"the",
"specified",
"file",
"(",
"s",
")"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/linux_acl.py#L167-L188 | [
"def",
"wipefacls",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"recursive",
"=",
"kwargs",
".",
"pop",
"(",
"'recursive'",
",",
"False",
")",
"_raise_on_no_files",
"(",
"*",
"args",
")",
"cmd",
"=",
"'setfacl -b'",
"if",
"recursive",
":",
"cm... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | modfacl | Add or modify a FACL for the specified file(s)
CLI Examples:
.. code-block:: bash
salt '*' acl.modfacl user myuser rwx /tmp/house/kitchen
salt '*' acl.modfacl default:group mygroup rx /tmp/house/kitchen
salt '*' acl.modfacl d:u myuser 7 /tmp/house/kitchen
salt '*' acl.modfacl ... | salt/modules/linux_acl.py | def modfacl(acl_type, acl_name='', perms='', *args, **kwargs):
'''
Add or modify a FACL for the specified file(s)
CLI Examples:
.. code-block:: bash
salt '*' acl.modfacl user myuser rwx /tmp/house/kitchen
salt '*' acl.modfacl default:group mygroup rx /tmp/house/kitchen
salt '*... | def modfacl(acl_type, acl_name='', perms='', *args, **kwargs):
'''
Add or modify a FACL for the specified file(s)
CLI Examples:
.. code-block:: bash
salt '*' acl.modfacl user myuser rwx /tmp/house/kitchen
salt '*' acl.modfacl default:group mygroup rx /tmp/house/kitchen
salt '*... | [
"Add",
"or",
"modify",
"a",
"FACL",
"for",
"the",
"specified",
"file",
"(",
"s",
")"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/linux_acl.py#L206-L237 | [
"def",
"modfacl",
"(",
"acl_type",
",",
"acl_name",
"=",
"''",
",",
"perms",
"=",
"''",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"recursive",
"=",
"kwargs",
".",
"pop",
"(",
"'recursive'",
",",
"False",
")",
"raise_err",
"=",
"kwargs",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | delfacl | Remove specific FACL from the specified file(s)
CLI Examples:
.. code-block:: bash
salt '*' acl.delfacl user myuser /tmp/house/kitchen
salt '*' acl.delfacl default:group mygroup /tmp/house/kitchen
salt '*' acl.delfacl d:u myuser /tmp/house/kitchen
salt '*' acl.delfacl g myuser... | salt/modules/linux_acl.py | def delfacl(acl_type, acl_name='', *args, **kwargs):
'''
Remove specific FACL from the specified file(s)
CLI Examples:
.. code-block:: bash
salt '*' acl.delfacl user myuser /tmp/house/kitchen
salt '*' acl.delfacl default:group mygroup /tmp/house/kitchen
salt '*' acl.delfacl d:... | def delfacl(acl_type, acl_name='', *args, **kwargs):
'''
Remove specific FACL from the specified file(s)
CLI Examples:
.. code-block:: bash
salt '*' acl.delfacl user myuser /tmp/house/kitchen
salt '*' acl.delfacl default:group mygroup /tmp/house/kitchen
salt '*' acl.delfacl d:... | [
"Remove",
"specific",
"FACL",
"from",
"the",
"specified",
"file",
"(",
"s",
")"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/linux_acl.py#L240-L269 | [
"def",
"delfacl",
"(",
"acl_type",
",",
"acl_name",
"=",
"''",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"recursive",
"=",
"kwargs",
".",
"pop",
"(",
"'recursive'",
",",
"False",
")",
"_raise_on_no_files",
"(",
"*",
"args",
")",
"cmd",
"="... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | present | Ensure that given user is present.
name
Name of the user to manage
passwd
Password of the user
admin : False
Whether the user should have cluster administration
privileges or not.
grants
Optional - Dict of database:privilege items associated with
the u... | salt/states/influxdb_user.py | def present(name,
passwd,
admin=False,
grants=None,
**client_args):
'''
Ensure that given user is present.
name
Name of the user to manage
passwd
Password of the user
admin : False
Whether the user should have cluster adminis... | def present(name,
passwd,
admin=False,
grants=None,
**client_args):
'''
Ensure that given user is present.
name
Name of the user to manage
passwd
Password of the user
admin : False
Whether the user should have cluster adminis... | [
"Ensure",
"that",
"given",
"user",
"is",
"present",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/influxdb_user.py#L22-L131 | [
"def",
"present",
"(",
"name",
",",
"passwd",
",",
"admin",
"=",
"False",
",",
"grants",
"=",
"None",
",",
"*",
"*",
"client_args",
")",
":",
"create",
"=",
"False",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | activate_backup_image | Activates the firmware backup image.
CLI Example:
Args:
reset(bool): Reset the CIMC device on activate.
.. code-block:: bash
salt '*' cimc.activate_backup_image
salt '*' cimc.activate_backup_image reset=True | salt/modules/cimc.py | def activate_backup_image(reset=False):
'''
Activates the firmware backup image.
CLI Example:
Args:
reset(bool): Reset the CIMC device on activate.
.. code-block:: bash
salt '*' cimc.activate_backup_image
salt '*' cimc.activate_backup_image reset=True
'''
dn = "... | def activate_backup_image(reset=False):
'''
Activates the firmware backup image.
CLI Example:
Args:
reset(bool): Reset the CIMC device on activate.
.. code-block:: bash
salt '*' cimc.activate_backup_image
salt '*' cimc.activate_backup_image reset=True
'''
dn = "... | [
"Activates",
"the",
"firmware",
"backup",
"image",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cimc.py#L55-L83 | [
"def",
"activate_backup_image",
"(",
"reset",
"=",
"False",
")",
":",
"dn",
"=",
"\"sys/rack-unit-1/mgmt/fw-boot-def/bootunit-combined\"",
"r",
"=",
"\"no\"",
"if",
"reset",
"is",
"True",
":",
"r",
"=",
"\"yes\"",
"inconfig",
"=",
"\"\"\"<firmwareBootUnit dn='sys/rack... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_user | Create a CIMC user with username and password.
Args:
uid(int): The user ID slot to create the user account in.
username(str): The name of the user.
password(str): The clear text password of the user.
priv(str): The privilege level of the user.
CLI Example:
.. code-block... | salt/modules/cimc.py | def create_user(uid=None, username=None, password=None, priv=None):
'''
Create a CIMC user with username and password.
Args:
uid(int): The user ID slot to create the user account in.
username(str): The name of the user.
password(str): The clear text password of the user.
... | def create_user(uid=None, username=None, password=None, priv=None):
'''
Create a CIMC user with username and password.
Args:
uid(int): The user ID slot to create the user account in.
username(str): The name of the user.
password(str): The clear text password of the user.
... | [
"Create",
"a",
"CIMC",
"user",
"with",
"username",
"and",
"password",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cimc.py#L86-L129 | [
"def",
"create_user",
"(",
"uid",
"=",
"None",
",",
"username",
"=",
"None",
",",
"password",
"=",
"None",
",",
"priv",
"=",
"None",
")",
":",
"if",
"not",
"uid",
":",
"raise",
"salt",
".",
"exceptions",
".",
"CommandExecutionError",
"(",
"\"The user ID ... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | mount_share | Mounts a remote file through a remote share. Currently, this feature is supported in version 1.5 or greater.
The remote share can be either NFS, CIFS, or WWW.
Some of the advantages of CIMC Mounted vMedia include:
Communication between mounted media and target stays local (inside datacenter)
Media ... | salt/modules/cimc.py | def mount_share(name=None,
remote_share=None,
remote_file=None,
mount_type="nfs",
username=None,
password=None):
'''
Mounts a remote file through a remote share. Currently, this feature is supported in version 1.5 or greater.
Th... | def mount_share(name=None,
remote_share=None,
remote_file=None,
mount_type="nfs",
username=None,
password=None):
'''
Mounts a remote file through a remote share. Currently, this feature is supported in version 1.5 or greater.
Th... | [
"Mounts",
"a",
"remote",
"file",
"through",
"a",
"remote",
"share",
".",
"Currently",
"this",
"feature",
"is",
"supported",
"in",
"version",
"1",
".",
"5",
"or",
"greater",
".",
"The",
"remote",
"share",
"can",
"be",
"either",
"NFS",
"CIFS",
"or",
"WWW",... | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cimc.py#L542-L608 | [
"def",
"mount_share",
"(",
"name",
"=",
"None",
",",
"remote_share",
"=",
"None",
",",
"remote_file",
"=",
"None",
",",
"mount_type",
"=",
"\"nfs\"",
",",
"username",
"=",
"None",
",",
"password",
"=",
"None",
")",
":",
"if",
"not",
"name",
":",
"raise... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | set_hostname | Sets the hostname on the server.
.. versionadded:: 2019.2.0
Args:
hostname(str): The new hostname to set.
CLI Example:
.. code-block:: bash
salt '*' cimc.set_hostname foobar | salt/modules/cimc.py | def set_hostname(hostname=None):
'''
Sets the hostname on the server.
.. versionadded:: 2019.2.0
Args:
hostname(str): The new hostname to set.
CLI Example:
.. code-block:: bash
salt '*' cimc.set_hostname foobar
'''
if not hostname:
raise salt.exceptions.Comm... | def set_hostname(hostname=None):
'''
Sets the hostname on the server.
.. versionadded:: 2019.2.0
Args:
hostname(str): The new hostname to set.
CLI Example:
.. code-block:: bash
salt '*' cimc.set_hostname foobar
'''
if not hostname:
raise salt.exceptions.Comm... | [
"Sets",
"the",
"hostname",
"on",
"the",
"server",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cimc.py#L632-L662 | [
"def",
"set_hostname",
"(",
"hostname",
"=",
"None",
")",
":",
"if",
"not",
"hostname",
":",
"raise",
"salt",
".",
"exceptions",
".",
"CommandExecutionError",
"(",
"\"Hostname option must be provided.\"",
")",
"dn",
"=",
"\"sys/rack-unit-1/mgmt/if-1\"",
"inconfig",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | set_logging_levels | Sets the logging levels of the CIMC devices. The logging levels must match
the following options: emergency, alert, critical, error, warning, notice,
informational, debug.
.. versionadded:: 2019.2.0
Args:
remote(str): The logging level for SYSLOG logs.
local(str): The logging level fo... | salt/modules/cimc.py | def set_logging_levels(remote=None, local=None):
'''
Sets the logging levels of the CIMC devices. The logging levels must match
the following options: emergency, alert, critical, error, warning, notice,
informational, debug.
.. versionadded:: 2019.2.0
Args:
remote(str): The logging lev... | def set_logging_levels(remote=None, local=None):
'''
Sets the logging levels of the CIMC devices. The logging levels must match
the following options: emergency, alert, critical, error, warning, notice,
informational, debug.
.. versionadded:: 2019.2.0
Args:
remote(str): The logging lev... | [
"Sets",
"the",
"logging",
"levels",
"of",
"the",
"CIMC",
"devices",
".",
"The",
"logging",
"levels",
"must",
"match",
"the",
"following",
"options",
":",
"emergency",
"alert",
"critical",
"error",
"warning",
"notice",
"informational",
"debug",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cimc.py#L665-L714 | [
"def",
"set_logging_levels",
"(",
"remote",
"=",
"None",
",",
"local",
"=",
"None",
")",
":",
"logging_options",
"=",
"[",
"'emergency'",
",",
"'alert'",
",",
"'critical'",
",",
"'error'",
",",
"'warning'",
",",
"'notice'",
",",
"'informational'",
",",
"'deb... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | set_ntp_server | Sets the NTP servers configuration. This will also enable the client NTP service.
Args:
server1(str): The first IP address or FQDN of the NTP servers.
server2(str): The second IP address or FQDN of the NTP servers.
server3(str): The third IP address or FQDN of the NTP servers.
se... | salt/modules/cimc.py | def set_ntp_server(server1='', server2='', server3='', server4=''):
'''
Sets the NTP servers configuration. This will also enable the client NTP service.
Args:
server1(str): The first IP address or FQDN of the NTP servers.
server2(str): The second IP address or FQDN of the NTP servers.
... | def set_ntp_server(server1='', server2='', server3='', server4=''):
'''
Sets the NTP servers configuration. This will also enable the client NTP service.
Args:
server1(str): The first IP address or FQDN of the NTP servers.
server2(str): The second IP address or FQDN of the NTP servers.
... | [
"Sets",
"the",
"NTP",
"servers",
"configuration",
".",
"This",
"will",
"also",
"enable",
"the",
"client",
"NTP",
"service",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cimc.py#L717-L746 | [
"def",
"set_ntp_server",
"(",
"server1",
"=",
"''",
",",
"server2",
"=",
"''",
",",
"server3",
"=",
"''",
",",
"server4",
"=",
"''",
")",
":",
"dn",
"=",
"\"sys/svc-ext/ntp-svc\"",
"inconfig",
"=",
"\"\"\"<commNtpProvider dn=\"sys/svc-ext/ntp-svc\" ntpEnable=\"yes\"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | set_power_configuration | Sets the power configuration on the device. This is only available for some
C-Series servers.
.. versionadded:: 2019.2.0
Args:
policy(str): The action to be taken when chassis power is restored after
an unexpected power loss. This can be one of the following:
reset: The server... | salt/modules/cimc.py | def set_power_configuration(policy=None, delayType=None, delayValue=None):
'''
Sets the power configuration on the device. This is only available for some
C-Series servers.
.. versionadded:: 2019.2.0
Args:
policy(str): The action to be taken when chassis power is restored after
an ... | def set_power_configuration(policy=None, delayType=None, delayValue=None):
'''
Sets the power configuration on the device. This is only available for some
C-Series servers.
.. versionadded:: 2019.2.0
Args:
policy(str): The action to be taken when chassis power is restored after
an ... | [
"Sets",
"the",
"power",
"configuration",
"on",
"the",
"device",
".",
"This",
"is",
"only",
"available",
"for",
"some",
"C",
"-",
"Series",
"servers",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cimc.py#L749-L817 | [
"def",
"set_power_configuration",
"(",
"policy",
"=",
"None",
",",
"delayType",
"=",
"None",
",",
"delayValue",
"=",
"None",
")",
":",
"query",
"=",
"\"\"",
"if",
"policy",
"==",
"\"reset\"",
":",
"query",
"=",
"' vpResumeOnACPowerLoss=\"reset\"'",
"if",
"dela... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | set_syslog_server | Set the SYSLOG server on the host.
Args:
server(str): The hostname or IP address of the SYSLOG server.
type(str): Specifies the type of SYSLOG server. This can either be primary (default) or secondary.
CLI Example:
.. code-block:: bash
salt '*' cimc.set_syslog_server foo.bar.com... | salt/modules/cimc.py | def set_syslog_server(server=None, type="primary"):
'''
Set the SYSLOG server on the host.
Args:
server(str): The hostname or IP address of the SYSLOG server.
type(str): Specifies the type of SYSLOG server. This can either be primary (default) or secondary.
CLI Example:
.. code-b... | def set_syslog_server(server=None, type="primary"):
'''
Set the SYSLOG server on the host.
Args:
server(str): The hostname or IP address of the SYSLOG server.
type(str): Specifies the type of SYSLOG server. This can either be primary (default) or secondary.
CLI Example:
.. code-b... | [
"Set",
"the",
"SYSLOG",
"server",
"on",
"the",
"host",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cimc.py#L820-L857 | [
"def",
"set_syslog_server",
"(",
"server",
"=",
"None",
",",
"type",
"=",
"\"primary\"",
")",
":",
"if",
"not",
"server",
":",
"raise",
"salt",
".",
"exceptions",
".",
"CommandExecutionError",
"(",
"\"The SYSLOG server must be specified.\"",
")",
"if",
"type",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | set_user | Sets a CIMC user with specified configurations.
.. versionadded:: 2019.2.0
Args:
uid(int): The user ID slot to create the user account in.
username(str): The name of the user.
password(str): The clear text password of the user.
priv(str): The privilege level of the user.
... | salt/modules/cimc.py | def set_user(uid=None, username=None, password=None, priv=None, status=None):
'''
Sets a CIMC user with specified configurations.
.. versionadded:: 2019.2.0
Args:
uid(int): The user ID slot to create the user account in.
username(str): The name of the user.
password(str): The... | def set_user(uid=None, username=None, password=None, priv=None, status=None):
'''
Sets a CIMC user with specified configurations.
.. versionadded:: 2019.2.0
Args:
uid(int): The user ID slot to create the user account in.
username(str): The name of the user.
password(str): The... | [
"Sets",
"a",
"CIMC",
"user",
"with",
"specified",
"configurations",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cimc.py#L860-L908 | [
"def",
"set_user",
"(",
"uid",
"=",
"None",
",",
"username",
"=",
"None",
",",
"password",
"=",
"None",
",",
"priv",
"=",
"None",
",",
"status",
"=",
"None",
")",
":",
"conf",
"=",
"\"\"",
"if",
"not",
"uid",
":",
"raise",
"salt",
".",
"exceptions"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | tftp_update_bios | Update the BIOS firmware through TFTP.
Args:
server(str): The IP address or hostname of the TFTP server.
path(str): The TFTP path and filename for the BIOS image.
CLI Example:
.. code-block:: bash
salt '*' cimc.tftp_update_bios foo.bar.com HP-SL2.cap | salt/modules/cimc.py | def tftp_update_bios(server=None, path=None):
'''
Update the BIOS firmware through TFTP.
Args:
server(str): The IP address or hostname of the TFTP server.
path(str): The TFTP path and filename for the BIOS image.
CLI Example:
.. code-block:: bash
salt '*' cimc.tftp_updat... | def tftp_update_bios(server=None, path=None):
'''
Update the BIOS firmware through TFTP.
Args:
server(str): The IP address or hostname of the TFTP server.
path(str): The TFTP path and filename for the BIOS image.
CLI Example:
.. code-block:: bash
salt '*' cimc.tftp_updat... | [
"Update",
"the",
"BIOS",
"firmware",
"through",
"TFTP",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cimc.py#L911-L942 | [
"def",
"tftp_update_bios",
"(",
"server",
"=",
"None",
",",
"path",
"=",
"None",
")",
":",
"if",
"not",
"server",
":",
"raise",
"salt",
".",
"exceptions",
".",
"CommandExecutionError",
"(",
"\"The server name must be specified.\"",
")",
"if",
"not",
"path",
":... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _acl_changes | return True if the acl need to be update, False if it doesn't need to be update | salt/states/consul.py | def _acl_changes(name, id=None, type=None, rules=None, consul_url=None, token=None):
'''
return True if the acl need to be update, False if it doesn't need to be update
'''
info = __salt__['consul.acl_info'](id=id, token=token, consul_url=consul_url)
if info['res'] and info['data'][0]['Name'] !=... | def _acl_changes(name, id=None, type=None, rules=None, consul_url=None, token=None):
'''
return True if the acl need to be update, False if it doesn't need to be update
'''
info = __salt__['consul.acl_info'](id=id, token=token, consul_url=consul_url)
if info['res'] and info['data'][0]['Name'] !=... | [
"return",
"True",
"if",
"the",
"acl",
"need",
"to",
"be",
"update",
"False",
"if",
"it",
"doesn",
"t",
"need",
"to",
"be",
"update"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/consul.py#L24-L37 | [
"def",
"_acl_changes",
"(",
"name",
",",
"id",
"=",
"None",
",",
"type",
"=",
"None",
",",
"rules",
"=",
"None",
",",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
")",
":",
"info",
"=",
"__salt__",
"[",
"'consul.acl_info'",
"]",
"(",
"id",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _acl_exists | Check the acl exists by using the name or the ID,
name is ignored if ID is specified,
if only Name is used the ID associated with it is returned | salt/states/consul.py | def _acl_exists(name=None, id=None, token=None, consul_url=None):
'''
Check the acl exists by using the name or the ID,
name is ignored if ID is specified,
if only Name is used the ID associated with it is returned
'''
ret = {'result': False, 'id': None}
if id:
info = __sa... | def _acl_exists(name=None, id=None, token=None, consul_url=None):
'''
Check the acl exists by using the name or the ID,
name is ignored if ID is specified,
if only Name is used the ID associated with it is returned
'''
ret = {'result': False, 'id': None}
if id:
info = __sa... | [
"Check",
"the",
"acl",
"exists",
"by",
"using",
"the",
"name",
"or",
"the",
"ID",
"name",
"is",
"ignored",
"if",
"ID",
"is",
"specified",
"if",
"only",
"Name",
"is",
"used",
"the",
"ID",
"associated",
"with",
"it",
"is",
"returned"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/consul.py#L40-L65 | [
"def",
"_acl_exists",
"(",
"name",
"=",
"None",
",",
"id",
"=",
"None",
",",
"token",
"=",
"None",
",",
"consul_url",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'result'",
":",
"False",
",",
"'id'",
":",
"None",
"}",
"if",
"id",
":",
"info",
"=",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | acl_present | Ensure the ACL is present
name
Specifies a human-friendly name for the ACL token.
id
Specifies the ID of the ACL.
type: client
Specifies the type of ACL token. Valid values are: client and management.
rules
Specifies rules for this ACL token.
consul_url : http://... | salt/states/consul.py | def acl_present(name, id=None, token=None, type="client", rules="", consul_url='http://localhost:8500'):
'''
Ensure the ACL is present
name
Specifies a human-friendly name for the ACL token.
id
Specifies the ID of the ACL.
type: client
Specifies the type of ACL token. Vali... | def acl_present(name, id=None, token=None, type="client", rules="", consul_url='http://localhost:8500'):
'''
Ensure the ACL is present
name
Specifies a human-friendly name for the ACL token.
id
Specifies the ID of the ACL.
type: client
Specifies the type of ACL token. Vali... | [
"Ensure",
"the",
"ACL",
"is",
"present"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/consul.py#L68-L128 | [
"def",
"acl_present",
"(",
"name",
",",
"id",
"=",
"None",
",",
"token",
"=",
"None",
",",
"type",
"=",
"\"client\"",
",",
"rules",
"=",
"\"\"",
",",
"consul_url",
"=",
"'http://localhost:8500'",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | acl_absent | Ensure the ACL is absent
name
Specifies a human-friendly name for the ACL token.
id
Specifies the ID of the ACL.
token
token to authenticate you Consul query
consul_url : http://locahost:8500
consul URL to query
.. note::
For more information https://www.... | salt/states/consul.py | def acl_absent(name, id=None, token=None, consul_url='http://localhost:8500'):
'''
Ensure the ACL is absent
name
Specifies a human-friendly name for the ACL token.
id
Specifies the ID of the ACL.
token
token to authenticate you Consul query
consul_url : http://locahos... | def acl_absent(name, id=None, token=None, consul_url='http://localhost:8500'):
'''
Ensure the ACL is absent
name
Specifies a human-friendly name for the ACL token.
id
Specifies the ID of the ACL.
token
token to authenticate you Consul query
consul_url : http://locahos... | [
"Ensure",
"the",
"ACL",
"is",
"absent"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/consul.py#L131-L172 | [
"def",
"acl_absent",
"(",
"name",
",",
"id",
"=",
"None",
",",
"token",
"=",
"None",
",",
"consul_url",
"=",
"'http://localhost:8500'",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"id",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"True",
","... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | nvme_nqn | Return NVMe NQN | salt/grains/nvme.py | def nvme_nqn():
'''
Return NVMe NQN
'''
grains = {}
grains['nvme_nqn'] = False
if salt.utils.platform.is_linux():
grains['nvme_nqn'] = _linux_nqn()
return grains | def nvme_nqn():
'''
Return NVMe NQN
'''
grains = {}
grains['nvme_nqn'] = False
if salt.utils.platform.is_linux():
grains['nvme_nqn'] = _linux_nqn()
return grains | [
"Return",
"NVMe",
"NQN"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/nvme.py#L36-L44 | [
"def",
"nvme_nqn",
"(",
")",
":",
"grains",
"=",
"{",
"}",
"grains",
"[",
"'nvme_nqn'",
"]",
"=",
"False",
"if",
"salt",
".",
"utils",
".",
"platform",
".",
"is_linux",
"(",
")",
":",
"grains",
"[",
"'nvme_nqn'",
"]",
"=",
"_linux_nqn",
"(",
")",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _linux_nqn | Return NVMe NQN from a Linux host. | salt/grains/nvme.py | def _linux_nqn():
'''
Return NVMe NQN from a Linux host.
'''
ret = []
initiator = '/etc/nvme/hostnqn'
try:
with salt.utils.files.fopen(initiator, 'r') as _nvme:
for line in _nvme:
line = line.strip()
if line.startswith('nqn.'):
... | def _linux_nqn():
'''
Return NVMe NQN from a Linux host.
'''
ret = []
initiator = '/etc/nvme/hostnqn'
try:
with salt.utils.files.fopen(initiator, 'r') as _nvme:
for line in _nvme:
line = line.strip()
if line.startswith('nqn.'):
... | [
"Return",
"NVMe",
"NQN",
"from",
"a",
"Linux",
"host",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/nvme.py#L47-L64 | [
"def",
"_linux_nqn",
"(",
")",
":",
"ret",
"=",
"[",
"]",
"initiator",
"=",
"'/etc/nvme/hostnqn'",
"try",
":",
"with",
"salt",
".",
"utils",
".",
"files",
".",
"fopen",
"(",
"initiator",
",",
"'r'",
")",
"as",
"_nvme",
":",
"for",
"line",
"in",
"_nvm... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | managed | Create or manage a java keystore.
name
The path to the keystore file
passphrase
The password to the keystore
entries
A list containing an alias, certificate, and optional private_key.
The certificate and private_key can be a file or a string
.. code-block:: yaml
... | salt/states/keystore.py | def managed(name, passphrase, entries, force_remove=False):
'''
Create or manage a java keystore.
name
The path to the keystore file
passphrase
The password to the keystore
entries
A list containing an alias, certificate, and optional private_key.
The certificate a... | def managed(name, passphrase, entries, force_remove=False):
'''
Create or manage a java keystore.
name
The path to the keystore file
passphrase
The password to the keystore
entries
A list containing an alias, certificate, and optional private_key.
The certificate a... | [
"Create",
"or",
"manage",
"a",
"java",
"keystore",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/keystore.py#L27-L151 | [
"def",
"managed",
"(",
"name",
",",
"passphrase",
",",
"entries",
",",
"force_remove",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"'changes'",
":",
"{",
"}",
",",
"'comment'",
":",
"''",
",",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
"}",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | disable | Disable the Packet Filter.
CLI example:
.. code-block:: bash
salt '*' pf.disable | salt/modules/pf.py | def disable():
'''
Disable the Packet Filter.
CLI example:
.. code-block:: bash
salt '*' pf.disable
'''
ret = {}
result = __salt__['cmd.run_all']('pfctl -d',
output_loglevel='trace',
python_shell=False)
... | def disable():
'''
Disable the Packet Filter.
CLI example:
.. code-block:: bash
salt '*' pf.disable
'''
ret = {}
result = __salt__['cmd.run_all']('pfctl -d',
output_loglevel='trace',
python_shell=False)
... | [
"Disable",
"the",
"Packet",
"Filter",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pf.py#L68-L96 | [
"def",
"disable",
"(",
")",
":",
"ret",
"=",
"{",
"}",
"result",
"=",
"__salt__",
"[",
"'cmd.run_all'",
"]",
"(",
"'pfctl -d'",
",",
"output_loglevel",
"=",
"'trace'",
",",
"python_shell",
"=",
"False",
")",
"if",
"result",
"[",
"'retcode'",
"]",
"==",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | loglevel | Set the debug level which limits the severity of log messages printed by ``pf(4)``.
level:
Log level. Should be one of the following: emerg, alert, crit, err, warning, notice,
info or debug (OpenBSD); or none, urgent, misc, loud (FreeBSD).
CLI example:
.. code-block:: bash
salt '... | salt/modules/pf.py | def loglevel(level):
'''
Set the debug level which limits the severity of log messages printed by ``pf(4)``.
level:
Log level. Should be one of the following: emerg, alert, crit, err, warning, notice,
info or debug (OpenBSD); or none, urgent, misc, loud (FreeBSD).
CLI example:
.. ... | def loglevel(level):
'''
Set the debug level which limits the severity of log messages printed by ``pf(4)``.
level:
Log level. Should be one of the following: emerg, alert, crit, err, warning, notice,
info or debug (OpenBSD); or none, urgent, misc, loud (FreeBSD).
CLI example:
.. ... | [
"Set",
"the",
"debug",
"level",
"which",
"limits",
"the",
"severity",
"of",
"log",
"messages",
"printed",
"by",
"pf",
"(",
"4",
")",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pf.py#L99-L135 | [
"def",
"loglevel",
"(",
"level",
")",
":",
"# There's no way to getting the previous loglevel so imply we've",
"# always made a change.",
"ret",
"=",
"{",
"'changes'",
":",
"True",
"}",
"myos",
"=",
"__grains__",
"[",
"'os'",
"]",
"if",
"myos",
"==",
"'FreeBSD'",
":... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | load | Load a ruleset from the specific file, overwriting the currently loaded ruleset.
file:
Full path to the file containing the ruleset.
noop:
Don't actually load the rules, just parse them.
CLI example:
.. code-block:: bash
salt '*' pf.load /etc/pf.conf.d/lockdown.conf | salt/modules/pf.py | def load(file='/etc/pf.conf', noop=False):
'''
Load a ruleset from the specific file, overwriting the currently loaded ruleset.
file:
Full path to the file containing the ruleset.
noop:
Don't actually load the rules, just parse them.
CLI example:
.. code-block:: bash
... | def load(file='/etc/pf.conf', noop=False):
'''
Load a ruleset from the specific file, overwriting the currently loaded ruleset.
file:
Full path to the file containing the ruleset.
noop:
Don't actually load the rules, just parse them.
CLI example:
.. code-block:: bash
... | [
"Load",
"a",
"ruleset",
"from",
"the",
"specific",
"file",
"overwriting",
"the",
"currently",
"loaded",
"ruleset",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pf.py#L138-L173 | [
"def",
"load",
"(",
"file",
"=",
"'/etc/pf.conf'",
",",
"noop",
"=",
"False",
")",
":",
"# We cannot precisely determine if loading the ruleset implied",
"# any changes so assume it always does.",
"ret",
"=",
"{",
"'changes'",
":",
"True",
"}",
"cmd",
"=",
"[",
"'pfct... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | flush | Flush the specified packet filter parameters.
modifier:
Should be one of the following:
- all
- info
- osfp
- rules
- sources
- states
- tables
Please refer to the OpenBSD `pfctl(8) <https://man.openbsd.org/pfctl#T>`_
documentation f... | salt/modules/pf.py | def flush(modifier):
'''
Flush the specified packet filter parameters.
modifier:
Should be one of the following:
- all
- info
- osfp
- rules
- sources
- states
- tables
Please refer to the OpenBSD `pfctl(8) <https://man.openbsd.org/p... | def flush(modifier):
'''
Flush the specified packet filter parameters.
modifier:
Should be one of the following:
- all
- info
- osfp
- rules
- sources
- states
- tables
Please refer to the OpenBSD `pfctl(8) <https://man.openbsd.org/p... | [
"Flush",
"the",
"specified",
"packet",
"filter",
"parameters",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pf.py#L176-L232 | [
"def",
"flush",
"(",
"modifier",
")",
":",
"ret",
"=",
"{",
"}",
"all_modifiers",
"=",
"[",
"'rules'",
",",
"'states'",
",",
"'info'",
",",
"'osfp'",
",",
"'all'",
",",
"'sources'",
",",
"'tables'",
"]",
"# Accept the following two modifiers to allow for a consi... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | table | Apply a command on the specified table.
table:
Name of the table.
command:
Command to apply to the table. Supported commands are:
- add
- delete
- expire
- flush
- kill
- replace
- show
- test
- zero
Please refer... | salt/modules/pf.py | def table(command, table, **kwargs):
'''
Apply a command on the specified table.
table:
Name of the table.
command:
Command to apply to the table. Supported commands are:
- add
- delete
- expire
- flush
- kill
- replace
- show
... | def table(command, table, **kwargs):
'''
Apply a command on the specified table.
table:
Name of the table.
command:
Command to apply to the table. Supported commands are:
- add
- delete
- expire
- flush
- kill
- replace
- show
... | [
"Apply",
"a",
"command",
"on",
"the",
"specified",
"table",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pf.py#L235-L310 | [
"def",
"table",
"(",
"command",
",",
"table",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"all_commands",
"=",
"[",
"'kill'",
",",
"'flush'",
",",
"'add'",
",",
"'delete'",
",",
"'expire'",
",",
"'replace'",
",",
"'show'",
",",
"'test'",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | show | Show filter parameters.
modifier:
Modifier to apply for filtering. Only a useful subset of what pfctl supports
can be used with Salt.
- rules
- states
- tables
CLI example:
.. code-block:: bash
salt '*' pf.show rules | salt/modules/pf.py | def show(modifier):
'''
Show filter parameters.
modifier:
Modifier to apply for filtering. Only a useful subset of what pfctl supports
can be used with Salt.
- rules
- states
- tables
CLI example:
.. code-block:: bash
salt '*' pf.show rules
''... | def show(modifier):
'''
Show filter parameters.
modifier:
Modifier to apply for filtering. Only a useful subset of what pfctl supports
can be used with Salt.
- rules
- states
- tables
CLI example:
.. code-block:: bash
salt '*' pf.show rules
''... | [
"Show",
"filter",
"parameters",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pf.py#L313-L356 | [
"def",
"show",
"(",
"modifier",
")",
":",
"# By definition showing the parameters makes no changes.",
"ret",
"=",
"{",
"'changes'",
":",
"False",
"}",
"capital_modifiers",
"=",
"[",
"'Tables'",
"]",
"all_modifiers",
"=",
"[",
"'rules'",
",",
"'states'",
",",
"'tab... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_event | Create an event on the VictorOps service
.. code-block:: yaml
webserver-warning-message:
victorops.create_event:
- message_type: 'CRITICAL'
- entity_id: 'webserver/diskspace'
- state_message: 'Webserver diskspace is low.'
database-server-warning-messa... | salt/states/victorops.py | def create_event(name, message_type, routing_key='everyone', **kwargs):
'''
Create an event on the VictorOps service
.. code-block:: yaml
webserver-warning-message:
victorops.create_event:
- message_type: 'CRITICAL'
- entity_id: 'webserver/diskspace'
-... | def create_event(name, message_type, routing_key='everyone', **kwargs):
'''
Create an event on the VictorOps service
.. code-block:: yaml
webserver-warning-message:
victorops.create_event:
- message_type: 'CRITICAL'
- entity_id: 'webserver/diskspace'
-... | [
"Create",
"an",
"event",
"on",
"the",
"VictorOps",
"service"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/victorops.py#L31-L115 | [
"def",
"create_event",
"(",
"name",
",",
"message_type",
",",
"routing_key",
"=",
"'everyone'",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'comment'",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _auth | Set up neutron credentials | salt/modules/neutron.py | def _auth(profile=None):
'''
Set up neutron credentials
'''
if profile:
credentials = __salt__['config.option'](profile)
user = credentials['keystone.user']
password = credentials['keystone.password']
tenant = credentials['keystone.tenant']
auth_url = credentials[... | def _auth(profile=None):
'''
Set up neutron credentials
'''
if profile:
credentials = __salt__['config.option'](profile)
user = credentials['keystone.user']
password = credentials['keystone.password']
tenant = credentials['keystone.tenant']
auth_url = credentials[... | [
"Set",
"up",
"neutron",
"credentials"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L99-L153 | [
"def",
"_auth",
"(",
"profile",
"=",
"None",
")",
":",
"if",
"profile",
":",
"credentials",
"=",
"__salt__",
"[",
"'config.option'",
"]",
"(",
"profile",
")",
"user",
"=",
"credentials",
"[",
"'keystone.user'",
"]",
"password",
"=",
"credentials",
"[",
"'k... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | update_quota | Update a tenant's quota
CLI Example:
.. code-block:: bash
salt '*' neutron.update_quota tenant-id subnet=40 router=50
network=10 floatingip=30 port=30
:param tenant_id: ID of tenant
:param subnet: Value of subnet quota (Optional)
:param router: Value o... | salt/modules/neutron.py | def update_quota(tenant_id,
subnet=None,
router=None,
network=None,
floatingip=None,
port=None,
security_group=None,
security_group_rule=None,
profile=None):
'''
Update a tenan... | def update_quota(tenant_id,
subnet=None,
router=None,
network=None,
floatingip=None,
port=None,
security_group=None,
security_group_rule=None,
profile=None):
'''
Update a tenan... | [
"Update",
"a",
"tenant",
"s",
"quota"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L212-L245 | [
"def",
"update_quota",
"(",
"tenant_id",
",",
"subnet",
"=",
"None",
",",
"router",
"=",
"None",
",",
"network",
"=",
"None",
",",
"floatingip",
"=",
"None",
",",
"port",
"=",
"None",
",",
"security_group",
"=",
"None",
",",
"security_group_rule",
"=",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_port | Creates a new port
CLI Example:
.. code-block:: bash
salt '*' neutron.create_port network-name port-name
:param name: Name of port to create
:param network: Network name or ID
:param device_id: ID of device (Optional)
:param admin_state_up: Set admin state up to true or false,
... | salt/modules/neutron.py | def create_port(name,
network,
device_id=None,
admin_state_up=True,
profile=None):
'''
Creates a new port
CLI Example:
.. code-block:: bash
salt '*' neutron.create_port network-name port-name
:param name: Name of port to cre... | def create_port(name,
network,
device_id=None,
admin_state_up=True,
profile=None):
'''
Creates a new port
CLI Example:
.. code-block:: bash
salt '*' neutron.create_port network-name port-name
:param name: Name of port to cre... | [
"Creates",
"a",
"new",
"port"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L322-L345 | [
"def",
"create_port",
"(",
"name",
",",
"network",
",",
"device_id",
"=",
"None",
",",
"admin_state_up",
"=",
"True",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"create_port",
"(",
"name",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | update_port | Updates a port
CLI Example:
.. code-block:: bash
salt '*' neutron.update_port port-name network-name new-port-name
:param port: Port name or ID
:param name: Name of this port
:param admin_state_up: Set admin state up to true or false,
default: true (Optional)
:param profi... | salt/modules/neutron.py | def update_port(port, name, admin_state_up=True, profile=None):
'''
Updates a port
CLI Example:
.. code-block:: bash
salt '*' neutron.update_port port-name network-name new-port-name
:param port: Port name or ID
:param name: Name of this port
:param admin_state_up: Set admin stat... | def update_port(port, name, admin_state_up=True, profile=None):
'''
Updates a port
CLI Example:
.. code-block:: bash
salt '*' neutron.update_port port-name network-name new-port-name
:param port: Port name or ID
:param name: Name of this port
:param admin_state_up: Set admin stat... | [
"Updates",
"a",
"port"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L348-L366 | [
"def",
"update_port",
"(",
"port",
",",
"name",
",",
"admin_state_up",
"=",
"True",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"update_port",
"(",
"port",
",",
"name",
",",
"admin_state_up",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_network | Creates a new network
CLI Example:
.. code-block:: bash
salt '*' neutron.create_network network-name
salt '*' neutron.create_network network-name profile=openstack1
:param name: Name of network to create
:param admin_state_up: should the state of the network be up?
defaul... | salt/modules/neutron.py | def create_network(name, router_ext=None, admin_state_up=True, network_type=None, physical_network=None, segmentation_id=None, shared=None, profile=None):
'''
Creates a new network
CLI Example:
.. code-block:: bash
salt '*' neutron.create_network network-name
salt '*' neutron.create_n... | def create_network(name, router_ext=None, admin_state_up=True, network_type=None, physical_network=None, segmentation_id=None, shared=None, profile=None):
'''
Creates a new network
CLI Example:
.. code-block:: bash
salt '*' neutron.create_network network-name
salt '*' neutron.create_n... | [
"Creates",
"a",
"new",
"network"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L425-L448 | [
"def",
"create_network",
"(",
"name",
",",
"router_ext",
"=",
"None",
",",
"admin_state_up",
"=",
"True",
",",
"network_type",
"=",
"None",
",",
"physical_network",
"=",
"None",
",",
"segmentation_id",
"=",
"None",
",",
"shared",
"=",
"None",
",",
"profile",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | update_network | Updates a network
CLI Example:
.. code-block:: bash
salt '*' neutron.update_network network-name new-network-name
:param network: ID or name of network to update
:param name: Name of this network
:param profile: Profile to build on (Optional)
:return: Value of updated network informa... | salt/modules/neutron.py | def update_network(network, name, profile=None):
'''
Updates a network
CLI Example:
.. code-block:: bash
salt '*' neutron.update_network network-name new-network-name
:param network: ID or name of network to update
:param name: Name of this network
:param profile: Profile to buil... | def update_network(network, name, profile=None):
'''
Updates a network
CLI Example:
.. code-block:: bash
salt '*' neutron.update_network network-name new-network-name
:param network: ID or name of network to update
:param name: Name of this network
:param profile: Profile to buil... | [
"Updates",
"a",
"network"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L451-L467 | [
"def",
"update_network",
"(",
"network",
",",
"name",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"update_network",
"(",
"network",
",",
"name",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_subnet | Creates a new subnet
CLI Example:
.. code-block:: bash
salt '*' neutron.create_subnet network-name 192.168.1.0/24
:param network: Network ID or name this subnet belongs to
:param cidr: CIDR of subnet to create (Ex. '192.168.1.0/24')
:param name: Name of the subnet to create (Optional)
... | salt/modules/neutron.py | def create_subnet(network, cidr, name=None,
ip_version=4, profile=None):
'''
Creates a new subnet
CLI Example:
.. code-block:: bash
salt '*' neutron.create_subnet network-name 192.168.1.0/24
:param network: Network ID or name this subnet belongs to
:param cidr: CIDR... | def create_subnet(network, cidr, name=None,
ip_version=4, profile=None):
'''
Creates a new subnet
CLI Example:
.. code-block:: bash
salt '*' neutron.create_subnet network-name 192.168.1.0/24
:param network: Network ID or name this subnet belongs to
:param cidr: CIDR... | [
"Creates",
"a",
"new",
"subnet"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L525-L544 | [
"def",
"create_subnet",
"(",
"network",
",",
"cidr",
",",
"name",
"=",
"None",
",",
"ip_version",
"=",
"4",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"create_subnet",
"(",
"network",
",",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | update_subnet | Updates a subnet
CLI Example:
.. code-block:: bash
salt '*' neutron.update_subnet subnet-name new-subnet-name
:param subnet: ID or name of subnet to update
:param name: Name of this subnet
:param profile: Profile to build on (Optional)
:return: Value of updated subnet information | salt/modules/neutron.py | def update_subnet(subnet, name, profile=None):
'''
Updates a subnet
CLI Example:
.. code-block:: bash
salt '*' neutron.update_subnet subnet-name new-subnet-name
:param subnet: ID or name of subnet to update
:param name: Name of this subnet
:param profile: Profile to build on (Opt... | def update_subnet(subnet, name, profile=None):
'''
Updates a subnet
CLI Example:
.. code-block:: bash
salt '*' neutron.update_subnet subnet-name new-subnet-name
:param subnet: ID or name of subnet to update
:param name: Name of this subnet
:param profile: Profile to build on (Opt... | [
"Updates",
"a",
"subnet"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L547-L563 | [
"def",
"update_subnet",
"(",
"subnet",
",",
"name",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"update_subnet",
"(",
"subnet",
",",
"name",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_router | Creates a new router
CLI Example:
.. code-block:: bash
salt '*' neutron.create_router new-router-name
:param name: Name of router to create (must be first)
:param ext_network: ID or name of the external for the gateway (Optional)
:param admin_state_up: Set admin state up to true or false... | salt/modules/neutron.py | def create_router(name, ext_network=None,
admin_state_up=True, profile=None):
'''
Creates a new router
CLI Example:
.. code-block:: bash
salt '*' neutron.create_router new-router-name
:param name: Name of router to create (must be first)
:param ext_network: ID or na... | def create_router(name, ext_network=None,
admin_state_up=True, profile=None):
'''
Creates a new router
CLI Example:
.. code-block:: bash
salt '*' neutron.create_router new-router-name
:param name: Name of router to create (must be first)
:param ext_network: ID or na... | [
"Creates",
"a",
"new",
"router"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L621-L640 | [
"def",
"create_router",
"(",
"name",
",",
"ext_network",
"=",
"None",
",",
"admin_state_up",
"=",
"True",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"create_router",
"(",
"name",
",",
"ext_net... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | update_router | Updates a router
CLI Example:
.. code-block:: bash
salt '*' neutron.update_router router_id name=new-router-name
admin_state_up=True
:param router: ID or name of router to update
:param name: Name of this router
:param ext_network: ID or name of the external for the gatew... | salt/modules/neutron.py | def update_router(router,
name=None,
admin_state_up=None,
profile=None,
**kwargs):
'''
Updates a router
CLI Example:
.. code-block:: bash
salt '*' neutron.update_router router_id name=new-router-name
admin... | def update_router(router,
name=None,
admin_state_up=None,
profile=None,
**kwargs):
'''
Updates a router
CLI Example:
.. code-block:: bash
salt '*' neutron.update_router router_id name=new-router-name
admin... | [
"Updates",
"a",
"router"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L643-L668 | [
"def",
"update_router",
"(",
"router",
",",
"name",
"=",
"None",
",",
"admin_state_up",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"update_router",
"(",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | add_interface_router | Adds an internal network interface to the specified router
CLI Example:
.. code-block:: bash
salt '*' neutron.add_interface_router router-name subnet-name
:param router: ID or name of the router
:param subnet: ID or name of the subnet
:param profile: Profile to build on (Optional)
:r... | salt/modules/neutron.py | def add_interface_router(router, subnet, profile=None):
'''
Adds an internal network interface to the specified router
CLI Example:
.. code-block:: bash
salt '*' neutron.add_interface_router router-name subnet-name
:param router: ID or name of the router
:param subnet: ID or name of ... | def add_interface_router(router, subnet, profile=None):
'''
Adds an internal network interface to the specified router
CLI Example:
.. code-block:: bash
salt '*' neutron.add_interface_router router-name subnet-name
:param router: ID or name of the router
:param subnet: ID or name of ... | [
"Adds",
"an",
"internal",
"network",
"interface",
"to",
"the",
"specified",
"router"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L689-L705 | [
"def",
"add_interface_router",
"(",
"router",
",",
"subnet",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"add_interface_router",
"(",
"router",
",",
"subnet",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | remove_interface_router | Removes an internal network interface from the specified router
CLI Example:
.. code-block:: bash
salt '*' neutron.remove_interface_router router-name subnet-name
:param router: ID or name of the router
:param subnet: ID or name of the subnet
:param profile: Profile to build on (Optional... | salt/modules/neutron.py | def remove_interface_router(router, subnet, profile=None):
'''
Removes an internal network interface from the specified router
CLI Example:
.. code-block:: bash
salt '*' neutron.remove_interface_router router-name subnet-name
:param router: ID or name of the router
:param subnet: ID ... | def remove_interface_router(router, subnet, profile=None):
'''
Removes an internal network interface from the specified router
CLI Example:
.. code-block:: bash
salt '*' neutron.remove_interface_router router-name subnet-name
:param router: ID or name of the router
:param subnet: ID ... | [
"Removes",
"an",
"internal",
"network",
"interface",
"from",
"the",
"specified",
"router"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L708-L724 | [
"def",
"remove_interface_router",
"(",
"router",
",",
"subnet",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"remove_interface_router",
"(",
"router",
",",
"subnet",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | add_gateway_router | Adds an external network gateway to the specified router
CLI Example:
.. code-block:: bash
salt '*' neutron.add_gateway_router router-name ext-network-name
:param router: ID or name of the router
:param ext_network: ID or name of the external network the gateway
:param profile: Profile t... | salt/modules/neutron.py | def add_gateway_router(router, ext_network, profile=None):
'''
Adds an external network gateway to the specified router
CLI Example:
.. code-block:: bash
salt '*' neutron.add_gateway_router router-name ext-network-name
:param router: ID or name of the router
:param ext_network: ID or... | def add_gateway_router(router, ext_network, profile=None):
'''
Adds an external network gateway to the specified router
CLI Example:
.. code-block:: bash
salt '*' neutron.add_gateway_router router-name ext-network-name
:param router: ID or name of the router
:param ext_network: ID or... | [
"Adds",
"an",
"external",
"network",
"gateway",
"to",
"the",
"specified",
"router"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L727-L743 | [
"def",
"add_gateway_router",
"(",
"router",
",",
"ext_network",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"add_gateway_router",
"(",
"router",
",",
"ext_network",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_floatingip | Creates a new floatingIP
CLI Example:
.. code-block:: bash
salt '*' neutron.create_floatingip network-name port-name
:param floating_network: Network name or ID to allocate floatingIP from
:param port: Of the port to be associated with the floatingIP (Optional)
:param profile: Profile to... | salt/modules/neutron.py | def create_floatingip(floating_network, port=None, profile=None):
'''
Creates a new floatingIP
CLI Example:
.. code-block:: bash
salt '*' neutron.create_floatingip network-name port-name
:param floating_network: Network name or ID to allocate floatingIP from
:param port: Of the port ... | def create_floatingip(floating_network, port=None, profile=None):
'''
Creates a new floatingIP
CLI Example:
.. code-block:: bash
salt '*' neutron.create_floatingip network-name port-name
:param floating_network: Network name or ID to allocate floatingIP from
:param port: Of the port ... | [
"Creates",
"a",
"new",
"floatingIP"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L800-L816 | [
"def",
"create_floatingip",
"(",
"floating_network",
",",
"port",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"create_floatingip",
"(",
"floating_network",
",",
"port",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | update_floatingip | Updates a floatingIP
CLI Example:
.. code-block:: bash
salt '*' neutron.update_floatingip network-name port-name
:param floatingip_id: ID of floatingIP
:param port: ID or name of port, to associate floatingip to `None` or do
not specify to disassociate the floatingip (Optional)
:... | salt/modules/neutron.py | def update_floatingip(floatingip_id, port=None, profile=None):
'''
Updates a floatingIP
CLI Example:
.. code-block:: bash
salt '*' neutron.update_floatingip network-name port-name
:param floatingip_id: ID of floatingIP
:param port: ID or name of port, to associate floatingip to `None... | def update_floatingip(floatingip_id, port=None, profile=None):
'''
Updates a floatingIP
CLI Example:
.. code-block:: bash
salt '*' neutron.update_floatingip network-name port-name
:param floatingip_id: ID of floatingIP
:param port: ID or name of port, to associate floatingip to `None... | [
"Updates",
"a",
"floatingIP"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L819-L836 | [
"def",
"update_floatingip",
"(",
"floatingip_id",
",",
"port",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"update_floatingip",
"(",
"floatingip_id",
",",
"port",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_security_group | Creates a new security group
CLI Example:
.. code-block:: bash
salt '*' neutron.create_security_group security-group-name \
description='Security group for servers'
:param name: Name of security group (Optional)
:param description: Description of security group (Optional)
... | salt/modules/neutron.py | def create_security_group(name=None, description=None, profile=None):
'''
Creates a new security group
CLI Example:
.. code-block:: bash
salt '*' neutron.create_security_group security-group-name \
description='Security group for servers'
:param name: Name of security gro... | def create_security_group(name=None, description=None, profile=None):
'''
Creates a new security group
CLI Example:
.. code-block:: bash
salt '*' neutron.create_security_group security-group-name \
description='Security group for servers'
:param name: Name of security gro... | [
"Creates",
"a",
"new",
"security",
"group"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L893-L910 | [
"def",
"create_security_group",
"(",
"name",
"=",
"None",
",",
"description",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"create_security_group",
"(",
"name",
",",
"description",
")... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | update_security_group | Updates a security group
CLI Example:
.. code-block:: bash
salt '*' neutron.update_security_group security-group-name \
new-security-group-name
:param security_group: ID or name of security group to update
:param name: Name of this security group (Optional)
:param descrip... | salt/modules/neutron.py | def update_security_group(security_group, name=None, description=None,
profile=None):
'''
Updates a security group
CLI Example:
.. code-block:: bash
salt '*' neutron.update_security_group security-group-name \
new-security-group-name
:param secur... | def update_security_group(security_group, name=None, description=None,
profile=None):
'''
Updates a security group
CLI Example:
.. code-block:: bash
salt '*' neutron.update_security_group security-group-name \
new-security-group-name
:param secur... | [
"Updates",
"a",
"security",
"group"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L913-L932 | [
"def",
"update_security_group",
"(",
"security_group",
",",
"name",
"=",
"None",
",",
"description",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"update_security_group",
"(",
"security... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_security_group_rule | Creates a new security group rule
CLI Example:
.. code-block:: bash
salt '*' neutron.show_security_group_rule security-group-rule-id
:param security_group: Security group name or ID to add rule
:param remote_group_id: Remote security group name or ID to
apply rule (Optional)
... | salt/modules/neutron.py | def create_security_group_rule(security_group,
remote_group_id=None,
direction='ingress',
protocol=None,
port_range_min=None,
port_range_max=None,
... | def create_security_group_rule(security_group,
remote_group_id=None,
direction='ingress',
protocol=None,
port_range_min=None,
port_range_max=None,
... | [
"Creates",
"a",
"new",
"security",
"group",
"rule"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L989-L1026 | [
"def",
"create_security_group_rule",
"(",
"security_group",
",",
"remote_group_id",
"=",
"None",
",",
"direction",
"=",
"'ingress'",
",",
"protocol",
"=",
"None",
",",
"port_range_min",
"=",
"None",
",",
"port_range_max",
"=",
"None",
",",
"ethertype",
"=",
"'IP... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_vpnservices | Fetches a list of all configured VPN services for a tenant
CLI Example:
.. code-block:: bash
salt '*' neutron.list_vpnservices
:param retrieve_all: True or False, default: True (Optional)
:param profile: Profile to build on (Optional)
:return: List of VPN service | salt/modules/neutron.py | def list_vpnservices(retrieve_all=True, profile=None, **kwargs):
'''
Fetches a list of all configured VPN services for a tenant
CLI Example:
.. code-block:: bash
salt '*' neutron.list_vpnservices
:param retrieve_all: True or False, default: True (Optional)
:param profile: Profile to ... | def list_vpnservices(retrieve_all=True, profile=None, **kwargs):
'''
Fetches a list of all configured VPN services for a tenant
CLI Example:
.. code-block:: bash
salt '*' neutron.list_vpnservices
:param retrieve_all: True or False, default: True (Optional)
:param profile: Profile to ... | [
"Fetches",
"a",
"list",
"of",
"all",
"configured",
"VPN",
"services",
"for",
"a",
"tenant"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L1047-L1062 | [
"def",
"list_vpnservices",
"(",
"retrieve_all",
"=",
"True",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"list_vpnservices",
"(",
"retrieve_all",
",",
"*",
"*",
"kwargs... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | show_vpnservice | Fetches information of a specific VPN service
CLI Example:
.. code-block:: bash
salt '*' neutron.show_vpnservice vpnservice-name
:param vpnservice: ID or name of vpn service to look up
:param profile: Profile to build on (Optional)
:return: VPN service information | salt/modules/neutron.py | def show_vpnservice(vpnservice, profile=None, **kwargs):
'''
Fetches information of a specific VPN service
CLI Example:
.. code-block:: bash
salt '*' neutron.show_vpnservice vpnservice-name
:param vpnservice: ID or name of vpn service to look up
:param profile: Profile to build on (O... | def show_vpnservice(vpnservice, profile=None, **kwargs):
'''
Fetches information of a specific VPN service
CLI Example:
.. code-block:: bash
salt '*' neutron.show_vpnservice vpnservice-name
:param vpnservice: ID or name of vpn service to look up
:param profile: Profile to build on (O... | [
"Fetches",
"information",
"of",
"a",
"specific",
"VPN",
"service"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L1065-L1080 | [
"def",
"show_vpnservice",
"(",
"vpnservice",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"show_vpnservice",
"(",
"vpnservice",
",",
"*",
"*",
"kwargs",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_vpnservice | Creates a new VPN service
CLI Example:
.. code-block:: bash
salt '*' neutron.create_vpnservice router-name name
:param subnet: Subnet unique identifier for the VPN service deployment
:param router: Router unique identifier for the VPN service
:param name: Set a name for the VPN service
... | salt/modules/neutron.py | def create_vpnservice(subnet, router, name, admin_state_up=True, profile=None):
'''
Creates a new VPN service
CLI Example:
.. code-block:: bash
salt '*' neutron.create_vpnservice router-name name
:param subnet: Subnet unique identifier for the VPN service deployment
:param router: Ro... | def create_vpnservice(subnet, router, name, admin_state_up=True, profile=None):
'''
Creates a new VPN service
CLI Example:
.. code-block:: bash
salt '*' neutron.create_vpnservice router-name name
:param subnet: Subnet unique identifier for the VPN service deployment
:param router: Ro... | [
"Creates",
"a",
"new",
"VPN",
"service"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L1083-L1102 | [
"def",
"create_vpnservice",
"(",
"subnet",
",",
"router",
",",
"name",
",",
"admin_state_up",
"=",
"True",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"create_vpnservice",
"(",
"subnet",
",",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | update_vpnservice | Updates a VPN service
CLI Example:
.. code-block:: bash
salt '*' neutron.update_vpnservice vpnservice-name desc='VPN Service1'
:param vpnservice: ID or name of vpn service to update
:param desc: Set a description for the VPN service
:param profile: Profile to build on (Optional)
:ret... | salt/modules/neutron.py | def update_vpnservice(vpnservice, desc, profile=None):
'''
Updates a VPN service
CLI Example:
.. code-block:: bash
salt '*' neutron.update_vpnservice vpnservice-name desc='VPN Service1'
:param vpnservice: ID or name of vpn service to update
:param desc: Set a description for the VPN ... | def update_vpnservice(vpnservice, desc, profile=None):
'''
Updates a VPN service
CLI Example:
.. code-block:: bash
salt '*' neutron.update_vpnservice vpnservice-name desc='VPN Service1'
:param vpnservice: ID or name of vpn service to update
:param desc: Set a description for the VPN ... | [
"Updates",
"a",
"VPN",
"service"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L1105-L1121 | [
"def",
"update_vpnservice",
"(",
"vpnservice",
",",
"desc",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"update_vpnservice",
"(",
"vpnservice",
",",
"desc",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_ipsec_site_connection | Creates a new IPsecSiteConnection
CLI Example:
.. code-block:: bash
salt '*' neutron.show_ipsec_site_connection connection-name
ipsec-policy-name ikepolicy-name vpnservice-name
192.168.XXX.XXX/24 192.168.XXX.XXX 192.168.XXX.XXX secret
:param name: Set friendly nam... | salt/modules/neutron.py | def create_ipsec_site_connection(name,
ipsecpolicy,
ikepolicy,
vpnservice,
peer_cidrs,
peer_address,
peer_id,
... | def create_ipsec_site_connection(name,
ipsecpolicy,
ikepolicy,
vpnservice,
peer_cidrs,
peer_address,
peer_id,
... | [
"Creates",
"a",
"new",
"IPsecSiteConnection"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L1179-L1232 | [
"def",
"create_ipsec_site_connection",
"(",
"name",
",",
"ipsecpolicy",
",",
"ikepolicy",
",",
"vpnservice",
",",
"peer_cidrs",
",",
"peer_address",
",",
"peer_id",
",",
"psk",
",",
"admin_state_up",
"=",
"True",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_ikepolicy | Creates a new IKEPolicy
CLI Example:
.. code-block:: bash
salt '*' neutron.create_ikepolicy ikepolicy-name
phase1_negotiation_mode=main auth_algorithm=sha1
encryption_algorithm=aes-128 pfs=group5
:param name: Name of the IKE policy
:param phase1_negotiation_mo... | salt/modules/neutron.py | def create_ikepolicy(name, profile=None, **kwargs):
'''
Creates a new IKEPolicy
CLI Example:
.. code-block:: bash
salt '*' neutron.create_ikepolicy ikepolicy-name
phase1_negotiation_mode=main auth_algorithm=sha1
encryption_algorithm=aes-128 pfs=group5
:par... | def create_ikepolicy(name, profile=None, **kwargs):
'''
Creates a new IKEPolicy
CLI Example:
.. code-block:: bash
salt '*' neutron.create_ikepolicy ikepolicy-name
phase1_negotiation_mode=main auth_algorithm=sha1
encryption_algorithm=aes-128 pfs=group5
:par... | [
"Creates",
"a",
"new",
"IKEPolicy"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L1289-L1318 | [
"def",
"create_ikepolicy",
"(",
"name",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"create_ikepolicy",
"(",
"name",
",",
"*",
"*",
"kwargs",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_ipsecpolicy | Creates a new IPsecPolicy
CLI Example:
.. code-block:: bash
salt '*' neutron.create_ipsecpolicy ipsecpolicy-name
transform_protocol=esp auth_algorithm=sha1
encapsulation_mode=tunnel encryption_algorithm=aes-128
:param name: Name of the IPSec policy
:param tran... | salt/modules/neutron.py | def create_ipsecpolicy(name, profile=None, **kwargs):
'''
Creates a new IPsecPolicy
CLI Example:
.. code-block:: bash
salt '*' neutron.create_ipsecpolicy ipsecpolicy-name
transform_protocol=esp auth_algorithm=sha1
encapsulation_mode=tunnel encryption_algorithm=... | def create_ipsecpolicy(name, profile=None, **kwargs):
'''
Creates a new IPsecPolicy
CLI Example:
.. code-block:: bash
salt '*' neutron.create_ipsecpolicy ipsecpolicy-name
transform_protocol=esp auth_algorithm=sha1
encapsulation_mode=tunnel encryption_algorithm=... | [
"Creates",
"a",
"new",
"IPsecPolicy"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L1375-L1404 | [
"def",
"create_ipsecpolicy",
"(",
"name",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"create_ipsecpolicy",
"(",
"name",
",",
"*",
"*",
"kwargs",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | create_firewall_rule | Creates a new firewall rule
CLI Example:
.. code-block:: bash
salt '*' neutron.create_firewall_rule protocol action
tenant_id=TENANT_ID name=NAME description=DESCRIPTION ip_version=IP_VERSION
source_ip_address=SOURCE_IP_ADDRESS destination_ip_address=DESTINATION_IP_ADD... | salt/modules/neutron.py | def create_firewall_rule(protocol, action, profile=None, **kwargs):
'''
Creates a new firewall rule
CLI Example:
.. code-block:: bash
salt '*' neutron.create_firewall_rule protocol action
tenant_id=TENANT_ID name=NAME description=DESCRIPTION ip_version=IP_VERSION
... | def create_firewall_rule(protocol, action, profile=None, **kwargs):
'''
Creates a new firewall rule
CLI Example:
.. code-block:: bash
salt '*' neutron.create_firewall_rule protocol action
tenant_id=TENANT_ID name=NAME description=DESCRIPTION ip_version=IP_VERSION
... | [
"Creates",
"a",
"new",
"firewall",
"rule"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L1462-L1489 | [
"def",
"create_firewall_rule",
"(",
"protocol",
",",
"action",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"conn",
"=",
"_auth",
"(",
"profile",
")",
"return",
"conn",
".",
"create_firewall_rule",
"(",
"protocol",
",",
"action",
",",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | update_firewall_rule | Update a firewall rule
CLI Example:
.. code-block:: bash
salt '*' neutron.update_firewall_rule firewall_rule protocol=PROTOCOL action=ACTION
name=NAME description=DESCRIPTION ip_version=IP_VERSION
source_ip_address=SOURCE_IP_ADDRESS destination_ip_address=DESTINATION_I... | salt/modules/neutron.py | def update_firewall_rule(firewall_rule,
protocol=None,
action=None,
name=None,
description=None,
ip_version=None,
source_ip_address=None,
destina... | def update_firewall_rule(firewall_rule,
protocol=None,
action=None,
name=None,
description=None,
ip_version=None,
source_ip_address=None,
destina... | [
"Update",
"a",
"firewall",
"rule"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/neutron.py#L1510-L1552 | [
"def",
"update_firewall_rule",
"(",
"firewall_rule",
",",
"protocol",
"=",
"None",
",",
"action",
"=",
"None",
",",
"name",
"=",
"None",
",",
"description",
"=",
"None",
",",
"ip_version",
"=",
"None",
",",
"source_ip_address",
"=",
"None",
",",
"destination... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | active | Return a report on all actively running jobs from a job id centric
perspective
CLI Example:
.. code-block:: bash
salt-run jobs.active | salt/runners/jobs.py | def active(display_progress=False):
'''
Return a report on all actively running jobs from a job id centric
perspective
CLI Example:
.. code-block:: bash
salt-run jobs.active
'''
ret = {}
client = salt.client.get_local_client(__opts__['conf_file'])
try:
active_ = cl... | def active(display_progress=False):
'''
Return a report on all actively running jobs from a job id centric
perspective
CLI Example:
.. code-block:: bash
salt-run jobs.active
'''
ret = {}
client = salt.client.get_local_client(__opts__['conf_file'])
try:
active_ = cl... | [
"Return",
"a",
"report",
"on",
"all",
"actively",
"running",
"jobs",
"from",
"a",
"job",
"id",
"centric",
"perspective"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/jobs.py#L34-L78 | [
"def",
"active",
"(",
"display_progress",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"}",
"client",
"=",
"salt",
".",
"client",
".",
"get_local_client",
"(",
"__opts__",
"[",
"'conf_file'",
"]",
")",
"try",
":",
"active_",
"=",
"client",
".",
"cmd",
"(",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | lookup_jid | Return the printout from a previously executed job
jid
The jid to look up.
ext_source
The external job cache to use. Default: `None`.
returned : True
If ``True``, include the minions that did return from the command.
.. versionadded:: 2015.8.0
missing : False
... | salt/runners/jobs.py | def lookup_jid(jid,
ext_source=None,
returned=True,
missing=False,
display_progress=False):
'''
Return the printout from a previously executed job
jid
The jid to look up.
ext_source
The external job cache to use. Default: `Non... | def lookup_jid(jid,
ext_source=None,
returned=True,
missing=False,
display_progress=False):
'''
Return the printout from a previously executed job
jid
The jid to look up.
ext_source
The external job cache to use. Default: `Non... | [
"Return",
"the",
"printout",
"from",
"a",
"previously",
"executed",
"job"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/jobs.py#L81-L168 | [
"def",
"lookup_jid",
"(",
"jid",
",",
"ext_source",
"=",
"None",
",",
"returned",
"=",
"True",
",",
"missing",
"=",
"False",
",",
"display_progress",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"}",
"mminion",
"=",
"salt",
".",
"minion",
".",
"MasterMinio... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_job | List a specific job given by its jid
ext_source
If provided, specifies which external job cache to use.
display_progress : False
If ``True``, fire progress events.
.. versionadded:: 2015.8.8
CLI Example:
.. code-block:: bash
salt-run jobs.list_job 201309161255244635... | salt/runners/jobs.py | def list_job(jid, ext_source=None, display_progress=False):
'''
List a specific job given by its jid
ext_source
If provided, specifies which external job cache to use.
display_progress : False
If ``True``, fire progress events.
.. versionadded:: 2015.8.8
CLI Example:
... | def list_job(jid, ext_source=None, display_progress=False):
'''
List a specific job given by its jid
ext_source
If provided, specifies which external job cache to use.
display_progress : False
If ``True``, fire progress events.
.. versionadded:: 2015.8.8
CLI Example:
... | [
"List",
"a",
"specific",
"job",
"given",
"by",
"its",
"jid"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/jobs.py#L171-L214 | [
"def",
"list_job",
"(",
"jid",
",",
"ext_source",
"=",
"None",
",",
"display_progress",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"'jid'",
":",
"jid",
"}",
"mminion",
"=",
"salt",
".",
"minion",
".",
"MasterMinion",
"(",
"__opts__",
")",
"returner",
"="... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_jobs | List all detectable jobs and associated functions
ext_source
If provided, specifies which external job cache to use.
**FILTER OPTIONS**
.. note::
If more than one of the below options are used, only jobs which match
*all* of the filters will be returned.
search_metadata
... | salt/runners/jobs.py | def list_jobs(ext_source=None,
outputter=None,
search_metadata=None,
search_function=None,
search_target=None,
start_time=None,
end_time=None,
display_progress=False):
'''
List all detectable jobs and associated fu... | def list_jobs(ext_source=None,
outputter=None,
search_metadata=None,
search_function=None,
search_target=None,
start_time=None,
end_time=None,
display_progress=False):
'''
List all detectable jobs and associated fu... | [
"List",
"all",
"detectable",
"jobs",
"and",
"associated",
"functions"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/jobs.py#L217-L379 | [
"def",
"list_jobs",
"(",
"ext_source",
"=",
"None",
",",
"outputter",
"=",
"None",
",",
"search_metadata",
"=",
"None",
",",
"search_function",
"=",
"None",
",",
"search_target",
"=",
"None",
",",
"start_time",
"=",
"None",
",",
"end_time",
"=",
"None",
",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | list_jobs_filter | List all detectable jobs and associated functions
ext_source
The external job cache to use. Default: `None`.
CLI Example:
.. code-block:: bash
salt-run jobs.list_jobs_filter 50
salt-run jobs.list_jobs_filter 100 filter_find_job=False | salt/runners/jobs.py | def list_jobs_filter(count,
filter_find_job=True,
ext_source=None,
outputter=None,
display_progress=False):
'''
List all detectable jobs and associated functions
ext_source
The external job cache to use. Default: `N... | def list_jobs_filter(count,
filter_find_job=True,
ext_source=None,
outputter=None,
display_progress=False):
'''
List all detectable jobs and associated functions
ext_source
The external job cache to use. Default: `N... | [
"List",
"all",
"detectable",
"jobs",
"and",
"associated",
"functions"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/jobs.py#L382-L423 | [
"def",
"list_jobs_filter",
"(",
"count",
",",
"filter_find_job",
"=",
"True",
",",
"ext_source",
"=",
"None",
",",
"outputter",
"=",
"None",
",",
"display_progress",
"=",
"False",
")",
":",
"returner",
"=",
"_get_returner",
"(",
"(",
"__opts__",
"[",
"'ext_j... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | print_job | Print a specific job's detail given by it's jid, including the return data.
CLI Example:
.. code-block:: bash
salt-run jobs.print_job 20130916125524463507 | salt/runners/jobs.py | def print_job(jid, ext_source=None):
'''
Print a specific job's detail given by it's jid, including the return data.
CLI Example:
.. code-block:: bash
salt-run jobs.print_job 20130916125524463507
'''
ret = {}
returner = _get_returner((
__opts__['ext_job_cache'],
e... | def print_job(jid, ext_source=None):
'''
Print a specific job's detail given by it's jid, including the return data.
CLI Example:
.. code-block:: bash
salt-run jobs.print_job 20130916125524463507
'''
ret = {}
returner = _get_returner((
__opts__['ext_job_cache'],
e... | [
"Print",
"a",
"specific",
"job",
"s",
"detail",
"given",
"by",
"it",
"s",
"jid",
"including",
"the",
"return",
"data",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/jobs.py#L426-L463 | [
"def",
"print_job",
"(",
"jid",
",",
"ext_source",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"}",
"returner",
"=",
"_get_returner",
"(",
"(",
"__opts__",
"[",
"'ext_job_cache'",
"]",
",",
"ext_source",
",",
"__opts__",
"[",
"'master_job_cache'",
"]",
")",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | exit_success | Check if a job has been executed and exit successfully
jid
The jid to look up.
ext_source
The external job cache to use. Default: `None`.
CLI Example:
.. code-block:: bash
salt-run jobs.exit_success 20160520145827701627 | salt/runners/jobs.py | def exit_success(jid, ext_source=None):
'''
Check if a job has been executed and exit successfully
jid
The jid to look up.
ext_source
The external job cache to use. Default: `None`.
CLI Example:
.. code-block:: bash
salt-run jobs.exit_success 20160520145827701627
... | def exit_success(jid, ext_source=None):
'''
Check if a job has been executed and exit successfully
jid
The jid to look up.
ext_source
The external job cache to use. Default: `None`.
CLI Example:
.. code-block:: bash
salt-run jobs.exit_success 20160520145827701627
... | [
"Check",
"if",
"a",
"job",
"has",
"been",
"executed",
"and",
"exit",
"successfully"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/jobs.py#L466-L500 | [
"def",
"exit_success",
"(",
"jid",
",",
"ext_source",
"=",
"None",
")",
":",
"ret",
"=",
"dict",
"(",
")",
"data",
"=",
"list_job",
"(",
"jid",
",",
"ext_source",
"=",
"ext_source",
")",
"minions",
"=",
"data",
".",
"get",
"(",
"'Minions'",
",",
"[",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | last_run | .. versionadded:: 2015.8.0
List all detectable jobs and associated functions
CLI Example:
.. code-block:: bash
salt-run jobs.last_run
salt-run jobs.last_run target=nodename
salt-run jobs.last_run function='cmd.run'
salt-run jobs.last_run metadata="{'foo': 'bar'}" | salt/runners/jobs.py | def last_run(ext_source=None,
outputter=None,
metadata=None,
function=None,
target=None,
display_progress=False):
'''
.. versionadded:: 2015.8.0
List all detectable jobs and associated functions
CLI Example:
.. code-block:: bash
... | def last_run(ext_source=None,
outputter=None,
metadata=None,
function=None,
target=None,
display_progress=False):
'''
.. versionadded:: 2015.8.0
List all detectable jobs and associated functions
CLI Example:
.. code-block:: bash
... | [
"..",
"versionadded",
"::",
"2015",
".",
"8",
".",
"0"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/jobs.py#L503-L539 | [
"def",
"last_run",
"(",
"ext_source",
"=",
"None",
",",
"outputter",
"=",
"None",
",",
"metadata",
"=",
"None",
",",
"function",
"=",
"None",
",",
"target",
"=",
"None",
",",
"display_progress",
"=",
"False",
")",
":",
"if",
"metadata",
":",
"if",
"not... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _format_job_instance | Helper to format a job instance | salt/runners/jobs.py | def _format_job_instance(job):
'''
Helper to format a job instance
'''
if not job:
ret = {'Error': 'Cannot contact returner or no job with this jid'}
return ret
ret = {'Function': job.get('fun', 'unknown-function'),
'Arguments': list(job.get('arg', [])),
# unli... | def _format_job_instance(job):
'''
Helper to format a job instance
'''
if not job:
ret = {'Error': 'Cannot contact returner or no job with this jid'}
return ret
ret = {'Function': job.get('fun', 'unknown-function'),
'Arguments': list(job.get('arg', [])),
# unli... | [
"Helper",
"to",
"format",
"a",
"job",
"instance"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/jobs.py#L551-L575 | [
"def",
"_format_job_instance",
"(",
"job",
")",
":",
"if",
"not",
"job",
":",
"ret",
"=",
"{",
"'Error'",
":",
"'Cannot contact returner or no job with this jid'",
"}",
"return",
"ret",
"ret",
"=",
"{",
"'Function'",
":",
"job",
".",
"get",
"(",
"'fun'",
","... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _walk_through | Walk through the job dir and return jobs | salt/runners/jobs.py | def _walk_through(job_dir, display_progress=False):
'''
Walk through the job dir and return jobs
'''
serial = salt.payload.Serial(__opts__)
for top in os.listdir(job_dir):
t_path = os.path.join(job_dir, top)
for final in os.listdir(t_path):
load_path = os.path.join(t_pa... | def _walk_through(job_dir, display_progress=False):
'''
Walk through the job dir and return jobs
'''
serial = salt.payload.Serial(__opts__)
for top in os.listdir(job_dir):
t_path = os.path.join(job_dir, top)
for final in os.listdir(t_path):
load_path = os.path.join(t_pa... | [
"Walk",
"through",
"the",
"job",
"dir",
"and",
"return",
"jobs"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/jobs.py#L587-L612 | [
"def",
"_walk_through",
"(",
"job_dir",
",",
"display_progress",
"=",
"False",
")",
":",
"serial",
"=",
"salt",
".",
"payload",
".",
"Serial",
"(",
"__opts__",
")",
"for",
"top",
"in",
"os",
".",
"listdir",
"(",
"job_dir",
")",
":",
"t_path",
"=",
"os"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | trigger_event | Trigger an event in IFTTT
.. code-block:: yaml
ifttt-event:
ifttt.trigger_event:
- event: TestEvent
- value1: 'A value that we want to send.'
- value2: 'A second value that we want to send.'
- value3: 'A third value that we want to send.'
The ... | salt/states/ifttt.py | def trigger_event(name,
event,
value1=None,
value2=None,
value3=None
):
'''
Trigger an event in IFTTT
.. code-block:: yaml
ifttt-event:
ifttt.trigger_event:
- event: TestEvent
... | def trigger_event(name,
event,
value1=None,
value2=None,
value3=None
):
'''
Trigger an event in IFTTT
.. code-block:: yaml
ifttt-event:
ifttt.trigger_event:
- event: TestEvent
... | [
"Trigger",
"an",
"event",
"in",
"IFTTT"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/ifttt.py#L38-L98 | [
"def",
"trigger_event",
"(",
"name",
",",
"event",
",",
"value1",
"=",
"None",
",",
"value2",
"=",
"None",
",",
"value3",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"False",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | absent | Ensure the CNAME with the given name or canonical name is removed | salt/states/infoblox_cname.py | def absent(name=None, canonical=None, **api_opts):
'''
Ensure the CNAME with the given name or canonical name is removed
'''
ret = {'name': name, 'result': False, 'comment': '', 'changes': {}}
obj = __salt__['infoblox.get_cname'](name=name, canonical=canonical, **api_opts)
if not obj:
r... | def absent(name=None, canonical=None, **api_opts):
'''
Ensure the CNAME with the given name or canonical name is removed
'''
ret = {'name': name, 'result': False, 'comment': '', 'changes': {}}
obj = __salt__['infoblox.get_cname'](name=name, canonical=canonical, **api_opts)
if not obj:
r... | [
"Ensure",
"the",
"CNAME",
"with",
"the",
"given",
"name",
"or",
"canonical",
"name",
"is",
"removed"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/infoblox_cname.py#L104-L124 | [
"def",
"absent",
"(",
"name",
"=",
"None",
",",
"canonical",
"=",
"None",
",",
"*",
"*",
"api_opts",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"False",
",",
"'comment'",
":",
"''",
",",
"'changes'",
":",
"{",
"}",
"}... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _get_options | Get the redis options from salt. | salt/returners/redis_return.py | def _get_options(ret=None):
'''
Get the redis options from salt.
'''
attrs = {'host': 'host',
'port': 'port',
'unix_socket_path': 'unix_socket_path',
'db': 'db',
'password': 'password',
'cluster_mode': 'cluster_mode',
'startup... | def _get_options(ret=None):
'''
Get the redis options from salt.
'''
attrs = {'host': 'host',
'port': 'port',
'unix_socket_path': 'unix_socket_path',
'db': 'db',
'password': 'password',
'cluster_mode': 'cluster_mode',
'startup... | [
"Get",
"the",
"redis",
"options",
"from",
"salt",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/redis_return.py#L145-L176 | [
"def",
"_get_options",
"(",
"ret",
"=",
"None",
")",
":",
"attrs",
"=",
"{",
"'host'",
":",
"'host'",
",",
"'port'",
":",
"'port'",
",",
"'unix_socket_path'",
":",
"'unix_socket_path'",
",",
"'db'",
":",
"'db'",
",",
"'password'",
":",
"'password'",
",",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _get_serv | Return a redis server object | salt/returners/redis_return.py | def _get_serv(ret=None):
'''
Return a redis server object
'''
_options = _get_options(ret)
global REDIS_POOL
if REDIS_POOL:
return REDIS_POOL
elif _options.get('cluster_mode'):
REDIS_POOL = StrictRedisCluster(startup_nodes=_options.get('startup_nodes'),
... | def _get_serv(ret=None):
'''
Return a redis server object
'''
_options = _get_options(ret)
global REDIS_POOL
if REDIS_POOL:
return REDIS_POOL
elif _options.get('cluster_mode'):
REDIS_POOL = StrictRedisCluster(startup_nodes=_options.get('startup_nodes'),
... | [
"Return",
"a",
"redis",
"server",
"object"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/redis_return.py#L179-L198 | [
"def",
"_get_serv",
"(",
"ret",
"=",
"None",
")",
":",
"_options",
"=",
"_get_options",
"(",
"ret",
")",
"global",
"REDIS_POOL",
"if",
"REDIS_POOL",
":",
"return",
"REDIS_POOL",
"elif",
"_options",
".",
"get",
"(",
"'cluster_mode'",
")",
":",
"REDIS_POOL",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | returner | Return data to a redis data store | salt/returners/redis_return.py | def returner(ret):
'''
Return data to a redis data store
'''
serv = _get_serv(ret)
pipeline = serv.pipeline(transaction=False)
minion, jid = ret['id'], ret['jid']
pipeline.hset('ret:{0}'.format(jid), minion, salt.utils.json.dumps(ret))
pipeline.expire('ret:{0}'.format(jid), _get_ttl())
... | def returner(ret):
'''
Return data to a redis data store
'''
serv = _get_serv(ret)
pipeline = serv.pipeline(transaction=False)
minion, jid = ret['id'], ret['jid']
pipeline.hset('ret:{0}'.format(jid), minion, salt.utils.json.dumps(ret))
pipeline.expire('ret:{0}'.format(jid), _get_ttl())
... | [
"Return",
"data",
"to",
"a",
"redis",
"data",
"store"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/redis_return.py#L205-L216 | [
"def",
"returner",
"(",
"ret",
")",
":",
"serv",
"=",
"_get_serv",
"(",
"ret",
")",
"pipeline",
"=",
"serv",
".",
"pipeline",
"(",
"transaction",
"=",
"False",
")",
"minion",
",",
"jid",
"=",
"ret",
"[",
"'id'",
"]",
",",
"ret",
"[",
"'jid'",
"]",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | save_load | Save the load to the specified jid | salt/returners/redis_return.py | def save_load(jid, load, minions=None):
'''
Save the load to the specified jid
'''
serv = _get_serv(ret=None)
serv.setex('load:{0}'.format(jid), _get_ttl(), salt.utils.json.dumps(load)) | def save_load(jid, load, minions=None):
'''
Save the load to the specified jid
'''
serv = _get_serv(ret=None)
serv.setex('load:{0}'.format(jid), _get_ttl(), salt.utils.json.dumps(load)) | [
"Save",
"the",
"load",
"to",
"the",
"specified",
"jid"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/redis_return.py#L219-L224 | [
"def",
"save_load",
"(",
"jid",
",",
"load",
",",
"minions",
"=",
"None",
")",
":",
"serv",
"=",
"_get_serv",
"(",
"ret",
"=",
"None",
")",
"serv",
".",
"setex",
"(",
"'load:{0}'",
".",
"format",
"(",
"jid",
")",
",",
"_get_ttl",
"(",
")",
",",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_load | Return the load data that marks a specified jid | salt/returners/redis_return.py | def get_load(jid):
'''
Return the load data that marks a specified jid
'''
serv = _get_serv(ret=None)
data = serv.get('load:{0}'.format(jid))
if data:
return salt.utils.json.loads(data)
return {} | def get_load(jid):
'''
Return the load data that marks a specified jid
'''
serv = _get_serv(ret=None)
data = serv.get('load:{0}'.format(jid))
if data:
return salt.utils.json.loads(data)
return {} | [
"Return",
"the",
"load",
"data",
"that",
"marks",
"a",
"specified",
"jid"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/redis_return.py#L234-L242 | [
"def",
"get_load",
"(",
"jid",
")",
":",
"serv",
"=",
"_get_serv",
"(",
"ret",
"=",
"None",
")",
"data",
"=",
"serv",
".",
"get",
"(",
"'load:{0}'",
".",
"format",
"(",
"jid",
")",
")",
"if",
"data",
":",
"return",
"salt",
".",
"utils",
".",
"jso... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_jid | Return the information returned when the specified job id was executed | salt/returners/redis_return.py | def get_jid(jid):
'''
Return the information returned when the specified job id was executed
'''
serv = _get_serv(ret=None)
ret = {}
for minion, data in six.iteritems(serv.hgetall('ret:{0}'.format(jid))):
if data:
ret[minion] = salt.utils.json.loads(data)
return ret | def get_jid(jid):
'''
Return the information returned when the specified job id was executed
'''
serv = _get_serv(ret=None)
ret = {}
for minion, data in six.iteritems(serv.hgetall('ret:{0}'.format(jid))):
if data:
ret[minion] = salt.utils.json.loads(data)
return ret | [
"Return",
"the",
"information",
"returned",
"when",
"the",
"specified",
"job",
"id",
"was",
"executed"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/redis_return.py#L245-L254 | [
"def",
"get_jid",
"(",
"jid",
")",
":",
"serv",
"=",
"_get_serv",
"(",
"ret",
"=",
"None",
")",
"ret",
"=",
"{",
"}",
"for",
"minion",
",",
"data",
"in",
"six",
".",
"iteritems",
"(",
"serv",
".",
"hgetall",
"(",
"'ret:{0}'",
".",
"format",
"(",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_fun | Return a dict of the last function called for all minions | salt/returners/redis_return.py | def get_fun(fun):
'''
Return a dict of the last function called for all minions
'''
serv = _get_serv(ret=None)
ret = {}
for minion in serv.smembers('minions'):
ind_str = '{0}:{1}'.format(minion, fun)
try:
jid = serv.get(ind_str)
except Exception:
c... | def get_fun(fun):
'''
Return a dict of the last function called for all minions
'''
serv = _get_serv(ret=None)
ret = {}
for minion in serv.smembers('minions'):
ind_str = '{0}:{1}'.format(minion, fun)
try:
jid = serv.get(ind_str)
except Exception:
c... | [
"Return",
"a",
"dict",
"of",
"the",
"last",
"function",
"called",
"for",
"all",
"minions"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/redis_return.py#L257-L274 | [
"def",
"get_fun",
"(",
"fun",
")",
":",
"serv",
"=",
"_get_serv",
"(",
"ret",
"=",
"None",
")",
"ret",
"=",
"{",
"}",
"for",
"minion",
"in",
"serv",
".",
"smembers",
"(",
"'minions'",
")",
":",
"ind_str",
"=",
"'{0}:{1}'",
".",
"format",
"(",
"mini... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_jids | Return a dict mapping all job ids to job information | salt/returners/redis_return.py | def get_jids():
'''
Return a dict mapping all job ids to job information
'''
serv = _get_serv(ret=None)
ret = {}
for s in serv.mget(serv.keys('load:*')):
if s is None:
continue
load = salt.utils.json.loads(s)
jid = load['jid']
ret[jid] = salt.utils.jid... | def get_jids():
'''
Return a dict mapping all job ids to job information
'''
serv = _get_serv(ret=None)
ret = {}
for s in serv.mget(serv.keys('load:*')):
if s is None:
continue
load = salt.utils.json.loads(s)
jid = load['jid']
ret[jid] = salt.utils.jid... | [
"Return",
"a",
"dict",
"mapping",
"all",
"job",
"ids",
"to",
"job",
"information"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/redis_return.py#L277-L289 | [
"def",
"get_jids",
"(",
")",
":",
"serv",
"=",
"_get_serv",
"(",
"ret",
"=",
"None",
")",
"ret",
"=",
"{",
"}",
"for",
"s",
"in",
"serv",
".",
"mget",
"(",
"serv",
".",
"keys",
"(",
"'load:*'",
")",
")",
":",
"if",
"s",
"is",
"None",
":",
"co... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | clean_old_jobs | Clean out minions's return data for old jobs.
Normally, hset 'ret:<jid>' are saved with a TTL, and will eventually
get cleaned by redis.But for jobs with some very late minion return, the
corresponding hset's TTL will be refreshed to a too late timestamp, we'll
do manually cleaning here. | salt/returners/redis_return.py | def clean_old_jobs():
'''
Clean out minions's return data for old jobs.
Normally, hset 'ret:<jid>' are saved with a TTL, and will eventually
get cleaned by redis.But for jobs with some very late minion return, the
corresponding hset's TTL will be refreshed to a too late timestamp, we'll
do manu... | def clean_old_jobs():
'''
Clean out minions's return data for old jobs.
Normally, hset 'ret:<jid>' are saved with a TTL, and will eventually
get cleaned by redis.But for jobs with some very late minion return, the
corresponding hset's TTL will be refreshed to a too late timestamp, we'll
do manu... | [
"Clean",
"out",
"minions",
"s",
"return",
"data",
"for",
"old",
"jobs",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/redis_return.py#L300-L319 | [
"def",
"clean_old_jobs",
"(",
")",
":",
"serv",
"=",
"_get_serv",
"(",
"ret",
"=",
"None",
")",
"ret_jids",
"=",
"serv",
".",
"keys",
"(",
"'ret:*'",
")",
"living_jids",
"=",
"set",
"(",
"serv",
".",
"keys",
"(",
"'load:*'",
")",
")",
"to_remove",
"=... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | SaltAPI.prepare | Run the preparation sequence required to start a salt-api daemon.
If sub-classed, don't **ever** forget to run:
super(YourSubClass, self).prepare() | salt/cli/api.py | def prepare(self):
'''
Run the preparation sequence required to start a salt-api daemon.
If sub-classed, don't **ever** forget to run:
super(YourSubClass, self).prepare()
'''
super(SaltAPI, self).prepare()
try:
if self.config['verify_env']:
... | def prepare(self):
'''
Run the preparation sequence required to start a salt-api daemon.
If sub-classed, don't **ever** forget to run:
super(YourSubClass, self).prepare()
'''
super(SaltAPI, self).prepare()
try:
if self.config['verify_env']:
... | [
"Run",
"the",
"preparation",
"sequence",
"required",
"to",
"start",
"a",
"salt",
"-",
"api",
"daemon",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/api.py#L28-L56 | [
"def",
"prepare",
"(",
"self",
")",
":",
"super",
"(",
"SaltAPI",
",",
"self",
")",
".",
"prepare",
"(",
")",
"try",
":",
"if",
"self",
".",
"config",
"[",
"'verify_env'",
"]",
":",
"logfile",
"=",
"self",
".",
"config",
"[",
"'log_file'",
"]",
"if... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | SaltAPI.start | Start the actual master.
If sub-classed, don't **ever** forget to run:
super(YourSubClass, self).start()
NOTE: Run any required code before calling `super()`. | salt/cli/api.py | def start(self):
'''
Start the actual master.
If sub-classed, don't **ever** forget to run:
super(YourSubClass, self).start()
NOTE: Run any required code before calling `super()`.
'''
super(SaltAPI, self).start()
if check_user(self.config['user']):
... | def start(self):
'''
Start the actual master.
If sub-classed, don't **ever** forget to run:
super(YourSubClass, self).start()
NOTE: Run any required code before calling `super()`.
'''
super(SaltAPI, self).start()
if check_user(self.config['user']):
... | [
"Start",
"the",
"actual",
"master",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/api.py#L58-L71 | [
"def",
"start",
"(",
"self",
")",
":",
"super",
"(",
"SaltAPI",
",",
"self",
")",
".",
"start",
"(",
")",
"if",
"check_user",
"(",
"self",
".",
"config",
"[",
"'user'",
"]",
")",
":",
"log",
".",
"info",
"(",
"'The salt-api is starting up'",
")",
"se... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | SaltAPI.shutdown | If sub-classed, run any shutdown operations on this method. | salt/cli/api.py | def shutdown(self, exitcode=0, exitmsg=None):
'''
If sub-classed, run any shutdown operations on this method.
'''
log.info('The salt-api is shutting down..')
msg = 'The salt-api is shutdown. '
if exitmsg is not None:
exitmsg = msg + exitmsg
else:
... | def shutdown(self, exitcode=0, exitmsg=None):
'''
If sub-classed, run any shutdown operations on this method.
'''
log.info('The salt-api is shutting down..')
msg = 'The salt-api is shutdown. '
if exitmsg is not None:
exitmsg = msg + exitmsg
else:
... | [
"If",
"sub",
"-",
"classed",
"run",
"any",
"shutdown",
"operations",
"on",
"this",
"method",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/api.py#L73-L83 | [
"def",
"shutdown",
"(",
"self",
",",
"exitcode",
"=",
"0",
",",
"exitmsg",
"=",
"None",
")",
":",
"log",
".",
"info",
"(",
"'The salt-api is shutting down..'",
")",
"msg",
"=",
"'The salt-api is shutdown. '",
"if",
"exitmsg",
"is",
"not",
"None",
":",
"exitm... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | present | Make sure znode is present in the correct state with the correct acls
name
path to znode
value
value znode should be set to
acls
list of acl dictionaries to set on znode (make sure the ones salt is connected with are included)
Default: None
ephemeral
Boolean t... | salt/states/zookeeper.py | def present(name, value, acls=None, ephemeral=False, sequence=False, makepath=False, version=-1,
profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None):
'''
Make sure znode is present in the correct state with the correct acls
name
path to znode
valu... | def present(name, value, acls=None, ephemeral=False, sequence=False, makepath=False, version=-1,
profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None):
'''
Make sure znode is present in the correct state with the correct acls
name
path to znode
valu... | [
"Make",
"sure",
"znode",
"is",
"present",
"in",
"the",
"correct",
"state",
"with",
"the",
"correct",
"acls"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zookeeper.py#L47-L200 | [
"def",
"present",
"(",
"name",
",",
"value",
",",
"acls",
"=",
"None",
",",
"ephemeral",
"=",
"False",
",",
"sequence",
"=",
"False",
",",
"makepath",
"=",
"False",
",",
"version",
"=",
"-",
"1",
",",
"profile",
"=",
"None",
",",
"hosts",
"=",
"Non... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | absent | Make sure znode is absent
name
path to znode
version
Specify the version which should be deleted
Default: -1 (always match)
recursive
Boolean to indicate if children should be recursively deleted
Default: False
profile
Configured Zookeeper profile to a... | salt/states/zookeeper.py | def absent(name, version=-1, recursive=False, profile=None, hosts=None, scheme=None,
username=None, password=None, default_acl=None):
'''
Make sure znode is absent
name
path to znode
version
Specify the version which should be deleted
Default: -1 (always match)
... | def absent(name, version=-1, recursive=False, profile=None, hosts=None, scheme=None,
username=None, password=None, default_acl=None):
'''
Make sure znode is absent
name
path to znode
version
Specify the version which should be deleted
Default: -1 (always match)
... | [
"Make",
"sure",
"znode",
"is",
"absent"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zookeeper.py#L203-L276 | [
"def",
"absent",
"(",
"name",
",",
"version",
"=",
"-",
"1",
",",
"recursive",
"=",
"False",
",",
"profile",
"=",
"None",
",",
"hosts",
"=",
"None",
",",
"scheme",
"=",
"None",
",",
"username",
"=",
"None",
",",
"password",
"=",
"None",
",",
"defau... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | acls | Update acls on a znode
name
path to znode
acls
list of acl dictionaries to set on znode
version
Specify the version which should be deleted
Default: -1 (always match)
profile
Configured Zookeeper profile to authenticate with (Default: None)
hosts
... | salt/states/zookeeper.py | def acls(name, acls, version=-1, profile=None, hosts=None, scheme=None,
username=None, password=None, default_acl=None):
'''
Update acls on a znode
name
path to znode
acls
list of acl dictionaries to set on znode
version
Specify the version which should be deleted... | def acls(name, acls, version=-1, profile=None, hosts=None, scheme=None,
username=None, password=None, default_acl=None):
'''
Update acls on a znode
name
path to znode
acls
list of acl dictionaries to set on znode
version
Specify the version which should be deleted... | [
"Update",
"acls",
"on",
"a",
"znode"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zookeeper.py#L279-L362 | [
"def",
"acls",
"(",
"name",
",",
"acls",
",",
"version",
"=",
"-",
"1",
",",
"profile",
"=",
"None",
",",
"hosts",
"=",
"None",
",",
"scheme",
"=",
"None",
",",
"username",
"=",
"None",
",",
"password",
"=",
"None",
",",
"default_acl",
"=",
"None",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _timedatectl | get the output of timedatectl | salt/modules/timezone.py | def _timedatectl():
'''
get the output of timedatectl
'''
ret = __salt__['cmd.run_all'](['timedatectl'], python_shell=False)
if ret['retcode'] != 0:
msg = 'timedatectl failed: {0}'.format(ret['stderr'])
raise CommandExecutionError(msg)
return ret | def _timedatectl():
'''
get the output of timedatectl
'''
ret = __salt__['cmd.run_all'](['timedatectl'], python_shell=False)
if ret['retcode'] != 0:
msg = 'timedatectl failed: {0}'.format(ret['stderr'])
raise CommandExecutionError(msg)
return ret | [
"get",
"the",
"output",
"of",
"timedatectl"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/timezone.py#L46-L56 | [
"def",
"_timedatectl",
"(",
")",
":",
"ret",
"=",
"__salt__",
"[",
"'cmd.run_all'",
"]",
"(",
"[",
"'timedatectl'",
"]",
",",
"python_shell",
"=",
"False",
")",
"if",
"ret",
"[",
"'retcode'",
"]",
"!=",
"0",
":",
"msg",
"=",
"'timedatectl failed: {0}'",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | _get_adjtime_timezone | Return the timezone in /etc/adjtime of the system clock | salt/modules/timezone.py | def _get_adjtime_timezone():
'''
Return the timezone in /etc/adjtime of the system clock
'''
adjtime_file = '/etc/adjtime'
if os.path.exists(adjtime_file):
cmd = ['tail', '-n', '1', adjtime_file]
return __salt__['cmd.run'](cmd, python_shell=False)
elif os.path.exists('/dev/rtc'):... | def _get_adjtime_timezone():
'''
Return the timezone in /etc/adjtime of the system clock
'''
adjtime_file = '/etc/adjtime'
if os.path.exists(adjtime_file):
cmd = ['tail', '-n', '1', adjtime_file]
return __salt__['cmd.run'](cmd, python_shell=False)
elif os.path.exists('/dev/rtc'):... | [
"Return",
"the",
"timezone",
"in",
"/",
"etc",
"/",
"adjtime",
"of",
"the",
"system",
"clock"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/timezone.py#L70-L84 | [
"def",
"_get_adjtime_timezone",
"(",
")",
":",
"adjtime_file",
"=",
"'/etc/adjtime'",
"if",
"os",
".",
"path",
".",
"exists",
"(",
"adjtime_file",
")",
":",
"cmd",
"=",
"[",
"'tail'",
",",
"'-n'",
",",
"'1'",
",",
"adjtime_file",
"]",
"return",
"__salt__",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_zone | Get current timezone (i.e. America/Denver)
.. versionchanged:: 2016.11.4
.. note::
On AIX operating systems, Posix values can also be returned
'CST6CDT,M3.2.0/2:00:00,M11.1.0/2:00:00'
CLI Example:
.. code-block:: bash
salt '*' timezone.get_zone | salt/modules/timezone.py | def get_zone():
'''
Get current timezone (i.e. America/Denver)
.. versionchanged:: 2016.11.4
.. note::
On AIX operating systems, Posix values can also be returned
'CST6CDT,M3.2.0/2:00:00,M11.1.0/2:00:00'
CLI Example:
.. code-block:: bash
salt '*' timezone.get_zone
... | def get_zone():
'''
Get current timezone (i.e. America/Denver)
.. versionchanged:: 2016.11.4
.. note::
On AIX operating systems, Posix values can also be returned
'CST6CDT,M3.2.0/2:00:00,M11.1.0/2:00:00'
CLI Example:
.. code-block:: bash
salt '*' timezone.get_zone
... | [
"Get",
"current",
"timezone",
"(",
"i",
".",
"e",
".",
"America",
"/",
"Denver",
")"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/timezone.py#L161-L207 | [
"def",
"get_zone",
"(",
")",
":",
"if",
"salt",
".",
"utils",
".",
"path",
".",
"which",
"(",
"'timedatectl'",
")",
":",
"ret",
"=",
"_timedatectl",
"(",
")",
"for",
"line",
"in",
"(",
"x",
".",
"strip",
"(",
")",
"for",
"x",
"in",
"salt",
".",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_offset | Get current numeric timezone offset from UCT (i.e. -0700)
CLI Example:
.. code-block:: bash
salt '*' timezone.get_offset | salt/modules/timezone.py | def get_offset():
'''
Get current numeric timezone offset from UCT (i.e. -0700)
CLI Example:
.. code-block:: bash
salt '*' timezone.get_offset
'''
if 'AIX' not in __grains__['os_family']:
return __salt__['cmd.run'](['date', '+%z'], python_shell=False)
salt_path = '/opt/sa... | def get_offset():
'''
Get current numeric timezone offset from UCT (i.e. -0700)
CLI Example:
.. code-block:: bash
salt '*' timezone.get_offset
'''
if 'AIX' not in __grains__['os_family']:
return __salt__['cmd.run'](['date', '+%z'], python_shell=False)
salt_path = '/opt/sa... | [
"Get",
"current",
"numeric",
"timezone",
"offset",
"from",
"UCT",
"(",
"i",
".",
"e",
".",
"-",
"0700",
")"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/timezone.py#L223-L241 | [
"def",
"get_offset",
"(",
")",
":",
"if",
"'AIX'",
"not",
"in",
"__grains__",
"[",
"'os_family'",
"]",
":",
"return",
"__salt__",
"[",
"'cmd.run'",
"]",
"(",
"[",
"'date'",
",",
"'+%z'",
"]",
",",
"python_shell",
"=",
"False",
")",
"salt_path",
"=",
"'... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | set_zone | Unlinks, then symlinks /etc/localtime to the set timezone.
The timezone is crucial to several system processes, each of which SHOULD
be restarted (for instance, whatever you system uses as its cron and
syslog daemons). This will not be automagically done and must be done
manually!
CLI Example:
... | salt/modules/timezone.py | def set_zone(timezone):
'''
Unlinks, then symlinks /etc/localtime to the set timezone.
The timezone is crucial to several system processes, each of which SHOULD
be restarted (for instance, whatever you system uses as its cron and
syslog daemons). This will not be automagically done and must be done... | def set_zone(timezone):
'''
Unlinks, then symlinks /etc/localtime to the set timezone.
The timezone is crucial to several system processes, each of which SHOULD
be restarted (for instance, whatever you system uses as its cron and
syslog daemons). This will not be automagically done and must be done... | [
"Unlinks",
"then",
"symlinks",
"/",
"etc",
"/",
"localtime",
"to",
"the",
"set",
"timezone",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/timezone.py#L244-L317 | [
"def",
"set_zone",
"(",
"timezone",
")",
":",
"if",
"salt",
".",
"utils",
".",
"path",
".",
"which",
"(",
"'timedatectl'",
")",
":",
"try",
":",
"__salt__",
"[",
"'cmd.run'",
"]",
"(",
"'timedatectl set-timezone {0}'",
".",
"format",
"(",
"timezone",
")",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | zone_compare | Compares the given timezone name with the system timezone name.
Checks the hash sum between the given timezone, and the one set in
/etc/localtime. Returns True if names and hash sums match, and False if not.
Mostly useful for running state checks.
.. versionchanged:: 2016.3.0
.. note::
On... | salt/modules/timezone.py | def zone_compare(timezone):
'''
Compares the given timezone name with the system timezone name.
Checks the hash sum between the given timezone, and the one set in
/etc/localtime. Returns True if names and hash sums match, and False if not.
Mostly useful for running state checks.
.. versionchang... | def zone_compare(timezone):
'''
Compares the given timezone name with the system timezone name.
Checks the hash sum between the given timezone, and the one set in
/etc/localtime. Returns True if names and hash sums match, and False if not.
Mostly useful for running state checks.
.. versionchang... | [
"Compares",
"the",
"given",
"timezone",
"name",
"with",
"the",
"system",
"timezone",
"name",
".",
"Checks",
"the",
"hash",
"sum",
"between",
"the",
"given",
"timezone",
"and",
"the",
"one",
"set",
"in",
"/",
"etc",
"/",
"localtime",
".",
"Returns",
"True",... | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/timezone.py#L320-L365 | [
"def",
"zone_compare",
"(",
"timezone",
")",
":",
"if",
"'Solaris'",
"in",
"__grains__",
"[",
"'os_family'",
"]",
"or",
"'AIX'",
"in",
"__grains__",
"[",
"'os_family'",
"]",
":",
"return",
"timezone",
"==",
"get_zone",
"(",
")",
"if",
"'FreeBSD'",
"in",
"_... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_hwclock | Get current hardware clock setting (UTC or localtime)
CLI Example:
.. code-block:: bash
salt '*' timezone.get_hwclock | salt/modules/timezone.py | def get_hwclock():
'''
Get current hardware clock setting (UTC or localtime)
CLI Example:
.. code-block:: bash
salt '*' timezone.get_hwclock
'''
if salt.utils.path.which('timedatectl'):
ret = _timedatectl()
for line in (x.strip() for x in ret['stdout'].splitlines()):
... | def get_hwclock():
'''
Get current hardware clock setting (UTC or localtime)
CLI Example:
.. code-block:: bash
salt '*' timezone.get_hwclock
'''
if salt.utils.path.which('timedatectl'):
ret = _timedatectl()
for line in (x.strip() for x in ret['stdout'].splitlines()):
... | [
"Get",
"current",
"hardware",
"clock",
"setting",
"(",
"UTC",
"or",
"localtime",
")"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/timezone.py#L378-L488 | [
"def",
"get_hwclock",
"(",
")",
":",
"if",
"salt",
".",
"utils",
".",
"path",
".",
"which",
"(",
"'timedatectl'",
")",
":",
"ret",
"=",
"_timedatectl",
"(",
")",
"for",
"line",
"in",
"(",
"x",
".",
"strip",
"(",
")",
"for",
"x",
"in",
"ret",
"[",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | set_hwclock | Sets the hardware clock to be either UTC or localtime
CLI Example:
.. code-block:: bash
salt '*' timezone.set_hwclock UTC | salt/modules/timezone.py | def set_hwclock(clock):
'''
Sets the hardware clock to be either UTC or localtime
CLI Example:
.. code-block:: bash
salt '*' timezone.set_hwclock UTC
'''
if salt.utils.path.which('timedatectl'):
cmd = ['timedatectl', 'set-local-rtc',
'true' if clock == 'localtim... | def set_hwclock(clock):
'''
Sets the hardware clock to be either UTC or localtime
CLI Example:
.. code-block:: bash
salt '*' timezone.set_hwclock UTC
'''
if salt.utils.path.which('timedatectl'):
cmd = ['timedatectl', 'set-local-rtc',
'true' if clock == 'localtim... | [
"Sets",
"the",
"hardware",
"clock",
"to",
"be",
"either",
"UTC",
"or",
"localtime"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/timezone.py#L491-L563 | [
"def",
"set_hwclock",
"(",
"clock",
")",
":",
"if",
"salt",
".",
"utils",
".",
"path",
".",
"which",
"(",
"'timedatectl'",
")",
":",
"cmd",
"=",
"[",
"'timedatectl'",
",",
"'set-local-rtc'",
",",
"'true'",
"if",
"clock",
"==",
"'localtime'",
"else",
"'fa... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | installed | Installs a package if not already installed
Args:
name (str):
The name of the package to be installed. Required.
version (str):
Install a specific version of the package. Defaults to latest
version. If the version is different to the one installed then the
... | salt/states/chocolatey.py | def installed(name, version=None, source=None, force=False, pre_versions=False,
install_args=None, override_args=False, force_x86=False,
package_args=None, allow_multiple=False, execution_timeout=None):
'''
Installs a package if not already installed
Args:
name (str):
... | def installed(name, version=None, source=None, force=False, pre_versions=False,
install_args=None, override_args=False, force_x86=False,
package_args=None, allow_multiple=False, execution_timeout=None):
'''
Installs a package if not already installed
Args:
name (str):
... | [
"Installs",
"a",
"package",
"if",
"not",
"already",
"installed"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/chocolatey.py#L30-L199 | [
"def",
"installed",
"(",
"name",
",",
"version",
"=",
"None",
",",
"source",
"=",
"None",
",",
"force",
"=",
"False",
",",
"pre_versions",
"=",
"False",
",",
"install_args",
"=",
"None",
",",
"override_args",
"=",
"False",
",",
"force_x86",
"=",
"False",... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | uninstalled | Uninstalls a package
name
The name of the package to be uninstalled
version
Uninstalls a specific version of the package. Defaults to latest
version installed.
uninstall_args
A list of uninstall arguments you want to pass to the uninstallation
process i.e product key or feat... | salt/states/chocolatey.py | def uninstalled(name, version=None, uninstall_args=None, override_args=False):
'''
Uninstalls a package
name
The name of the package to be uninstalled
version
Uninstalls a specific version of the package. Defaults to latest
version installed.
uninstall_args
A list of unins... | def uninstalled(name, version=None, uninstall_args=None, override_args=False):
'''
Uninstalls a package
name
The name of the package to be uninstalled
version
Uninstalls a specific version of the package. Defaults to latest
version installed.
uninstall_args
A list of unins... | [
"Uninstalls",
"a",
"package"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/chocolatey.py#L202-L278 | [
"def",
"uninstalled",
"(",
"name",
",",
"version",
"=",
"None",
",",
"uninstall_args",
"=",
"None",
",",
"override_args",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'changes'",
":",
"{",
"}",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | store_job | Store job information using the configured master_job_cache | salt/utils/job.py | def store_job(opts, load, event=None, mminion=None):
'''
Store job information using the configured master_job_cache
'''
# Generate EndTime
endtime = salt.utils.jid.jid_to_time(salt.utils.jid.gen_jid(opts))
# If the return data is invalid, just ignore it
if any(key not in load for key in ('r... | def store_job(opts, load, event=None, mminion=None):
'''
Store job information using the configured master_job_cache
'''
# Generate EndTime
endtime = salt.utils.jid.jid_to_time(salt.utils.jid.gen_jid(opts))
# If the return data is invalid, just ignore it
if any(key not in load for key in ('r... | [
"Store",
"job",
"information",
"using",
"the",
"configured",
"master_job_cache"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/job.py#L19-L116 | [
"def",
"store_job",
"(",
"opts",
",",
"load",
",",
"event",
"=",
"None",
",",
"mminion",
"=",
"None",
")",
":",
"# Generate EndTime",
"endtime",
"=",
"salt",
".",
"utils",
".",
"jid",
".",
"jid_to_time",
"(",
"salt",
".",
"utils",
".",
"jid",
".",
"g... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | store_minions | Store additional minions matched on lower-level masters using the configured
master_job_cache | salt/utils/job.py | def store_minions(opts, jid, minions, mminion=None, syndic_id=None):
'''
Store additional minions matched on lower-level masters using the configured
master_job_cache
'''
if mminion is None:
mminion = salt.minion.MasterMinion(opts, states=False, rend=False)
job_cache = opts['master_job_c... | def store_minions(opts, jid, minions, mminion=None, syndic_id=None):
'''
Store additional minions matched on lower-level masters using the configured
master_job_cache
'''
if mminion is None:
mminion = salt.minion.MasterMinion(opts, states=False, rend=False)
job_cache = opts['master_job_c... | [
"Store",
"additional",
"minions",
"matched",
"on",
"lower",
"-",
"level",
"masters",
"using",
"the",
"configured",
"master_job_cache"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/job.py#L119-L136 | [
"def",
"store_minions",
"(",
"opts",
",",
"jid",
",",
"minions",
",",
"mminion",
"=",
"None",
",",
"syndic_id",
"=",
"None",
")",
":",
"if",
"mminion",
"is",
"None",
":",
"mminion",
"=",
"salt",
".",
"minion",
".",
"MasterMinion",
"(",
"opts",
",",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | get_retcode | Determine a retcode for a given return | salt/utils/job.py | def get_retcode(ret):
'''
Determine a retcode for a given return
'''
retcode = 0
# if there is a dict with retcode, use that
if isinstance(ret, dict) and ret.get('retcode', 0) != 0:
return ret['retcode']
# if its a boolean, False means 1
elif isinstance(ret, bool) and not ret:
... | def get_retcode(ret):
'''
Determine a retcode for a given return
'''
retcode = 0
# if there is a dict with retcode, use that
if isinstance(ret, dict) and ret.get('retcode', 0) != 0:
return ret['retcode']
# if its a boolean, False means 1
elif isinstance(ret, bool) and not ret:
... | [
"Determine",
"a",
"retcode",
"for",
"a",
"given",
"return"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/job.py#L139-L150 | [
"def",
"get_retcode",
"(",
"ret",
")",
":",
"retcode",
"=",
"0",
"# if there is a dict with retcode, use that",
"if",
"isinstance",
"(",
"ret",
",",
"dict",
")",
"and",
"ret",
".",
"get",
"(",
"'retcode'",
",",
"0",
")",
"!=",
"0",
":",
"return",
"ret",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | beacon | Checks for locked accounts due to too many invalid login attempts, 3 or higher.
.. code-block:: yaml
beacons:
aix_account:
user: ALL
interval: 120 | salt/beacons/aix_account.py | def beacon(config):
'''
Checks for locked accounts due to too many invalid login attempts, 3 or higher.
.. code-block:: yaml
beacons:
aix_account:
user: ALL
interval: 120
'''
ret = []
user = config['user']
locked_accounts = __salt__['shadow.log... | def beacon(config):
'''
Checks for locked accounts due to too many invalid login attempts, 3 or higher.
.. code-block:: yaml
beacons:
aix_account:
user: ALL
interval: 120
'''
ret = []
user = config['user']
locked_accounts = __salt__['shadow.log... | [
"Checks",
"for",
"locked",
"accounts",
"due",
"to",
"too",
"many",
"invalid",
"login",
"attempts",
"3",
"or",
"higher",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/aix_account.py#L43-L63 | [
"def",
"beacon",
"(",
"config",
")",
":",
"ret",
"=",
"[",
"]",
"user",
"=",
"config",
"[",
"'user'",
"]",
"locked_accounts",
"=",
"__salt__",
"[",
"'shadow.login_failures'",
"]",
"(",
"user",
")",
"ret",
".",
"append",
"(",
"{",
"'accounts'",
":",
"lo... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | post_data | Post data to OpsGenie. It's designed for Salt's Event Reactor.
After configuring the sls reaction file as shown above, you can trigger the
module with your designated tag (og-tag in this case).
CLI Example:
.. code-block:: bash
salt-call event.send 'og-tag' '{"reason" : "Overheating CPU!"}'
... | salt/modules/opsgenie.py | def post_data(api_key=None, name='OpsGenie Execution Module', reason=None,
action_type=None):
'''
Post data to OpsGenie. It's designed for Salt's Event Reactor.
After configuring the sls reaction file as shown above, you can trigger the
module with your designated tag (og-tag in this case... | def post_data(api_key=None, name='OpsGenie Execution Module', reason=None,
action_type=None):
'''
Post data to OpsGenie. It's designed for Salt's Event Reactor.
After configuring the sls reaction file as shown above, you can trigger the
module with your designated tag (og-tag in this case... | [
"Post",
"data",
"to",
"OpsGenie",
".",
"It",
"s",
"designed",
"for",
"Salt",
"s",
"Event",
"Reactor",
"."
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/opsgenie.py#L37-L109 | [
"def",
"post_data",
"(",
"api_key",
"=",
"None",
",",
"name",
"=",
"'OpsGenie Execution Module'",
",",
"reason",
"=",
"None",
",",
"action_type",
"=",
"None",
")",
":",
"if",
"api_key",
"is",
"None",
"or",
"reason",
"is",
"None",
":",
"raise",
"salt",
".... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
train | installed | Install a Mac OS Package from a pkg or dmg file, if given a dmg file it
will first be mounted in a temporary location
name
The pkg or dmg file to install
target
The location in which to install the package. This can be a path or LocalSystem
dmg
Is the given file a dmg file?
... | salt/states/macpackage.py | def installed(name, target="LocalSystem", dmg=False, store=False, app=False, mpkg=False, user=None, onlyif=None,
unless=None, force=False, allow_untrusted=False, version_check=None):
'''
Install a Mac OS Package from a pkg or dmg file, if given a dmg file it
will first be mounted in a temporar... | def installed(name, target="LocalSystem", dmg=False, store=False, app=False, mpkg=False, user=None, onlyif=None,
unless=None, force=False, allow_untrusted=False, version_check=None):
'''
Install a Mac OS Package from a pkg or dmg file, if given a dmg file it
will first be mounted in a temporar... | [
"Install",
"a",
"Mac",
"OS",
"Package",
"from",
"a",
"pkg",
"or",
"dmg",
"file",
"if",
"given",
"a",
"dmg",
"file",
"it",
"will",
"first",
"be",
"mounted",
"in",
"a",
"temporary",
"location"
] | saltstack/salt | python | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/macpackage.py#L49-L245 | [
"def",
"installed",
"(",
"name",
",",
"target",
"=",
"\"LocalSystem\"",
",",
"dmg",
"=",
"False",
",",
"store",
"=",
"False",
",",
"app",
"=",
"False",
",",
"mpkg",
"=",
"False",
",",
"user",
"=",
"None",
",",
"onlyif",
"=",
"None",
",",
"unless",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.