components/policy/tools/template_writers/policy_template_generator.py
def _ExpandAtomicGroups(self, policy_list, policy_atomic_groups):
    '''Replaces policies names inside atomic group definitions for actual
    policies definitions.

    Args:
      policy_list: A list of policies and groups.

    Returns:
      Modified policy_list
    '''
    policies = [
        policy for policy in policy_list if not IsGroupOrAtomicGroup(policy)
    ]
    for group in policy_atomic_groups:
      group['type'] = 'atomic_group'
    expanded = self._ExpandGroups(policies + policy_atomic_groups)
    expanded = [policy for policy in expanded if IsGroupOrAtomicGroup(policy)]
    return copy.deepcopy(expanded)
Replaces policies names inside atomic group definitions for actual
    policies definitions.

    Args:
      policy_list: A list of policies and groups.

    Returns:
      Modified policy_list
    
Replaces policies names inside atomic group definitions for actual
policies definitions.
Replaces policies names inside atomic group definitions for actual policies definitions .
def _ExpandAtomicGroups(self, policy_list, policy_atomic_groups):
    policies = [
        policy for policy in policy_list if not IsGroupOrAtomicGroup(policy)
    ]
    for group in policy_atomic_groups:
      group['type'] = 'atomic_group'
    expanded = self._ExpandGroups(policies + policy_atomic_groups)
    expanded = [policy for policy in expanded if IsGroupOrAtomicGroup(policy)]
    return copy.deepcopy(expanded)
def _ExpandAtomicGroups ( self , policy_list , policy_atomic_groups ) : policies = [ policy for policy in policy_list if not IsGroupOrAtomicGroup ( policy ) ] for group in policy_atomic_groups : group [ 'type' ] = 'atomic_group' expanded = self . _ExpandGroups ( policies + policy_atomic_groups ) expanded = [ policy for policy in expanded if IsGroupOrAtomicGroup ( policy ) ] return copy . deepcopy ( expanded )
Replaces policies names inside atomic group definitions for actual
policies definitions.
Replaces policies names inside atomic group definitions for actual policies definitions .
'''Replaces policies names inside atomic group definitions for actual
    policies definitions.

    Args:
      policy_list: A list of policies and groups.

    Returns:
      Modified policy_list
    '''
None
self
policy_list
A list of policies and groups.
A list of policies and groups .
policy_atomic_groups