コード例 #1
0
ファイル: nx_switch_impl.py プロジェクト: hrsht/pox
 def _receive_vendor(self, vendor, connection):
   self.log.debug("Vendor %s %s" % (self.name, str(vendor)))
   if(vendor.vendor == nx.VENDOR_ID):
     try:
       data = nx.unpack_vendor_data_nx(vendor.data)
       if isinstance(data, nx.role_request_data):
         self.set_role(connection, data.role)
         reply = of.ofp_vendor(vendor = nx.VENDOR_ID, data = nx.role_reply_data(role = data.role))
         self.send(reply)
         return
     except NotImplemented:
       self.send_error(connection)
   else:
     return SwitchImpl._receive_vendor(self, vendor)
コード例 #2
0
ファイル: nx_switch_impl.py プロジェクト: 09beeihaq/pox
 def _receive_vendor(self, vendor, connection):
   self.log.debug("Vendor %s %s" % (self.name, str(vendor)))
   if(vendor.vendor == nx.VENDOR_ID):
     try:
       data = nx.unpack_vendor_data_nx(vendor.data)
       if isinstance(data, nx.role_request_data):
         self.set_role(connection, data.role)
         reply = of.ofp_vendor(vendor = nx.VENDOR_ID, data = nx.role_reply_data(role = data.role))
         self.send(reply)
         return
     except NotImplemented:
       self.send_error(connection)
   else:
     return SwitchImpl._receive_vendor(self, vendor)
コード例 #3
0
 def _rx_vendor (self, vendor, connection):
   self.log.debug("Vendor %s %s", self.name, str(vendor))
   if vendor.vendor == nx.VENDOR_ID:
     try:
       data = nx.unpack_vendor_data_nx(vendor.data)
       if isinstance(data, nx.role_request_data):
         self.set_role(connection, data.role)
         reply = of.ofp_vendor(xid=vendor.xid, vendor = nx.VENDOR_ID,
                               data = nx.role_reply_data(role = data.role))
         self.send(reply)
         return
     except NotImplementedError:
       self.send_vendor_error(connection)
   else:
     return SoftwareSwitch._rx_vendor(self, vendor)
コード例 #4
0
ファイル: nx_switch.py プロジェクト: 14gr1010/software
 def _rx_vendor (self, vendor, connection):
   self.log.debug("Vendor %s %s", self.name, str(vendor))
   if vendor.vendor == nx.VENDOR_ID:
     try:
       data = nx.unpack_vendor_data_nx(vendor.data)
       if isinstance(data, nx.role_request_data):
         self.set_role(connection, data.role)
         reply = of.ofp_vendor(xid=vendor.xid, vendor = nx.VENDOR_ID,
                               data = nx.role_reply_data(role = data.role))
         self.send(reply)
         return
     except NotImplementedError:
       self.send_vendor_error(connection)
   else:
     return SoftwareSwitch._rx_vendor(self, vendor)