コード例 #1
0
    def runTest(self):
        logging = get_logger()
        logging.info("Running Grp90No160 DescStatsGet test")

        logging.info("Sending stats request")
        request = message.desc_stats_request()
        response, pkt = self.controller.transact(request)
        self.assertTrue(response is not None,
                        "Did not get reply for desc stats")

        mfr_desc = ""
        hw_desc = ""
        sw_dec = ""
        serial_num = ""
        dp_decription = ""

        for stats in response.stats:

            mfr_desc += stats.mfr_desc
            hw_desc += stats.hw_desc
            sw_dec += stats.sw_desc
            serial_num += stats.serial_num
            dp_decription += stats.dp_desc

        logging.info("Manufacture Description :" + mfr_desc)
        logging.info("Hardware description : " + hw_desc)
        logging.info("Software Description :" + sw_dec)
        logging.info("Serial number :" + serial_num)
        logging.info("Human readable description of datapath :" +
                     dp_decription)
コード例 #2
0
ファイル: message_types.py プロジェクト: bestsharp/oftest
    def runTest(self):
        logging.info("Running DescStatsGet test")
        
        logging.info("Sending stats request")
        request = message.desc_stats_request()
        response, pkt = self.controller.transact(request)
        self.assertTrue(response is not None,
                        "Did not get reply for desc stats")
        
        mfr_desc = ""
        hw_desc = ""
        sw_dec = ""
        serial_num = ""
        dp_decription = ""

        for stats in response.stats:

            mfr_desc += stats.mfr_desc
            hw_desc += stats.hw_desc
            sw_dec += stats.sw_desc
            serial_num += stats.serial_num
            dp_decription += stats.dp_desc

        logging.info("Manufacture Description :" + mfr_desc)
        logging.info("Hardware description : " + hw_desc)
        logging.info("Software Description :" + sw_dec)
        logging.info("Serial number :" + serial_num)
        logging.info("Human readable description of datapath :" + dp_decription)
コード例 #3
0
ファイル: stats.py プロジェクト: HuaweiSwitch/OpenFlow
 def runTest(self):
     request = message.desc_stats_request()
     xid = int(random.random() * 1000)
     request.header.xid = xid
     response, _ = self.controller.transact(request)
     self.assertTrue(response, "Got no desc_stats reply!")
     self.assertEqual(response.header.type, ofp.OFPT_MULTIPART_REPLY, "response is not echo_reply")
     self.assertEqual(request.header.xid, response.header.xid, "response xid != request xid")
コード例 #4
0
ファイル: basic.py プロジェクト: crotsos/oftest
 def runTest(self):
     basic_logger.info("Running DescStatsGet")
     
     basic_logger.info("Sending stats request")
     request = message.desc_stats_request()
     response, pkt = self.controller.transact(request)
     self.assertTrue(response is not None, "Did not get response")
     basic_logger.debug(response.show())
コード例 #5
0
ファイル: basic.py プロジェクト: sun363587351/oftest
    def runTest(self):
        logging.info("Running DescStatsGet")

        logging.info("Sending stats request")
        request = message.desc_stats_request()
        response, pkt = self.controller.transact(request)
        self.assertTrue(response is not None,
                        "Did not get reply for desc stats")
        logging.debug(response.show())
コード例 #6
0
ファイル: stats.py プロジェクト: sun363587351/OpenFlow-1
 def runTest(self):
     request = message.desc_stats_request()
     xid = int(random.random() * 1000)
     request.header.xid = xid
     response, _ = self.controller.transact(request)
     self.assertTrue(response, "Got no desc_stats reply!")
     self.assertEqual(response.header.type, ofp.OFPT_MULTIPART_REPLY,
                      'response is not echo_reply')
     self.assertEqual(request.header.xid, response.header.xid,
                      'response xid != request xid')
コード例 #7
0
ファイル: sdn.py プロジェクト: HuaweiSwitch/OpenFlow
 def runTest(self):
     request = message.desc_stats_request();
     response,_ = self.controller.transact(request)
     #print(response.show())
     self.logger.info(response.show())
コード例 #8
0
 def runTest(self):
     request = message.desc_stats_request()
     response, _ = self.controller.transact(request)
     #print(response.show())
     self.logger.info(response.show())