コード例 #1
0
ファイル: malformed.py プロジェクト: snrism/florence-test
    def runTest(self):
        logging.info("Running " + str(self))
        request = malformed_message.malformed_message(version=0, type=0)

        reply, pkt = self.controller.transact(request)
        self.assertTrue(reply is not None, "No response to unsupported hello")
        self.assertTrue(reply.type == ofp.OFPT_ERROR,
                        "reply not an error message")
        self.assertTrue(reply.err_type == ofp.OFPET_BAD_REQUEST,
                        "reply error type is not bad request")
        self.assertTrue(reply.code == ofp.OFPET_HELLO_FAILED,
                        "reply error code is not bad type")
コード例 #2
0
ファイル: malformed.py プロジェクト: rubiruchi/florence-test
    def runTest(self):
        logging.info("Running " + str(self))
        request = malformed_message.malformed_message(version=0, type=0)

        reply, pkt = self.controller.transact(request)
        self.assertTrue(reply is not None, "No response to unsupported hello")
        self.assertTrue(reply.type == ofp.OFPT_ERROR,
                        "reply not an error message")
        self.assertTrue(reply.err_type == ofp.OFPET_BAD_REQUEST,
                        "reply error type is not bad request")
        self.assertTrue(reply.code == ofp.OFPET_HELLO_FAILED,
                        "reply error code is not bad type")
コード例 #3
0
ファイル: malformed.py プロジェクト: snrism/florence-test
    def runTest(self):
        logging.info("Running " + str(self))
        request = malformed_message.malformed_message(version=5, type=10)

        reply, pkt = self.controller.transact(request)
        self.assertTrue(reply is not None,
                        "No response to malformed message version")
        self.assertTrue(reply.type == ofp.OFPT_ERROR,
                        "reply not an error message")
        self.assertTrue(reply.err_type == ofp.OFPET_BAD_REQUEST,
                        "reply error type is not bad request")
        self.assertTrue(reply.code == ofp.OFPBRC_BAD_VERSION,
                        "reply error code is not bad type")
コード例 #4
0
ファイル: malformed.py プロジェクト: rubiruchi/florence-test
    def runTest(self):
        logging.info("Running " + str(self))
        request = malformed_message.malformed_message(version=5, type=10)

        reply, pkt = self.controller.transact(request)
        self.assertTrue(reply is not None,
                        "No response to malformed message version")
        self.assertTrue(reply.type == ofp.OFPT_ERROR,
                        "reply not an error message")
        self.assertTrue(reply.err_type == ofp.OFPET_BAD_REQUEST,
                        "reply error type is not bad request")
        self.assertTrue(reply.code == ofp.OFPBRC_BAD_VERSION,
                        "reply error code is not bad type")
コード例 #5
0
ファイル: switch.py プロジェクト: sdshayward/florence-dev
    def runTest(self):
        INFO = " 1.1.80 - Malformed Version Number"
        request = malformed_message.malformed_message(version=0, type=0)

        reply, pkt = self.controller.transact(request)
        try:
            self.assertTrue(reply is not None,
                            "No response to malformed version number")
            self.assertTrue(reply.type == ofp.OFPT_ERROR,
                            "Reply not an error message")
            self.assertTrue(reply.err_type == ofp.OFPET_BAD_REQUEST,
                            "Reply error type is not bad request")
            self.assertTrue(reply.code == ofp.OFPET_HELLO_FAILED,
                           "Reply error code is not hello failed")
            log.info(PASS + INFO)
        except AssertionError, Err:
            log.info(FAIL + INFO)
            log.info(REASON + " -> "+ str(Err))
