Beispiel #1
0
 def setUp(self):
     host_descriptions = [environment.HostDescription(l3_agent=True)]
     env = environment.Environment(
         environment.EnvironmentDescription(network_type='vlan',
                                            l2_pop=False),
         host_descriptions)
     super(TestLegacyL3Agent, self).setUp(env)
Beispiel #2
0
 def setUp(self):
     host_desc = [environment.HostDescription(
         l3_agent=False,
         l2_agent_type=self.l2_agent_type)]
     env_desc = environment.EnvironmentDescription(qos=True)
     env = environment.Environment(env_desc, host_desc)
     super(TestQoSWithL2Agent, self).setUp(env)
Beispiel #3
0
 def setUp(self, *args):
     host_descriptions = [environment.HostDescription()]
     env = environment.Environment(
         environment.EnvironmentDescription(quota_driver=self.quota_driver),
         host_descriptions)
     super().setUp(env)
     self.tenant_id = uuidutils.generate_uuid()
Beispiel #4
0
    def setUp(self):
        host_desc = [
            environment.HostDescription(l3_agent=False,
                                        l2_agent_type=self.l2_agent_type)
            for _ in range(self.number_of_hosts)
        ]
        env_desc = environment.EnvironmentDescription(agent_down_time=10,
                                                      qos=True)
        env = environment.Environment(env_desc, host_desc)
        super(BaseQoSRuleTestCase, self).setUp(env)
        self.l2_agent_process = self.environment.hosts[0].l2_agent
        self.l2_agent = self.safe_client.client.list_agents(
            agent_type=self.l2_agent_type)['agents'][0]

        self.tenant_id = uuidutils.generate_uuid()
        network_args = {}
        if self.physical_network:
            network_args = {
                'physical_network': self.physical_network,
                'network_type': 'vlan'
            }
        self.network = self.safe_client.create_network(self.tenant_id,
                                                       name='network-test',
                                                       **network_args)
        self.subnet = self.safe_client.create_subnet(self.tenant_id,
                                                     self.network['id'],
                                                     cidr='10.0.0.0/24',
                                                     gateway_ip='10.0.0.1',
                                                     name='subnet-test',
                                                     enable_dhcp=False)
Beispiel #5
0
 def setUp(self):
     host_descriptions = [
         environment.HostDescription(l3_agent=True) for _ in range(2)
     ]
     env = environment.Environment(environment.EnvironmentDescription(),
                                   host_descriptions)
     super(TestHAL3Agent, self).setUp(env)
Beispiel #6
0
    def setUp(self):
        host_descriptions = [
            environment.HostDescription(
                dhcp_agent=True, l2_agent_type=constants.AGENT_TYPE_OVS),
            environment.HostDescription(
                dhcp_agent=False,
                l2_agent_type=constants.AGENT_TYPE_LINUXBRIDGE)
        ]

        env = environment.Environment(
            environment.EnvironmentDescription(
                network_type='vlan',
                mech_drivers='openvswitch,linuxbridge',
                l2_pop=False,
                arp_responder=False,
                agent_down_time=self.agent_down_time,
                service_plugins='router,segments'
            ),
            host_descriptions)

        # Note(lajoskatona): Here, call grandparent's (BaseFullStackTestCase)
        # setup(), to avoid BaseDhcpAgentTest mess up environment.
        super(BaseDhcpAgentTest, self).setUp(env)
        self.project_id = uuidutils.generate_uuid()
        if self.boot_vm_for_test:
            self._create_network_subnet_and_vm()
Beispiel #7
0
 def setUp(self):
     host_descriptions = [
         environment.HostDescription(l3_agent=True) for _ in range(2)
     ]
     env = environment.Environment(
         environment.EnvironmentDescription(network_type='vxlan',
                                            l2_pop=True), host_descriptions)
     super(TestHAL3Agent, self).setUp(env)
 def setUp(self):
     host_descriptions = [
         environment.HostDescription() for _ in range(2)]
     env = environment.Environment(
         environment.EnvironmentDescription(
             network_type=self.network_type,
             l2_pop=self.l2_pop),
         host_descriptions)
     super(TestConnectivitySameNetwork, self).setUp(env)
