components/policy/tools/template_writers/writers/admx_writer.py
def _AddEnumPolicy(self, parent, policy):
    '''Generates ADMX elements for an Enum-Policy and adds them to the
    passed parent element.
    '''
    name = policy['name']
    items = policy['items']
    attributes = {
        'id': name,
        'valueName': name,
    }
    enum_elem = self.AddElement(parent, 'enum', attributes)
    for item in items:
      attributes = {'displayName': self._AdmlString(name + "_" + item['name'])}
      item_elem = self.AddElement(enum_elem, 'item', attributes)
      value_elem = self.AddElement(item_elem, 'value')
      value_string = str(item['value'])
      if policy['type'] == 'int-enum':
        self.AddElement(value_elem, 'decimal', {'value': value_string})
      else:
        self.AddElement(value_elem, 'string', {}, value_string)
Generates ADMX elements for an Enum-Policy and adds them to the
    passed parent element.
    
Generates ADMX elements for an Enum-Policy and adds them to the
passed parent element.
Generates ADMX elements for an Enum - Policy and adds them to the passed parent element .
def _AddEnumPolicy(self, parent, policy):
    name = policy['name']
    items = policy['items']
    attributes = {
        'id': name,
        'valueName': name,
    }
    enum_elem = self.AddElement(parent, 'enum', attributes)
    for item in items:
      attributes = {'displayName': self._AdmlString(name + "_" + item['name'])}
      item_elem = self.AddElement(enum_elem, 'item', attributes)
      value_elem = self.AddElement(item_elem, 'value')
      value_string = str(item['value'])
      if policy['type'] == 'int-enum':
        self.AddElement(value_elem, 'decimal', {'value': value_string})
      else:
        self.AddElement(value_elem, 'string', {}, value_string)
def _AddEnumPolicy ( self , parent , policy ) : name = policy [ 'name' ] items = policy [ 'items' ] attributes = { 'id' : name , 'valueName' : name , } enum_elem = self . AddElement ( parent , 'enum' , attributes ) for item in items : attributes = { 'displayName' : self . _AdmlString ( name + "_" + item [ 'name' ] ) } item_elem = self . AddElement ( enum_elem , 'item' , attributes ) value_elem = self . AddElement ( item_elem , 'value' ) value_string = str ( item [ 'value' ] ) if policy [ 'type' ] == 'int-enum' : self . AddElement ( value_elem , 'decimal' , { 'value' : value_string } ) else : self . AddElement ( value_elem , 'string' , { } , value_string )
Generates ADMX elements for an Enum-Policy and adds them to the
passed parent element.
Generates ADMX elements for an Enum - Policy and adds them to the passed parent element .
'''Generates ADMX elements for an Enum-Policy and adds them to the
    passed parent element.
    '''
self
parent
policy