コード例 #1
0
ファイル: nitosv1.py プロジェクト: aquila/sfa
 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])
コード例 #2
0
ファイル: nitosv1.py プロジェクト: gnogueras/sfa
 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])
コード例 #3
0
ファイル: nitosv1.py プロジェクト: aquila/sfa
 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
コード例 #4
0
ファイル: nitosv1.py プロジェクト: gnogueras/sfa
 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