Ejemplo n.º 1
0
    def setUp(self):
        self._cloud_manager = CloudManager()
        # We want to start with a fresh network every run
        self._cloud_manager.delete_networks([NETWORK_ID])

        self._cloud_manager.create_network(NETWORK_ID)
        self._cloud_manager.register_gateway(
            NETWORK_ID,
            GATEWAY_ID,
            get_gateway_hw_id(),
        )
Ejemplo n.º 2
0
    def setUp(self):
        self._cloud_manager = cloud_manager.CloudManager()
        # We want to start with a fresh network every time because we're
        # testing gateway registration -> config update flow
        self._cloud_manager.delete_networks([fixtures.NETWORK_ID])
        # We also want to start off with default mconfigs
        rpc.reset_gateway_mconfigs()

        self._cloud_manager.create_network(fixtures.NETWORK_ID)
        self._cloud_manager.register_gateway(
            fixtures.NETWORK_ID,
            fixtures.GATEWAY_ID,
            rpc.get_gateway_hw_id(),
        )
Ejemplo n.º 3
0
    def setUp(self):
        self._cloud_manager = CloudManager()
        self._cloud_manager.delete_networks([NETWORK_ID])

        self._cloud_manager.create_network(NETWORK_ID)
        self._cloud_manager.register_gateway(
            NETWORK_ID,
            GATEWAY_ID,
            get_gateway_hw_id(),
        )

        self._test_server = HTTPServer((self.TEST_VM_IP, self.TEST_VM_PORT),
                                       TestHTTPServerRequestHandler)
        self._server_thread = threading.Thread(target=self.run_server)
        self._server_thread.daemon = True