Esempio n. 1
0
 def get_default_sliver_attributes(self, network=None):
     if network:
         defaults = self.xml.xpath("//network[@name='%s']/sliver_defaults" % network)
     else:
         defaults = self.xml.xpath("//sliver_defaults")
     if not defaults: return []
     return NITOSv1Sliver.get_sliver_attributes(defaults[0])
Esempio n. 2
0
 def get_default_sliver_attributes(self, network=None):
     if network:
         defaults = self.xml.xpath("//network[@name='%s']/sliver_defaults" %
                                   network)
     else:
         defaults = self.xml.xpath("//sliver_defaults")
     if not defaults: return []
     return NITOSv1Sliver.get_sliver_attributes(defaults[0])
Esempio n. 3
0
 def get_sliver_attributes(self, component_id, network=None):
     nodes = self.get_nodes({'component_id': '*%s*' % component_id})
     attribs = []
     if nodes is not None and isinstance(nodes, list) and len(nodes) > 0:
         node = nodes[0]
         slivers = NITOSv1Sliver.get_slivers(node.element)
         if slivers is not None and isinstance(slivers, list) and len(slivers) > 0:
             sliver = slivers[0]
             attribs = NITOSv1Sliver.get_sliver_attributes(sliver.element)
     return attribs
Esempio n. 4
0
 def get_sliver_attributes(self, component_id, network=None):
     nodes = self.get_nodes({'component_id': '*%s*' % component_id})
     attribs = []
     if nodes is not None and isinstance(nodes, list) and len(nodes) > 0:
         node = nodes[0]
         slivers = NITOSv1Sliver.get_slivers(node.element)
         if slivers is not None and isinstance(slivers,
                                               list) and len(slivers) > 0:
             sliver = slivers[0]
             attribs = NITOSv1Sliver.get_sliver_attributes(sliver.element)
     return attribs