コード例 #1
0
ファイル: request_parser.py プロジェクト: dana-i2cat/felix
 def __datapath(self, element):
     d = Datapath(element.attrib.get("component_id"),
                  element.attrib.get("component_manager_id"),
                  element.attrib.get("dpid"))
     for p in element.iterfind("{%s}port" % (self.__of)):
         d.add_port(p.attrib.get("num"), p.attrib.get("name"))
     return d.serialize()
コード例 #2
0
ファイル: request_parser.py プロジェクト: dana-i2cat/felix
 def __datapath(self, element):
     d = Datapath(element.attrib.get("component_id"),
                  element.attrib.get("component_manager_id"),
                  element.attrib.get("dpid"))
     for p in element.iterfind("{%s}port" % (self.__of)):
         d.add_port(p.attrib.get("num"), p.attrib.get("name"))
     return d.serialize()
コード例 #3
0
    def datapaths(self):
        ofdps_ = []
        for ofd in self.rspec.iterchildren("{%s}datapath" % (self.__of)):
            of_ = Datapath(ofd.attrib.get("component_id"),
                           ofd.attrib.get("component_manager_id"),
                           ofd.attrib.get("dpid"))

            [of_.add_port(p.attrib.get("num"), p.attrib.get("name"))
             for p in ofd.findall(".//{%s}port" % (self.__of))]

            ofdps_.append(of_.serialize())
        return ofdps_
コード例 #4
0
    def datapaths(self):
        ofdps_ = []
        for ofd in self.rspec.iterchildren("{%s}datapath" % (self.__of)):
            of_ = Datapath(ofd.attrib.get("component_id"),
                           ofd.attrib.get("component_manager_id"),
                           ofd.attrib.get("dpid"))

            [
                of_.add_port(p.attrib.get("num"), p.attrib.get("name"))
                for p in ofd.findall(".//{%s}port" % (self.__of))
            ]

            ofdps_.append(of_.serialize())
        return ofdps_