Beispiel #9
0
    def setUp(self):
        hosts_description = [
            environment.HostDescription(l2_agent_type=self.l2_agent_type,
                                        l3_agent=False)
        ]
        env = environment.Environment(environment.EnvironmentDescription(),
                                      hosts_description)

        super(TestSegmentationId, self).setUp(env)
        self.tenant_id = uuidutils.generate_uuid()
 def setUp(self):
     host_descriptions = [
         environment.HostDescription(l3_agent=True, dhcp_agent=True,
                                     l3_agent_extensions="fip_qos")
         for _ in range(2)]
     env = environment.Environment(
         environment.EnvironmentDescription(
             network_type='vlan', l2_pop=True,
             qos=True),
         host_descriptions)
     super(TestHAL3Agent, self).setUp(env)
Beispiel #11
0
    def setUp(self):
        host_desc = [
            environment.HostDescription(l3_agent=False,
                                        l2_agent_type=self.l2_agent_type)
        ]
        env_desc = environment.EnvironmentDescription(network_type='vlan',
                                                      l2_pop=False,
                                                      report_bandwidths=True)
        env = environment.Environment(env_desc, host_desc)

        super(TestAgentBandwidthReport, self).setUp(env)
 def setUp(self):
     host_descriptions = [
         environment.HostDescription(l3_agent=True, dhcp_agent=True),
         environment.HostDescription()]
     env = environment.Environment(
         environment.EnvironmentDescription(network_type='vlan',
                                            l2_pop=False),
         host_descriptions)
     super(TestSubnet, self).setUp(env)
     self._project_id = uuidutils.generate_uuid()
     self._network = self._create_network(self._project_id)
Beispiel #13
0
    def setUp(self):
        host_descriptions = [
            environment.HostDescription(
                l2_agent_type=self.l2_agent_type, l3_agent=False
            ) for _ in range(self.num_hosts)]
        env = environment.Environment(
            environment.EnvironmentDescription(
                network_type=self.network_type),
            host_descriptions)

        super(BaseSegmentationIdTest, self).setUp(env)
        self.project_id = uuidutils.generate_uuid()
 def setUp(self):
     host_descriptions = [
         environment.HostDescription(
             l2_agent_type=self.l2_agent_type,
             dhcp_agent=self.use_dhcp,
         ) for _ in range(self.num_hosts)
     ]
     env = environment.Environment(
         environment.EnvironmentDescription(
             l2_pop=self.l2_pop, arp_responder=self.arp_responder),
         host_descriptions)
     super(PortShutDownTest, self).setUp(env)
Beispiel #15
0
 def setUp(self):
     host_descriptions = [
         # There's value in enabling L3 agents registration when l2pop
         # is enabled, because l2pop code makes assumptions about the
         # agent types present on machines.
         environment.HostDescription(l3_agent=self.l2_pop) for _ in range(2)
     ]
     env = environment.Environment(
         environment.EnvironmentDescription(network_type=self.network_type,
                                            l2_pop=self.l2_pop),
         host_descriptions)
     super(TestConnectivitySameNetwork, self).setUp(env)
Beispiel #16
0
 def setUp(self):
     # We limit this test to using the openvswitch mech driver, because DSCP
     # is presently not implemented for Linux Bridge.  The 'rule_types' API
     # call only returns rule types that are supported by all configured
     # mech drivers.  So in a fullstack scenario, where both the OVS and the
     # Linux Bridge mech drivers are configured, the DSCP rule type will be
     # unavailable since it is not implemented in Linux Bridge.
     mech_driver = 'openvswitch'
     host_desc = []  # No need to register agents for this test case
     env_desc = environment.EnvironmentDescription(qos=True, l2_pop=True,
                                                   mech_drivers=mech_driver)
     env = environment.Environment(env_desc, host_desc)
     super(TestQoSWithL2Population, self).setUp(env)
Beispiel #17
0
    def setUp(self):
        host_descriptions = [
            environment.HostDescription(dhcp_agent=True,
                                        l2_agent_type=self.l2_agent_type)
        ]

        env = environment.Environment(
            environment.EnvironmentDescription(l2_pop=False,
                                               arp_responder=False),
            host_descriptions)

        super(TestDhcpAgent, self).setUp(env)
        self.project_id = uuidutils.generate_uuid()
        self._create_network_subnet_and_vm()
Beispiel #18
0
 def setUp(self):
     host_desc = [
         environment.HostDescription(l3_agent=False,
                                     l2_agent_type=self.l2_agent_type)
     ]
     env_desc = environment.EnvironmentDescription(
         network_type='vlan',
         l2_pop=False,
         mech_drivers=self.mech_drivers,
         report_bandwidths=True,
         has_placement=True,
         placement_port=self.placement_port)
     env = environment.Environment(env_desc, host_desc)
     super(TestPlacementBandwidthReport, self).setUp(env)
