components/policy/tools/template_writers/writers/doc_atomic_groups_writer.py
def WriteTemplate(self, template):
    '''Writes the given template definition.

    Args:
      template: Template definition to write.

    Returns:
      Generated output for the passed template definition.
    '''
    self.messages = template['messages']
    self.Init()

    policies = self.PreprocessPolicies(
        template['policy_atomic_group_definitions'])

    self.BeginTemplate()
    for policy in policies:
      if policy['type'] != 'atomic_group':
        continue
      self.BeginPolicyGroup(policy)
      for child_policy in policy['policies']:
        # Nesting of groups is currently not supported.
        self.WritePolicy(child_policy)
      self.EndPolicyGroup()
    self.EndTemplate()

    return self.GetTemplateText()
Writes the given template definition.

    Args:
      template: Template definition to write.

    Returns:
      Generated output for the passed template definition.
    
Writes the given template definition.
Writes the given template definition .
def WriteTemplate(self, template):
    self.messages = template['messages']
    self.Init()
    policies = self.PreprocessPolicies(
        template['policy_atomic_group_definitions'])
    self.BeginTemplate()
    for policy in policies:
      if policy['type'] != 'atomic_group':
        continue
      self.BeginPolicyGroup(policy)
      for child_policy in policy['policies']:
        self.WritePolicy(child_policy)
      self.EndPolicyGroup()
    self.EndTemplate()
    return self.GetTemplateText()
def WriteTemplate ( self , template ) : self . messages = template [ 'messages' ] self . Init ( ) policies = self . PreprocessPolicies ( template [ 'policy_atomic_group_definitions' ] ) self . BeginTemplate ( ) for policy in policies : if policy [ 'type' ] != 'atomic_group' : continue self . BeginPolicyGroup ( policy ) for child_policy in policy [ 'policies' ] : self . WritePolicy ( child_policy ) self . EndPolicyGroup ( ) self . EndTemplate ( ) return self . GetTemplateText ( )
Writes the given template definition.
Writes the given template definition .
'''Writes the given template definition.

    Args:
      template: Template definition to write.

    Returns:
      Generated output for the passed template definition.
    ''' # Nesting of groups is currently not supported.
Generated output for the passed template definition.
Generated output for the passed template definition .
self
template
Template definition to write.
Template definition to write .