Beispiel #1
0
    def deploy_neutron_ip_v6(self):
        """Check IPv6 only functionality for Neutron VLAN

        Test disabled and move to fuel_tests suite:
            fuel_tests.test.test_neutron_ipv6.TestNeutronIPv6

        Scenario:
            1. Revert deploy_neutron_vlan snapshot
            2. Create network resources: two dualstack network IPv6 subnets
                (should be in SLAAC mode,
                address space should not intersect),
                virtual router and set gateway.
            3. Create a Security Group,
                that allows SSH and ICMP for both IPv4 and IPv6.
            4. Launch two instances, one for each network.
            5. Attach Floating IP for both instances.
            6. SSH to the main instance and ping6 another instance.

        Duration 10m
        Snapshot deploy_neutron_ip_v6

        """
        # pylint: disable=W0101
        warn("Test disabled and move to fuel_tests suite", DeprecationWarning)
        raise SkipTest("Test disabled and move to fuel_tests suite")

        self.show_step(1, initialize=True)
        self.env.revert_snapshot("deploy_neutron_vlan")

        cluster_id = self.fuel_web.get_last_created_cluster()
        public_vip = self.fuel_web.get_public_vip(cluster_id)
        logger.info('Public vip is %s', public_vip)

        os_conn = os_actions.OpenStackActions(controller_ip=public_vip,
                                              user='******',
                                              passwd='simpleVlan',
                                              tenant='simpleVlan')

        tenant = os_conn.get_tenant('simpleVlan')

        self.show_step(2)
        net1, net2 = os_conn.create_network_resources_for_ipv6_test(tenant)

        self.show_step(3)
        security_group = os_conn.create_sec_group_for_ssh()

        self.show_step(4)
        instance1 = os_conn.create_server(
            name='instance1',
            security_groups=[security_group],
            net_id=net1['id'],
        )

        instance2 = os_conn.create_server(
            name='instance2',
            security_groups=[security_group],
            net_id=net2['id'],
        )

        self.show_step(5)
        floating_ip = os_conn.assign_floating_ip(instance1)
        floating_ip2 = os_conn.assign_floating_ip(instance2)

        self.show_step(6)
        get_instance_ipv6(instance1, net1)
        instance2_ipv6 = get_instance_ipv6(instance2, net2)

        node_ip = self.fuel_web.get_node_ip_by_devops_name("slave-01")
        remote = ssh_manager.get_remote(node_ip)
        for instance_ip, instance in ((floating_ip.ip, instance1),
                                      (floating_ip2.ip, instance2)):
            logger.info("Wait for ping from instance {} "
                        "by floating ip".format(instance.id))
            devops_helpers.wait(
                lambda: devops_helpers.tcp_ping(instance_ip, 22),
                timeout=300,
                timeout_msg=(
                    "Instance {0} is unreachable for {1} seconds".format(
                        instance.id, 300)))

        ping6_from_instance(remote, floating_ip.ip, instance2_ipv6)

        self.env.make_snapshot('deploy_neutron_ip_v6')
Beispiel #2
0
    def deploy_ovs_firewall_and_dpdk_vxlan_ipv6(self):
        """Deploy non-HA cluster with DPDK, VXLAN, OVS firewall driver with
        the check of IPv6 functionality

        Scenario:
            1. Revert deploy_ovs_firewall_and_dpdk_vlan snapshot
            2. Create network resources: two dualstack network IPv6 subnets
                (should be in SLAAC mode,
                address space should not intersect),
                virtual router and set gateway.
            3. Create a Security Group,
                that allows SSH and ICMP for both IPv4 and IPv6.
            4. Launch two instances, one for each network.
            5. Attach Floating IP for both instances.
            6. SSH to the main instance and ping6 another instance.

        Duration 10m
        Snapshot deploy_ovs_firewall_and_dpdk_vxlan_ipv6

        """
        self.show_step(1)
        self.env.revert_snapshot("deploy_ovs_firewall_and_dpdk_vxlan")

        cluster_id = self.fuel_web.get_last_created_cluster()
        public_vip = self.fuel_web.get_public_vip(cluster_id)
        logger.info('Public vip is %s', public_vip)

        os_conn = os_actions.OpenStackActions(
            self.fuel_web.get_public_vip(cluster_id))

        tenant = os_conn.get_tenant('admin')

        self.show_step(2)
        net1, net2 = os_conn.create_network_resources_for_ipv6_test(tenant)

        self.show_step(3)
        instance1 = self.boot_dpdk_instance(os_conn,
                                            cluster_id,
                                            net_name=net1['name'])

        instance2 = self.boot_dpdk_instance(os_conn,
                                            cluster_id,
                                            net_name=net2['name'])

        self.show_step(5)
        floating_ip = os_conn.assign_floating_ip(instance1)
        floating_ip2 = os_conn.assign_floating_ip(instance2)

        self.show_step(6)
        get_instance_ipv6(instance1, net1)
        instance2_ipv6 = get_instance_ipv6(instance2, net2)

        node_ip = self.fuel_web.get_node_ip_by_devops_name("slave-01")
        remote = ssh_manager.get_remote(node_ip)
        for instance_ip, instance in ((floating_ip.ip, instance1),
                                      (floating_ip2.ip, instance2)):
            logger.info("Wait for ping from instance {} "
                        "by floating ip".format(instance.id))
            devops_helpers.wait(
                lambda: devops_helpers.tcp_ping(instance_ip, 22),
                timeout=300,
                timeout_msg=(
                    "Instance {0} is unreachable for {1} seconds".format(
                        instance.id, 300)))

        ping6_from_instance(remote, floating_ip.ip, instance2_ipv6)

        self.env.make_snapshot('deploy_ovs_firewall_and_dpdk_vxlan_ipv6')