Ejemplo n.º 1
0
 def _to_irule(self, element):
     compatible = []
     matches = element.findall(
         fixxpath('virtualListenerCompatibility', TYPES_URN))
     for match_element in matches:
         compatible.append(
             DimensionDataVirtualListenerCompatibility(
                 type=match_element.get('type'),
                 protocol=match_element.get('protocol', None)))
     irule_element = element.find(fixxpath('irule', TYPES_URN))
     return DimensionDataDefaultiRule(id=irule_element.get('id'),
                                      name=irule_element.get('name'),
                                      compatible_listeners=compatible)
Ejemplo n.º 2
0
    def _to_persistence_profile(self, element):
        compatible = []
        matches = element.findall(
            fixxpath('virtualListenerCompatibility', TYPES_URN))
        for match_element in matches:
            compatible.append(
                DimensionDataVirtualListenerCompatibility(
                    type=match_element.get('type'),
                    protocol=match_element.get('protocol', None)))

        return DimensionDataPersistenceProfile(
            id=element.get('id'),
            fallback_compatible=bool(
                element.get('fallbackCompatible') == "true"),
            name=findtext(element, 'name', TYPES_URN),
            compatible_listeners=compatible)
Ejemplo n.º 3
0
 def _to_irule(self, element):
     compatible = []
     matches = element.findall(
         fixxpath("virtualListenerCompatibility", TYPES_URN))
     for match_element in matches:
         compatible.append(
             DimensionDataVirtualListenerCompatibility(
                 type=match_element.get("type"),
                 protocol=match_element.get("protocol", None),
             ))
     irule_element = element.find(fixxpath("irule", TYPES_URN))
     return DimensionDataDefaultiRule(
         id=irule_element.get("id"),
         name=irule_element.get("name"),
         compatible_listeners=compatible,
     )
Ejemplo n.º 4
0
    def _to_persistence_profile(self, element):
        compatible = []
        matches = element.findall(
            fixxpath("virtualListenerCompatibility", TYPES_URN))
        for match_element in matches:
            compatible.append(
                DimensionDataVirtualListenerCompatibility(
                    type=match_element.get("type"),
                    protocol=match_element.get("protocol", None),
                ))

        return DimensionDataPersistenceProfile(
            id=element.get("id"),
            fallback_compatible=bool(
                element.get("fallbackCompatible") == "true"),
            name=findtext(element, "name", TYPES_URN),
            compatible_listeners=compatible,
        )