id
int32
0
252k
repo
stringlengths
7
55
path
stringlengths
4
127
func_name
stringlengths
1
88
original_string
stringlengths
75
19.8k
language
stringclasses
1 value
code
stringlengths
75
19.8k
code_tokens
list
docstring
stringlengths
3
17.3k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
87
242
34,400
saltstack/salt
salt/grains/fibre_channel.py
_linux_wwns
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(): ...
python
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", "(", ")", ":", "ret", "=", "[", "]", "for", "fc_file", "in", "glob", ".", "glob", "(", "'/sys/class/fc_host/*/port_name'", ")", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "fc_file", ",", "'r'", ")", "as", ...
Return Fibre Channel port WWNs from a Linux host.
[ "Return", "Fibre", "Channel", "port", "WWNs", "from", "a", "Linux", "host", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/fibre_channel.py#L38-L48
34,401
saltstack/salt
salt/grains/fibre_channel.py
_windows_wwns
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...
python
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", "(", ")", ":", "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", "=", "[", "...
Return Fibre Channel port WWNs from a Windows host.
[ "Return", "Fibre", "Channel", "port", "WWNs", "from", "a", "Windows", "host", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/fibre_channel.py#L51-L64
34,402
saltstack/salt
salt/grains/fibre_channel.py
fibre_channel_wwns
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
python
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", "(", ")", ":", "grains", "=", "{", "'fc_wwn'", ":", "False", "}", "if", "salt", ".", "utils", ".", "platform", ".", "is_linux", "(", ")", ":", "grains", "[", "'fc_wwn'", "]", "=", "_linux_wwns", "(", ")", "elif", "salt", ...
Return list of fiber channel HBA WWNs
[ "Return", "list", "of", "fiber", "channel", "HBA", "WWNs" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/fibre_channel.py#L67-L76
34,403
saltstack/salt
salt/utils/vsan.py
get_vsan_cluster_config_system
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 ...
python
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", ")", ":", "#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...
Returns a vim.cluster.VsanVcClusterConfigSystem object service_instance Service instance to the host or vCenter
[ "Returns", "a", "vim", ".", "cluster", ".", "VsanVcClusterConfigSystem", "object" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L110-L131
34,404
saltstack/salt
salt/utils/vsan.py
get_host_vsan_system
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: ...
python
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", ")", ":", "if", "not", "hostname", ":", "hostname", "=", "salt", ".", "utils", ".", "vmware", ".", "get_managed_object_name", "(", "host_ref", ")", "traversa...
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.
[ "Returns", "a", "host", "s", "vsan", "system" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L158-L184
34,405
saltstack/salt
salt/utils/vsan.py
create_diskgroup
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...
python
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", ")", ":", "hostname", "=", "salt", ".", "utils", ".", "vmware", ".", "get_managed_object_name", "(", "host_ref", ")", "cach...
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...
[ "Creates", "a", "disk", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L187-L242
34,406
saltstack/salt
salt/utils/vsan.py
remove_diskgroup
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 ...
python
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", ")", ":", "if", "not", ...
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...
[ "Removes", "a", "disk", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L382-L440
34,407
saltstack/salt
salt/utils/vsan.py
reconfigure_cluster_vsan
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...
python
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", ")", ":", "cluster_name", "=", "salt", ".", "utils", ".", "vmware", ".", "get_managed_object_name", "(", "cluster_ref", ")", "log", ".", "trace", "(", "'Reconfiguring vsan on cluster \\'%...
Reconfigures the VSAN system of a cluster. cluster_ref Reference to the cluster cluster_vsan_spec Cluster VSAN reconfigure spec (vim.vsan.ReconfigSpec).
[ "Reconfigures", "the", "VSAN", "system", "of", "a", "cluster", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L471-L500
34,408
saltstack/salt
salt/utils/vsan.py
_wait_for_tasks
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:...
python
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", ")", ":", "log", ".", "trace", "(", "'Waiting for vsan tasks: {0}'", ",", "', '", ".", "join", "(", "[", "six", ".", "text_type", "(", "t", ")", "for", "t", "in", "tasks", "]", ")", ")", ...
Wait for tasks created via the VSAN API
[ "Wait", "for", "tasks", "created", "via", "the", "VSAN", "API" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L503-L522
34,409
saltstack/salt
salt/utils/crypt.py
pem_finger
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...
python
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'", ")", ":", "if", "not", "key", ":", "if", "not", "os", ".", "path", ".", "isfile", "(", "path", ")", ":", "return", "''", "with", "salt", "."...
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.
[ "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", ".", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/crypt.py#L117-L140
34,410
saltstack/salt
salt/utils/schema.py
SchemaItem._get_argname_value
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...
python
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", ")", ":", "# Let's see if there's a private function to get the value", "argvalue", "=", "getattr", "(", "self", ",", "'__get_{0}__'", ".", "format", "(", "argname", ")", ",", "None", ")", "if", "argvalue", ...
Return the argname value looking up on all possible attributes
[ "Return", "the", "argname", "value", "looking", "up", "on", "all", "possible", "attributes" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schema.py#L731-L748
34,411
saltstack/salt
salt/utils/schema.py
BaseSchemaItem.serialize
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...
python
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", ")", ":", "serialized", "=", "{", "'type'", ":", "self", ".", "__type__", "}", "for", "argname", "in", "self", ".", "_attributes", ":", "if", "argname", "==", "'required'", ":", "# This is handled elsewhere", "continue", "arg...
Return a serializable form of the config instance
[ "Return", "a", "serializable", "form", "of", "the", "config", "instance" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schema.py#L827-L845
34,412
saltstack/salt
salt/utils/schema.py
ComplexSchemaItem._add_missing_schema_attributes
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...
python
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", ")", ":", "for", "attr", "in", "[", "attr", "for", "attr", "in", "dir", "(", "self", ")", "if", "not", "attr", ".", "startswith", "(", "'__'", ")", "]", ":", "attr_val", "=", "getattr", "(", "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
[ "Adds", "any", "missed", "schema", "attributes", "to", "the", "_attributes", "list" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schema.py#L1481-L1493
34,413
saltstack/salt
salt/utils/schema.py
ComplexSchemaItem.get_definition
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 = {} ...
python
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", ")", ":", "serialized", "=", "super", "(", "ComplexSchemaItem", ",", "self", ")", ".", "serialize", "(", ")", "# Adjust entries in the serialization", "del", "serialized", "[", "'definition_name'", "]", "serialized", "[", "'ti...
Returns the definition of the complex item
[ "Returns", "the", "definition", "of", "the", "complex", "item" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schema.py#L1506-L1533
34,414
saltstack/salt
salt/utils/schema.py
ComplexSchemaItem.get_complex_attrs
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)]
python
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", ")", ":", "return", "[", "getattr", "(", "self", ",", "attr_name", ")", "for", "attr_name", "in", "self", ".", "_attributes", "if", "isinstance", "(", "getattr", "(", "self", ",", "attr_name", ")", ",", "ComplexSche...
Returns a dictionary of the complex attributes
[ "Returns", "a", "dictionary", "of", "the", "complex", "attributes" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schema.py#L1535-L1538
34,415
saltstack/salt
salt/modules/boto_rds.py
exists
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...
python
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", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "="...
Check to see if an RDS exists. CLI example:: salt myminion boto_rds.exists myrds region=us-east-1
[ "Check", "to", "see", "if", "an", "RDS", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L141-L155
34,416
saltstack/salt
salt/modules/boto_rds.py
option_group_exists
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...
python
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", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", ...
Check to see if an RDS option group exists. CLI example:: salt myminion boto_rds.option_group_exists myoptiongr region=us-east-1
[ "Check", "to", "see", "if", "an", "RDS", "option", "group", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L158-L173
34,417
saltstack/salt
salt/modules/boto_rds.py
parameter_group_exists
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...
python
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", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ","...
Check to see if an RDS parameter group exists. CLI example:: salt myminion boto_rds.parameter_group_exists myparametergroup \ region=us-east-1
[ "Check", "to", "see", "if", "an", "RDS", "parameter", "group", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L176-L196
34,418
saltstack/salt
salt/modules/boto_rds.py
subnet_group_exists
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...
python
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", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "r...
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
[ "Check", "to", "see", "if", "an", "RDS", "subnet", "group", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L199-L220
34,419
saltstack/salt
salt/modules/boto_rds.py
create_read_replica
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...
python
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_na...
Create an RDS read replica CLI example to create an RDS read replica:: salt myminion boto_rds.create_read_replica replicaname source_name
[ "Create", "an", "RDS", "read", "replica" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L322-L377
34,420
saltstack/salt
salt/modules/boto_rds.py
create_option_group
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....
python
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_option_group my-opt-group mysql 5.6 \ "group description"
[ "Create", "an", "RDS", "option", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L380-L410
34,421
saltstack/salt
salt/modules/boto_rds.py
create_parameter_group
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...
python
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", ")", ":", "res", "=...
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"
[ "Create", "an", "RDS", "parameter", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L413-L446
34,422
saltstack/salt
salt/modules/boto_rds.py
create_subnet_group
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...
python
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", ")", ":", "res", "=", "__salt__", ...
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
[ "Create", "an", "RDS", "subnet", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L449-L477
34,423
saltstack/salt
salt/modules/boto_rds.py
update_parameter_group
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...
python
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-group \ parameters='{"back_log":1, "binlog_cache_size":4096}' \ region=us-east-1
[ "Update", "an", "RDS", "parameter", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L480-L522
34,424
saltstack/salt
salt/modules/boto_rds.py
describe
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...
python
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", ")", ":", "res", "=", "__salt__", "[", "'boto_rds.exists'", "]", "(", "name", ","...
Return RDS instance details. CLI example:: salt myminion boto_rds.describe myrds
[ "Return", "RDS", "instance", "details", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L525-L572
34,425
saltstack/salt
salt/modules/boto_rds.py
describe_db_instances
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...
python
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", ")", ":", "conn",...
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...
[ "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", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L575-L600
34,426
saltstack/salt
salt/modules/boto_rds.py
describe_db_subnet_groups
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...
python
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 returned dataset can be selected by passing in a valid JMSEPath filter as well. CLI example:: salt myminion boto_rds.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", "p...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L603-L622
34,427
saltstack/salt
salt/modules/boto_rds.py
get_endpoint
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...
python
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", ")", ":", "endpoint", "=", "False", "res", "=", "__salt__", "[", "'boto_rds.exi...
Return the endpoint of an RDS instance. CLI example:: salt myminion boto_rds.get_endpoint myrds
[ "Return", "the", "endpoint", "of", "an", "RDS", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L625-L651
34,428
saltstack/salt
salt/modules/boto_rds.py
delete
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...
python
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"...
Delete an RDS instance. CLI example:: salt myminion boto_rds.delete myrds skip_final_snapshot=True \ region=us-east-1
[ "Delete", "an", "RDS", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L654-L708
34,429
saltstack/salt
salt/modules/boto_rds.py
delete_option_group
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...
python
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", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "...
Delete an RDS option group. CLI example:: salt myminion boto_rds.delete_option_group my-opt-group \ region=us-east-1
[ "Delete", "an", "RDS", "option", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L711-L733
34,430
saltstack/salt
salt/modules/boto_rds.py
delete_parameter_group
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...
python
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", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", ...
Delete an RDS parameter group. CLI example:: salt myminion boto_rds.delete_parameter_group my-param-group \ region=us-east-1
[ "Delete", "an", "RDS", "parameter", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L736-L755
34,431
saltstack/salt
salt/modules/boto_rds.py
delete_subnet_group
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...
python
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", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "...
Delete an RDS subnet group. CLI example:: salt myminion boto_rds.delete_subnet_group my-subnet-group \ region=us-east-1
[ "Delete", "an", "RDS", "subnet", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L758-L777
34,432
saltstack/salt
salt/beacons/sensehat.py
beacon
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: ...
python
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", ")", ":", "ret", "=", "[", "]", "min_default", "=", "{", "'humidity'", ":", "'0'", ",", "'pressure'", ":", "'0'", ",", "'temperature'", ":", "'-273.15'", "}", "_config", "=", "{", "}", "list", "(", "map", "(", "_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: percent * temperature...
[ "Monitor", "the", "temperature", "humidity", "and", "pressure", "using", "the", "SenseHat", "sensors", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/sensehat.py#L47-L109
34,433
saltstack/salt
salt/states/nova.py
flavor_present
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:...
python
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", ")", ":", "dry_run", "=", "__opts__", "[", "'test'", "]", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ...
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: ...
[ "Creates", "Nova", "flavor", "if", "it", "does", "not", "exist" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/nova.py#L27-L78
34,434
saltstack/salt
salt/states/nova.py
flavor_access_list
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...
python
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", ")", ":", "dry_run", "=", "__opts__", "[", "'test'", "]", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'c...
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 ...
[ "Grants", "access", "of", "the", "flavor", "to", "a", "project", ".", "Flavor", "must", "be", "private", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/nova.py#L81-L141
34,435
saltstack/salt
salt/states/nova.py
flavor_absent
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': ''...
python
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", ")", ":", "dry_run", "=", "__opts__", "[", "'test'", "]", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", ...
Makes flavor to be absent :param name: flavor name .. code-block:: yaml nova-flavor-absent: nova.flavor_absent: - name: flavor_name
[ "Makes", "flavor", "to", "be", "absent" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/nova.py#L144-L183
34,436
saltstack/salt
salt/matchers/nodegroup_match.py
match
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...
python
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", ")", ":", "if", "not", "opts", ":", "opts", "=", "__opts__", "if", "not", "nodegroups", ":", "log", ".", "debug", "(", "'Nodegroup matcher called with no nodegroups.'", "...
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
[ "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" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/matchers/nodegroup_match.py#L14-L30
34,437
saltstack/salt
salt/states/ldap.py
_update_entry
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...
python
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", ")", ":", "for", "directive", ",", "state", "in", "six", ".", "iteritems", "(", "directives", ")", ":", "if", "directive", "==", "'delete_others'", ":", "status", "[", "'delete_others'",...
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: ...
[ "Update", "an", "entry", "s", "attributes", "using", "the", "provided", "directives" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/ldap.py#L458-L494
34,438
saltstack/salt
salt/states/ldap.py
_toset
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...
python
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", ")", ":", "if", "thing", "is", "None", ":", "return", "OrderedSet", "(", ")", "if", "isinstance", "(", "thing", ",", "six", ".", "string_types", ")", ":", "return", "OrderedSet", "(", "(", "thing", ",", ")", ")", "# con...
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...
[ "helper", "to", "convert", "various", "things", "to", "a", "set" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/ldap.py#L497-L528
34,439
saltstack/salt
salt/modules/boto_route53.py
describe_hosted_zones
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...
python
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", ")", ":", "conn", "=", "_get_conn", "(", "region"...
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...
[ "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...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L110-L179
34,440
saltstack/salt
salt/modules/boto_route53.py
list_all_zones_by_name
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...
python
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", ")", ":", "ret", "=", "describe_hosted_zones", "(", "region", "=", "region", ",", "key", "=", "key", ",", "key...
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...
[ "List", "by", "their", "FQDNs", "all", "hosted", "zones", "in", "the", "bound", "account", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L182-L207
34,441
saltstack/salt
salt/modules/boto_route53.py
list_all_zones_by_id
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...
python
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", ")", ":", "ret", "=", "describe_hosted_zones", "(", "region", "=", "region", ",", "key", "=", "key", ",", "keyid...
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....
[ "List", "by", "their", "IDs", "all", "hosted", "zones", "in", "the", "bound", "account", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L210-L235
34,442
saltstack/salt
salt/modules/boto_route53.py
zone_exists
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...
python
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", "=", ...
Check for the existence of a Route53 hosted zone. .. versionadded:: 2015.8.0 CLI Example:: salt myminion boto_route53.zone_exists example.org
[ "Check", "for", "the", "existence", "of", "a", "Route53", "hosted", "zone", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L238-L282
34,443
saltstack/salt
salt/modules/boto_route53.py
create_zone
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_...
python
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", ")", ":", "if"...
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...
[ "Create", "a", "Route53", "hosted", "zone", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L285-L337
34,444
saltstack/salt
salt/modules/boto_route53.py
create_healthcheck
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...
python
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'", "...
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...
[ "Create", "a", "Route53", "healthcheck" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L340-L439
34,445
saltstack/salt
salt/modules/boto_route53.py
get_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...
python
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", ",", "priv...
Get a record from a zone. CLI example:: salt myminion boto_route53.get_record test.example.org example.org A
[ "Get", "a", "record", "from", "a", "zone", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L473-L543
34,446
saltstack/salt
salt/modules/boto_route53.py
delete_record
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...
python
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", ",", ...
Modify a record in a zone. CLI example:: salt myminion boto_route53.delete_record test.example.org example.org A
[ "Modify", "a", "record", "in", "a", "zone", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_route53.py#L692-L750
34,447
saltstack/salt
salt/renderers/pass.py
_fetch_secret
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...
python
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", ")", ":", "cmd", "=", "\"pass show {0}\"", ".", "format", "(", "pass_path", ".", "strip", "(", ")", ")", "log", ".", "debug", "(", "'Fetching secret: %s'", ",", "cmd", ")", "proc", "=", "Popen", "(", "cmd", ".", ...
Fetch secret from pass based on pass_path. If there is any error, return back the original pass_path value
[ "Fetch", "secret", "from", "pass", "based", "on", "pass_path", ".", "If", "there", "is", "any", "error", "return", "back", "the", "original", "pass_path", "value" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/renderers/pass.py#L79-L95
34,448
saltstack/salt
salt/renderers/pass.py
render
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...
python
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", ")", ":", "try", ":", "_get_pass_exec", "(", ")", "except", "SaltRenderError", ":", "raise", "# Make sure environ...
Fetch secret from pass based on pass_path
[ "Fetch", "secret", "from", "pass", "based", "on", "pass_path" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/renderers/pass.py#L113-L125
34,449
saltstack/salt
salt/runners/pkg.py
list_upgrades
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=...
python
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", ")", ":", "mminion", "=", "salt", ".", "minion", ".", "MasterMinion", "(", "__opts__", ")", "returner", "=", "_get_returner...
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
[ "Show", "list", "of", "available", "pkg", "upgrades", "using", "a", "specified", "format", "style" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/pkg.py#L28-L66
34,450
saltstack/salt
salt/modules/firewalld.py
__firewall_cmd
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: ...
python
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", ")", ":", "firewall_cmd", "=", "'{0} {1}'", ".", "format", "(", "salt", ".", "utils", ".", "path", ".", "which", "(", "'firewall-cmd'", ")", ",", "cmd", ")", "out", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "...
Return the firewall-cmd location
[ "Return", "the", "firewall", "-", "cmd", "location" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L30-L45
34,451
saltstack/salt
salt/modules/firewalld.py
__mgmt
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)
python
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", ")", ":", "# 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", ")"...
Perform zone management
[ "Perform", "zone", "management" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L48-L55
34,452
saltstack/salt
salt/modules/firewalld.py
list_zones
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...
python
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", ")", ":", "zones", "=", "{", "}", "cmd", "=", "'--list-all-zones'", "if", "permanent", ":", "cmd", "+=", "' --permanent'", "for", "i", "in", "__firewall_cmd", "(", "cmd", ")", ".", "splitlines", "(", ")...
List everything added for or enabled in all zones CLI Example: .. code-block:: bash salt '*' firewalld.list_zones
[ "List", "everything", "added", "for", "or", "enabled", "in", "all", "zones" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L100-L129
34,453
saltstack/salt
salt/modules/firewalld.py
new_zone
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...
python
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", ")", ":", "out", "=", "__mgmt", "(", "zone", ",", "'zone'", ",", "'new'", ")", "if", "restart", ":", "if", "out", "==", "'success'", ":", "return", "__firewall_cmd", "(", "'--reload'", ")", ...
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
[ "Add", "a", "new", "zone" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L186-L210
34,454
saltstack/salt
salt/modules/firewalld.py
delete_zone
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...
python
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", ")", ":", "out", "=", "__mgmt", "(", "zone", ",", "'zone'", ",", "'delete'", ")", "if", "restart", ":", "if", "out", "==", "'success'", ":", "return", "__firewall_cmd", "(", "'--reload'", ...
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
[ "Delete", "an", "existing", "zone" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L213-L237
34,455
saltstack/salt
salt/modules/firewalld.py
new_service
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 '...
python
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", ")", ":", "out", "=", "__mgmt", "(", "name", ",", "'service'", ",", "'new'", ")", "if", "restart", ":", "if", "out", "==", "'success'", ":", "return", "__firewall_cmd", "(", "'--reload'", ...
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
[ "Add", "a", "new", "service" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L253-L277
34,456
saltstack/salt
salt/modules/firewalld.py
delete_service
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 ...
python
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", ")", ":", "out", "=", "__mgmt", "(", "name", ",", "'service'", ",", "'delete'", ")", "if", "restart", ":", "if", "out", "==", "'success'", ":", "return", "__firewall_cmd", "(", "'--reload...
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...
[ "Delete", "an", "existing", "service" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L280-L304
34,457
saltstack/salt
salt/modules/firewalld.py
list_all
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...
python
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", ")", ":", "_zone", "=", "{", "}", "id_", "=", "''", "if", "zone", ":", "cmd", "=", "'--zone={0} --list-all'", ".", "format", "(", "zone", ")", "else", ":", "cmd", "=", "'--...
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
[ "List", "everything", "added", "for", "or", "enabled", "in", "a", "zone" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L307-L351
34,458
saltstack/salt
salt/modules/firewalld.py
list_services
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 '*'...
python
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", ")", ":", "if", "zone", ":", "cmd", "=", "'--zone={0} --list-services'", ".", "format", "(", "zone", ")", "else", ":", "cmd", "=", "'--list-services'", "if", "permanent", ":",...
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
[ "List", "services", "added", "for", "zone", "as", "a", "space", "separated", "list", ".", "If", "zone", "is", "omitted", "default", "zone", "will", "be", "used", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L354-L379
34,459
saltstack/salt
salt/modules/firewalld.py
add_service
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...
python
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", ")", ":", "if", "zone", ":", "cmd", "=", "'--zone={0} --add-service={1}'", ".", "format", "(", "zone", ",", "service", ")", "else", ":", "cmd", "=", "'--add-se...
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
[ "Add", "a", "service", "for", "zone", ".", "If", "zone", "is", "omitted", "default", "zone", "will", "be", "used", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L382-L406
34,460
saltstack/salt
salt/modules/firewalld.py
remove_service
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...
python
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", ")", ":", "if", "zone", ":", "cmd", "=", "'--zone={0} --remove-service={1}'", ".", "format", "(", "zone", ",", "service", ")", "else", ":", "cmd", "=", "'--...
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...
[ "Remove", "a", "service", "from", "zone", ".", "This", "option", "can", "be", "specified", "multiple", "times", ".", "If", "zone", "is", "omitted", "default", "zone", "will", "be", "used", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L409-L434
34,461
saltstack/salt
salt/modules/firewalld.py
add_service_port
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...
python
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", ")", ":", "if", "service", "not", "in", "get_services", "(", "permanent", "=", "True", ")", ":", "raise", "CommandExecutionError", "(", "'The service does not exist.'", ")", "cmd", "=", "'--permanent --servic...
Add a new port to the specified service. .. versionadded:: 2016.11.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_service_port zone 80
[ "Add", "a", "new", "port", "to", "the", "specified", "service", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L437-L453
34,462
saltstack/salt
salt/modules/firewalld.py
get_masquerade
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...
python
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", ")", ":", "zone_info", "=", "list_all", "(", "zone", ",", "permanent", ")", "if", "'no'", "in", "[", "zone_info", "[", "i", "]", "[", "'masquerade'", "]", "[", "0", "]"...
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
[ "Show", "if", "masquerading", "is", "enabled", "on", "a", "zone", ".", "If", "zone", "is", "omitted", "default", "zone", "will", "be", "used", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L541-L557
34,463
saltstack/salt
salt/modules/firewalld.py
add_masquerade
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...
python
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", ")", ":", "if", "zone", ":", "cmd", "=", "'--zone={0} --add-masquerade'", ".", "format", "(", "zone", ")", "else", ":", "cmd", "=", "'--add-masquerade'", "if", "permanent", "...
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
[ "Enable", "masquerade", "on", "a", "zone", ".", "If", "zone", "is", "omitted", "default", "zone", "will", "be", "used", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L560-L587
34,464
saltstack/salt
salt/modules/firewalld.py
remove_masquerade
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...
python
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", ")", ":", "if", "zone", ":", "cmd", "=", "'--zone={0} --remove-masquerade'", ".", "format", "(", "zone", ")", "else", ":", "cmd", "=", "'--remove-masquerade'", "if", "perman...
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...
[ "Remove", "masquerade", "on", "a", "zone", ".", "If", "zone", "is", "omitted", "default", "zone", "will", "be", "used", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L590-L617
34,465
saltstack/salt
salt/modules/firewalld.py
add_port
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...
python
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", ")", ":", "cmd", "=", "'--zone={0} --add-port={1}'", ".", "format", "(", "zone", ",", "port", ")", "if", "permanent", ":", "cmd", "+=", "' --permanent'", "return", "__firewall_cmd", ...
Allow specific ports in a zone. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_port internal 443/tcp
[ "Allow", "specific", "ports", "in", "a", "zone", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L620-L637
34,466
saltstack/salt
salt/modules/firewalld.py
remove_port
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: ...
python
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", ")", ":", "cmd", "=", "'--zone={0} --remove-port={1}'", ".", "format", "(", "zone", ",", "port", ")", "if", "permanent", ":", "cmd", "+=", "' --permanent'", "return", "__firewall_...
Remove a specific port from a zone. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.remove_port internal 443/tcp
[ "Remove", "a", "specific", "port", "from", "a", "zone", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L640-L657
34,467
saltstack/salt
salt/modules/firewalld.py
list_ports
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_...
python
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", ")", ":", "cmd", "=", "'--zone={0} --list-ports'", ".", "format", "(", "zone", ")", "if", "permanent", ":", "cmd", "+=", "' --permanent'", "return", "__firewall_cmd", "(", "cmd", ")", ".", "s...
List all ports in a zone. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.list_ports
[ "List", "all", "ports", "in", "a", "zone", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L660-L677
34,468
saltstack/salt
salt/modules/firewalld.py
add_port_fwd
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={...
python
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", ")", ":", "cmd", "=", "'--zone={0} --add-forward-port=port={1}:proto={2}:toport={3}:toaddr={4}'", ".", "format", "(...
Add port forwarding. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_port_fwd public 80 443 tcp
[ "Add", "port", "forwarding", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L680-L703
34,469
saltstack/salt
salt/modules/firewalld.py
list_port_fwd
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...
python
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", ")", ":", "ret", "=", "[", "]", "cmd", "=", "'--zone={0} --list-forward-ports'", ".", "format", "(", "zone", ")", "if", "permanent", ":", "cmd", "+=", "' --permanent'", "for", "i", "in", ...
List port forwarding .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.list_port_fwd public
[ "List", "port", "forwarding" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L732-L761
34,470
saltstack/salt
salt/modules/firewalld.py
block_icmp
def block_icmp(zone, icmp, permanent=True): ''' Block a specific ICMP type on a zone .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.block_icmp zone echo-reply ''' if icmp not in get_icmp_types(permanent): log.error('Invalid ICMP type') ...
python
def block_icmp(zone, icmp, permanent=True): ''' Block a specific ICMP type on a zone .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.block_icmp zone echo-reply ''' if icmp not in get_icmp_types(permanent): log.error('Invalid ICMP type') ...
[ "def", "block_icmp", "(", "zone", ",", "icmp", ",", "permanent", "=", "True", ")", ":", "if", "icmp", "not", "in", "get_icmp_types", "(", "permanent", ")", ":", "log", ".", "error", "(", "'Invalid ICMP type'", ")", "return", "False", "if", "icmp", "in", ...
Block a specific ICMP type on a zone .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewalld.block_icmp zone echo-reply
[ "Block", "a", "specific", "ICMP", "type", "on", "a", "zone" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L764-L789
34,471
saltstack/salt
salt/modules/firewalld.py
list_icmp_block
def list_icmp_block(zone, permanent=True): ''' List ICMP blocks on a zone .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewlld.list_icmp_block zone ''' cmd = '--zone={0} --list-icmp-blocks'.format(zone) if permanent: cmd += ' --permanent' ...
python
def list_icmp_block(zone, permanent=True): ''' List ICMP blocks on a zone .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewlld.list_icmp_block zone ''' cmd = '--zone={0} --list-icmp-blocks'.format(zone) if permanent: cmd += ' --permanent' ...
[ "def", "list_icmp_block", "(", "zone", ",", "permanent", "=", "True", ")", ":", "cmd", "=", "'--zone={0} --list-icmp-blocks'", ".", "format", "(", "zone", ")", "if", "permanent", ":", "cmd", "+=", "' --permanent'", "return", "__firewall_cmd", "(", "cmd", ")", ...
List ICMP blocks on a zone .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt '*' firewlld.list_icmp_block zone
[ "List", "ICMP", "blocks", "on", "a", "zone" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L820-L837
34,472
saltstack/salt
salt/modules/firewalld.py
get_interfaces
def get_interfaces(zone, permanent=True): ''' List interfaces bound to a zone .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' firewalld.get_interfaces zone ''' cmd = '--zone={0} --list-interfaces'.format(zone) if permanent: cmd += ' --permanent'...
python
def get_interfaces(zone, permanent=True): ''' List interfaces bound to a zone .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' firewalld.get_interfaces zone ''' cmd = '--zone={0} --list-interfaces'.format(zone) if permanent: cmd += ' --permanent'...
[ "def", "get_interfaces", "(", "zone", ",", "permanent", "=", "True", ")", ":", "cmd", "=", "'--zone={0} --list-interfaces'", ".", "format", "(", "zone", ")", "if", "permanent", ":", "cmd", "+=", "' --permanent'", "return", "__firewall_cmd", "(", "cmd", ")", ...
List interfaces bound to a zone .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' firewalld.get_interfaces zone
[ "List", "interfaces", "bound", "to", "a", "zone" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L855-L872
34,473
saltstack/salt
salt/modules/firewalld.py
add_interface
def add_interface(zone, interface, permanent=True): ''' Bind an interface to a zone .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_interface zone eth0 ''' if interface in get_interfaces(zone, permanent): log.info('Interface is already ...
python
def add_interface(zone, interface, permanent=True): ''' Bind an interface to a zone .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_interface zone eth0 ''' if interface in get_interfaces(zone, permanent): log.info('Interface is already ...
[ "def", "add_interface", "(", "zone", ",", "interface", ",", "permanent", "=", "True", ")", ":", "if", "interface", "in", "get_interfaces", "(", "zone", ",", "permanent", ")", ":", "log", ".", "info", "(", "'Interface is already bound to zone.'", ")", "cmd", ...
Bind an interface to a zone .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_interface zone eth0
[ "Bind", "an", "interface", "to", "a", "zone" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L875-L895
34,474
saltstack/salt
salt/modules/firewalld.py
get_sources
def get_sources(zone, permanent=True): ''' List sources bound to a zone .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' firewalld.get_sources zone ''' cmd = '--zone={0} --list-sources'.format(zone) if permanent: cmd += ' --permanent' return...
python
def get_sources(zone, permanent=True): ''' List sources bound to a zone .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' firewalld.get_sources zone ''' cmd = '--zone={0} --list-sources'.format(zone) if permanent: cmd += ' --permanent' return...
[ "def", "get_sources", "(", "zone", ",", "permanent", "=", "True", ")", ":", "cmd", "=", "'--zone={0} --list-sources'", ".", "format", "(", "zone", ")", "if", "permanent", ":", "cmd", "+=", "' --permanent'", "return", "__firewall_cmd", "(", "cmd", ")", ".", ...
List sources bound to a zone .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' firewalld.get_sources zone
[ "List", "sources", "bound", "to", "a", "zone" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L921-L938
34,475
saltstack/salt
salt/modules/firewalld.py
add_source
def add_source(zone, source, permanent=True): ''' Bind a source to a zone .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_source zone 192.168.1.0/24 ''' if source in get_sources(zone, permanent): log.info('Source is already bound to zon...
python
def add_source(zone, source, permanent=True): ''' Bind a source to a zone .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_source zone 192.168.1.0/24 ''' if source in get_sources(zone, permanent): log.info('Source is already bound to zon...
[ "def", "add_source", "(", "zone", ",", "source", ",", "permanent", "=", "True", ")", ":", "if", "source", "in", "get_sources", "(", "zone", ",", "permanent", ")", ":", "log", ".", "info", "(", "'Source is already bound to zone.'", ")", "cmd", "=", "'--zone...
Bind a source to a zone .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_source zone 192.168.1.0/24
[ "Bind", "a", "source", "to", "a", "zone" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L941-L961
34,476
saltstack/salt
salt/modules/firewalld.py
get_rich_rules
def get_rich_rules(zone, permanent=True): ''' List rich rules bound to a zone .. versionadded:: 2016.11.0 CLI Example: .. code-block:: bash salt '*' firewalld.get_rich_rules zone ''' cmd = '--zone={0} --list-rich-rules'.format(zone) if permanent: cmd += ' --permanent...
python
def get_rich_rules(zone, permanent=True): ''' List rich rules bound to a zone .. versionadded:: 2016.11.0 CLI Example: .. code-block:: bash salt '*' firewalld.get_rich_rules zone ''' cmd = '--zone={0} --list-rich-rules'.format(zone) if permanent: cmd += ' --permanent...
[ "def", "get_rich_rules", "(", "zone", ",", "permanent", "=", "True", ")", ":", "cmd", "=", "'--zone={0} --list-rich-rules'", ".", "format", "(", "zone", ")", "if", "permanent", ":", "cmd", "+=", "' --permanent'", "return", "__firewall_cmd", "(", "cmd", ")", ...
List rich rules bound to a zone .. versionadded:: 2016.11.0 CLI Example: .. code-block:: bash salt '*' firewalld.get_rich_rules zone
[ "List", "rich", "rules", "bound", "to", "a", "zone" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/firewalld.py#L987-L1004
34,477
saltstack/salt
salt/grains/mdadm.py
mdadm
def mdadm(): ''' Return list of mdadm devices ''' devices = set() try: with salt.utils.files.fopen('/proc/mdstat', 'r') as mdstat: for line in mdstat: line = salt.utils.stringutils.to_unicode(line) if line.startswith('Personalities : '): ...
python
def mdadm(): ''' Return list of mdadm devices ''' devices = set() try: with salt.utils.files.fopen('/proc/mdstat', 'r') as mdstat: for line in mdstat: line = salt.utils.stringutils.to_unicode(line) if line.startswith('Personalities : '): ...
[ "def", "mdadm", "(", ")", ":", "devices", "=", "set", "(", ")", "try", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "'/proc/mdstat'", ",", "'r'", ")", "as", "mdstat", ":", "for", "line", "in", "mdstat", ":", "line", "=", "s...
Return list of mdadm devices
[ "Return", "list", "of", "mdadm", "devices" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/mdadm.py#L16-L38
34,478
saltstack/salt
salt/modules/vsphere.py
supports_proxies
def supports_proxies(*proxy_types): ''' Decorator to specify which proxy types are supported by a function proxy_types: Arbitrary list of strings with the supported types of proxies ''' def _supports_proxies(fn): @wraps(fn) def __supports_proxies(*args, **kwargs): ...
python
def supports_proxies(*proxy_types): ''' Decorator to specify which proxy types are supported by a function proxy_types: Arbitrary list of strings with the supported types of proxies ''' def _supports_proxies(fn): @wraps(fn) def __supports_proxies(*args, **kwargs): ...
[ "def", "supports_proxies", "(", "*", "proxy_types", ")", ":", "def", "_supports_proxies", "(", "fn", ")", ":", "@", "wraps", "(", "fn", ")", "def", "__supports_proxies", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "proxy_type", "=", "get_proxy_t...
Decorator to specify which proxy types are supported by a function proxy_types: Arbitrary list of strings with the supported types of proxies
[ "Decorator", "to", "specify", "which", "proxy", "types", "are", "supported", "by", "a", "function" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L280-L297
34,479
saltstack/salt
salt/modules/vsphere.py
esxcli_cmd
def esxcli_cmd(cmd_str, host=None, username=None, password=None, protocol=None, port=None, esxi_hosts=None, credstore=None): ''' Run an ESXCLI command directly on the host or list of hosts. host The location of the host. username The username used to login to the host, such as ``root``...
python
def esxcli_cmd(cmd_str, host=None, username=None, password=None, protocol=None, port=None, esxi_hosts=None, credstore=None): ''' Run an ESXCLI command directly on the host or list of hosts. host The location of the host. username The username used to login to the host, such as ``root``...
[ "def", "esxcli_cmd", "(", "cmd_str", ",", "host", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "esxi_hosts", "=", "None", ",", "credstore", "=", "None", ")", ":"...
Run an ESXCLI command directly on the host or list of hosts. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to the host. cmd_str The ESXCLI command to run. Note: This should not inc...
[ "Run", "an", "ESXCLI", "command", "directly", "on", "the", "host", "or", "list", "of", "hosts", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L436-L505
34,480
saltstack/salt
salt/modules/vsphere.py
get_coredump_network_config
def get_coredump_network_config(host, username, password, protocol=None, port=None, esxi_hosts=None, credstore=None): ''' Retrieve information on ESXi or vCenter network dump collection and format it into a dictionary. host The location of the host. username The username used to lo...
python
def get_coredump_network_config(host, username, password, protocol=None, port=None, esxi_hosts=None, credstore=None): ''' Retrieve information on ESXi or vCenter network dump collection and format it into a dictionary. host The location of the host. username The username used to lo...
[ "def", "get_coredump_network_config", "(", "host", ",", "username", ",", "password", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "esxi_hosts", "=", "None", ",", "credstore", "=", "None", ")", ":", "cmd", "=", "'system coredump network get'", ...
Retrieve information on ESXi or vCenter network dump collection and format it into a dictionary. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to the host. protocol Optionally ...
[ "Retrieve", "information", "on", "ESXi", "or", "vCenter", "network", "dump", "collection", "and", "format", "it", "into", "a", "dictionary", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L509-L581
34,481
saltstack/salt
salt/modules/vsphere.py
coredump_network_enable
def coredump_network_enable(host, username, password, enabled, protocol=None, port=None, esxi_hosts=None, credstore=None): ''' Enable or disable ESXi core dump collection. Returns ``True`` if coredump is enabled and returns ``False`` if core dump is not enabled. If there was an error, the error will be ...
python
def coredump_network_enable(host, username, password, enabled, protocol=None, port=None, esxi_hosts=None, credstore=None): ''' Enable or disable ESXi core dump collection. Returns ``True`` if coredump is enabled and returns ``False`` if core dump is not enabled. If there was an error, the error will be ...
[ "def", "coredump_network_enable", "(", "host", ",", "username", ",", "password", ",", "enabled", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "esxi_hosts", "=", "None", ",", "credstore", "=", "None", ")", ":", "if", "enabled", ":", "enabl...
Enable or disable ESXi core dump collection. Returns ``True`` if coredump is enabled and returns ``False`` if core dump is not enabled. If there was an error, the error will be the value printed in the ``Error`` key dictionary for the given host. host The location of the host. username ...
[ "Enable", "or", "disable", "ESXi", "core", "dump", "collection", ".", "Returns", "True", "if", "coredump", "is", "enabled", "and", "returns", "False", "if", "core", "dump", "is", "not", "enabled", ".", "If", "there", "was", "an", "error", "the", "error", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L585-L659
34,482
saltstack/salt
salt/modules/vsphere.py
enable_firewall_ruleset
def enable_firewall_ruleset(host, username, password, ruleset_enable, ruleset_name, protocol=None, port=None, esxi_hosts=Non...
python
def enable_firewall_ruleset(host, username, password, ruleset_enable, ruleset_name, protocol=None, port=None, esxi_hosts=Non...
[ "def", "enable_firewall_ruleset", "(", "host", ",", "username", ",", "password", ",", "ruleset_enable", ",", "ruleset_name", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "esxi_hosts", "=", "None", ",", "credstore", "=", "None", ")", ":", "c...
Enable or disable an ESXi firewall rule set. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to the host. ruleset_enable True to enable the ruleset, false to disable. ruleset_na...
[ "Enable", "or", "disable", "an", "ESXi", "firewall", "rule", "set", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L839-L915
34,483
saltstack/salt
salt/modules/vsphere.py
set_syslog_config
def set_syslog_config(host, username, password, syslog_config, config_value, protocol=None, port=None, firewall=True, reset_service=True, ...
python
def set_syslog_config(host, username, password, syslog_config, config_value, protocol=None, port=None, firewall=True, reset_service=True, ...
[ "def", "set_syslog_config", "(", "host", ",", "username", ",", "password", ",", "syslog_config", ",", "config_value", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "firewall", "=", "True", ",", "reset_service", "=", "True", ",", "esxi_hosts", ...
Set the specified syslog configuration parameter. By default, this function will reset the syslog service after the configuration is set. host ESXi or vCenter host to connect to. username User to connect as, usually root. password Password to connect with. syslog_config ...
[ "Set", "the", "specified", "syslog", "configuration", "parameter", ".", "By", "default", "this", "function", "will", "reset", "the", "syslog", "service", "after", "the", "configuration", "is", "set", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L984-L1118
34,484
saltstack/salt
salt/modules/vsphere.py
get_syslog_config
def get_syslog_config(host, username, password, protocol=None, port=None, esxi_hosts=None, credstore=None): ''' Retrieve the syslog configuration. host The location of the host. username The username used to login to the host, such as ``root``. password The password used t...
python
def get_syslog_config(host, username, password, protocol=None, port=None, esxi_hosts=None, credstore=None): ''' Retrieve the syslog configuration. host The location of the host. username The username used to login to the host, such as ``root``. password The password used t...
[ "def", "get_syslog_config", "(", "host", ",", "username", ",", "password", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "esxi_hosts", "=", "None", ",", "credstore", "=", "None", ")", ":", "cmd", "=", "'system syslog config get'", "ret", "="...
Retrieve the syslog configuration. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to the host. protocol Optionally set to alternate protocol if the host is not using the default ...
[ "Retrieve", "the", "syslog", "configuration", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1122-L1185
34,485
saltstack/salt
salt/modules/vsphere.py
reset_syslog_config
def reset_syslog_config(host, username, password, protocol=None, port=None, syslog_config=None, esxi_hosts=None, credstore=None): ''' Reset the ...
python
def reset_syslog_config(host, username, password, protocol=None, port=None, syslog_config=None, esxi_hosts=None, credstore=None): ''' Reset the ...
[ "def", "reset_syslog_config", "(", "host", ",", "username", ",", "password", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "syslog_config", "=", "None", ",", "esxi_hosts", "=", "None", ",", "credstore", "=", "None", ")", ":", "if", "not", ...
Reset the syslog service to its default settings. Valid syslog_config values are ``logdir``, ``loghost``, ``logdir-unique``, ``default-rotate``, ``default-size``, ``default-timeout``, or ``all`` for all of these. host The location of the host. username The username used to login t...
[ "Reset", "the", "syslog", "service", "to", "its", "default", "settings", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1189-L1283
34,486
saltstack/salt
salt/modules/vsphere.py
upload_ssh_key
def upload_ssh_key(host, username, password, ssh_key=None, ssh_key_file=None, protocol=None, port=None, certificate_verify=False): ''' Upload an ssh key for root to an ESXi host via http PUT. This function only works for ESXi, not vCenter. Only one ssh key can be uploaded for root. U...
python
def upload_ssh_key(host, username, password, ssh_key=None, ssh_key_file=None, protocol=None, port=None, certificate_verify=False): ''' Upload an ssh key for root to an ESXi host via http PUT. This function only works for ESXi, not vCenter. Only one ssh key can be uploaded for root. U...
[ "def", "upload_ssh_key", "(", "host", ",", "username", ",", "password", ",", "ssh_key", "=", "None", ",", "ssh_key_file", "=", "None", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "certificate_verify", "=", "False", ")", ":", "if", "proto...
Upload an ssh key for root to an ESXi host via http PUT. This function only works for ESXi, not vCenter. Only one ssh key can be uploaded for root. Uploading a second key will replace any existing key. :param host: The location of the ESXi Host :param username: Username to connect as :param pa...
[ "Upload", "an", "ssh", "key", "for", "root", "to", "an", "ESXi", "host", "via", "http", "PUT", ".", "This", "function", "only", "works", "for", "ESXi", "not", "vCenter", ".", "Only", "one", "ssh", "key", "can", "be", "uploaded", "for", "root", ".", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1287-L1355
34,487
saltstack/salt
salt/modules/vsphere.py
get_ssh_key
def get_ssh_key(host, username, password, protocol=None, port=None, certificate_verify=False): ''' Retrieve the authorized_keys entry for root. This function only works for ESXi, not vCenter. :param host: The location of th...
python
def get_ssh_key(host, username, password, protocol=None, port=None, certificate_verify=False): ''' Retrieve the authorized_keys entry for root. This function only works for ESXi, not vCenter. :param host: The location of th...
[ "def", "get_ssh_key", "(", "host", ",", "username", ",", "password", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "certificate_verify", "=", "False", ")", ":", "if", "protocol", "is", "None", ":", "protocol", "=", "'https'", "if", "port",...
Retrieve the authorized_keys entry for root. This function only works for ESXi, not vCenter. :param host: The location of the ESXi Host :param username: Username to connect as :param password: Password for the ESXi web endpoint :param protocol: defaults to https, can be http if ssl is disabled on E...
[ "Retrieve", "the", "authorized_keys", "entry", "for", "root", ".", "This", "function", "only", "works", "for", "ESXi", "not", "vCenter", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1359-L1412
34,488
saltstack/salt
salt/modules/vsphere.py
get_ntp_config
def get_ntp_config(host, username, password, protocol=None, port=None, host_names=None): ''' Get the NTP configuration information for a given host or list of host_names. host The location of the host. username The username used to login to the host, such as ``root``. password ...
python
def get_ntp_config(host, username, password, protocol=None, port=None, host_names=None): ''' Get the NTP configuration information for a given host or list of host_names. host The location of the host. username The username used to login to the host, such as ``root``. password ...
[ "def", "get_ntp_config", "(", "host", ",", "username", ",", "password", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "host_names", "=", "None", ")", ":", "service_instance", "=", "salt", ".", "utils", ".", "vmware", ".", "get_service_instan...
Get the NTP configuration information for a given host or list of host_names. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to the host. protocol Optionally set to alternate protoc...
[ "Get", "the", "NTP", "configuration", "information", "for", "a", "given", "host", "or", "list", "of", "host_names", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1476-L1529
34,489
saltstack/salt
salt/modules/vsphere.py
get_service_policy
def get_service_policy(host, username, password, service_name, protocol=None, port=None, host_names=None): ''' Get the service name's policy for a given host or list of hosts. host The location of the host. username The username used to login to the host, such as ``root``. passwor...
python
def get_service_policy(host, username, password, service_name, protocol=None, port=None, host_names=None): ''' Get the service name's policy for a given host or list of hosts. host The location of the host. username The username used to login to the host, such as ``root``. passwor...
[ "def", "get_service_policy", "(", "host", ",", "username", ",", "password", ",", "service_name", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "host_names", "=", "None", ")", ":", "service_instance", "=", "salt", ".", "utils", ".", "vmware",...
Get the service name's policy for a given host or list of hosts. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to the host. service_name The name of the service for which to retrie...
[ "Get", "the", "service", "name", "s", "policy", "for", "a", "given", "host", "or", "list", "of", "hosts", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1534-L1636
34,490
saltstack/salt
salt/modules/vsphere.py
get_vmotion_enabled
def get_vmotion_enabled(host, username, password, protocol=None, port=None, host_names=None): ''' Get the VMotion enabled status for a given host or a list of host_names. Returns ``True`` if VMotion is enabled, ``False`` if it is not enabled. host The location of the host. username ...
python
def get_vmotion_enabled(host, username, password, protocol=None, port=None, host_names=None): ''' Get the VMotion enabled status for a given host or a list of host_names. Returns ``True`` if VMotion is enabled, ``False`` if it is not enabled. host The location of the host. username ...
[ "def", "get_vmotion_enabled", "(", "host", ",", "username", ",", "password", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "host_names", "=", "None", ")", ":", "service_instance", "=", "salt", ".", "utils", ".", "vmware", ".", "get_service_i...
Get the VMotion enabled status for a given host or a list of host_names. Returns ``True`` if VMotion is enabled, ``False`` if it is not enabled. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to logi...
[ "Get", "the", "VMotion", "enabled", "status", "for", "a", "given", "host", "or", "a", "list", "of", "host_names", ".", "Returns", "True", "if", "VMotion", "is", "enabled", "False", "if", "it", "is", "not", "enabled", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1748-L1805
34,491
saltstack/salt
salt/modules/vsphere.py
get_vsan_enabled
def get_vsan_enabled(host, username, password, protocol=None, port=None, host_names=None): ''' Get the VSAN enabled status for a given host or a list of host_names. Returns ``True`` if VSAN is enabled, ``False`` if it is not enabled, and ``None`` if a VSAN Host Config is unset, per host. host ...
python
def get_vsan_enabled(host, username, password, protocol=None, port=None, host_names=None): ''' Get the VSAN enabled status for a given host or a list of host_names. Returns ``True`` if VSAN is enabled, ``False`` if it is not enabled, and ``None`` if a VSAN Host Config is unset, per host. host ...
[ "def", "get_vsan_enabled", "(", "host", ",", "username", ",", "password", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "host_names", "=", "None", ")", ":", "service_instance", "=", "salt", ".", "utils", ".", "vmware", ".", "get_service_inst...
Get the VSAN enabled status for a given host or a list of host_names. Returns ``True`` if VSAN is enabled, ``False`` if it is not enabled, and ``None`` if a VSAN Host Config is unset, per host. host The location of the host. username The username used to login to the host, such as ``ro...
[ "Get", "the", "VSAN", "enabled", "status", "for", "a", "given", "host", "or", "a", "list", "of", "host_names", ".", "Returns", "True", "if", "VSAN", "is", "enabled", "False", "if", "it", "is", "not", "enabled", "and", "None", "if", "a", "VSAN", "Host",...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1810-L1872
34,492
saltstack/salt
salt/modules/vsphere.py
get_vsan_eligible_disks
def get_vsan_eligible_disks(host, username, password, protocol=None, port=None, host_names=None): ''' Returns a list of VSAN-eligible disks for a given host or list of host_names. host The location of the host. username The username used to login to the host, such as ``root``. pas...
python
def get_vsan_eligible_disks(host, username, password, protocol=None, port=None, host_names=None): ''' Returns a list of VSAN-eligible disks for a given host or list of host_names. host The location of the host. username The username used to login to the host, such as ``root``. pas...
[ "def", "get_vsan_eligible_disks", "(", "host", ",", "username", ",", "password", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "host_names", "=", "None", ")", ":", "service_instance", "=", "salt", ".", "utils", ".", "vmware", ".", "get_servi...
Returns a list of VSAN-eligible disks for a given host or list of host_names. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to the host. protocol Optionally set to alternate protoc...
[ "Returns", "a", "list", "of", "VSAN", "-", "eligible", "disks", "for", "a", "given", "host", "or", "list", "of", "host_names", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1877-L1947
34,493
saltstack/salt
salt/modules/vsphere.py
system_info
def system_info(host, username, password, protocol=None, port=None): ''' Return system information about a VMware environment. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to the host....
python
def system_info(host, username, password, protocol=None, port=None): ''' Return system information about a VMware environment. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to the host....
[ "def", "system_info", "(", "host", ",", "username", ",", "password", ",", "protocol", "=", "None", ",", "port", "=", "None", ")", ":", "service_instance", "=", "salt", ".", "utils", ".", "vmware", ".", "get_service_instance", "(", "host", "=", "host", ",...
Return system information about a VMware environment. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to the host. protocol Optionally set to alternate protocol if the host is not us...
[ "Return", "system", "information", "about", "a", "VMware", "environment", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L1973-L2009
34,494
saltstack/salt
salt/modules/vsphere.py
list_datacenters
def list_datacenters(host, username, password, protocol=None, port=None): ''' Returns a list of datacenters for the the specified host. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to ...
python
def list_datacenters(host, username, password, protocol=None, port=None): ''' Returns a list of datacenters for the the specified host. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to ...
[ "def", "list_datacenters", "(", "host", ",", "username", ",", "password", ",", "protocol", "=", "None", ",", "port", "=", "None", ")", ":", "service_instance", "=", "salt", ".", "utils", ".", "vmware", ".", "get_service_instance", "(", "host", "=", "host",...
Returns a list of datacenters for the the specified host. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to the host. protocol Optionally set to alternate protocol if the host is no...
[ "Returns", "a", "list", "of", "datacenters", "for", "the", "the", "specified", "host", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L2014-L2047
34,495
saltstack/salt
salt/modules/vsphere.py
list_ssds
def list_ssds(host, username, password, protocol=None, port=None, host_names=None): ''' Returns a list of SSDs for the given host or list of host_names. host The location of the host. username The username used to login to the host, such as ``root``. password The password ...
python
def list_ssds(host, username, password, protocol=None, port=None, host_names=None): ''' Returns a list of SSDs for the given host or list of host_names. host The location of the host. username The username used to login to the host, such as ``root``. password The password ...
[ "def", "list_ssds", "(", "host", ",", "username", ",", "password", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "host_names", "=", "None", ")", ":", "service_instance", "=", "salt", ".", "utils", ".", "vmware", ".", "get_service_instance", ...
Returns a list of SSDs for the given host or list of host_names. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to the host. protocol Optionally set to alternate protocol if the hos...
[ "Returns", "a", "list", "of", "SSDs", "for", "the", "given", "host", "or", "list", "of", "host_names", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L2424-L2480
34,496
saltstack/salt
salt/modules/vsphere.py
set_ntp_config
def set_ntp_config(host, username, password, ntp_servers, protocol=None, port=None, host_names=None): ''' Set NTP configuration for a given host of list of host_names. host The location of the host. username The username used to login to the host, such as ``root``. password ...
python
def set_ntp_config(host, username, password, ntp_servers, protocol=None, port=None, host_names=None): ''' Set NTP configuration for a given host of list of host_names. host The location of the host. username The username used to login to the host, such as ``root``. password ...
[ "def", "set_ntp_config", "(", "host", ",", "username", ",", "password", ",", "ntp_servers", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "host_names", "=", "None", ")", ":", "service_instance", "=", "salt", ".", "utils", ".", "vmware", "....
Set NTP configuration for a given host of list of host_names. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to the host. ntp_servers A list of servers that should be added to and c...
[ "Set", "NTP", "configuration", "for", "a", "given", "host", "of", "list", "of", "host_names", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L2553-L2628
34,497
saltstack/salt
salt/modules/vsphere.py
service_start
def service_start(host, username, password, service_name, protocol=None, port=None, host_names=None): ''' Start the named service for the given host or list of hosts. host The location of the...
python
def service_start(host, username, password, service_name, protocol=None, port=None, host_names=None): ''' Start the named service for the given host or list of hosts. host The location of the...
[ "def", "service_start", "(", "host", ",", "username", ",", "password", ",", "service_name", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "host_names", "=", "None", ")", ":", "service_instance", "=", "salt", ".", "utils", ".", "vmware", "....
Start the named service for the given host or list of hosts. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to the host. service_name The name of the service for which to set the po...
[ "Start", "the", "named", "service", "for", "the", "given", "host", "or", "list", "of", "hosts", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L2633-L2739
34,498
saltstack/salt
salt/modules/vsphere.py
set_service_policy
def set_service_policy(host, username, password, service_name, service_policy, protocol=None, port=None, host_names=None): ''' Set the service name's p...
python
def set_service_policy(host, username, password, service_name, service_policy, protocol=None, port=None, host_names=None): ''' Set the service name's p...
[ "def", "set_service_policy", "(", "host", ",", "username", ",", "password", ",", "service_name", ",", "service_policy", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "host_names", "=", "None", ")", ":", "service_instance", "=", "salt", ".", ...
Set the service name's policy for a given host or list of hosts. host The location of the host. username The username used to login to the host, such as ``root``. password The password used to login to the host. service_name The name of the service for which to set th...
[ "Set", "the", "service", "name", "s", "policy", "for", "a", "given", "host", "or", "list", "of", "hosts", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L2966-L3090
34,499
saltstack/salt
salt/modules/vsphere.py
update_host_password
def update_host_password(host, username, password, new_password, protocol=None, port=None): ''' Update the password for a given host. .. note:: Currently only works with connections to ESXi hosts. Does not work with vCenter servers. host The location of the ESXi host. username The...
python
def update_host_password(host, username, password, new_password, protocol=None, port=None): ''' Update the password for a given host. .. note:: Currently only works with connections to ESXi hosts. Does not work with vCenter servers. host The location of the ESXi host. username The...
[ "def", "update_host_password", "(", "host", ",", "username", ",", "password", ",", "new_password", ",", "protocol", "=", "None", ",", "port", "=", "None", ")", ":", "service_instance", "=", "salt", ".", "utils", ".", "vmware", ".", "get_service_instance", "(...
Update the password for a given host. .. note:: Currently only works with connections to ESXi hosts. Does not work with vCenter servers. host The location of the ESXi host. username The username used to login to the ESXi host, such as ``root``. password The password used to l...
[ "Update", "the", "password", "for", "a", "given", "host", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vsphere.py#L3162-L3220