Beispiel #19
0
 def setUp(self):
     host_descriptions = [
         environment.HostDescription(
             l3_agent=False,
             l2_agent_type=constants.AGENT_TYPE_OVS,
             firewall_driver='iptables_hybrid',
             dhcp_agent=False,
         )
     ]
     env = environment.Environment(environment.EnvironmentDescription(),
                                   host_descriptions)
     super(FirewallMigrationTestCase, self).setUp(env)
     # fullstack doesn't separate nodes running ovs agent so iptables rules
     # are implemented in root namespace
     self.iptables_manager = iptables_manager.IptablesManager()
Beispiel #20
0
    def setUp(self):
        host_descriptions = [
            environment.HostDescription(l2_agent_type=self.l2_agent_type)
        ]
        env = environment.Environment(
            environment.EnvironmentDescription(
                agent_down_time=10,
                ml2_extension_drivers=['uplink_status_propagation']),
            host_descriptions)
        super(TestPortsApi, self).setUp(env)

        self.tenant_id = uuidutils.generate_uuid()
        self.network = self.safe_client.create_network(self.tenant_id)
        self.safe_client.create_subnet(self.tenant_id, self.network['id'],
                                       '20.0.0.0/24')
Beispiel #21
0
 def setUp(self):
     host_descriptions = [
         environment.HostDescription(l3_agent=True,
                                     dhcp_agent=True,
                                     l3_agent_extensions="fip_qos"),
         # None(obondarev): dhcp agent is added to workaround bug 1930401,
         # to be removed in scope of proper bug fix:
         # https://review.opendev.org/c/openstack/neutron/+/794994
         environment.HostDescription(dhcp_agent=True)
     ]
     env = environment.Environment(
         environment.EnvironmentDescription(network_type='vlan',
                                            l2_pop=False,
                                            qos=True), host_descriptions)
     super(TestLegacyL3Agent, self).setUp(env)
 def setUp(self):
     if (self.firewall_driver == 'openvswitch'
             and not OVSVersionChecker.supports_ovsfirewall()):
         self.skipTest("Open vSwitch firewall_driver doesn't work "
                       "with this version of ovs.")
     host_descriptions = [
         environment.HostDescription(of_interface=self.of_interface,
                                     ovsdb_interface=self.ovsdb_interface,
                                     l2_agent_type=self.l2_agent_type,
                                     firewall_driver=self.firewall_driver,
                                     dhcp_agent=True) for _ in range(2)
     ]
     env = environment.Environment(
         environment.EnvironmentDescription(network_type=self.network_type),
         host_descriptions)
     super(BaseSecurityGroupsSameNetworkTest, self).setUp(env)
Beispiel #23
0
    def setUp(self):
        host_descriptions = [
            environment.HostDescription(dhcp_agent=True,
                                        l2_agent_type=self.l2_agent_type)
            for _ in range(self.number_of_hosts)
        ]

        env = environment.Environment(
            environment.EnvironmentDescription(
                l2_pop=False,
                arp_responder=False,
                agent_down_time=self.agent_down_time), host_descriptions)

        super(BaseDhcpAgentTest, self).setUp(env)
        self.project_id = uuidutils.generate_uuid()
        self._create_network_subnet_and_vm()
Beispiel #24
0
    def setUp(self):
        host_desc = [environment.HostDescription(
            l3_agent=False,
            l2_agent_type=self.l2_agent_type)]
        env_desc = environment.EnvironmentDescription(qos=True)
        env = environment.Environment(env_desc, host_desc)
        super(BaseQoSRuleTestCase, self).setUp(env)

        self.tenant_id = uuidutils.generate_uuid()
        self.network = self.safe_client.create_network(self.tenant_id,
                                                       'network-test')
        self.subnet = self.safe_client.create_subnet(
            self.tenant_id, self.network['id'],
            cidr='10.0.0.0/24',
            gateway_ip='10.0.0.1',
            name='subnet-test',
            enable_dhcp=False)
Beispiel #25
0
 def setUp(self):
     host_descriptions = [
         # There's value in enabling L3 agents registration when l2pop
         # is enabled, because l2pop code makes assumptions about the
         # agent types present on machines.
         environment.HostDescription(l3_agent=self.l2_pop,
                                     of_interface=self.of_interface,
                                     ovsdb_interface=self.ovsdb_interface,
                                     l2_agent_type=self.l2_agent_type)
         for _ in range(self.num_hosts)
     ]
     env = environment.Environment(
         environment.EnvironmentDescription(
             network_type=self.network_type,
             l2_pop=self.l2_pop,
             arp_responder=self.arp_responder), host_descriptions)
     super(BaseConnectivitySameNetworkTest, self).setUp(env)
