Reads the acls of all the parameters.

        Returns
        -------
        dict
            A dictionary of the ACLs, keyed by the parameter name.
772186
def read_acls(self):
        
        group = self[self.sampler_group]['acls']
        return {param: group[param].value for param in group.keys()}
882429
def permission_to_pyramid_acls(permissions):
    
    acls = []
    for perm in permissions:
        if perm.type == "user":
            acls.append((Allow, perm.user.id, perm.perm_name))
        elif perm.type == "group":
            acls.append((Allow, "group:%s" % perm.group.id, perm.perm_name))
    return acls
154605
def __get_acl(self, load):
        '''
        
        '''
        if 'eauth' not in load:
            return None
        mod = self.opts['eauth_acl_module']
        if not mod:
            mod = load['eauth']
        fstr = '{0}.acl'.format(mod)
        if fstr not in self.auth:
            return None
        fcall = salt.utils.args.format_call(
            self.auth[fstr],
            load,
            expected_extra_kws=AUTH_INTERNAL_KEYWORDS)
        try:
            return self.auth[fstr](*fcall['args'], **fcall['kwargs'])
        except Exception as e:
            log.debug('Authentication module threw %s', e)
            return None
784584
def set_collections_acl(self):
        
        acl = [(Allow, 'g:admin', ALL_PERMISSIONS)]
        collections = self.get_collections()
        resources = self.get_resources(collections)
        aces = self._get_least_permissions_aces(resources)
        if aces is not None:
            for ace in aces:
                acl.append(ace)
        acl.append(DENY_ALL)
        self.__acl__ = tuple(acl)
62092
def read_parameters(self):
        
        param_fname = join(self.out_dir, "PARAMETERS.OUT")

        if not exists(param_fname):
            raise FileNotFoundError("No PARAMETERS.OUT found")

        with open(param_fname) as nml_file:
            parameters = dict(f90nml.read(nml_file))
            for group in ["nml_years", "nml_allcfgs", "nml_outputcfgs"]:
                parameters[group] = dict(parameters[group])
                for k, v in parameters[group].items():
                    parameters[group][k] = _clean_value(v)
                parameters[group.replace("nml_", "")] = parameters.pop(group)
            self.config = parameters
        return parameters
25083
def all(self):
        """"""
        return self._instance._client.acls.all(self._instance.name)
708825
def get_params(self):
        
        param_names = ['aws_access_key_id', 'aws_secret_access_key',
                       'is_secure', 'port', 'proxy', 'proxy_port',
                       'proxy_user', 'proxy_pass',
                       'debug', 'https_connection_factory']
        params = {}
        for name in param_names:
            params[name] = getattr(self, name)
        return params
779775
def _get_dynamic_acl_info(self, switch_ip):
        """"""
        cmds = ["enable",
                "show ip access-lists dynamic",
                "show ip access-lists summary dynamic"]
        switch = self._switches.get(switch_ip)

        _, acls, bindings = self._run_eos_cmds(cmds, switch)

        parsed_acls = self._parse_acl_config(acls)
        parsed_bindings = self._parse_binding_config(bindings)

        return parsed_acls, parsed_bindings
1334176
public synchronized Long convertAcls(List<ACL> acls) {
        if (acls == null)
            return -1L;
        // get the value from the map
        Long ret = aclKeyMap.get(acls);
        // could not find the map
        if (ret != null)
            return ret;
        long val = incrementIndex();
        longKeyMap.put(val, acls);
        aclKeyMap.put(acls, val);
        return val;
    }
232263
def get_parameters(self):
        """"""
        parameter_names = self.PARAMETERS.keys()
        # TODO: Unresolved reference for processor
        parameter_values = [getattr(processor, n) for n in parameter_names]
        return dict(zip(parameter_names, parameter_values))
816287
def get_params(self, param_list=None, get_path=False, merged=False, raw=False):
        
        # Convert parameter name to list
        if param_list and isinstance(param_list, str):
            param_list = [param_list]
        if param_list and isinstance(param_list, (list, tuple)):
            result = {k: v for k, v in self._params_found.items() if k in param_list}
            result.update({k: v for k, v in self._params.items() if (k in param_list and k not in result)})
        else:
            result = {k: v for k, v in self._params_found.items()}
            result.update({k: v for k, v in self._params.items() if k not in result})
        if get_path:
            result['path'] = self.unpacked_path
        if merged:
            result.update(self._parser.merge_valued(result))
        if raw:
            result.update({k: v for k, v in self._params_found_raw.items()})
        return result
1313780
def to_params(self):
        
        dic = self.__dict__
        return [(k, repr(dic[k])) for k in sorted(dic)
                if not k.startswith('_')]
839957
def parse_acl(acl_iter):
    """"""

    if isinstance(acl_iter, basestring):
        acl_iter = [acl_iter]

    for chunk in acl_iter:

        if isinstance(chunk, basestring):
            chunk = chunk.splitlines()
            chunk = [re.sub(r'#.+', '', line).strip() for line in chunk]
            chunk = filter(None, chunk)
        else:
            chunk = [chunk]

        for ace in chunk:

            # If this was provided as a string, then parse the permission set.
            # Otherwise, use it as-is, which will result in an equality test.
            if isinstance(ace, basestring):
                ace = ace.split(None, 2)
                state, predicate, permission_set = ace
                yield parse_state(state), parse_predicate(predicate), parse_permission_set(permission_set)
            else:
                state, predicate, permission_set = ace
                yield parse_state(state), parse_predicate(predicate), permission_set
645136
def all(self):
        
        return {
            self._decode(k): self._loads(v)
            for k, v in self._client.hgetall(self.key_prefix).items()
        }
69008
def validate_permissions(perms):
    
    if not isinstance(perms, (list, tuple)):
        perms = [perms]
    valid_perms = set(PERMISSIONS.values())
    if ALL_PERMISSIONS in perms:
        return perms
    if set(perms) - valid_perms:
        raise ValueError(
            'Invalid ACL permission names. Valid permissions '
            'are: {}'.format(', '.join(valid_perms)))
    return perms
317654
def to_dict(self):
        
        return dict((parameter.name, parameter.value) for parameter in self.values())
338072
def get_run_params(self) -> Dict:
        """"""
        params = {}
        if self.celery_queue:
            params['queue'] = self.celery_queue

        if self.timeout:
            params['soft_time_limit'] = self.timeout
            # We set also a hard time limit that will send sig 9
            # This hard time limit should not happened, as it will set inconsistent state
            params['time_limit'] = self.timeout + settings.CELERY_HARD_TIME_LIMIT_DELAY

        if self.execute_at:
            params['eta'] = self.execute_at

        return params