Пример #1
0
 def __environment_variables(self, secure, encrypted=False):
     guarded_element = PossiblyMissingElement(self.element)
     variable_elements = guarded_element.possibly_missing_child("environmentvariables").findall("variable")
     result = {}
     for variable_element in variable_elements:
         if secure == self.__is_secure(variable_element):
             is_encrypted = self.__is_encrypted(variable_element)
             value_element_name = self.__value_element_name(is_encrypted)
             if encrypted == is_encrypted:
                 result[variable_element.attrib['name']] = variable_element.find(value_element_name).text
     return result
Пример #2
0
 def __environment_variables(self, secure, encrypted=False):
     guarded_element = PossiblyMissingElement(self.element)
     variable_elements = guarded_element.possibly_missing_child("environmentvariables").findall("variable")
     result = {}
     for variable_element in variable_elements:
         if secure == self.__is_secure(variable_element):
             is_encrypted = self.__is_encrypted(variable_element)
             value_element_name = self.__value_element_name(is_encrypted)
             if encrypted == is_encrypted:
                 result[variable_element.attrib['name']] = variable_element.find(value_element_name).text
     return result
Пример #3
0
 def resources(self):
     guarded_element = PossiblyMissingElement(self.element)
     return set([e.text for e in guarded_element.possibly_missing_child('resources').findall('resource')])
Пример #4
0
 def resources(self):
     guarded_element = PossiblyMissingElement(self.element)
     return set([e.text for e in guarded_element.possibly_missing_child('resources').findall('resource')])
Пример #5
0
 def users(self):
     guarded_element = PossiblyMissingElement(self.element)
     if guarded_element.possibly_missing_child('approval').has_attribute('type', 'manual'):
         return set([e.text for e in guarded_element.possibly_missing_child('approval').possibly_missing_child('authorization').findall('user')])
     else:
         return None