Beispiel #26
0
    def setUp(self):
        host_desc = [environment.HostDescription(
            l3_agent=False,
            l2_agent_type=constants.AGENT_TYPE_OVS)]
        env_desc = environment.EnvironmentDescription(service_plugins='trunk')
        env = environment.Environment(env_desc, host_desc)
        super(TestTrunkPlugin, self).setUp(env)

        self.tenant_id = uuidutils.generate_uuid()
        self.trunk_network = Network('trunk', '10.0.0.0/24')
        self.vlan1_network = Network('vlan1', '192.168.0.0/24', tag=10)
        self.vlan2_network = Network('vlan2', '192.168.1.0/24', tag=20)

        self.host = self.environment.hosts[0]

        for network in (
                self.trunk_network, self.vlan1_network, self.vlan2_network):
            self.create_network_and_subnet(network)
Beispiel #27
0
    def setUp(self):
        debug_iptables = self.firewall_driver.startswith("iptables")
        host_descriptions = [
            environment.HostDescription(l2_agent_type=self.l2_agent_type,
                                        firewall_driver=self.firewall_driver,
                                        dhcp_agent=True)
            for _ in range(self.num_hosts)
        ]
        env = environment.Environment(
            environment.EnvironmentDescription(network_type=self.network_type,
                                               debug_iptables=debug_iptables),
            host_descriptions)
        super(BaseSecurityGroupsSameNetworkTest, self).setUp(env)

        if (self.firewall_driver == 'openvswitch'
                and not OVSVersionChecker.supports_ovsfirewall()):
            self.skipTest("Open vSwitch firewall_driver doesn't work "
                          "with this version of ovs.")
Beispiel #28
0
    def setUp(self):
        host_desc = [
            environment.HostDescription(
                l2_agent_type=constants.AGENT_TYPE_OVS,
                firewall_driver='openvswitch',
                dhcp_agent=True) for _ in range(self.number_of_hosts)]
        env_desc = environment.EnvironmentDescription(
            mech_drivers='openvswitch', log=True)
        env = environment.Environment(env_desc, host_desc)
        super(BaseLoggingTestCase, self).setUp(env)

        self.tenant_id = uuidutils.generate_uuid()
        self.network = self.safe_client.create_network(
            self.tenant_id, 'network-test')
        self.subnet = self.safe_client.create_subnet(
            self.tenant_id, self.network['id'],
            cidr='10.0.0.0/24',
            gateway_ip='10.0.0.1',
            name='subnet-test')
Beispiel #29
0
    def setUp(self):
        host_desc = [
            environment.HostDescription(l3_agent=False,
                                        of_interface=self.of_interface,
                                        ovsdb_interface=self.ovsdb_interface,
                                        l2_agent_type=self.l2_agent_type)
            for _ in range(self.number_of_hosts)
        ]
        env_desc = environment.EnvironmentDescription()
        env = environment.Environment(env_desc, host_desc)
        super(MTUNetworkTestSetup, self).setUp(env)

        self.tenant_id = uuidutils.generate_uuid()
        self.subnet = self.safe_client.create_subnet(self.tenant_id,
                                                     self.network['id'],
                                                     cidr='10.0.0.0/24',
                                                     gateway_ip='10.0.0.1',
                                                     name='subnet-test',
                                                     enable_dhcp=False)
Beispiel #30
0
    def setUp(self):
        host_descriptions = [
            environment.HostDescription(l2_agent_type=self.l2_agent_type,
                                        l3_agent=self.use_l3_agent)
        ]
        env = environment.Environment(
            environment.EnvironmentDescription(agent_down_time=10),
            host_descriptions)

        super(TestPortsRebind, self).setUp(env)

        self.l2_agent_process = self.environment.hosts[0].l2_agent
        self.l2_agent = self.safe_client.client.list_agents(
            agent_type=self.l2_agent_type)['agents'][0]

        self.tenant_id = uuidutils.generate_uuid()
        self.network = self.safe_client.create_network(self.tenant_id)
        self.subnet = self.safe_client.create_subnet(self.tenant_id,
                                                     self.network['id'],
                                                     '20.0.0.0/24')