コード例 #6
0
ファイル: switch.py プロジェクト: sdshayward/florence-dev
    def runTest(self):
        INFO = " 1.1.70 - Unsupported Version Number"
        request = malformed_message.malformed_message(version=5, type=10)

        try:
            reply, pkt = self.controller.transact(request)
            self.assertTrue(reply is not None,
                            "No response to unsupported version number")
            self.assertTrue(reply.type == ofp.OFPT_ERROR,
                            "Reply not an error message")
            self.assertTrue(reply.err_type == ofp.OFPET_BAD_REQUEST,
                            "Reply error type is not bad request")
            self.assertTrue(reply.code == ofp.OFPBRC_BAD_VERSION,
                           "Reply error code is not bad version")
            log.info(PASS + INFO)
        except AssertionError, Err:
            log.info(FAIL + INFO)
            log.info(REASON + " -> "+ str(Err))
コード例 #7
0
ファイル: switch.py プロジェクト: sdshayward/florence-dev
    def runTest(self):
        INFO = " 1.1.60 - Unsupported Message Type"
        request = malformed_message.malformed_message(version=4, type=97)

        reply, pkt = self.controller.transact(request)
        try:
            self.assertTrue(reply is not None,
                            "No response to unsupported message type")
            self.assertTrue(reply.type == ofp.OFPT_ERROR,
                            "Reply not an error message")
            self.assertTrue(reply.err_type == ofp.OFPET_BAD_REQUEST,
                            "Reply error type is not bad request")
            self.assertTrue(reply.code == ofp.OFPBRC_BAD_TYPE,
                           "Reply error code is not bad type")
            log.info(PASS + INFO)
        except AssertionError, Err:
            log.info(FAIL + INFO)
            log.info(REASON + " -> "+ str(Err))
コード例 #8
0
ファイル: switch.py プロジェクト: rubiruchi/florence-dev
    def runTest(self):
        INFO = " 1.1.80 - Malformed Version Number"
        request = malformed_message.malformed_message(version=0, type=0)

        reply, pkt = self.controller.transact(request)
        try:
            self.assertTrue(reply is not None,
                            "No response to malformed version number")
            self.assertTrue(reply.type == ofp.OFPT_ERROR,
                            "Reply not an error message")
            self.assertTrue(reply.err_type == ofp.OFPET_BAD_REQUEST,
                            "Reply error type is not bad request")
            self.assertTrue(reply.code == ofp.OFPET_HELLO_FAILED,
                            "Reply error code is not hello failed")
            log.info(PASS + INFO)
        except AssertionError, Err:
            log.info(FAIL + INFO)
            log.info(REASON + " -> " + str(Err))
コード例 #9
0
ファイル: switch.py プロジェクト: rubiruchi/florence-dev
    def runTest(self):
        INFO = " 1.1.70 - Unsupported Version Number"
        request = malformed_message.malformed_message(version=5, type=10)

        try:
            reply, pkt = self.controller.transact(request)
            self.assertTrue(reply is not None,
                            "No response to unsupported version number")
            self.assertTrue(reply.type == ofp.OFPT_ERROR,
                            "Reply not an error message")
            self.assertTrue(reply.err_type == ofp.OFPET_BAD_REQUEST,
                            "Reply error type is not bad request")
            self.assertTrue(reply.code == ofp.OFPBRC_BAD_VERSION,
                            "Reply error code is not bad version")
            log.info(PASS + INFO)
        except AssertionError, Err:
            log.info(FAIL + INFO)
            log.info(REASON + " -> " + str(Err))
コード例 #10
0
ファイル: switch.py プロジェクト: rubiruchi/florence-dev
    def runTest(self):
        INFO = " 1.1.60 - Unsupported Message Type"
        request = malformed_message.malformed_message(version=4, type=97)

        reply, pkt = self.controller.transact(request)
        try:
            self.assertTrue(reply is not None,
                            "No response to unsupported message type")
            self.assertTrue(reply.type == ofp.OFPT_ERROR,
                            "Reply not an error message")
            self.assertTrue(reply.err_type == ofp.OFPET_BAD_REQUEST,
                            "Reply error type is not bad request")
            self.assertTrue(reply.code == ofp.OFPBRC_BAD_TYPE,
                            "Reply error code is not bad type")
            log.info(PASS + INFO)
        except AssertionError, Err:
            log.info(FAIL + INFO)
            log.info(REASON + " -> " + str(Err))