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
fcontext_policy_applied
.. versionadded:: 2017.7.0 Checks and makes sure the SELinux policies for a given filespec are applied.
salt/states/selinux.py
def fcontext_policy_applied(name, recursive=False): ''' .. versionadded:: 2017.7.0 Checks and makes sure the SELinux policies for a given filespec are applied. ''' ret = {'name': name, 'result': False, 'changes': {}, 'comment': ''} changes_text = __salt__['selinux.fcontext_policy_is_applie...
def fcontext_policy_applied(name, recursive=False): ''' .. versionadded:: 2017.7.0 Checks and makes sure the SELinux policies for a given filespec are applied. ''' ret = {'name': name, 'result': False, 'changes': {}, 'comment': ''} changes_text = __salt__['selinux.fcontext_policy_is_applie...
[ "..", "versionadded", "::", "2017", ".", "7", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/selinux.py#L458-L481
[ "def", "fcontext_policy_applied", "(", "name", ",", "recursive", "=", "False", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'changes'", ":", "{", "}", ",", "'comment'", ":", "''", "}", "changes_text", "=", "__s...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
port_policy_present
.. versionadded:: 2019.2.0 Makes sure an SELinux port policy for a given port, protocol and SELinux context type is present. name The protocol and port spec. Can be formatted as ``(tcp|udp)/(port|port-range)``. sel_type The SELinux Type. protocol The protocol for the port, ``...
salt/states/selinux.py
def port_policy_present(name, sel_type, protocol=None, port=None, sel_range=None): ''' .. versionadded:: 2019.2.0 Makes sure an SELinux port policy for a given port, protocol and SELinux context type is present. name The protocol and port spec. Can be formatted as ``(tcp|udp)/(port|port-range)...
def port_policy_present(name, sel_type, protocol=None, port=None, sel_range=None): ''' .. versionadded:: 2019.2.0 Makes sure an SELinux port policy for a given port, protocol and SELinux context type is present. name The protocol and port spec. Can be formatted as ``(tcp|udp)/(port|port-range)...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/selinux.py#L484-L536
[ "def", "port_policy_present", "(", "name", ",", "sel_type", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "sel_range", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'changes'", ":", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
port_policy_absent
.. versionadded:: 2019.2.0 Makes sure an SELinux port policy for a given port, protocol and SELinux context type is absent. name The protocol and port spec. Can be formatted as ``(tcp|udp)/(port|port-range)``. sel_type The SELinux Type. Optional; can be used in determining if policy is pr...
salt/states/selinux.py
def port_policy_absent(name, sel_type=None, protocol=None, port=None): ''' .. versionadded:: 2019.2.0 Makes sure an SELinux port policy for a given port, protocol and SELinux context type is absent. name The protocol and port spec. Can be formatted as ``(tcp|udp)/(port|port-range)``. sel_...
def port_policy_absent(name, sel_type=None, protocol=None, port=None): ''' .. versionadded:: 2019.2.0 Makes sure an SELinux port policy for a given port, protocol and SELinux context type is absent. name The protocol and port spec. Can be formatted as ``(tcp|udp)/(port|port-range)``. sel_...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/selinux.py#L539-L587
[ "def", "port_policy_absent", "(", "name", ",", "sel_type", "=", "None", ",", "protocol", "=", "None", ",", "port", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'changes'", ":", "{", "}", ",", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
present
Ensure a value is set in an OpenStack configuration file. filename The full path to the configuration file section The section in which the parameter will be set parameter (optional) The parameter to change. If the parameter is not supplied, the name will be used as the parameter...
salt/states/openstack_config.py
def present(name, filename, section, value, parameter=None): ''' Ensure a value is set in an OpenStack configuration file. filename The full path to the configuration file section The section in which the parameter will be set parameter (optional) The parameter to change. ...
def present(name, filename, section, value, parameter=None): ''' Ensure a value is set in an OpenStack configuration file. filename The full path to the configuration file section The section in which the parameter will be set parameter (optional) The parameter to change. ...
[ "Ensure", "a", "value", "is", "set", "in", "an", "OpenStack", "configuration", "file", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/openstack_config.py#L33-L90
[ "def", "present", "(", "name", ",", "filename", ",", "section", ",", "value", ",", "parameter", "=", "None", ")", ":", "if", "parameter", "is", "None", ":", "parameter", "=", "name", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
availability_set_present
.. versionadded:: 2019.2.0 Ensure an availability set exists. :param name: Name of the availability set. :param resource_group: The resource group assigned to the availability set. :param tags: A dictionary of strings can be passed as tag metadata to the availability set obje...
salt/states/azurearm_compute.py
def availability_set_present(name, resource_group, tags=None, platform_update_domain_count=None, platform_fault_domain_count=None, virtual_machines=None, sku=None, connection_auth=None, **kwargs): ''' .. versionadded:: 2019.2.0 Ensure an availabilit...
def availability_set_present(name, resource_group, tags=None, platform_update_domain_count=None, platform_fault_domain_count=None, virtual_machines=None, sku=None, connection_auth=None, **kwargs): ''' .. versionadded:: 2019.2.0 Ensure an availabilit...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_compute.py#L104-L263
[ "def", "availability_set_present", "(", "name", ",", "resource_group", ",", "tags", "=", "None", ",", "platform_update_domain_count", "=", "None", ",", "platform_fault_domain_count", "=", "None", ",", "virtual_machines", "=", "None", ",", "sku", "=", "None", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
availability_set_absent
.. versionadded:: 2019.2.0 Ensure an availability set does not exist in a resource group. :param name: Name of the availability set. :param resource_group: Name of the resource group containing the availability set. :param connection_auth: A dict with subscription and authent...
salt/states/azurearm_compute.py
def availability_set_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure an availability set does not exist in a resource group. :param name: Name of the availability set. :param resource_group: Name of the resource group containing the availa...
def availability_set_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure an availability set does not exist in a resource group. :param name: Name of the availability set. :param resource_group: Name of the resource group containing the availa...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_compute.py#L266-L326
[ "def", "availability_set_absent", "(", "name", ",", "resource_group", ",", "connection_auth", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_linux_wwns
Return Fibre Channel port WWNs from a Linux host.
salt/grains/fibre_channel.py
def _linux_wwns(): ''' Return Fibre Channel port WWNs from a Linux host. ''' ret = [] for fc_file in glob.glob('/sys/class/fc_host/*/port_name'): with salt.utils.files.fopen(fc_file, 'r') as _wwn: content = _wwn.read() for line in content.splitlines(): ...
def _linux_wwns(): ''' Return Fibre Channel port WWNs from a Linux host. ''' ret = [] for fc_file in glob.glob('/sys/class/fc_host/*/port_name'): with salt.utils.files.fopen(fc_file, 'r') as _wwn: content = _wwn.read() for line in content.splitlines(): ...
[ "Return", "Fibre", "Channel", "port", "WWNs", "from", "a", "Linux", "host", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/fibre_channel.py#L38-L48
[ "def", "_linux_wwns", "(", ")", ":", "ret", "=", "[", "]", "for", "fc_file", "in", "glob", ".", "glob", "(", "'/sys/class/fc_host/*/port_name'", ")", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "fc_file", ",", "'r'", ")", "as", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_windows_wwns
Return Fibre Channel port WWNs from a Windows host.
salt/grains/fibre_channel.py
def _windows_wwns(): ''' Return Fibre Channel port WWNs from a Windows host. ''' ps_cmd = r'Get-WmiObject -ErrorAction Stop ' \ r'-class MSFC_FibrePortHBAAttributes ' \ r'-namespace "root\WMI" | ' \ r'Select -Expandproperty Attributes | ' \ r'%{($_.Por...
def _windows_wwns(): ''' Return Fibre Channel port WWNs from a Windows host. ''' ps_cmd = r'Get-WmiObject -ErrorAction Stop ' \ r'-class MSFC_FibrePortHBAAttributes ' \ r'-namespace "root\WMI" | ' \ r'Select -Expandproperty Attributes | ' \ r'%{($_.Por...
[ "Return", "Fibre", "Channel", "port", "WWNs", "from", "a", "Windows", "host", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/fibre_channel.py#L51-L64
[ "def", "_windows_wwns", "(", ")", ":", "ps_cmd", "=", "r'Get-WmiObject -ErrorAction Stop '", "r'-class MSFC_FibrePortHBAAttributes '", "r'-namespace \"root\\WMI\" | '", "r'Select -Expandproperty Attributes | '", "r'%{($_.PortWWN | % {\"{0:x2}\" -f $_}) -join \"\"}'", "ret", "=", "[", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
fibre_channel_wwns
Return list of fiber channel HBA WWNs
salt/grains/fibre_channel.py
def fibre_channel_wwns(): ''' Return list of fiber channel HBA WWNs ''' grains = {'fc_wwn': False} if salt.utils.platform.is_linux(): grains['fc_wwn'] = _linux_wwns() elif salt.utils.platform.is_windows(): grains['fc_wwn'] = _windows_wwns() return grains
def fibre_channel_wwns(): ''' Return list of fiber channel HBA WWNs ''' grains = {'fc_wwn': False} if salt.utils.platform.is_linux(): grains['fc_wwn'] = _linux_wwns() elif salt.utils.platform.is_windows(): grains['fc_wwn'] = _windows_wwns() return grains
[ "Return", "list", "of", "fiber", "channel", "HBA", "WWNs" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/fibre_channel.py#L67-L76
[ "def", "fibre_channel_wwns", "(", ")", ":", "grains", "=", "{", "'fc_wwn'", ":", "False", "}", "if", "salt", ".", "utils", ".", "platform", ".", "is_linux", "(", ")", ":", "grains", "[", "'fc_wwn'", "]", "=", "_linux_wwns", "(", ")", "elif", "salt", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
vsan_supported
Returns whether vsan is supported on the vCenter: api version needs to be 6 or higher service_instance Service instance to the host or vCenter
salt/utils/vsan.py
def vsan_supported(service_instance): ''' Returns whether vsan is supported on the vCenter: api version needs to be 6 or higher service_instance Service instance to the host or vCenter ''' try: api_version = service_instance.content.about.apiVersion except vim.fault.NoPe...
def vsan_supported(service_instance): ''' Returns whether vsan is supported on the vCenter: api version needs to be 6 or higher service_instance Service instance to the host or vCenter ''' try: api_version = service_instance.content.about.apiVersion except vim.fault.NoPe...
[ "Returns", "whether", "vsan", "is", "supported", "on", "the", "vCenter", ":", "api", "version", "needs", "to", "be", "6", "or", "higher" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L85-L107
[ "def", "vsan_supported", "(", "service_instance", ")", ":", "try", ":", "api_version", "=", "service_instance", ".", "content", ".", "about", ".", "apiVersion", "except", "vim", ".", "fault", ".", "NoPermission", "as", "exc", ":", "log", ".", "exception", "(...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_vsan_cluster_config_system
Returns a vim.cluster.VsanVcClusterConfigSystem object service_instance Service instance to the host or vCenter
salt/utils/vsan.py
def get_vsan_cluster_config_system(service_instance): ''' Returns a vim.cluster.VsanVcClusterConfigSystem object service_instance Service instance to the host or vCenter ''' #TODO Replace when better connection mechanism is available #For python 2.7.9 and later, the defaul SSL conext ...
def get_vsan_cluster_config_system(service_instance): ''' Returns a vim.cluster.VsanVcClusterConfigSystem object service_instance Service instance to the host or vCenter ''' #TODO Replace when better connection mechanism is available #For python 2.7.9 and later, the defaul SSL conext ...
[ "Returns", "a", "vim", ".", "cluster", ".", "VsanVcClusterConfigSystem", "object" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L110-L131
[ "def", "get_vsan_cluster_config_system", "(", "service_instance", ")", ":", "#TODO Replace when better connection mechanism is available", "#For python 2.7.9 and later, the defaul SSL conext has more strict", "#connection handshaking rule. We may need turn of the hostname checking", "#and client s...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_host_vsan_system
Returns a host's vsan system service_instance Service instance to the host or vCenter host_ref Refernce to ESXi host hostname Name of ESXi host. Default value is None.
salt/utils/vsan.py
def get_host_vsan_system(service_instance, host_ref, hostname=None): ''' Returns a host's vsan system service_instance Service instance to the host or vCenter host_ref Refernce to ESXi host hostname Name of ESXi host. Default value is None. ''' if not hostname: ...
def get_host_vsan_system(service_instance, host_ref, hostname=None): ''' Returns a host's vsan system service_instance Service instance to the host or vCenter host_ref Refernce to ESXi host hostname Name of ESXi host. Default value is None. ''' if not hostname: ...
[ "Returns", "a", "host", "s", "vsan", "system" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L158-L184
[ "def", "get_host_vsan_system", "(", "service_instance", ",", "host_ref", ",", "hostname", "=", "None", ")", ":", "if", "not", "hostname", ":", "hostname", "=", "salt", ".", "utils", ".", "vmware", ".", "get_managed_object_name", "(", "host_ref", ")", "traversa...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_diskgroup
Creates a disk group service_instance Service instance to the host or vCenter vsan_disk_mgmt_system vim.VimClusterVsanVcDiskManagemenetSystem representing the vSan disk management system retrieved from the vsan endpoint. host_ref vim.HostSystem object representing the targ...
salt/utils/vsan.py
def create_diskgroup(service_instance, vsan_disk_mgmt_system, host_ref, cache_disk, capacity_disks): ''' Creates a disk group service_instance Service instance to the host or vCenter vsan_disk_mgmt_system vim.VimClusterVsanVcDiskManagemenetSystem representing the v...
def create_diskgroup(service_instance, vsan_disk_mgmt_system, host_ref, cache_disk, capacity_disks): ''' Creates a disk group service_instance Service instance to the host or vCenter vsan_disk_mgmt_system vim.VimClusterVsanVcDiskManagemenetSystem representing the v...
[ "Creates", "a", "disk", "group" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L187-L242
[ "def", "create_diskgroup", "(", "service_instance", ",", "vsan_disk_mgmt_system", ",", "host_ref", ",", "cache_disk", ",", "capacity_disks", ")", ":", "hostname", "=", "salt", ".", "utils", ".", "vmware", ".", "get_managed_object_name", "(", "host_ref", ")", "cach...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
remove_capacity_from_diskgroup
Removes capacity disk(s) from a disk group. service_instance Service instance to the host or vCenter host_vsan_system ESXi host's VSAN system host_ref Reference to the ESXi host diskgroup The vsan.HostDiskMapping object representing the host's diskgroup from w...
salt/utils/vsan.py
def remove_capacity_from_diskgroup(service_instance, host_ref, diskgroup, capacity_disks, data_evacuation=True, hostname=None, host_vsan_system=None): ''' Removes capacity disk(s) from a disk group. ser...
def remove_capacity_from_diskgroup(service_instance, host_ref, diskgroup, capacity_disks, data_evacuation=True, hostname=None, host_vsan_system=None): ''' Removes capacity disk(s) from a disk group. ser...
[ "Removes", "capacity", "disk", "(", "s", ")", "from", "a", "disk", "group", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L308-L379
[ "def", "remove_capacity_from_diskgroup", "(", "service_instance", ",", "host_ref", ",", "diskgroup", ",", "capacity_disks", ",", "data_evacuation", "=", "True", ",", "hostname", "=", "None", ",", "host_vsan_system", "=", "None", ")", ":", "if", "not", "hostname", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
remove_diskgroup
Removes a disk group. service_instance Service instance to the host or vCenter host_ref Reference to the ESXi host diskgroup The vsan.HostDiskMapping object representing the host's diskgroup from where the capacity needs to be removed hostname Name of ESXi hos...
salt/utils/vsan.py
def remove_diskgroup(service_instance, host_ref, diskgroup, hostname=None, host_vsan_system=None, erase_disk_partitions=False, data_accessibility=True): ''' Removes a disk group. service_instance Service instance to the host or vCenter host_ref ...
def remove_diskgroup(service_instance, host_ref, diskgroup, hostname=None, host_vsan_system=None, erase_disk_partitions=False, data_accessibility=True): ''' Removes a disk group. service_instance Service instance to the host or vCenter host_ref ...
[ "Removes", "a", "disk", "group", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L382-L440
[ "def", "remove_diskgroup", "(", "service_instance", ",", "host_ref", ",", "diskgroup", ",", "hostname", "=", "None", ",", "host_vsan_system", "=", "None", ",", "erase_disk_partitions", "=", "False", ",", "data_accessibility", "=", "True", ")", ":", "if", "not", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_cluster_vsan_info
Returns the extended cluster vsan configuration object (vim.VsanConfigInfoEx). cluster_ref Reference to the cluster
salt/utils/vsan.py
def get_cluster_vsan_info(cluster_ref): ''' Returns the extended cluster vsan configuration object (vim.VsanConfigInfoEx). cluster_ref Reference to the cluster ''' cluster_name = salt.utils.vmware.get_managed_object_name(cluster_ref) log.trace('Retrieving cluster vsan info of clust...
def get_cluster_vsan_info(cluster_ref): ''' Returns the extended cluster vsan configuration object (vim.VsanConfigInfoEx). cluster_ref Reference to the cluster ''' cluster_name = salt.utils.vmware.get_managed_object_name(cluster_ref) log.trace('Retrieving cluster vsan info of clust...
[ "Returns", "the", "extended", "cluster", "vsan", "configuration", "object", "(", "vim", ".", "VsanConfigInfoEx", ")", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L443-L468
[ "def", "get_cluster_vsan_info", "(", "cluster_ref", ")", ":", "cluster_name", "=", "salt", ".", "utils", ".", "vmware", ".", "get_managed_object_name", "(", "cluster_ref", ")", "log", ".", "trace", "(", "'Retrieving cluster vsan info of cluster \\'%s\\''", ",", "clust...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
reconfigure_cluster_vsan
Reconfigures the VSAN system of a cluster. cluster_ref Reference to the cluster cluster_vsan_spec Cluster VSAN reconfigure spec (vim.vsan.ReconfigSpec).
salt/utils/vsan.py
def reconfigure_cluster_vsan(cluster_ref, cluster_vsan_spec): ''' Reconfigures the VSAN system of a cluster. cluster_ref Reference to the cluster cluster_vsan_spec Cluster VSAN reconfigure spec (vim.vsan.ReconfigSpec). ''' cluster_name = salt.utils.vmware.get_managed_object_nam...
def reconfigure_cluster_vsan(cluster_ref, cluster_vsan_spec): ''' Reconfigures the VSAN system of a cluster. cluster_ref Reference to the cluster cluster_vsan_spec Cluster VSAN reconfigure spec (vim.vsan.ReconfigSpec). ''' cluster_name = salt.utils.vmware.get_managed_object_nam...
[ "Reconfigures", "the", "VSAN", "system", "of", "a", "cluster", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L471-L500
[ "def", "reconfigure_cluster_vsan", "(", "cluster_ref", ",", "cluster_vsan_spec", ")", ":", "cluster_name", "=", "salt", ".", "utils", ".", "vmware", ".", "get_managed_object_name", "(", "cluster_ref", ")", "log", ".", "trace", "(", "'Reconfiguring vsan on cluster \\'%...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_wait_for_tasks
Wait for tasks created via the VSAN API
salt/utils/vsan.py
def _wait_for_tasks(tasks, service_instance): ''' Wait for tasks created via the VSAN API ''' log.trace('Waiting for vsan tasks: {0}', ', '.join([six.text_type(t) for t in tasks])) try: vsanapiutils.WaitForTasks(tasks, service_instance) except vim.fault.NoPermission as exc:...
def _wait_for_tasks(tasks, service_instance): ''' Wait for tasks created via the VSAN API ''' log.trace('Waiting for vsan tasks: {0}', ', '.join([six.text_type(t) for t in tasks])) try: vsanapiutils.WaitForTasks(tasks, service_instance) except vim.fault.NoPermission as exc:...
[ "Wait", "for", "tasks", "created", "via", "the", "VSAN", "API" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L503-L522
[ "def", "_wait_for_tasks", "(", "tasks", ",", "service_instance", ")", ":", "log", ".", "trace", "(", "'Waiting for vsan tasks: {0}'", ",", "', '", ".", "join", "(", "[", "six", ".", "text_type", "(", "t", ")", "for", "t", "in", "tasks", "]", ")", ")", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
decrypt
.. versionadded:: 2017.7.0 Decrypt a data structure using the specified renderer. Written originally as a common codebase to handle decryption of encrypted elements within Pillar data, but should be flexible enough for other uses as well. Returns the decrypted result, but any decryption renderer shoul...
salt/utils/crypt.py
def decrypt(data, rend, translate_newlines=False, renderers=None, opts=None, valid_rend=None): ''' .. versionadded:: 2017.7.0 Decrypt a data structure using the specified renderer. Written originally as a common codebase to handle decryption o...
def decrypt(data, rend, translate_newlines=False, renderers=None, opts=None, valid_rend=None): ''' .. versionadded:: 2017.7.0 Decrypt a data structure using the specified renderer. Written originally as a common codebase to handle decryption o...
[ "..", "versionadded", "::", "2017", ".", "7", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/crypt.py#L27-L100
[ "def", "decrypt", "(", "data", ",", "rend", ",", "translate_newlines", "=", "False", ",", "renderers", "=", "None", ",", "opts", "=", "None", ",", "valid_rend", "=", "None", ")", ":", "try", ":", "if", "valid_rend", "and", "rend", "not", "in", "valid_r...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
pem_finger
Pass in either a raw pem string, or the path on disk to the location of a pem file, and the type of cryptographic hash to use. The default is SHA256. The fingerprint of the pem will be returned. If neither a key nor a path are passed in, a blank string will be returned.
salt/utils/crypt.py
def pem_finger(path=None, key=None, sum_type='sha256'): ''' Pass in either a raw pem string, or the path on disk to the location of a pem file, and the type of cryptographic hash to use. The default is SHA256. The fingerprint of the pem will be returned. If neither a key nor a path are passed in, a...
def pem_finger(path=None, key=None, sum_type='sha256'): ''' Pass in either a raw pem string, or the path on disk to the location of a pem file, and the type of cryptographic hash to use. The default is SHA256. The fingerprint of the pem will be returned. If neither a key nor a path are passed in, a...
[ "Pass", "in", "either", "a", "raw", "pem", "string", "or", "the", "path", "on", "disk", "to", "the", "location", "of", "a", "pem", "file", "and", "the", "type", "of", "cryptographic", "hash", "to", "use", ".", "The", "default", "is", "SHA256", ".", "...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/crypt.py#L117-L140
[ "def", "pem_finger", "(", "path", "=", "None", ",", "key", "=", "None", ",", "sum_type", "=", "'sha256'", ")", ":", "if", "not", "key", ":", "if", "not", "os", ".", "path", ".", "isfile", "(", "path", ")", ":", "return", "''", "with", "salt", "."...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
SchemaItem._get_argname_value
Return the argname value looking up on all possible attributes
salt/utils/schema.py
def _get_argname_value(self, argname): ''' Return the argname value looking up on all possible attributes ''' # Let's see if there's a private function to get the value argvalue = getattr(self, '__get_{0}__'.format(argname), None) if argvalue is not None and callable(argv...
def _get_argname_value(self, argname): ''' Return the argname value looking up on all possible attributes ''' # Let's see if there's a private function to get the value argvalue = getattr(self, '__get_{0}__'.format(argname), None) if argvalue is not None and callable(argv...
[ "Return", "the", "argname", "value", "looking", "up", "on", "all", "possible", "attributes" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schema.py#L731-L748
[ "def", "_get_argname_value", "(", "self", ",", "argname", ")", ":", "# Let's see if there's a private function to get the value", "argvalue", "=", "getattr", "(", "self", ",", "'__get_{0}__'", ".", "format", "(", "argname", ")", ",", "None", ")", "if", "argvalue", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
BaseSchemaItem.serialize
Return a serializable form of the config instance
salt/utils/schema.py
def serialize(self): ''' Return a serializable form of the config instance ''' serialized = {'type': self.__type__} for argname in self._attributes: if argname == 'required': # This is handled elsewhere continue argvalue = s...
def serialize(self): ''' Return a serializable form of the config instance ''' serialized = {'type': self.__type__} for argname in self._attributes: if argname == 'required': # This is handled elsewhere continue argvalue = s...
[ "Return", "a", "serializable", "form", "of", "the", "config", "instance" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schema.py#L827-L845
[ "def", "serialize", "(", "self", ")", ":", "serialized", "=", "{", "'type'", ":", "self", ".", "__type__", "}", "for", "argname", "in", "self", ".", "_attributes", ":", "if", "argname", "==", "'required'", ":", "# This is handled elsewhere", "continue", "arg...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
ComplexSchemaItem._add_missing_schema_attributes
Adds any missed schema attributes to the _attributes list The attributes can be class attributes and they won't be included in the _attributes list automatically
salt/utils/schema.py
def _add_missing_schema_attributes(self): ''' Adds any missed schema attributes to the _attributes list The attributes can be class attributes and they won't be included in the _attributes list automatically ''' for attr in [attr for attr in dir(self) if not attr.startsw...
def _add_missing_schema_attributes(self): ''' Adds any missed schema attributes to the _attributes list The attributes can be class attributes and they won't be included in the _attributes list automatically ''' for attr in [attr for attr in dir(self) if not attr.startsw...
[ "Adds", "any", "missed", "schema", "attributes", "to", "the", "_attributes", "list" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schema.py#L1481-L1493
[ "def", "_add_missing_schema_attributes", "(", "self", ")", ":", "for", "attr", "in", "[", "attr", "for", "attr", "in", "dir", "(", "self", ")", "if", "not", "attr", ".", "startswith", "(", "'__'", ")", "]", ":", "attr_val", "=", "getattr", "(", "self",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
ComplexSchemaItem.get_definition
Returns the definition of the complex item
salt/utils/schema.py
def get_definition(self): '''Returns the definition of the complex item''' serialized = super(ComplexSchemaItem, self).serialize() # Adjust entries in the serialization del serialized['definition_name'] serialized['title'] = self.definition_name properties = {} ...
def get_definition(self): '''Returns the definition of the complex item''' serialized = super(ComplexSchemaItem, self).serialize() # Adjust entries in the serialization del serialized['definition_name'] serialized['title'] = self.definition_name properties = {} ...
[ "Returns", "the", "definition", "of", "the", "complex", "item" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schema.py#L1506-L1533
[ "def", "get_definition", "(", "self", ")", ":", "serialized", "=", "super", "(", "ComplexSchemaItem", ",", "self", ")", ".", "serialize", "(", ")", "# Adjust entries in the serialization", "del", "serialized", "[", "'definition_name'", "]", "serialized", "[", "'ti...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
ComplexSchemaItem.get_complex_attrs
Returns a dictionary of the complex attributes
salt/utils/schema.py
def get_complex_attrs(self): '''Returns a dictionary of the complex attributes''' return [getattr(self, attr_name) for attr_name in self._attributes if isinstance(getattr(self, attr_name), ComplexSchemaItem)]
def get_complex_attrs(self): '''Returns a dictionary of the complex attributes''' return [getattr(self, attr_name) for attr_name in self._attributes if isinstance(getattr(self, attr_name), ComplexSchemaItem)]
[ "Returns", "a", "dictionary", "of", "the", "complex", "attributes" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schema.py#L1535-L1538
[ "def", "get_complex_attrs", "(", "self", ")", ":", "return", "[", "getattr", "(", "self", ",", "attr_name", ")", "for", "attr_name", "in", "self", ".", "_attributes", "if", "isinstance", "(", "getattr", "(", "self", ",", "attr_name", ")", ",", "ComplexSche...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
exists
Check to see if an RDS exists. CLI example:: salt myminion boto_rds.exists myrds region=us-east-1
salt/modules/boto_rds.py
def exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an RDS exists. CLI example:: salt myminion boto_rds.exists myrds region=us-east-1 ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) try: rds = conn.descri...
def exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an RDS exists. CLI example:: salt myminion boto_rds.exists myrds region=us-east-1 ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) try: rds = conn.descri...
[ "Check", "to", "see", "if", "an", "RDS", "exists", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L141-L155
[ "def", "exists", "(", "name", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "="...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
option_group_exists
Check to see if an RDS option group exists. CLI example:: salt myminion boto_rds.option_group_exists myoptiongr region=us-east-1
salt/modules/boto_rds.py
def option_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an RDS option group exists. CLI example:: salt myminion boto_rds.option_group_exists myoptiongr region=us-east-1 ''' conn = _get_conn(region=region, key=ke...
def option_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an RDS option group exists. CLI example:: salt myminion boto_rds.option_group_exists myoptiongr region=us-east-1 ''' conn = _get_conn(region=region, key=ke...
[ "Check", "to", "see", "if", "an", "RDS", "option", "group", "exists", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L158-L173
[ "def", "option_group_exists", "(", "name", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
parameter_group_exists
Check to see if an RDS parameter group exists. CLI example:: salt myminion boto_rds.parameter_group_exists myparametergroup \ region=us-east-1
salt/modules/boto_rds.py
def parameter_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an RDS parameter group exists. CLI example:: salt myminion boto_rds.parameter_group_exists myparametergroup \ region=us-east-1 ''' co...
def parameter_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an RDS parameter group exists. CLI example:: salt myminion boto_rds.parameter_group_exists myparametergroup \ region=us-east-1 ''' co...
[ "Check", "to", "see", "if", "an", "RDS", "parameter", "group", "exists", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L176-L196
[ "def", "parameter_group_exists", "(", "name", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ","...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
subnet_group_exists
Check to see if an RDS subnet group exists. CLI example:: salt myminion boto_rds.subnet_group_exists my-param-group \ region=us-east-1
salt/modules/boto_rds.py
def subnet_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an RDS subnet group exists. CLI example:: salt myminion boto_rds.subnet_group_exists my-param-group \ region=us-east-1 ''' try: con...
def subnet_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an RDS subnet group exists. CLI example:: salt myminion boto_rds.subnet_group_exists my-param-group \ region=us-east-1 ''' try: con...
[ "Check", "to", "see", "if", "an", "RDS", "subnet", "group", "exists", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L199-L220
[ "def", "subnet_group_exists", "(", "name", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "r...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create
Create an RDS Instance CLI example to create an RDS Instance:: salt myminion boto_rds.create myrds 10 db.t2.micro MySQL sqlusr sqlpassw
salt/modules/boto_rds.py
def create(name, allocated_storage, db_instance_class, engine, master_username, master_user_password, db_name=None, db_security_groups=None, vpc_security_group_ids=None, vpc_security_groups=None, availability_zone=None, db_subnet_group_name=None, preferred_maintenance_window=...
def create(name, allocated_storage, db_instance_class, engine, master_username, master_user_password, db_name=None, db_security_groups=None, vpc_security_group_ids=None, vpc_security_groups=None, availability_zone=None, db_subnet_group_name=None, preferred_maintenance_window=...
[ "Create", "an", "RDS", "Instance" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L223-L319
[ "def", "create", "(", "name", ",", "allocated_storage", ",", "db_instance_class", ",", "engine", ",", "master_username", ",", "master_user_password", ",", "db_name", "=", "None", ",", "db_security_groups", "=", "None", ",", "vpc_security_group_ids", "=", "None", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_read_replica
Create an RDS read replica CLI example to create an RDS read replica:: salt myminion boto_rds.create_read_replica replicaname source_name
salt/modules/boto_rds.py
def create_read_replica(name, source_name, db_instance_class=None, availability_zone=None, port=None, auto_minor_version_upgrade=None, iops=None, option_group_name=None, publicly_accessible=None, tags=None, db_subnet_group_n...
def create_read_replica(name, source_name, db_instance_class=None, availability_zone=None, port=None, auto_minor_version_upgrade=None, iops=None, option_group_name=None, publicly_accessible=None, tags=None, db_subnet_group_n...
[ "Create", "an", "RDS", "read", "replica" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L322-L377
[ "def", "create_read_replica", "(", "name", ",", "source_name", ",", "db_instance_class", "=", "None", ",", "availability_zone", "=", "None", ",", "port", "=", "None", ",", "auto_minor_version_upgrade", "=", "None", ",", "iops", "=", "None", ",", "option_group_na...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_option_group
Create an RDS option group CLI example to create an RDS option group:: salt myminion boto_rds.create_option_group my-opt-group mysql 5.6 \ "group description"
salt/modules/boto_rds.py
def create_option_group(name, engine_name, major_engine_version, option_group_description, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an RDS option group CLI example to create an RDS option group:: salt myminion boto_rds....
def create_option_group(name, engine_name, major_engine_version, option_group_description, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an RDS option group CLI example to create an RDS option group:: salt myminion boto_rds....
[ "Create", "an", "RDS", "option", "group" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L380-L410
[ "def", "create_option_group", "(", "name", ",", "engine_name", ",", "major_engine_version", ",", "option_group_description", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_parameter_group
Create an RDS parameter group CLI example to create an RDS parameter group:: salt myminion boto_rds.create_parameter_group my-param-group mysql5.6 \ "group description"
salt/modules/boto_rds.py
def create_parameter_group(name, db_parameter_group_family, description, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an RDS parameter group CLI example to create an RDS parameter group:: salt myminion boto_rds.create...
def create_parameter_group(name, db_parameter_group_family, description, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an RDS parameter group CLI example to create an RDS parameter group:: salt myminion boto_rds.create...
[ "Create", "an", "RDS", "parameter", "group" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L413-L446
[ "def", "create_parameter_group", "(", "name", ",", "db_parameter_group_family", ",", "description", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "res", "=...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_subnet_group
Create an RDS subnet group CLI example to create an RDS subnet group:: salt myminion boto_rds.create_subnet_group my-subnet-group \ "group description" '[subnet-12345678, subnet-87654321]' \ region=us-east-1
salt/modules/boto_rds.py
def create_subnet_group(name, description, subnet_ids, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an RDS subnet group CLI example to create an RDS subnet group:: salt myminion boto_rds.create_subnet_group my-subnet-group \ "group des...
def create_subnet_group(name, description, subnet_ids, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an RDS subnet group CLI example to create an RDS subnet group:: salt myminion boto_rds.create_subnet_group my-subnet-group \ "group des...
[ "Create", "an", "RDS", "subnet", "group" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L449-L477
[ "def", "create_subnet_group", "(", "name", ",", "description", ",", "subnet_ids", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "res", "=", "__salt__", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
update_parameter_group
Update an RDS parameter group. CLI example:: salt myminion boto_rds.update_parameter_group my-param-group \ parameters='{"back_log":1, "binlog_cache_size":4096}' \ region=us-east-1
salt/modules/boto_rds.py
def update_parameter_group(name, parameters, apply_method="pending-reboot", tags=None, region=None, key=None, keyid=None, profile=None): ''' Update an RDS parameter group. CLI example:: salt myminion boto_rds.update_parameter_group my-param-gro...
def update_parameter_group(name, parameters, apply_method="pending-reboot", tags=None, region=None, key=None, keyid=None, profile=None): ''' Update an RDS parameter group. CLI example:: salt myminion boto_rds.update_parameter_group my-param-gro...
[ "Update", "an", "RDS", "parameter", "group", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L480-L522
[ "def", "update_parameter_group", "(", "name", ",", "parameters", ",", "apply_method", "=", "\"pending-reboot\"", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
describe
Return RDS instance details. CLI example:: salt myminion boto_rds.describe myrds
salt/modules/boto_rds.py
def describe(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Return RDS instance details. CLI example:: salt myminion boto_rds.describe myrds ''' res = __salt__['boto_rds.exists'](name, tags, region, key, keyid, pro...
def describe(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Return RDS instance details. CLI example:: salt myminion boto_rds.describe myrds ''' res = __salt__['boto_rds.exists'](name, tags, region, key, keyid, pro...
[ "Return", "RDS", "instance", "details", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L525-L572
[ "def", "describe", "(", "name", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "res", "=", "__salt__", "[", "'boto_rds.exists'", "]", "(", "name", ","...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
describe_db_instances
Return a detailed listing of some, or all, DB Instances visible in the current scope. Arbitrary subelements or subsections of the returned dataset can be selected by passing in a valid JMSEPath filter as well. CLI example:: salt myminion boto_rds.describe_db_instances jmespath='DBInstances[*].DBI...
salt/modules/boto_rds.py
def describe_db_instances(name=None, filters=None, jmespath='DBInstances', region=None, key=None, keyid=None, profile=None): ''' Return a detailed listing of some, or all, DB Instances visible in the current scope. Arbitrary subelements or subsections of the returned dataset c...
def describe_db_instances(name=None, filters=None, jmespath='DBInstances', region=None, key=None, keyid=None, profile=None): ''' Return a detailed listing of some, or all, DB Instances visible in the current scope. Arbitrary subelements or subsections of the returned dataset c...
[ "Return", "a", "detailed", "listing", "of", "some", "or", "all", "DB", "Instances", "visible", "in", "the", "current", "scope", ".", "Arbitrary", "subelements", "or", "subsections", "of", "the", "returned", "dataset", "can", "be", "selected", "by", "passing", ...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L575-L600
[ "def", "describe_db_instances", "(", "name", "=", "None", ",", "filters", "=", "None", ",", "jmespath", "=", "'DBInstances'", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
describe_db_subnet_groups
Return a detailed listing of some, or all, DB Subnet Groups visible in the current scope. Arbitrary subelements or subsections of the returned dataset can be selected by passing in a valid JMSEPath filter as well. CLI example:: salt myminion boto_rds.describe_db_subnet_groups
salt/modules/boto_rds.py
def describe_db_subnet_groups(name=None, filters=None, jmespath='DBSubnetGroups', region=None, key=None, keyid=None, profile=None): ''' Return a detailed listing of some, or all, DB Subnet Groups visible in the current scope. Arbitrary subelements or subsections of the returne...
def describe_db_subnet_groups(name=None, filters=None, jmespath='DBSubnetGroups', region=None, key=None, keyid=None, profile=None): ''' Return a detailed listing of some, or all, DB Subnet Groups visible in the current scope. Arbitrary subelements or subsections of the returne...
[ "Return", "a", "detailed", "listing", "of", "some", "or", "all", "DB", "Subnet", "Groups", "visible", "in", "the", "current", "scope", ".", "Arbitrary", "subelements", "or", "subsections", "of", "the", "returned", "dataset", "can", "be", "selected", "by", "p...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L603-L622
[ "def", "describe_db_subnet_groups", "(", "name", "=", "None", ",", "filters", "=", "None", ",", "jmespath", "=", "'DBSubnetGroups'", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_endpoint
Return the endpoint of an RDS instance. CLI example:: salt myminion boto_rds.get_endpoint myrds
salt/modules/boto_rds.py
def get_endpoint(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Return the endpoint of an RDS instance. CLI example:: salt myminion boto_rds.get_endpoint myrds ''' endpoint = False res = __salt__['boto_rds.exists'](name, tags, region, key, keyi...
def get_endpoint(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Return the endpoint of an RDS instance. CLI example:: salt myminion boto_rds.get_endpoint myrds ''' endpoint = False res = __salt__['boto_rds.exists'](name, tags, region, key, keyi...
[ "Return", "the", "endpoint", "of", "an", "RDS", "instance", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L625-L651
[ "def", "get_endpoint", "(", "name", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "endpoint", "=", "False", "res", "=", "__salt__", "[", "'boto_rds.exi...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete
Delete an RDS instance. CLI example:: salt myminion boto_rds.delete myrds skip_final_snapshot=True \ region=us-east-1
salt/modules/boto_rds.py
def delete(name, skip_final_snapshot=None, final_db_snapshot_identifier=None, region=None, key=None, keyid=None, profile=None, tags=None, wait_for_deletion=True, timeout=180): ''' Delete an RDS instance. CLI example:: salt myminion boto_rds.delete myrds skip_final_snapshot=Tr...
def delete(name, skip_final_snapshot=None, final_db_snapshot_identifier=None, region=None, key=None, keyid=None, profile=None, tags=None, wait_for_deletion=True, timeout=180): ''' Delete an RDS instance. CLI example:: salt myminion boto_rds.delete myrds skip_final_snapshot=Tr...
[ "Delete", "an", "RDS", "instance", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L654-L708
[ "def", "delete", "(", "name", ",", "skip_final_snapshot", "=", "None", ",", "final_db_snapshot_identifier", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "tags", "=", "None"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_option_group
Delete an RDS option group. CLI example:: salt myminion boto_rds.delete_option_group my-opt-group \ region=us-east-1
salt/modules/boto_rds.py
def delete_option_group(name, region=None, key=None, keyid=None, profile=None): ''' Delete an RDS option group. CLI example:: salt myminion boto_rds.delete_option_group my-opt-group \ region=us-east-1 ''' try: conn = _get_conn(region=region, key=key, keyid=keyid, pr...
def delete_option_group(name, region=None, key=None, keyid=None, profile=None): ''' Delete an RDS option group. CLI example:: salt myminion boto_rds.delete_option_group my-opt-group \ region=us-east-1 ''' try: conn = _get_conn(region=region, key=key, keyid=keyid, pr...
[ "Delete", "an", "RDS", "option", "group", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L711-L733
[ "def", "delete_option_group", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_parameter_group
Delete an RDS parameter group. CLI example:: salt myminion boto_rds.delete_parameter_group my-param-group \ region=us-east-1
salt/modules/boto_rds.py
def delete_parameter_group(name, region=None, key=None, keyid=None, profile=None): ''' Delete an RDS parameter group. CLI example:: salt myminion boto_rds.delete_parameter_group my-param-group \ region=us-east-1 ''' try: conn = _get_conn(r...
def delete_parameter_group(name, region=None, key=None, keyid=None, profile=None): ''' Delete an RDS parameter group. CLI example:: salt myminion boto_rds.delete_parameter_group my-param-group \ region=us-east-1 ''' try: conn = _get_conn(r...
[ "Delete", "an", "RDS", "parameter", "group", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L736-L755
[ "def", "delete_parameter_group", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_subnet_group
Delete an RDS subnet group. CLI example:: salt myminion boto_rds.delete_subnet_group my-subnet-group \ region=us-east-1
salt/modules/boto_rds.py
def delete_subnet_group(name, region=None, key=None, keyid=None, profile=None): ''' Delete an RDS subnet group. CLI example:: salt myminion boto_rds.delete_subnet_group my-subnet-group \ region=us-east-1 ''' try: conn = _get_conn(region=regio...
def delete_subnet_group(name, region=None, key=None, keyid=None, profile=None): ''' Delete an RDS subnet group. CLI example:: salt myminion boto_rds.delete_subnet_group my-subnet-group \ region=us-east-1 ''' try: conn = _get_conn(region=regio...
[ "Delete", "an", "RDS", "subnet", "group", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L758-L777
[ "def", "delete_subnet_group", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
describe_parameter_group
Returns a list of `DBParameterGroup` descriptions. CLI example to description of parameter group:: salt myminion boto_rds.describe_parameter_group parametergroupname\ region=us-east-1
salt/modules/boto_rds.py
def describe_parameter_group(name, Filters=None, MaxRecords=None, Marker=None, region=None, key=None, keyid=None, profile=None): ''' Returns a list of `DBParameterGroup` descriptions. CLI example to description of parameter group:: salt myminion boto_rds.describe_parame...
def describe_parameter_group(name, Filters=None, MaxRecords=None, Marker=None, region=None, key=None, keyid=None, profile=None): ''' Returns a list of `DBParameterGroup` descriptions. CLI example to description of parameter group:: salt myminion boto_rds.describe_parame...
[ "Returns", "a", "list", "of", "DBParameterGroup", "descriptions", ".", "CLI", "example", "to", "description", "of", "parameter", "group", "::" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L780-L819
[ "def", "describe_parameter_group", "(", "name", ",", "Filters", "=", "None", ",", "MaxRecords", "=", "None", ",", "Marker", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
describe_parameters
Returns a list of `DBParameterGroup` parameters. CLI example to description of parameters :: salt myminion boto_rds.describe_parameters parametergroupname\ region=us-east-1
salt/modules/boto_rds.py
def describe_parameters(name, Source=None, MaxRecords=None, Marker=None, region=None, key=None, keyid=None, profile=None): ''' Returns a list of `DBParameterGroup` parameters. CLI example to description of parameters :: salt myminion boto_rds.describe_parameters parametergro...
def describe_parameters(name, Source=None, MaxRecords=None, Marker=None, region=None, key=None, keyid=None, profile=None): ''' Returns a list of `DBParameterGroup` parameters. CLI example to description of parameters :: salt myminion boto_rds.describe_parameters parametergro...
[ "Returns", "a", "list", "of", "DBParameterGroup", "parameters", ".", "CLI", "example", "to", "description", "of", "parameters", "::" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L822-L875
[ "def", "describe_parameters", "(", "name", ",", "Source", "=", "None", ",", "MaxRecords", "=", "None", ",", "Marker", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
modify_db_instance
Modify settings for a DB instance. CLI example to description of parameters :: salt myminion boto_rds.modify_db_instance db_instance_identifier region=us-east-1
salt/modules/boto_rds.py
def modify_db_instance(name, allocated_storage=None, allow_major_version_upgrade=None, apply_immediately=None, auto_minor_version_upgrade=None, backup_retention_period=None, ca_certi...
def modify_db_instance(name, allocated_storage=None, allow_major_version_upgrade=None, apply_immediately=None, auto_minor_version_upgrade=None, backup_retention_period=None, ca_certi...
[ "Modify", "settings", "for", "a", "DB", "instance", ".", "CLI", "example", "to", "description", "of", "parameters", "::" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L878-L952
[ "def", "modify_db_instance", "(", "name", ",", "allocated_storage", "=", "None", ",", "allow_major_version_upgrade", "=", "None", ",", "apply_immediately", "=", "None", ",", "auto_minor_version_upgrade", "=", "None", ",", "backup_retention_period", "=", "None", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
beacon
Monitor the temperature, humidity and pressure using the SenseHat sensors. You can either specify a threshold for each value and only emit a beacon if it is exceeded or define a range and emit a beacon when the value is out of range. Units: * humidity: percent * temperature...
salt/beacons/sensehat.py
def beacon(config): ''' Monitor the temperature, humidity and pressure using the SenseHat sensors. You can either specify a threshold for each value and only emit a beacon if it is exceeded or define a range and emit a beacon when the value is out of range. Units: * humidity: ...
def beacon(config): ''' Monitor the temperature, humidity and pressure using the SenseHat sensors. You can either specify a threshold for each value and only emit a beacon if it is exceeded or define a range and emit a beacon when the value is out of range. Units: * humidity: ...
[ "Monitor", "the", "temperature", "humidity", "and", "pressure", "using", "the", "SenseHat", "sensors", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/sensehat.py#L47-L109
[ "def", "beacon", "(", "config", ")", ":", "ret", "=", "[", "]", "min_default", "=", "{", "'humidity'", ":", "'0'", ",", "'pressure'", ":", "'0'", ",", "'temperature'", ":", "'-273.15'", "}", "_config", "=", "{", "}", "list", "(", "map", "(", "_config...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
flavor_present
Creates Nova flavor if it does not exist :param name: Flavor name :param params: Definition of the Flavor (see Compute API documentation) .. code-block:: yaml nova-flavor-present: nova.flavor_present: - name: myflavor - params: ram: ...
salt/states/nova.py
def flavor_present(name, params=None, **kwargs): ''' Creates Nova flavor if it does not exist :param name: Flavor name :param params: Definition of the Flavor (see Compute API documentation) .. code-block:: yaml nova-flavor-present: nova.flavor_present: - name:...
def flavor_present(name, params=None, **kwargs): ''' Creates Nova flavor if it does not exist :param name: Flavor name :param params: Definition of the Flavor (see Compute API documentation) .. code-block:: yaml nova-flavor-present: nova.flavor_present: - name:...
[ "Creates", "Nova", "flavor", "if", "it", "does", "not", "exist" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/nova.py#L27-L78
[ "def", "flavor_present", "(", "name", ",", "params", "=", "None", ",", "*", "*", "kwargs", ")", ":", "dry_run", "=", "__opts__", "[", "'test'", "]", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
flavor_access_list
Grants access of the flavor to a project. Flavor must be private. :param name: non-public flavor name :param projects: list of projects which should have the access to the flavor .. code-block:: yaml nova-flavor-share: nova.flavor_project_access: - name: myflavor ...
salt/states/nova.py
def flavor_access_list(name, projects, **kwargs): ''' Grants access of the flavor to a project. Flavor must be private. :param name: non-public flavor name :param projects: list of projects which should have the access to the flavor .. code-block:: yaml nova-flavor-share: nova...
def flavor_access_list(name, projects, **kwargs): ''' Grants access of the flavor to a project. Flavor must be private. :param name: non-public flavor name :param projects: list of projects which should have the access to the flavor .. code-block:: yaml nova-flavor-share: nova...
[ "Grants", "access", "of", "the", "flavor", "to", "a", "project", ".", "Flavor", "must", "be", "private", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/nova.py#L81-L141
[ "def", "flavor_access_list", "(", "name", ",", "projects", ",", "*", "*", "kwargs", ")", ":", "dry_run", "=", "__opts__", "[", "'test'", "]", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'c...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
flavor_absent
Makes flavor to be absent :param name: flavor name .. code-block:: yaml nova-flavor-absent: nova.flavor_absent: - name: flavor_name
salt/states/nova.py
def flavor_absent(name, **kwargs): ''' Makes flavor to be absent :param name: flavor name .. code-block:: yaml nova-flavor-absent: nova.flavor_absent: - name: flavor_name ''' dry_run = __opts__['test'] ret = {'name': name, 'result': False, 'comment': ''...
def flavor_absent(name, **kwargs): ''' Makes flavor to be absent :param name: flavor name .. code-block:: yaml nova-flavor-absent: nova.flavor_absent: - name: flavor_name ''' dry_run = __opts__['test'] ret = {'name': name, 'result': False, 'comment': ''...
[ "Makes", "flavor", "to", "be", "absent" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/nova.py#L144-L183
[ "def", "flavor_absent", "(", "name", ",", "*", "*", "kwargs", ")", ":", "dry_run", "=", "__opts__", "[", "'test'", "]", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
match
This is a compatibility matcher and is NOT called when using nodegroups for remote execution, but is called when the nodegroups matcher is used in states
salt/matchers/nodegroup_match.py
def match(tgt, nodegroups=None, opts=None): ''' This is a compatibility matcher and is NOT called when using nodegroups for remote execution, but is called when the nodegroups matcher is used in states ''' if not opts: opts = __opts__ if not nodegroups: log.debug('Nodegroup m...
def match(tgt, nodegroups=None, opts=None): ''' This is a compatibility matcher and is NOT called when using nodegroups for remote execution, but is called when the nodegroups matcher is used in states ''' if not opts: opts = __opts__ if not nodegroups: log.debug('Nodegroup m...
[ "This", "is", "a", "compatibility", "matcher", "and", "is", "NOT", "called", "when", "using", "nodegroups", "for", "remote", "execution", "but", "is", "called", "when", "the", "nodegroups", "matcher", "is", "used", "in", "states" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/matchers/nodegroup_match.py#L14-L30
[ "def", "match", "(", "tgt", ",", "nodegroups", "=", "None", ",", "opts", "=", "None", ")", ":", "if", "not", "opts", ":", "opts", "=", "__opts__", "if", "not", "nodegroups", ":", "log", ".", "debug", "(", "'Nodegroup matcher called with no nodegroups.'", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
managed
Ensure the existence (or not) of LDAP entries and their attributes Example: .. code-block:: yaml ldapi:///: ldap.managed: - connect_spec: bind: method: sasl - entries: # make sure the entry doesn't exist ...
salt/states/ldap.py
def managed(name, entries, connect_spec=None): '''Ensure the existence (or not) of LDAP entries and their attributes Example: .. code-block:: yaml ldapi:///: ldap.managed: - connect_spec: bind: method: sasl - entries: ...
def managed(name, entries, connect_spec=None): '''Ensure the existence (or not) of LDAP entries and their attributes Example: .. code-block:: yaml ldapi:///: ldap.managed: - connect_spec: bind: method: sasl - entries: ...
[ "Ensure", "the", "existence", "(", "or", "not", ")", "of", "LDAP", "entries", "and", "their", "attributes" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/ldap.py#L26-L368
[ "def", "managed", "(", "name", ",", "entries", ",", "connect_spec", "=", "None", ")", ":", "if", "connect_spec", "is", "None", ":", "connect_spec", "=", "{", "}", "try", ":", "connect_spec", ".", "setdefault", "(", "'url'", ",", "name", ")", "except", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_process_entries
Helper for managed() to process entries and return before/after views Collect the current database state and update it according to the data in :py:func:`managed`'s ``entries`` parameter. Return the current database state and what it will look like after modification. :param l: the LDAP c...
salt/states/ldap.py
def _process_entries(l, entries): '''Helper for managed() to process entries and return before/after views Collect the current database state and update it according to the data in :py:func:`managed`'s ``entries`` parameter. Return the current database state and what it will look like after modifi...
def _process_entries(l, entries): '''Helper for managed() to process entries and return before/after views Collect the current database state and update it according to the data in :py:func:`managed`'s ``entries`` parameter. Return the current database state and what it will look like after modifi...
[ "Helper", "for", "managed", "()", "to", "process", "entries", "and", "return", "before", "/", "after", "views" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/ldap.py#L371-L455
[ "def", "_process_entries", "(", "l", ",", "entries", ")", ":", "old", "=", "OrderedDict", "(", ")", "new", "=", "OrderedDict", "(", ")", "for", "entries_dict", "in", "entries", ":", "for", "dn", ",", "directives_seq", "in", "six", ".", "iteritems", "(", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_update_entry
Update an entry's attributes using the provided directives :param entry: A dict mapping each attribute name to a set of its values :param status: A dict holding cross-invocation status (whether delete_others is True or not, and the set of mentioned attributes) :param directives: ...
salt/states/ldap.py
def _update_entry(entry, status, directives): '''Update an entry's attributes using the provided directives :param entry: A dict mapping each attribute name to a set of its values :param status: A dict holding cross-invocation status (whether delete_others is True or not, and the se...
def _update_entry(entry, status, directives): '''Update an entry's attributes using the provided directives :param entry: A dict mapping each attribute name to a set of its values :param status: A dict holding cross-invocation status (whether delete_others is True or not, and the se...
[ "Update", "an", "entry", "s", "attributes", "using", "the", "provided", "directives" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/ldap.py#L458-L494
[ "def", "_update_entry", "(", "entry", ",", "status", ",", "directives", ")", ":", "for", "directive", ",", "state", "in", "six", ".", "iteritems", "(", "directives", ")", ":", "if", "directive", "==", "'delete_others'", ":", "status", "[", "'delete_others'",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_toset
helper to convert various things to a set This enables flexibility in what users provide as the list of LDAP entry attribute values. Note that the LDAP spec prohibits duplicate values in an attribute. RFC 2251 states that: "The order of attribute values within the vals set is undefined and i...
salt/states/ldap.py
def _toset(thing): '''helper to convert various things to a set This enables flexibility in what users provide as the list of LDAP entry attribute values. Note that the LDAP spec prohibits duplicate values in an attribute. RFC 2251 states that: "The order of attribute values within the vals s...
def _toset(thing): '''helper to convert various things to a set This enables flexibility in what users provide as the list of LDAP entry attribute values. Note that the LDAP spec prohibits duplicate values in an attribute. RFC 2251 states that: "The order of attribute values within the vals s...
[ "helper", "to", "convert", "various", "things", "to", "a", "set" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/ldap.py#L497-L528
[ "def", "_toset", "(", "thing", ")", ":", "if", "thing", "is", "None", ":", "return", "OrderedSet", "(", ")", "if", "isinstance", "(", "thing", ",", "six", ".", "string_types", ")", ":", "return", "OrderedSet", "(", "(", "thing", ",", ")", ")", "# con...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
info
Return information for the specified user name User to get the information for root Directory to chroot into CLI Example: .. code-block:: bash salt '*' shadow.info root
salt/modules/shadow.py
def info(name, root=None): ''' Return information for the specified user name User to get the information for root Directory to chroot into CLI Example: .. code-block:: bash salt '*' shadow.info root ''' if root is not None: getspnam = functools.parti...
def info(name, root=None): ''' Return information for the specified user name User to get the information for root Directory to chroot into CLI Example: .. code-block:: bash salt '*' shadow.info root ''' if root is not None: getspnam = functools.parti...
[ "Return", "information", "for", "the", "specified", "user" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/shadow.py#L53-L95
[ "def", "info", "(", "name", ",", "root", "=", "None", ")", ":", "if", "root", "is", "not", "None", ":", "getspnam", "=", "functools", ".", "partial", "(", "_getspnam", ",", "root", "=", "root", ")", "else", ":", "getspnam", "=", "functools", ".", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_set_attrib
Set a parameter in /etc/shadow
salt/modules/shadow.py
def _set_attrib(name, key, value, param, root=None, validate=True): ''' Set a parameter in /etc/shadow ''' pre_info = info(name, root=root) # If the user is not present or the attribute is already present, # we return early if not pre_info['name']: return False if value == pre_...
def _set_attrib(name, key, value, param, root=None, validate=True): ''' Set a parameter in /etc/shadow ''' pre_info = info(name, root=root) # If the user is not present or the attribute is already present, # we return early if not pre_info['name']: return False if value == pre_...
[ "Set", "a", "parameter", "in", "/", "etc", "/", "shadow" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/shadow.py#L98-L122
[ "def", "_set_attrib", "(", "name", ",", "key", ",", "value", ",", "param", ",", "root", "=", "None", ",", "validate", "=", "True", ")", ":", "pre_info", "=", "info", "(", "name", ",", "root", "=", "root", ")", "# If the user is not present or the attribute...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
gen_password
.. versionadded:: 2014.7.0 Generate hashed password .. note:: When called this function is called directly via remote-execution, the password argument may be displayed in the system's process list. This may be a security risk on certain systems. password Plaintext passwor...
salt/modules/shadow.py
def gen_password(password, crypt_salt=None, algorithm='sha512'): ''' .. versionadded:: 2014.7.0 Generate hashed password .. note:: When called this function is called directly via remote-execution, the password argument may be displayed in the system's process list. This may b...
def gen_password(password, crypt_salt=None, algorithm='sha512'): ''' .. versionadded:: 2014.7.0 Generate hashed password .. note:: When called this function is called directly via remote-execution, the password argument may be displayed in the system's process list. This may b...
[ "..", "versionadded", "::", "2014", ".", "7", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/shadow.py#L193-L232
[ "def", "gen_password", "(", "password", ",", "crypt_salt", "=", "None", ",", "algorithm", "=", "'sha512'", ")", ":", "if", "not", "HAS_CRYPT", ":", "raise", "CommandExecutionError", "(", "'gen_password is not available on this operating system '", "'because the \"crypt\" ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
del_password
.. versionadded:: 2014.7.0 Delete the password from name user name User to delete root Directory to chroot into CLI Example: .. code-block:: bash salt '*' shadow.del_password username
salt/modules/shadow.py
def del_password(name, root=None): ''' .. versionadded:: 2014.7.0 Delete the password from name user name User to delete root Directory to chroot into CLI Example: .. code-block:: bash salt '*' shadow.del_password username ''' cmd = ['passwd'] if roo...
def del_password(name, root=None): ''' .. versionadded:: 2014.7.0 Delete the password from name user name User to delete root Directory to chroot into CLI Example: .. code-block:: bash salt '*' shadow.del_password username ''' cmd = ['passwd'] if roo...
[ "..", "versionadded", "::", "2014", ".", "7", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/shadow.py#L235-L260
[ "def", "del_password", "(", "name", ",", "root", "=", "None", ")", ":", "cmd", "=", "[", "'passwd'", "]", "if", "root", "is", "not", "None", ":", "cmd", ".", "extend", "(", "(", "'-R'", ",", "root", ")", ")", "cmd", ".", "extend", "(", "(", "'-...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
unlock_password
.. versionadded:: 2016.11.0 Unlock the password from name user name User to unlock root Directory to chroot into CLI Example: .. code-block:: bash salt '*' shadow.unlock_password username
salt/modules/shadow.py
def unlock_password(name, root=None): ''' .. versionadded:: 2016.11.0 Unlock the password from name user name User to unlock root Directory to chroot into CLI Example: .. code-block:: bash salt '*' shadow.unlock_password username ''' pre_info = info(name...
def unlock_password(name, root=None): ''' .. versionadded:: 2016.11.0 Unlock the password from name user name User to unlock root Directory to chroot into CLI Example: .. code-block:: bash salt '*' shadow.unlock_password username ''' pre_info = info(name...
[ "..", "versionadded", "::", "2016", ".", "11", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/shadow.py#L299-L332
[ "def", "unlock_password", "(", "name", ",", "root", "=", "None", ")", ":", "pre_info", "=", "info", "(", "name", ",", "root", "=", "root", ")", "if", "not", "pre_info", "[", "'name'", "]", ":", "return", "False", "if", "not", "pre_info", "[", "'passw...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_password
Set the password for a named user. The password must be a properly defined hash. The password hash can be generated with this command: ``python -c "import crypt; print crypt.crypt('password', '\\$6\\$SALTsalt')"`` ``SALTsalt`` is the 8-character crpytographic salt. Valid characters in the salt are...
salt/modules/shadow.py
def set_password(name, password, use_usermod=False, root=None): ''' Set the password for a named user. The password must be a properly defined hash. The password hash can be generated with this command: ``python -c "import crypt; print crypt.crypt('password', '\\$6\\$SALTsalt')"`` ``SALTsalt``...
def set_password(name, password, use_usermod=False, root=None): ''' Set the password for a named user. The password must be a properly defined hash. The password hash can be generated with this command: ``python -c "import crypt; print crypt.crypt('password', '\\$6\\$SALTsalt')"`` ``SALTsalt``...
[ "Set", "the", "password", "for", "a", "named", "user", ".", "The", "password", "must", "be", "a", "properly", "defined", "hash", ".", "The", "password", "hash", "can", "be", "generated", "with", "this", "command", ":" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/shadow.py#L335-L408
[ "def", "set_password", "(", "name", ",", "password", ",", "use_usermod", "=", "False", ",", "root", "=", "None", ")", ":", "if", "not", "salt", ".", "utils", ".", "data", ".", "is_true", "(", "use_usermod", ")", ":", "# Edit the shadow file directly", "# A...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_date
Sets the value for the date the password was last changed to days since the epoch (January 1, 1970). See man chage. name User to modify date Date the password was last changed root Directory to chroot into CLI Example: .. code-block:: bash salt '*' shadow.se...
salt/modules/shadow.py
def set_date(name, date, root=None): ''' Sets the value for the date the password was last changed to days since the epoch (January 1, 1970). See man chage. name User to modify date Date the password was last changed root Directory to chroot into CLI Example: ...
def set_date(name, date, root=None): ''' Sets the value for the date the password was last changed to days since the epoch (January 1, 1970). See man chage. name User to modify date Date the password was last changed root Directory to chroot into CLI Example: ...
[ "Sets", "the", "value", "for", "the", "date", "the", "password", "was", "last", "changed", "to", "days", "since", "the", "epoch", "(", "January", "1", "1970", ")", ".", "See", "man", "chage", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/shadow.py#L434-L454
[ "def", "set_date", "(", "name", ",", "date", ",", "root", "=", "None", ")", ":", "return", "_set_attrib", "(", "name", ",", "'lstchg'", ",", "date", ",", "'-d'", ",", "root", "=", "root", ",", "validate", "=", "False", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_expire
.. versionchanged:: 2014.7.0 Sets the value for the date the account expires as days since the epoch (January 1, 1970). Using a value of -1 will clear expiration. See man chage. name User to modify date Date the account expires root Directory to chroot into CLI E...
salt/modules/shadow.py
def set_expire(name, expire, root=None): ''' .. versionchanged:: 2014.7.0 Sets the value for the date the account expires as days since the epoch (January 1, 1970). Using a value of -1 will clear expiration. See man chage. name User to modify date Date the account expires ...
def set_expire(name, expire, root=None): ''' .. versionchanged:: 2014.7.0 Sets the value for the date the account expires as days since the epoch (January 1, 1970). Using a value of -1 will clear expiration. See man chage. name User to modify date Date the account expires ...
[ "..", "versionchanged", "::", "2014", ".", "7", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/shadow.py#L457-L480
[ "def", "set_expire", "(", "name", ",", "expire", ",", "root", "=", "None", ")", ":", "return", "_set_attrib", "(", "name", ",", "'expire'", ",", "expire", ",", "'-E'", ",", "root", "=", "root", ",", "validate", "=", "False", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_users
.. versionadded:: 2018.3.0 Return a list of all shadow users root Directory to chroot into CLI Example: .. code-block:: bash salt '*' shadow.list_users
salt/modules/shadow.py
def list_users(root=None): ''' .. versionadded:: 2018.3.0 Return a list of all shadow users root Directory to chroot into CLI Example: .. code-block:: bash salt '*' shadow.list_users ''' if root is not None: getspall = functools.partial(_getspall, root=root) ...
def list_users(root=None): ''' .. versionadded:: 2018.3.0 Return a list of all shadow users root Directory to chroot into CLI Example: .. code-block:: bash salt '*' shadow.list_users ''' if root is not None: getspall = functools.partial(_getspall, root=root) ...
[ "..", "versionadded", "::", "2018", ".", "3", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/shadow.py#L483-L504
[ "def", "list_users", "(", "root", "=", "None", ")", ":", "if", "root", "is", "not", "None", ":", "getspall", "=", "functools", ".", "partial", "(", "_getspall", ",", "root", "=", "root", ")", "else", ":", "getspall", "=", "functools", ".", "partial", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_getspnam
Alternative implementation for getspnam, that use only /etc/shadow
salt/modules/shadow.py
def _getspnam(name, root=None): ''' Alternative implementation for getspnam, that use only /etc/shadow ''' root = '/' if not root else root passwd = os.path.join(root, 'etc/shadow') with salt.utils.files.fopen(passwd) as fp_: for line in fp_: line = salt.utils.stringutils.to_...
def _getspnam(name, root=None): ''' Alternative implementation for getspnam, that use only /etc/shadow ''' root = '/' if not root else root passwd = os.path.join(root, 'etc/shadow') with salt.utils.files.fopen(passwd) as fp_: for line in fp_: line = salt.utils.stringutils.to_...
[ "Alternative", "implementation", "for", "getspnam", "that", "use", "only", "/", "etc", "/", "shadow" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/shadow.py#L507-L522
[ "def", "_getspnam", "(", "name", ",", "root", "=", "None", ")", ":", "root", "=", "'/'", "if", "not", "root", "else", "root", "passwd", "=", "os", ".", "path", ".", "join", "(", "root", ",", "'etc/shadow'", ")", "with", "salt", ".", "utils", ".", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_split_zone
With boto route53, zones can only be matched by name or iterated over in a list. Since the name will be the same for public and private zones in a split DNS situation, iterate over the list and match the zone name and public/private status.
salt/modules/boto_route53.py
def _get_split_zone(zone, _conn, private_zone): ''' With boto route53, zones can only be matched by name or iterated over in a list. Since the name will be the same for public and private zones in a split DNS situation, iterate over the list and match the zone name and public/private status. ...
def _get_split_zone(zone, _conn, private_zone): ''' With boto route53, zones can only be matched by name or iterated over in a list. Since the name will be the same for public and private zones in a split DNS situation, iterate over the list and match the zone name and public/private status. ...
[ "With", "boto", "route53", "zones", "can", "only", "be", "matched", "by", "name", "or", "iterated", "over", "in", "a", "list", ".", "Since", "the", "name", "will", "be", "the", "same", "for", "public", "and", "private", "zones", "in", "a", "split", "DN...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L94-L107
[ "def", "_get_split_zone", "(", "zone", ",", "_conn", ",", "private_zone", ")", ":", "for", "_zone", "in", "_conn", ".", "get_zones", "(", ")", ":", "if", "_zone", ".", "name", "==", "zone", ":", "_private_zone", "=", "True", "if", "_zone", ".", "config...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
describe_hosted_zones
Return detailed info about one, or all, zones in the bound account. If neither zone_id nor domain_name is provided, return all zones. Note that the return format is slightly different between the 'all' and 'single' description types. zone_id The unique identifier for the Hosted Zone domain...
salt/modules/boto_route53.py
def describe_hosted_zones(zone_id=None, domain_name=None, region=None, key=None, keyid=None, profile=None): ''' Return detailed info about one, or all, zones in the bound account. If neither zone_id nor domain_name is provided, return all zones. Note that the return format is s...
def describe_hosted_zones(zone_id=None, domain_name=None, region=None, key=None, keyid=None, profile=None): ''' Return detailed info about one, or all, zones in the bound account. If neither zone_id nor domain_name is provided, return all zones. Note that the return format is s...
[ "Return", "detailed", "info", "about", "one", "or", "all", "zones", "in", "the", "bound", "account", ".", "If", "neither", "zone_id", "nor", "domain_name", "is", "provided", "return", "all", "zones", ".", "Note", "that", "the", "return", "format", "is", "s...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L110-L179
[ "def", "describe_hosted_zones", "(", "zone_id", "=", "None", ",", "domain_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_all_zones_by_name
List, by their FQDNs, all hosted zones in the bound account. region Region to connect to. key Secret key to be used. keyid Access key to be used. profile A dict with region, key and keyid, or a pillar key (string) that contains a dict with region, key and keyi...
salt/modules/boto_route53.py
def list_all_zones_by_name(region=None, key=None, keyid=None, profile=None): ''' List, by their FQDNs, all hosted zones in the bound account. region Region to connect to. key Secret key to be used. keyid Access key to be used. profile A dict with region, key a...
def list_all_zones_by_name(region=None, key=None, keyid=None, profile=None): ''' List, by their FQDNs, all hosted zones in the bound account. region Region to connect to. key Secret key to be used. keyid Access key to be used. profile A dict with region, key a...
[ "List", "by", "their", "FQDNs", "all", "hosted", "zones", "in", "the", "bound", "account", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L182-L207
[ "def", "list_all_zones_by_name", "(", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "ret", "=", "describe_hosted_zones", "(", "region", "=", "region", ",", "key", "=", "key", ",", "key...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_all_zones_by_id
List, by their IDs, all hosted zones in the bound account. region Region to connect to. key Secret key to be used. keyid Access key to be used. profile A dict with region, key and keyid, or a pillar key (string) that contains a dict with region, key and keyid....
salt/modules/boto_route53.py
def list_all_zones_by_id(region=None, key=None, keyid=None, profile=None): ''' List, by their IDs, all hosted zones in the bound account. region Region to connect to. key Secret key to be used. keyid Access key to be used. profile A dict with region, key and k...
def list_all_zones_by_id(region=None, key=None, keyid=None, profile=None): ''' List, by their IDs, all hosted zones in the bound account. region Region to connect to. key Secret key to be used. keyid Access key to be used. profile A dict with region, key and k...
[ "List", "by", "their", "IDs", "all", "hosted", "zones", "in", "the", "bound", "account", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L210-L235
[ "def", "list_all_zones_by_id", "(", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "ret", "=", "describe_hosted_zones", "(", "region", "=", "region", ",", "key", "=", "key", ",", "keyid...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
zone_exists
Check for the existence of a Route53 hosted zone. .. versionadded:: 2015.8.0 CLI Example:: salt myminion boto_route53.zone_exists example.org
salt/modules/boto_route53.py
def zone_exists(zone, region=None, key=None, keyid=None, profile=None, retry_on_rate_limit=None, rate_limit_retries=None, retry_on_errors=True, error_retries=5): ''' Check for the existence of a Route53 hosted zone. .. versionadded:: 2015.8.0 CLI Example:: salt...
def zone_exists(zone, region=None, key=None, keyid=None, profile=None, retry_on_rate_limit=None, rate_limit_retries=None, retry_on_errors=True, error_retries=5): ''' Check for the existence of a Route53 hosted zone. .. versionadded:: 2015.8.0 CLI Example:: salt...
[ "Check", "for", "the", "existence", "of", "a", "Route53", "hosted", "zone", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L238-L282
[ "def", "zone_exists", "(", "zone", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "retry_on_rate_limit", "=", "None", ",", "rate_limit_retries", "=", "None", ",", "retry_on_errors", "=", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_zone
Create a Route53 hosted zone. .. versionadded:: 2015.8.0 zone DNS zone to create private True/False if the zone will be a private zone vpc_id VPC ID to associate the zone to (required if private is True) vpc_region VPC Region (required if private is True) re...
salt/modules/boto_route53.py
def create_zone(zone, private=False, vpc_id=None, vpc_region=None, region=None, key=None, keyid=None, profile=None): ''' Create a Route53 hosted zone. .. versionadded:: 2015.8.0 zone DNS zone to create private True/False if the zone will be a private zone vpc_...
def create_zone(zone, private=False, vpc_id=None, vpc_region=None, region=None, key=None, keyid=None, profile=None): ''' Create a Route53 hosted zone. .. versionadded:: 2015.8.0 zone DNS zone to create private True/False if the zone will be a private zone vpc_...
[ "Create", "a", "Route53", "hosted", "zone", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L285-L337
[ "def", "create_zone", "(", "zone", ",", "private", "=", "False", ",", "vpc_id", "=", "None", ",", "vpc_region", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_healthcheck
Create a Route53 healthcheck .. versionadded:: 2018.3.0 ip_addr IP address to check. ip_addr or fqdn is required. fqdn Domain name of the endpoint to check. ip_addr or fqdn is required port Port to check hc_type Healthcheck type. HTTP | HTTPS | HTTP_STR_MA...
salt/modules/boto_route53.py
def create_healthcheck(ip_addr=None, fqdn=None, region=None, key=None, keyid=None, profile=None, port=53, hc_type='TCP', resource_path='', string_match=None, request_interval=30, failure_threshold=3, retry_on_errors=True, error_retries=5): ''' Create a Route53 healthc...
def create_healthcheck(ip_addr=None, fqdn=None, region=None, key=None, keyid=None, profile=None, port=53, hc_type='TCP', resource_path='', string_match=None, request_interval=30, failure_threshold=3, retry_on_errors=True, error_retries=5): ''' Create a Route53 healthc...
[ "Create", "a", "Route53", "healthcheck" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L340-L439
[ "def", "create_healthcheck", "(", "ip_addr", "=", "None", ",", "fqdn", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "port", "=", "53", ",", "hc_type", "=", "'TCP'", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_zone
Delete a Route53 hosted zone. .. versionadded:: 2015.8.0 CLI Example:: salt myminion boto_route53.delete_zone example.org
salt/modules/boto_route53.py
def delete_zone(zone, region=None, key=None, keyid=None, profile=None): ''' Delete a Route53 hosted zone. .. versionadded:: 2015.8.0 CLI Example:: salt myminion boto_route53.delete_zone example.org ''' if region is None: region = 'universal' conn = _get_conn(region=region...
def delete_zone(zone, region=None, key=None, keyid=None, profile=None): ''' Delete a Route53 hosted zone. .. versionadded:: 2015.8.0 CLI Example:: salt myminion boto_route53.delete_zone example.org ''' if region is None: region = 'universal' conn = _get_conn(region=region...
[ "Delete", "a", "Route53", "hosted", "zone", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L442-L462
[ "def", "delete_zone", "(", "zone", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "region", "is", "None", ":", "region", "=", "'universal'", "conn", "=", "_get_conn", "(", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_record
Get a record from a zone. CLI example:: salt myminion boto_route53.get_record test.example.org example.org A
salt/modules/boto_route53.py
def get_record(name, zone, record_type, fetch_all=False, region=None, key=None, keyid=None, profile=None, split_dns=False, private_zone=False, identifier=None, retry_on_rate_limit=None, rate_limit_retries=None, retry_on_errors=True, error_retries=5): ''' Get a record...
def get_record(name, zone, record_type, fetch_all=False, region=None, key=None, keyid=None, profile=None, split_dns=False, private_zone=False, identifier=None, retry_on_rate_limit=None, rate_limit_retries=None, retry_on_errors=True, error_retries=5): ''' Get a record...
[ "Get", "a", "record", "from", "a", "zone", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L473-L543
[ "def", "get_record", "(", "name", ",", "zone", ",", "record_type", ",", "fetch_all", "=", "False", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "split_dns", "=", "False", ",", "priv...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_record
Modify a record in a zone. CLI example:: salt myminion boto_route53.delete_record test.example.org example.org A
salt/modules/boto_route53.py
def delete_record(name, zone, record_type, identifier=None, all_records=False, region=None, key=None, keyid=None, profile=None, wait_for_sync=True, split_dns=False, private_zone=False, retry_on_rate_limit=None, rate_limit_retries=None, retry_on_err...
def delete_record(name, zone, record_type, identifier=None, all_records=False, region=None, key=None, keyid=None, profile=None, wait_for_sync=True, split_dns=False, private_zone=False, retry_on_rate_limit=None, rate_limit_retries=None, retry_on_err...
[ "Modify", "a", "record", "in", "a", "zone", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L692-L750
[ "def", "delete_record", "(", "name", ",", "zone", ",", "record_type", ",", "identifier", "=", "None", ",", "all_records", "=", "False", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_hosted_zone
Create a new Route53 Hosted Zone. Returns a Python data structure with information about the newly created Hosted Zone. domain_name The name of the domain. This must be fully-qualified, terminating with a period. This is the name you have registered with your domain registrar. It is also the ...
salt/modules/boto_route53.py
def create_hosted_zone(domain_name, caller_ref=None, comment='', private_zone=False, vpc_id=None, vpc_name=None, vpc_region=None, region=None, key=None, keyid=None, profile=None): ''' Create a new Route53 Hosted Zone. Returns a Python data structure with information...
def create_hosted_zone(domain_name, caller_ref=None, comment='', private_zone=False, vpc_id=None, vpc_name=None, vpc_region=None, region=None, key=None, keyid=None, profile=None): ''' Create a new Route53 Hosted Zone. Returns a Python data structure with information...
[ "Create", "a", "new", "Route53", "Hosted", "Zone", ".", "Returns", "a", "Python", "data", "structure", "with", "information", "about", "the", "newly", "created", "Hosted", "Zone", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L798-L915
[ "def", "create_hosted_zone", "(", "domain_name", ",", "caller_ref", "=", "None", ",", "comment", "=", "''", ",", "private_zone", "=", "False", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "vpc_region", "=", "None", ",", "region", "=", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_fetch_secret
Fetch secret from pass based on pass_path. If there is any error, return back the original pass_path value
salt/renderers/pass.py
def _fetch_secret(pass_path): ''' Fetch secret from pass based on pass_path. If there is any error, return back the original pass_path value ''' cmd = "pass show {0}".format(pass_path.strip()) log.debug('Fetching secret: %s', cmd) proc = Popen(cmd.split(' '), stdout=PIPE, stderr=PIPE) p...
def _fetch_secret(pass_path): ''' Fetch secret from pass based on pass_path. If there is any error, return back the original pass_path value ''' cmd = "pass show {0}".format(pass_path.strip()) log.debug('Fetching secret: %s', cmd) proc = Popen(cmd.split(' '), stdout=PIPE, stderr=PIPE) p...
[ "Fetch", "secret", "from", "pass", "based", "on", "pass_path", ".", "If", "there", "is", "any", "error", "return", "back", "the", "original", "pass_path", "value" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/renderers/pass.py#L79-L95
[ "def", "_fetch_secret", "(", "pass_path", ")", ":", "cmd", "=", "\"pass show {0}\"", ".", "format", "(", "pass_path", ".", "strip", "(", ")", ")", "log", ".", "debug", "(", "'Fetching secret: %s'", ",", "cmd", ")", "proc", "=", "Popen", "(", "cmd", ".", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_decrypt_object
Recursively try to find a pass path (string) that can be handed off to pass
salt/renderers/pass.py
def _decrypt_object(obj): ''' Recursively try to find a pass path (string) that can be handed off to pass ''' if isinstance(obj, six.string_types): return _fetch_secret(obj) elif isinstance(obj, dict): for pass_key, pass_path in six.iteritems(obj): obj[pass_key] = _decryp...
def _decrypt_object(obj): ''' Recursively try to find a pass path (string) that can be handed off to pass ''' if isinstance(obj, six.string_types): return _fetch_secret(obj) elif isinstance(obj, dict): for pass_key, pass_path in six.iteritems(obj): obj[pass_key] = _decryp...
[ "Recursively", "try", "to", "find", "a", "pass", "path", "(", "string", ")", "that", "can", "be", "handed", "off", "to", "pass" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/renderers/pass.py#L98-L110
[ "def", "_decrypt_object", "(", "obj", ")", ":", "if", "isinstance", "(", "obj", ",", "six", ".", "string_types", ")", ":", "return", "_fetch_secret", "(", "obj", ")", "elif", "isinstance", "(", "obj", ",", "dict", ")", ":", "for", "pass_key", ",", "pas...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
render
Fetch secret from pass based on pass_path
salt/renderers/pass.py
def render(pass_info, saltenv='base', sls='', argline='', **kwargs): ''' Fetch secret from pass based on pass_path ''' try: _get_pass_exec() except SaltRenderError: raise # Make sure environment variable HOME is set, since Pass looks for the # password-store under ~/.passwor...
def render(pass_info, saltenv='base', sls='', argline='', **kwargs): ''' Fetch secret from pass based on pass_path ''' try: _get_pass_exec() except SaltRenderError: raise # Make sure environment variable HOME is set, since Pass looks for the # password-store under ~/.passwor...
[ "Fetch", "secret", "from", "pass", "based", "on", "pass_path" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/renderers/pass.py#L113-L125
[ "def", "render", "(", "pass_info", ",", "saltenv", "=", "'base'", ",", "sls", "=", "''", ",", "argline", "=", "''", ",", "*", "*", "kwargs", ")", ":", "try", ":", "_get_pass_exec", "(", ")", "except", "SaltRenderError", ":", "raise", "# Make sure environ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_upgrades
Show list of available pkg upgrades using a specified format style CLI Example: .. code-block:: bash salt-run pkg.list_upgrades jid=20141120114114417719 style=group
salt/runners/pkg.py
def list_upgrades(jid, style='group', outputter='nested', ext_source=None): ''' Show list of available pkg upgrades using a specified format style CLI Example: .. code-block:: bash salt-run pkg.list_upgrades jid=20141120114114417719 style=...
def list_upgrades(jid, style='group', outputter='nested', ext_source=None): ''' Show list of available pkg upgrades using a specified format style CLI Example: .. code-block:: bash salt-run pkg.list_upgrades jid=20141120114114417719 style=...
[ "Show", "list", "of", "available", "pkg", "upgrades", "using", "a", "specified", "format", "style" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/pkg.py#L28-L66
[ "def", "list_upgrades", "(", "jid", ",", "style", "=", "'group'", ",", "outputter", "=", "'nested'", ",", "ext_source", "=", "None", ")", ":", "mminion", "=", "salt", ".", "minion", ".", "MasterMinion", "(", "__opts__", ")", "returner", "=", "_get_returner...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
__firewall_cmd
Return the firewall-cmd location
salt/modules/firewalld.py
def __firewall_cmd(cmd): ''' Return the firewall-cmd location ''' firewall_cmd = '{0} {1}'.format(salt.utils.path.which('firewall-cmd'), cmd) out = __salt__['cmd.run_all'](firewall_cmd) if out['retcode'] != 0: if not out['stderr']: msg = out['stdout'] else: ...
def __firewall_cmd(cmd): ''' Return the firewall-cmd location ''' firewall_cmd = '{0} {1}'.format(salt.utils.path.which('firewall-cmd'), cmd) out = __salt__['cmd.run_all'](firewall_cmd) if out['retcode'] != 0: if not out['stderr']: msg = out['stdout'] else: ...
[ "Return", "the", "firewall", "-", "cmd", "location" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L30-L45
[ "def", "__firewall_cmd", "(", "cmd", ")", ":", "firewall_cmd", "=", "'{0} {1}'", ".", "format", "(", "salt", ".", "utils", ".", "path", ".", "which", "(", "'firewall-cmd'", ")", ",", "cmd", ")", "out", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
__mgmt
Perform zone management
salt/modules/firewalld.py
def __mgmt(name, _type, action): ''' Perform zone management ''' # It's permanent because the 4 concerned functions need the permanent option, it's wrong without cmd = '--{0}-{1}={2} --permanent'.format(action, _type, name) return __firewall_cmd(cmd)
def __mgmt(name, _type, action): ''' Perform zone management ''' # It's permanent because the 4 concerned functions need the permanent option, it's wrong without cmd = '--{0}-{1}={2} --permanent'.format(action, _type, name) return __firewall_cmd(cmd)
[ "Perform", "zone", "management" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L48-L55
[ "def", "__mgmt", "(", "name", ",", "_type", ",", "action", ")", ":", "# It's permanent because the 4 concerned functions need the permanent option, it's wrong without", "cmd", "=", "'--{0}-{1}={2} --permanent'", ".", "format", "(", "action", ",", "_type", ",", "name", ")"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_zones
List everything added for or enabled in all zones CLI Example: .. code-block:: bash salt '*' firewalld.list_zones
salt/modules/firewalld.py
def list_zones(permanent=True): ''' List everything added for or enabled in all zones CLI Example: .. code-block:: bash salt '*' firewalld.list_zones ''' zones = {} cmd = '--list-all-zones' if permanent: cmd += ' --permanent' for i in __firewall_cmd(cmd).splitli...
def list_zones(permanent=True): ''' List everything added for or enabled in all zones CLI Example: .. code-block:: bash salt '*' firewalld.list_zones ''' zones = {} cmd = '--list-all-zones' if permanent: cmd += ' --permanent' for i in __firewall_cmd(cmd).splitli...
[ "List", "everything", "added", "for", "or", "enabled", "in", "all", "zones" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L100-L129
[ "def", "list_zones", "(", "permanent", "=", "True", ")", ":", "zones", "=", "{", "}", "cmd", "=", "'--list-all-zones'", "if", "permanent", ":", "cmd", "+=", "' --permanent'", "for", "i", "in", "__firewall_cmd", "(", "cmd", ")", ".", "splitlines", "(", ")...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
new_zone
Add a new zone CLI Example: .. code-block:: bash salt '*' firewalld.new_zone my_zone By default firewalld will be reloaded. However, to avoid reloading you need to specify the restart as False .. code-block:: bash salt '*' firewalld.new_zone my_zone False
salt/modules/firewalld.py
def new_zone(zone, restart=True): ''' Add a new zone CLI Example: .. code-block:: bash salt '*' firewalld.new_zone my_zone By default firewalld will be reloaded. However, to avoid reloading you need to specify the restart as False .. code-block:: bash salt '*' firewalld...
def new_zone(zone, restart=True): ''' Add a new zone CLI Example: .. code-block:: bash salt '*' firewalld.new_zone my_zone By default firewalld will be reloaded. However, to avoid reloading you need to specify the restart as False .. code-block:: bash salt '*' firewalld...
[ "Add", "a", "new", "zone" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L186-L210
[ "def", "new_zone", "(", "zone", ",", "restart", "=", "True", ")", ":", "out", "=", "__mgmt", "(", "zone", ",", "'zone'", ",", "'new'", ")", "if", "restart", ":", "if", "out", "==", "'success'", ":", "return", "__firewall_cmd", "(", "'--reload'", ")", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_zone
Delete an existing zone CLI Example: .. code-block:: bash salt '*' firewalld.delete_zone my_zone By default firewalld will be reloaded. However, to avoid reloading you need to specify the restart as False .. code-block:: bash salt '*' firewalld.delete_zone my_zone False
salt/modules/firewalld.py
def delete_zone(zone, restart=True): ''' Delete an existing zone CLI Example: .. code-block:: bash salt '*' firewalld.delete_zone my_zone By default firewalld will be reloaded. However, to avoid reloading you need to specify the restart as False .. code-block:: bash sal...
def delete_zone(zone, restart=True): ''' Delete an existing zone CLI Example: .. code-block:: bash salt '*' firewalld.delete_zone my_zone By default firewalld will be reloaded. However, to avoid reloading you need to specify the restart as False .. code-block:: bash sal...
[ "Delete", "an", "existing", "zone" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L213-L237
[ "def", "delete_zone", "(", "zone", ",", "restart", "=", "True", ")", ":", "out", "=", "__mgmt", "(", "zone", ",", "'zone'", ",", "'delete'", ")", "if", "restart", ":", "if", "out", "==", "'success'", ":", "return", "__firewall_cmd", "(", "'--reload'", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
new_service
Add a new service CLI Example: .. code-block:: bash salt '*' firewalld.new_service my_service By default firewalld will be reloaded. However, to avoid reloading you need to specify the restart as False .. code-block:: bash salt '*' firewalld.new_service my_service False
salt/modules/firewalld.py
def new_service(name, restart=True): ''' Add a new service CLI Example: .. code-block:: bash salt '*' firewalld.new_service my_service By default firewalld will be reloaded. However, to avoid reloading you need to specify the restart as False .. code-block:: bash salt '...
def new_service(name, restart=True): ''' Add a new service CLI Example: .. code-block:: bash salt '*' firewalld.new_service my_service By default firewalld will be reloaded. However, to avoid reloading you need to specify the restart as False .. code-block:: bash salt '...
[ "Add", "a", "new", "service" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L253-L277
[ "def", "new_service", "(", "name", ",", "restart", "=", "True", ")", ":", "out", "=", "__mgmt", "(", "name", ",", "'service'", ",", "'new'", ")", "if", "restart", ":", "if", "out", "==", "'success'", ":", "return", "__firewall_cmd", "(", "'--reload'", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_service
Delete an existing service CLI Example: .. code-block:: bash salt '*' firewalld.delete_service my_service By default firewalld will be reloaded. However, to avoid reloading you need to specify the restart as False .. code-block:: bash salt '*' firewalld.delete_service my_servic...
salt/modules/firewalld.py
def delete_service(name, restart=True): ''' Delete an existing service CLI Example: .. code-block:: bash salt '*' firewalld.delete_service my_service By default firewalld will be reloaded. However, to avoid reloading you need to specify the restart as False .. code-block:: bash ...
def delete_service(name, restart=True): ''' Delete an existing service CLI Example: .. code-block:: bash salt '*' firewalld.delete_service my_service By default firewalld will be reloaded. However, to avoid reloading you need to specify the restart as False .. code-block:: bash ...
[ "Delete", "an", "existing", "service" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L280-L304
[ "def", "delete_service", "(", "name", ",", "restart", "=", "True", ")", ":", "out", "=", "__mgmt", "(", "name", ",", "'service'", ",", "'delete'", ")", "if", "restart", ":", "if", "out", "==", "'success'", ":", "return", "__firewall_cmd", "(", "'--reload...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_all
List everything added for or enabled in a zone CLI Example: .. code-block:: bash salt '*' firewalld.list_all List a specific zone .. code-block:: bash salt '*' firewalld.list_all my_zone
salt/modules/firewalld.py
def list_all(zone=None, permanent=True): ''' List everything added for or enabled in a zone CLI Example: .. code-block:: bash salt '*' firewalld.list_all List a specific zone .. code-block:: bash salt '*' firewalld.list_all my_zone ''' _zone = {} id_ = '' i...
def list_all(zone=None, permanent=True): ''' List everything added for or enabled in a zone CLI Example: .. code-block:: bash salt '*' firewalld.list_all List a specific zone .. code-block:: bash salt '*' firewalld.list_all my_zone ''' _zone = {} id_ = '' i...
[ "List", "everything", "added", "for", "or", "enabled", "in", "a", "zone" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L307-L351
[ "def", "list_all", "(", "zone", "=", "None", ",", "permanent", "=", "True", ")", ":", "_zone", "=", "{", "}", "id_", "=", "''", "if", "zone", ":", "cmd", "=", "'--zone={0} --list-all'", ".", "format", "(", "zone", ")", "else", ":", "cmd", "=", "'--...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_services
List services added for zone as a space separated list. If zone is omitted, default zone will be used. CLI Example: .. code-block:: bash salt '*' firewalld.list_services List a specific zone .. code-block:: bash salt '*' firewalld.list_services my_zone
salt/modules/firewalld.py
def list_services(zone=None, permanent=True): ''' List services added for zone as a space separated list. If zone is omitted, default zone will be used. CLI Example: .. code-block:: bash salt '*' firewalld.list_services List a specific zone .. code-block:: bash salt '*'...
def list_services(zone=None, permanent=True): ''' List services added for zone as a space separated list. If zone is omitted, default zone will be used. CLI Example: .. code-block:: bash salt '*' firewalld.list_services List a specific zone .. code-block:: bash salt '*'...
[ "List", "services", "added", "for", "zone", "as", "a", "space", "separated", "list", ".", "If", "zone", "is", "omitted", "default", "zone", "will", "be", "used", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L354-L379
[ "def", "list_services", "(", "zone", "=", "None", ",", "permanent", "=", "True", ")", ":", "if", "zone", ":", "cmd", "=", "'--zone={0} --list-services'", ".", "format", "(", "zone", ")", "else", ":", "cmd", "=", "'--list-services'", "if", "permanent", ":",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
add_service
Add a service for zone. If zone is omitted, default zone will be used. CLI Example: .. code-block:: bash salt '*' firewalld.add_service ssh To assign a service to a specific zone: .. code-block:: bash salt '*' firewalld.add_service ssh my_zone
salt/modules/firewalld.py
def add_service(service, zone=None, permanent=True): ''' Add a service for zone. If zone is omitted, default zone will be used. CLI Example: .. code-block:: bash salt '*' firewalld.add_service ssh To assign a service to a specific zone: .. code-block:: bash salt '*' firewal...
def add_service(service, zone=None, permanent=True): ''' Add a service for zone. If zone is omitted, default zone will be used. CLI Example: .. code-block:: bash salt '*' firewalld.add_service ssh To assign a service to a specific zone: .. code-block:: bash salt '*' firewal...
[ "Add", "a", "service", "for", "zone", ".", "If", "zone", "is", "omitted", "default", "zone", "will", "be", "used", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L382-L406
[ "def", "add_service", "(", "service", ",", "zone", "=", "None", ",", "permanent", "=", "True", ")", ":", "if", "zone", ":", "cmd", "=", "'--zone={0} --add-service={1}'", ".", "format", "(", "zone", ",", "service", ")", "else", ":", "cmd", "=", "'--add-se...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
remove_service
Remove a service from zone. This option can be specified multiple times. If zone is omitted, default zone will be used. CLI Example: .. code-block:: bash salt '*' firewalld.remove_service ssh To remove a service from a specific zone .. code-block:: bash salt '*' firewalld.remov...
salt/modules/firewalld.py
def remove_service(service, zone=None, permanent=True): ''' Remove a service from zone. This option can be specified multiple times. If zone is omitted, default zone will be used. CLI Example: .. code-block:: bash salt '*' firewalld.remove_service ssh To remove a service from a speci...
def remove_service(service, zone=None, permanent=True): ''' Remove a service from zone. This option can be specified multiple times. If zone is omitted, default zone will be used. CLI Example: .. code-block:: bash salt '*' firewalld.remove_service ssh To remove a service from a speci...
[ "Remove", "a", "service", "from", "zone", ".", "This", "option", "can", "be", "specified", "multiple", "times", ".", "If", "zone", "is", "omitted", "default", "zone", "will", "be", "used", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L409-L434
[ "def", "remove_service", "(", "service", ",", "zone", "=", "None", ",", "permanent", "=", "True", ")", ":", "if", "zone", ":", "cmd", "=", "'--zone={0} --remove-service={1}'", ".", "format", "(", "zone", ",", "service", ")", "else", ":", "cmd", "=", "'--...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
add_service_port
Add a new port to the specified service. .. versionadded:: 2016.11.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_service_port zone 80
salt/modules/firewalld.py
def add_service_port(service, port): ''' Add a new port to the specified service. .. versionadded:: 2016.11.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_service_port zone 80 ''' if service not in get_services(permanent=True): raise CommandExecutionError('The...
def add_service_port(service, port): ''' Add a new port to the specified service. .. versionadded:: 2016.11.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_service_port zone 80 ''' if service not in get_services(permanent=True): raise CommandExecutionError('The...
[ "Add", "a", "new", "port", "to", "the", "specified", "service", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L437-L453
[ "def", "add_service_port", "(", "service", ",", "port", ")", ":", "if", "service", "not", "in", "get_services", "(", "permanent", "=", "True", ")", ":", "raise", "CommandExecutionError", "(", "'The service does not exist.'", ")", "cmd", "=", "'--permanent --servic...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_masquerade
Show if masquerading is enabled on a zone. If zone is omitted, default zone will be used. CLI Example: .. code-block:: bash salt '*' firewalld.get_masquerade zone
salt/modules/firewalld.py
def get_masquerade(zone=None, permanent=True): ''' Show if masquerading is enabled on a zone. If zone is omitted, default zone will be used. CLI Example: .. code-block:: bash salt '*' firewalld.get_masquerade zone ''' zone_info = list_all(zone, permanent) if 'no' in [zone_inf...
def get_masquerade(zone=None, permanent=True): ''' Show if masquerading is enabled on a zone. If zone is omitted, default zone will be used. CLI Example: .. code-block:: bash salt '*' firewalld.get_masquerade zone ''' zone_info = list_all(zone, permanent) if 'no' in [zone_inf...
[ "Show", "if", "masquerading", "is", "enabled", "on", "a", "zone", ".", "If", "zone", "is", "omitted", "default", "zone", "will", "be", "used", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L541-L557
[ "def", "get_masquerade", "(", "zone", "=", "None", ",", "permanent", "=", "True", ")", ":", "zone_info", "=", "list_all", "(", "zone", ",", "permanent", ")", "if", "'no'", "in", "[", "zone_info", "[", "i", "]", "[", "'masquerade'", "]", "[", "0", "]"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
add_masquerade
Enable masquerade on a zone. If zone is omitted, default zone will be used. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_masquerade To enable masquerade on a specific zone .. code-block:: bash salt '*' firewalld.add_masquerade dmz
salt/modules/firewalld.py
def add_masquerade(zone=None, permanent=True): ''' Enable masquerade on a zone. If zone is omitted, default zone will be used. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_masquerade To enable masquerade on a specific zone .. code-bloc...
def add_masquerade(zone=None, permanent=True): ''' Enable masquerade on a zone. If zone is omitted, default zone will be used. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_masquerade To enable masquerade on a specific zone .. code-bloc...
[ "Enable", "masquerade", "on", "a", "zone", ".", "If", "zone", "is", "omitted", "default", "zone", "will", "be", "used", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L560-L587
[ "def", "add_masquerade", "(", "zone", "=", "None", ",", "permanent", "=", "True", ")", ":", "if", "zone", ":", "cmd", "=", "'--zone={0} --add-masquerade'", ".", "format", "(", "zone", ")", "else", ":", "cmd", "=", "'--add-masquerade'", "if", "permanent", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
remove_masquerade
Remove masquerade on a zone. If zone is omitted, default zone will be used. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.remove_masquerade To remove masquerade on a specific zone .. code-block:: bash salt '*' firewalld.remove_masquerade d...
salt/modules/firewalld.py
def remove_masquerade(zone=None, permanent=True): ''' Remove masquerade on a zone. If zone is omitted, default zone will be used. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.remove_masquerade To remove masquerade on a specific zone .. cod...
def remove_masquerade(zone=None, permanent=True): ''' Remove masquerade on a zone. If zone is omitted, default zone will be used. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.remove_masquerade To remove masquerade on a specific zone .. cod...
[ "Remove", "masquerade", "on", "a", "zone", ".", "If", "zone", "is", "omitted", "default", "zone", "will", "be", "used", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L590-L617
[ "def", "remove_masquerade", "(", "zone", "=", "None", ",", "permanent", "=", "True", ")", ":", "if", "zone", ":", "cmd", "=", "'--zone={0} --remove-masquerade'", ".", "format", "(", "zone", ")", "else", ":", "cmd", "=", "'--remove-masquerade'", "if", "perman...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
add_port
Allow specific ports in a zone. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_port internal 443/tcp
salt/modules/firewalld.py
def add_port(zone, port, permanent=True): ''' Allow specific ports in a zone. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_port internal 443/tcp ''' cmd = '--zone={0} --add-port={1}'.format(zone, port) if permanent: cmd += ' --p...
def add_port(zone, port, permanent=True): ''' Allow specific ports in a zone. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_port internal 443/tcp ''' cmd = '--zone={0} --add-port={1}'.format(zone, port) if permanent: cmd += ' --p...
[ "Allow", "specific", "ports", "in", "a", "zone", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L620-L637
[ "def", "add_port", "(", "zone", ",", "port", ",", "permanent", "=", "True", ")", ":", "cmd", "=", "'--zone={0} --add-port={1}'", ".", "format", "(", "zone", ",", "port", ")", "if", "permanent", ":", "cmd", "+=", "' --permanent'", "return", "__firewall_cmd", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
remove_port
Remove a specific port from a zone. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.remove_port internal 443/tcp
salt/modules/firewalld.py
def remove_port(zone, port, permanent=True): ''' Remove a specific port from a zone. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.remove_port internal 443/tcp ''' cmd = '--zone={0} --remove-port={1}'.format(zone, port) if permanent: ...
def remove_port(zone, port, permanent=True): ''' Remove a specific port from a zone. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.remove_port internal 443/tcp ''' cmd = '--zone={0} --remove-port={1}'.format(zone, port) if permanent: ...
[ "Remove", "a", "specific", "port", "from", "a", "zone", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L640-L657
[ "def", "remove_port", "(", "zone", ",", "port", ",", "permanent", "=", "True", ")", ":", "cmd", "=", "'--zone={0} --remove-port={1}'", ".", "format", "(", "zone", ",", "port", ")", "if", "permanent", ":", "cmd", "+=", "' --permanent'", "return", "__firewall_...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_ports
List all ports in a zone. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.list_ports
salt/modules/firewalld.py
def list_ports(zone, permanent=True): ''' List all ports in a zone. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.list_ports ''' cmd = '--zone={0} --list-ports'.format(zone) if permanent: cmd += ' --permanent' return __firewall_...
def list_ports(zone, permanent=True): ''' List all ports in a zone. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.list_ports ''' cmd = '--zone={0} --list-ports'.format(zone) if permanent: cmd += ' --permanent' return __firewall_...
[ "List", "all", "ports", "in", "a", "zone", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L660-L677
[ "def", "list_ports", "(", "zone", ",", "permanent", "=", "True", ")", ":", "cmd", "=", "'--zone={0} --list-ports'", ".", "format", "(", "zone", ")", "if", "permanent", ":", "cmd", "+=", "' --permanent'", "return", "__firewall_cmd", "(", "cmd", ")", ".", "s...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
add_port_fwd
Add port forwarding. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_port_fwd public 80 443 tcp
salt/modules/firewalld.py
def add_port_fwd(zone, src, dest, proto='tcp', dstaddr='', permanent=True): ''' Add port forwarding. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_port_fwd public 80 443 tcp ''' cmd = '--zone={0} --add-forward-port=port={1}:proto={2}:toport={...
def add_port_fwd(zone, src, dest, proto='tcp', dstaddr='', permanent=True): ''' Add port forwarding. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_port_fwd public 80 443 tcp ''' cmd = '--zone={0} --add-forward-port=port={1}:proto={2}:toport={...
[ "Add", "port", "forwarding", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L680-L703
[ "def", "add_port_fwd", "(", "zone", ",", "src", ",", "dest", ",", "proto", "=", "'tcp'", ",", "dstaddr", "=", "''", ",", "permanent", "=", "True", ")", ":", "cmd", "=", "'--zone={0} --add-forward-port=port={1}:proto={2}:toport={3}:toaddr={4}'", ".", "format", "(...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_port_fwd
List port forwarding .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.list_port_fwd public
salt/modules/firewalld.py
def list_port_fwd(zone, permanent=True): ''' List port forwarding .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.list_port_fwd public ''' ret = [] cmd = '--zone={0} --list-forward-ports'.format(zone) if permanent: cmd += ' --perm...
def list_port_fwd(zone, permanent=True): ''' List port forwarding .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.list_port_fwd public ''' ret = [] cmd = '--zone={0} --list-forward-ports'.format(zone) if permanent: cmd += ' --perm...
[ "List", "port", "forwarding" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L732-L761
[ "def", "list_port_fwd", "(", "zone", ",", "permanent", "=", "True", ")", ":", "ret", "=", "[", "]", "cmd", "=", "'--zone={0} --list-forward-ports'", ".", "format", "(", "zone", ")", "if", "permanent", ":", "cmd", "+=", "' --permanent'", "for", "i", "in", ...
e8541fd6e744ab0df786c0f76102e41631f45d46