text
stringlengths
81
112k
Ensure that a volume is absent. .. versionadded:: 2015.8.4 .. versionchanged:: 2017.7.0 This state was renamed from **docker.volume_absent** to **docker_volume.absent** name Name of the volume Usage Examples: .. code-block:: yaml volume_foo: docker_volume.absen...
Generates a list of salt://<formula>/defaults.(json|yaml) files and fetches them from the Salt master. Returns first defaults file as python dict. def _load(formula): ''' Generates a list of salt://<formula>/defaults.(json|yaml) files and fetches them from the Salt master. Returns first defau...
defaults.get is used much like pillar.get except that it will read a default value for a pillar from defaults.json or defaults.yaml files that are stored in the root of a salt formula. CLI Example: .. code-block:: bash salt '*' defaults.get core:users:root The defaults is computed from p...
defaults.merge Allows deep merging of dicts in formulas. merge_lists : False If True, it will also merge lists instead of replace their items. in_place : True If True, it will merge into dest dict, if not it will make a new copy from that dict and return it. CLI Exampl...
defaults.update Allows to set defaults for group of data set e.g. group for nodes. This function is a combination of defaults.merge and defaults.deepcopy to avoid redundant in jinja. Example: .. code-block:: yaml group01: defaults: en...
Copied from win_system.py (_get_date_time_format) Function that detects the date/time format for the string passed. :param str dt_string: A date/time string :return: The format of the passed dt_string :rtype: str def _get_date_time_format(dt_string): ''' Copied from win_system.py (_g...
Lookup the key in a dictionary by it's value. Will return the first match. :param dict dictionary: The dictionary to search :param str value: The value to search for. :return: Returns the first key to match the value :rtype: str def _reverse_lookup(dictionary, value): ''' Lookup the key in a...
Lookup the first value given a key. Returns the first value if the key refers to a list or the value itself. :param dict dictionary: The dictionary to search :param str key: The key to get :return: Returns the first value available for the key :rtype: str def _lookup_first(dictionary, key): ...
Internal function to save the task definition. :param str name: The name of the task. :param str task_folder: The object representing the folder in which to save the task :param str task_definition: The object representing the task to be saved :param str user_name: The user_account under which t...
r''' List all tasks located in a specific location in the task scheduler. :param str location: A string value representing the folder from which you want to list tasks. Default is '\\' which is the root for the task scheduler (C:\Windows\System32\tasks). :return: Returns a list of tasks. ...
r''' List all folders located in a specific location in the task scheduler. :param str location: A string value representing the folder from which you want to list tasks. Default is '\\' which is the root for the task scheduler (C:\Windows\System32\tasks). :return: Returns a list of folder...
r''' List all triggers that pertain to a task in the specified location. :param str name: The name of the task for which list triggers. :param str location: A string value representing the location of the task from which to list triggers. Default is '\\' which is the root for the task sche...
r''' List all actions that pertain to a task in the specified location. :param str name: The name of the task for which list actions. :param str location: A string value representing the location of the task from which to list actions. Default is '\\' which is the root for the task schedul...
r''' Create a new task in the designated location. This function has many keyword arguments that are not listed here. For additional arguments see: - :py:func:`edit_task` - :py:func:`add_action` - :py:func:`add_trigger` :param str name: The name of the task. This will be displayed in the task ...
r''' Create a task based on XML. Source can be a file or a string of XML. :param str name: The name of the task. This will be displayed in the task scheduler. :param str location: A string value representing the location in which to create the task. Default is '\\' which is the root for th...
r''' Create a folder in which to create tasks. :param str name: The name of the folder. This will be displayed in the task scheduler. :param str location: A string value representing the location in which to create the folder. Default is '\\' which is the root for the task schedule...
r''' Edit the parameters of a task. Triggers and Actions cannot be edited yet. :param str name: The name of the task. This will be displayed in the task scheduler. :param str location: A string value representing the location in which to create the task. Default is '\\' which is the root f...
r''' Delete a task from the task scheduler. :param str name: The name of the task to delete. :param str location: A string value representing the location of the task. Default is '\\' which is the root for the task scheduler (C:\Windows\System32\tasks). :return: True if successful, Fa...
r''' Run a scheduled task manually. :param str name: The name of the task to run. :param str location: A string value representing the location of the task. Default is '\\' which is the root for the task scheduler (C:\Windows\System32\tasks). :return: True if successful, False if unsu...
r''' Run a scheduled task and return when the task finishes :param str name: The name of the task to run. :param str location: A string value representing the location of the task. Default is '\\' which is the root for the task scheduler (C:\Windows\System32\tasks). :return: True if s...
r''' Determine the status of a task. Is it Running, Queued, Ready, etc. :param str name: The name of the task for which to return the status :param str location: A string value representing the location of the task. Default is '\\' which is the root for the task scheduler (C:\Windows\Syste...
r''' Get the details about a task in the task scheduler. :param str name: The name of the task for which to return the status :param str location: A string value representing the location of the task. Default is '\\' which is the root for the task scheduler (C:\Windows\System32\tasks). ...
r''' Add an action to a task. :param str name: The name of the task to which to add the action. :param str location: A string value representing the location of the task. Default is '\\' which is the root for the task scheduler (C:\Windows\System32\tasks). :param str action_type: The ...
r''' :param str name: The name of the task to which to add the trigger. :param str location: A string value representing the location of the task. Default is '\\' which is the root for the task scheduler (C:\Windows\System32\tasks). :param str trigger_type: The type of trigger to create. T...
r''' Remove all triggers from the task. :param str name: The name of the task from which to clear all triggers. :param str location: A string value representing the location of the task. Default is '\\' which is the root for the task scheduler (C:\Windows\System32\tasks). :return: Tru...
Get a connection to CouchDB def _get_conn(profile): ''' Get a connection to CouchDB ''' DEFAULT_BASE_URL = _construct_uri(profile) or 'http://localhost:5984' server = couchdb.Server() if profile['database'] not in server: server.create(profile['database']) return server
Set a key/value pair in couchdb def set_(key, value, profile=None): ''' Set a key/value pair in couchdb ''' db = _get_db(profile) return db.save({'_id': uuid4().hex, key: value})
Generate a key for use with salt-ssh def gen_key(path): ''' Generate a key for use with salt-ssh ''' cmd = 'ssh-keygen -P "" -f {0} -t rsa -q'.format(path) if not os.path.isdir(os.path.dirname(path)): os.makedirs(os.path.dirname(path)) subprocess.call(cmd, shell=True)
Return the correct shell interface for the target system def gen_shell(opts, **kwargs): ''' Return the correct shell interface for the target system ''' if kwargs['winrm']: try: import saltwinshell shell = saltwinshell.Shell(opts, **kwargs) except ImportError: ...
Parse out an error and return a targeted error string def get_error(self, errstr): ''' Parse out an error and return a targeted error string ''' for line in errstr.split('\n'): if line.startswith('ssh:'): return line if line.startswith('Pseudo-ter...
Return options for the ssh command base for Salt to call def _key_opts(self): ''' Return options for the ssh command base for Salt to call ''' options = [ 'KbdInteractiveAuthentication=no', ] if self.passwd: options.append('Passw...
Return options to pass to ssh def _passwd_opts(self): ''' Return options to pass to ssh ''' # TODO ControlMaster does not work without ControlPath # user could take advantage of it if they set ControlPath in their # ssh config. Also, ControlPersist not widely available....
Return the string to execute ssh-copy-id def _copy_id_str_old(self): ''' Return the string to execute ssh-copy-id ''' if self.passwd: # Using single quotes prevents shell expansion and # passwords containing '$' return "{0} {1} '{2} -p {3} {4} {5}@{6}...
Execute ssh-copy-id to plant the id file on the target def copy_id(self): ''' Execute ssh-copy-id to plant the id file on the target ''' stdout, stderr, retcode = self._run_cmd(self._copy_id_str_old()) if salt.defaults.exitcodes.EX_OK != retcode and 'Usage' in stderr: ...
Return the cmd string to execute def _cmd_str(self, cmd, ssh='ssh'): ''' Return the cmd string to execute ''' # TODO: if tty, then our SSH_SHIM cannot be supplied from STDIN Will # need to deliver the SHIM to the remote host and execute it there command = [ssh] ...
Cleanly execute the command string def _old_run_cmd(self, cmd): ''' Cleanly execute the command string ''' try: proc = subprocess.Popen( cmd, shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE, ...
cmd iterator def _run_nb_cmd(self, cmd): ''' cmd iterator ''' try: proc = salt.utils.nb_popen.NonBlockingPopen( cmd, shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE, ) while Tr...
Yield None until cmd finished def exec_nb_cmd(self, cmd): ''' Yield None until cmd finished ''' r_out = [] r_err = [] rcode = None cmd = self._cmd_str(cmd) logmsg = 'Executing non-blocking command: {0}'.format(cmd) if self.passwd: log...
Execute a remote command def exec_cmd(self, cmd): ''' Execute a remote command ''' cmd = self._cmd_str(cmd) logmsg = 'Executing command: {0}'.format(cmd) if self.passwd: logmsg = logmsg.replace(self.passwd, ('*' * 6)) if 'decode("base64")' in logmsg ...
scp a file or files to a remote system def send(self, local, remote, makedirs=False): ''' scp a file or files to a remote system ''' if makedirs: self.exec_cmd('mkdir -p {0}'.format(os.path.dirname(remote))) # scp needs [<ipv6} host = self.host if ':...
Execute a shell command via VT. This is blocking and assumes that ssh is being run def _run_cmd(self, cmd, key_accept=False, passwd_retries=3): ''' Execute a shell command via VT. This is blocking and assumes that ssh is being run ''' if not cmd: return '', '...
sets up the sentry handler def setup_handlers(): ''' sets up the sentry handler ''' __grains__ = salt.loader.grains(__opts__) __salt__ = salt.loader.minion_mods(__opts__) if 'sentry_handler' not in __opts__: log.debug('No \'sentry_handler\' key was found in the configuration') r...
Return a value for 'name' from master config file options or defaults. def _config(key, mandatory=True, opts=None): ''' Return a value for 'name' from master config file options or defaults. ''' try: if opts: value = opts['auth.ldap.{0}'.format(key)] else: value ...
Render config template, substituting username where found. def _render_template(param, username): ''' Render config template, substituting username where found. ''' env = Environment() template = env.from_string(param) variables = {'username': username} return template.render(variables)
Bind with binddn and bindpw only for searching LDAP :param anonymous: Try binding anonymously :param opts: Pass in when __opts__ is not available :return: LDAPConnection object def _bind_for_search(anonymous=False, opts=None): ''' Bind with binddn and bindpw only for searching LDAP :param anony...
Authenticate via an LDAP bind def _bind(username, password, anonymous=False, opts=None): ''' Authenticate via an LDAP bind ''' # Get config params; create connection dictionary basedn = _config('basedn', opts=opts) scope = _config('scope', opts=opts) connargs = {} # config params (auth....
Simple LDAP auth def auth(username, password): ''' Simple LDAP auth ''' if not HAS_LDAP: log.error('LDAP authentication requires python-ldap module') return False bind = None # If bind credentials are configured, verify that we receive a valid bind if _config('binddn', man...
Authenticate against an LDAP group Behavior is highly dependent on if Active Directory is in use. AD handles group membership very differently than OpenLDAP. See the :ref:`External Authentication <acl-eauth>` documentation for a thorough discussion of available parameters for customizing the search. ...
Query LDAP, retrieve list of minion_ids from an OU or other search. For each minion_id returned from the LDAP search, copy the perms matchers into the auth dictionary :param auth_list: :param opts: __opts__ for when __opts__ is not injected :return: Modified auth list. def process_acl(auth_list, op...
Check for Netmiko arguments that were passed in as NAPALM optional arguments. Return a dictionary of these optional args that will be passed into the Netmiko ConnectHandler call. .. note:: This is a port of the NAPALM helper for backwards compatibility with older versions of NAPALM, and s...
Reconnect the NAPALM proxy when the connection is dropped by the network device. The connection can be forced to be restarted using the ``force`` argument. .. note:: This function can be used only when running proxy minions. CLI Example: .. code-block:: bash salt '*' napalm....
Execute arbitrary methods from the NAPALM library. To see the expected output, please consult the NAPALM documentation. .. note:: This feature is not recommended to be used in production. It should be used for testing only! CLI Example: .. code-block:: bash salt '*' napalm.c...
Return the compliance report. filepath The absolute path to the validation file. .. versionchanged:: 2019.2.0 Beginning with release codename ``2019.2.0``, this function has been enhanced, to be able to leverage the multi-engine template rendering of Salt, besides the poss...
.. versionadded:: 2019.2.0 Return the key-value arguments used for the authentication arguments for the netmiko module. When running in a non-native NAPALM driver (e.g., ``panos``, `f5``, ``mos`` - either from https://github.com/napalm-automation-community or defined in user's own environment, one...
.. versionadded:: 2019.2.0 Call an arbitrary function from the :mod:`Netmiko<salt.modules.netmiko_mod>` module, passing the authentication details from the existing NAPALM connection. fun The name of the function from the :mod:`Netmiko<salt.modules.netmiko_mod>` to invoke. args ...
.. versionadded:: 2019.2.0 Execute an arbitrary Netmiko method, passing the authentication details from the existing NAPALM connection. method The name of the Netmiko method to execute. args List of arguments to send to the Netmiko method specified in ``method``. kwargs K...
.. versionadded:: 2019.2.0 Execute a list of arbitrary Netmiko methods, passing the authentication details from the existing NAPALM connection. methods List of dictionaries with the following keys: - ``name``: the name of the Netmiko function to invoke. - ``args``: list of argumen...
.. versionadded:: 2019.2.0 Invoke one or more commands to be executed on the remote device, via Netmiko. Returns a list of strings, with the output from each command. commands A list of commands to be executed. expect_string Regular expression pattern to use for determining end of out...
.. versionadded:: 2019.2.0 Load a list of configuration commands on the remote device, via Netmiko. .. warning:: Please remember that ``netmiko`` does not have any rollback safeguards and any configuration change will be directly loaded into the running config if the platform doesn't ...
.. versionadded:: 2019.2.0 Execute an RPC request on the remote Junos device. cmd The RPC request to the executed. To determine the RPC request, you can check the from the command line of the device, by executing the usual command followed by ``| display xml rpc``, e.g., ``show...
.. versionadded:: 2019.2.0 Installs the given image on the device. path The image file source. This argument supports the following URIs: - Absolute path on the Minion. - ``salt://`` to fetch from the Salt fileserver. - ``http://`` and ``https://`` - ``ftp://`` ...
.. versionadded:: 2019.2.0 The complete list of Junos facts collected by ``junos-eznc``. CLI Example: .. code-block:: bash salt '*' napalm.junos_facts def junos_facts(**kwargs): ''' .. versionadded:: 2019.2.0 The complete list of Junos facts collected by ``junos-eznc``. CLI Ex...
.. versionadded:: 2019.2.0 Execute a CLI command and return the output in the specified format. command The command to execute on the Junos CLI. format: ``text`` Format in which to get the CLI output (either ``text`` or ``xml``). dev_timeout: ``30`` The NETCONF RPC timeout (i...
.. versionadded:: 2019.2.0 Copies the file on the remote Junos device. src The source file path. This argument accepts the usual Salt URIs (e.g., ``salt://``, ``http://``, ``https://``, ``s3://``, ``ftp://``, etc.). dst The destination path on the device where to copy the file. ...
.. versionadded:: 2019.2.0 Execute an arbitrary function from the :mod:`junos execution module <salt.module.junos>`. To check what ``args`` and ``kwargs`` you must send to the function, please consult the appropriate documentation. fun The name of the function. E.g., ``set_hostname``. ...
.. versionadded:: 2019.2.0 Return the key-value arguments used for the authentication arguments for the :mod:`pyeapi execution module <salt.module.arista_pyeapi>`. CLI Example: .. code-block:: bash salt '*' napalm.pyeapi_nxos_api_args def pyeapi_nxos_api_args(**prev_kwargs): ''' .. ...
.. versionadded:: 2019.2.0 Invoke an arbitrary method from the ``pyeapi`` library. This function forwards the existing connection details to the :mod:`pyeapi.run_commands <salt.module.arista_pyeapi.run_commands>` execution function. method The name of the ``pyeapi`` method to invoke. ...
.. versionadded:: 2019.2.0 Configures the Arista switch with the specified commands, via the ``pyeapi`` library. This function forwards the existing connection details to the :mod:`pyeapi.run_commands <salt.module.arista_pyeapi.run_commands>` execution function. commands The list of config...
.. versionadded:: 2019.2.0 Execute an arbitrary RPC request via the Nexus API. commands The RPC commands to be executed. method: ``cli`` The type of the response, i.e., raw text (``cli_ascii``) or structured document (``cli``). Defaults to ``cli`` (structured data). CLI Examp...
.. versionadded:: 2019.2.0 Configures the Nexus switch with the specified commands, via the NX-API. commands The list of configuration commands to load on the Nexus switch. .. note:: This argument is ignored when ``config_file`` is specified. config_file The source fi...
.. versionadded:: 2019.2.0 Execute one or more show (non-configuration) commands. commands The commands to be executed. raw_text: ``True`` Whether to return raw text or structured data. CLI Example: .. code-block:: bash salt '*' napalm.nxos_api_show 'show version' ...
.. versionadded:: 2019.2.0 This is a wrapper to execute RPC requests on various network operating systems supported by NAPALM, invoking the following functions for the NAPALM native drivers: - :py:func:`napalm.junos_rpc <salt.modules.napalm_mod.junos_rpc>` for ``junos`` - :py:func:`napalm.pyeapi_r...
r''' .. versionadded:: 2019.2.0 Return the configuration lines that match the regular expressions from the ``regex`` argument. The configuration is read from the network device interrogated. regex The regular expression to match the configuration lines against. source: ``running`` ...
r''' .. versionadded:: 2019.2.0 Return the configuration lines that match the regular expressions from the ``parent_regex`` argument, having child lines matching ``child_regex``. The configuration is read from the network device interrogated. .. note:: This function is only available only...
.. versionadded:: 2019.2.0 Return the configuration lines that match the regular expressions from the ``parent_regex`` argument, having the child lines *not* matching ``child_regex``. The configuration is read from the network device interrogated. .. note:: This function is only available ...
r''' .. versionadded:: 2019.2.0 Return a list of detailed matches, for the configuration blocks (parent-child relationship) whose parent respects the regular expressions configured via the ``parent_regex`` argument, and the child matches the ``child_regex`` regular expression. The result is a list ...
.. versionadded:: 2019.2.0 Transform Cisco IOS style configuration to structured Python dictionary. Depending on the value of the ``with_tags`` argument, this function may provide different views, valuable in different situations. source: ``running`` The configuration type to retrieve from the...
.. versionadded:: 2019.2.0 Return the merge tree of the ``initial_config`` with the ``merge_config``, as a Python dictionary. source: ``running`` The configuration type to retrieve from the network device. Default: ``running``. Available options: ``running``, ``startup``, ``candidate``. ...
.. versionadded:: 2019.2.0 Return the merge result of the configuration from ``source`` with the merge configuration, as plain text (without loading the config on the device). source: ``running`` The configuration type to retrieve from the network device. Default: ``running``. Availabl...
.. versionadded:: 2019.2.0 Return the merge diff, as text, after merging the merge config into the configuration source requested (without loading the config on the device). source: ``running`` The configuration type to retrieve from the network device. Default: ``running``. Available opti...
.. versionadded:: 2019.2.0 Return the diff, as Python dictionary, between two different sources. The sources can be either specified using the ``source1`` and ``source2`` arguments when retrieving from the managed network device. source1: ``candidate`` The source from where to retrieve the con...
.. versionadded:: 2019.2.0 Transfer files and directories from remote network device to the localhost of the Minion. .. note:: This function is only available only when the underlying library `scp <https://github.com/jbardin/scp.py>`_ is installed. See :mod:`scp module <sal...
.. versionadded:: 2019.2.0 Transfer files and directories to remote network device. .. note:: This function is only available only when the underlying library `scp <https://github.com/jbardin/scp.py>`_ is installed. See :mod:`scp module <salt.modules.scp_mod>` for more ...
Return configuration def _get_config(**kwargs): ''' Return configuration ''' config = { 'box_type': 'sealedbox', 'sk': None, 'sk_file': os.path.join(kwargs['opts'].get('pki_dir'), 'master/nacl'), 'pk': None, 'pk_file': os.path.join(kwargs['opts'].get('pki_dir'), ...
Return sk def _get_sk(**kwargs): ''' Return sk ''' config = _get_config(**kwargs) key = salt.utils.stringutils.to_str(config['sk']) sk_file = config['sk_file'] if not key and sk_file: with salt.utils.files.fopen(sk_file, 'rb') as keyf: key = salt.utils.stringutils.to_uni...
Return pk def _get_pk(**kwargs): ''' Return pk ''' config = _get_config(**kwargs) pubkey = salt.utils.stringutils.to_str(config['pk']) pk_file = config['pk_file'] if not pubkey and pk_file: with salt.utils.files.fopen(pk_file, 'rb') as keyf: pubkey = salt.utils.stringuti...
Use libnacl to generate a keypair. If no `sk_file` is defined return a keypair. If only the `sk_file` is defined `pk_file` will use the same name with a postfix `.pub`. When the `sk_file` is already existing, but `pk_file` is not. The `pk_file` will be generated using the `sk_file`. CLI Examples...
Alias to `{box_type}_encrypt` box_type: secretbox, sealedbox(default) def enc(data, **kwargs): ''' Alias to `{box_type}_encrypt` box_type: secretbox, sealedbox(default) ''' if 'keyfile' in kwargs: salt.utils.versions.warn_until( 'Neon', 'The \'keyfile\' argumen...
This is a helper function to encrypt a file and return its contents. You can provide an optional output file using `out` `name` can be a local file or when not using `salt-run` can be a url like `salt://`, `https://` etc. CLI Examples: .. code-block:: bash salt-run nacl.enc_file name=/tmp/i...
Alias to `{box_type}_decrypt` box_type: secretbox, sealedbox(default) def dec(data, **kwargs): ''' Alias to `{box_type}_decrypt` box_type: secretbox, sealedbox(default) ''' if 'keyfile' in kwargs: salt.utils.versions.warn_until( 'Neon', 'The \'keyfile\' argumen...
Encrypt data using a public key generated from `nacl.keygen`. The encryptd data can be decrypted using `nacl.sealedbox_decrypt` only with the secret key. CLI Examples: .. code-block:: bash salt-run nacl.sealedbox_encrypt datatoenc salt-call --local nacl.sealedbox_encrypt datatoenc pk_file...
Decrypt data using a secret key that was encrypted using a public key with `nacl.sealedbox_encrypt`. CLI Examples: .. code-block:: bash salt-call nacl.sealedbox_decrypt pEXHQM6cuaF7A= salt-call --local nacl.sealedbox_decrypt data='pEXHQM6cuaF7A=' sk_file=/etc/salt/pki/master/nacl salt...
Encrypt data using a secret key generated from `nacl.keygen`. The same secret key can be used to decrypt the data using `nacl.secretbox_decrypt`. CLI Examples: .. code-block:: bash salt-run nacl.secretbox_encrypt datatoenc salt-call --local nacl.secretbox_encrypt datatoenc sk_file=/etc/sa...
Decrypt data that was encrypted using `nacl.secretbox_encrypt` using the secret key that was generated from `nacl.keygen`. CLI Examples: .. code-block:: bash salt-call nacl.secretbox_decrypt pEXHQM6cuaF7A= salt-call --local nacl.secretbox_decrypt data='pEXHQM6cuaF7A=' sk_file=/etc/salt/pk...
Ensure the grafana dashboard exists and is managed. name Name of the grafana dashboard. base_dashboards_from_pillar A pillar key that contains a list of dashboards to inherit from base_panels_from_pillar A pillar key that contains a list of panels to inherit from base_rows_fr...
Ensure the named grafana dashboard is absent. name Name of the grafana dashboard. profile A pillar key or dict that contains grafana information def absent(name, profile='grafana'): ''' Ensure the named grafana dashboard is absent. name Name of the grafana dashboard. ...
Return a copy without fields that can differ. def _cleaned(_dashboard): '''Return a copy without fields that can differ.''' dashboard = copy.deepcopy(_dashboard) for ignored_dashboard_field in _IGNORED_DASHBOARD_FIELDS: dashboard.pop(ignored_dashboard_field, None) for row in dashboard.get('row...
Return a dashboard with properties from parents. def _inherited_dashboard(dashboard, base_dashboards_from_pillar, ret): '''Return a dashboard with properties from parents.''' base_dashboards = [] for base_dashboard_from_pillar in base_dashboards_from_pillar: base_dashboard = __salt__['pillar.get'](...
Return a row with properties from parents. def _inherited_row(row, base_rows_from_pillar, ret): '''Return a row with properties from parents.''' base_rows = [] for base_row_from_pillar in base_rows_from_pillar: base_row = __salt__['pillar.get'](base_row_from_pillar) if base_row: ...
Return a panel with properties from parents. def _inherited_panel(panel, base_panels_from_pillar, ret): '''Return a panel with properties from parents.''' base_panels = [] for base_panel_from_pillar in base_panels_from_pillar: base_panel = __salt__['pillar.get'](base_panel_from_pillar) if b...