components/policy/tools/template_writers/writers/doc_writer.py
def _AddDescription(self, parent, policy):
    '''Adds a string containing the description of the policy. URLs are
    replaced with links and the possible choices are enumerated in case
    of 'string-enum' and 'int-enum' type policies.

    Args:
      parent: The DOM node for which the feature list will be added.
      policy: The data structure of a policy.
    '''
    # Add description by paragraphs (URLs will be substituted by links).
    self._AddParagraphs(parent, policy['desc'])
    # Add list of enum items.
    if policy['type'] in ('string-enum', 'int-enum', 'string-enum-list'):
      ul = self.AddElement(parent, 'ul')
      for item in policy['items']:
        if policy['type'] == 'int-enum':
          value_string = str(item['value'])
        else:
          value_string = '"%s"' % item['value']
        self.AddElement(ul, 'li', {},
                        '%s = %s' % (value_string, item['caption']))
Adds a string containing the description of the policy. URLs are
    replaced with links and the possible choices are enumerated in case
    of 'string-enum' and 'int-enum' type policies.

    Args:
      parent: The DOM node for which the feature list will be added.
      policy: The data structure of a policy.
    
Adds a string containing the description of the policy. URLs are
replaced with links and the possible choices are enumerated in case
of 'string-enum' and 'int-enum' type policies.
Adds a string containing the description of the policy . URLs are replaced with links and the possible choices are enumerated in case of ' string - enum ' and ' int - enum ' type policies .
def _AddDescription(self, parent, policy):
    self._AddParagraphs(parent, policy['desc'])
    if policy['type'] in ('string-enum', 'int-enum', 'string-enum-list'):
      ul = self.AddElement(parent, 'ul')
      for item in policy['items']:
        if policy['type'] == 'int-enum':
          value_string = str(item['value'])
        else:
          value_string = '"%s"' % item['value']
        self.AddElement(ul, 'li', {},
                        '%s = %s' % (value_string, item['caption']))
def _AddDescription ( self , parent , policy ) : self . _AddParagraphs ( parent , policy [ 'desc' ] ) if policy [ 'type' ] in ( 'string-enum' , 'int-enum' , 'string-enum-list' ) : ul = self . AddElement ( parent , 'ul' ) for item in policy [ 'items' ] : if policy [ 'type' ] == 'int-enum' : value_string = str ( item [ 'value' ] ) else : value_string = '"%s"' % item [ 'value' ] self . AddElement ( ul , 'li' , { } , '%s = %s' % ( value_string , item [ 'caption' ] ) )
Adds a string containing the description of the policy.
Adds a string containing the description of the policy .
'''Adds a string containing the description of the policy. URLs are
    replaced with links and the possible choices are enumerated in case
    of 'string-enum' and 'int-enum' type policies.

    Args:
      parent: The DOM node for which the feature list will be added.
      policy: The data structure of a policy.
    ''' # Add description by paragraphs (URLs will be substituted by links). # Add list of enum items.
self
parent
The DOM node for which the feature list will be added.
The DOM node for which the feature list will be added .
policy
The data structure of a policy.
The data structure of a policy .