コード例 #1
0
ファイル: environment.py プロジェクト: ychen2u/stx-neutron
    def _setUp(self):
        self.temp_dir = self.useFixture(fixtures.TempDir()).path

        #we need this bridge before rabbit and neutron service will start
        self.central_data_bridge = self.useFixture(
            net_helpers.OVSBridgeFixture('cnt-data')).bridge
        self.central_external_bridge = self.useFixture(
            net_helpers.OVSBridgeFixture('cnt-ex')).bridge

        #Get rabbitmq address (and cnt-data network)
        rabbitmq_ip_address = self._configure_port_for_rabbitmq()
        self.rabbitmq_environment = self.useFixture(
            process.RabbitmqEnvironmentFixture(host=rabbitmq_ip_address))

        plugin_cfg_fixture = self.useFixture(
            config.ML2ConfigFixture(self.env_desc, self.hosts_desc,
                                    self.temp_dir, self.env_desc.network_type))
        neutron_cfg_fixture = self.useFixture(
            config.NeutronConfigFixture(self.env_desc, None, self.temp_dir,
                                        cfg.CONF.database.connection,
                                        self.rabbitmq_environment))
        self.neutron_server = self.useFixture(
            process.NeutronServerFixture(self.env_desc, None, self.test_name,
                                         neutron_cfg_fixture,
                                         plugin_cfg_fixture))

        self.hosts = [self._create_host(desc) for desc in self.hosts_desc]

        self.wait_until_env_is_up()
コード例 #2
0
    def _setUp(self):
        self.temp_dir = self.useFixture(fixtures.TempDir()).path
        self.rabbitmq_environment = self.useFixture(
            process.RabbitmqEnvironmentFixture())
        plugin_cfg_fixture = self.useFixture(
            config.ML2ConfigFixture(self.temp_dir, 'vlan'))
        neutron_cfg_fixture = self.useFixture(
            config.NeutronConfigFixture(self.temp_dir,
                                        cfg.CONF.database.connection,
                                        self.rabbitmq_environment))
        self.neutron_server = self.useFixture(
            process.NeutronServerFixture(self.test_name, neutron_cfg_fixture,
                                         plugin_cfg_fixture))

        self.central_data_bridge = self.useFixture(
            net_helpers.OVSBridgeFixture('cnt-data')).bridge
        self.central_external_bridge = self.useFixture(
            net_helpers.OVSBridgeFixture('cnt-ex')).bridge

        self.hosts = [
            self._create_host(description)
            for description in self.hosts_descriptions
        ]

        self.wait_until_env_is_up()
コード例 #3
0
    def _create_host(self, description):
        temp_dir = self.useFixture(fixtures.TempDir()).path
        neutron_config = config.NeutronConfigFixture(
            temp_dir, cfg.CONF.database.connection, self.rabbitmq_environment)
        self.useFixture(neutron_config)

        return self.useFixture(
            Host(self.test_name, neutron_config, description,
                 self.central_data_bridge, self.central_external_bridge))
コード例 #4
0
ファイル: environment.py プロジェクト: rolaya/neutron
    def _create_host(self, host_desc):
        LOG.info('%s(): caller(): %s', log_utils.get_fname(1), log_utils.get_fname(2))
        temp_dir = self.useFixture(fixtures.TempDir()).path
        neutron_config = config.NeutronConfigFixture(
            self.env_desc, host_desc, temp_dir,
            cfg.CONF.database.connection, self.rabbitmq_environment)
        self.useFixture(neutron_config)

        return self.useFixture(
            Host(self.env_desc,
                 host_desc,
                 self.test_name,
                 neutron_config,
                 self.central_bridge))