Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 1 | # Copyright 2014 Cisco Systems, Inc. |
| 2 | # All Rights Reserved. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 5 | # not use this file except in compliance with the License. You may obtain |
| 6 | # a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 | # License for the specific language governing permissions and limitations |
| 14 | # under the License. |
Slawek Kaplonski | c5c7ba9 | 2018-10-04 15:21:45 +0200 | [diff] [blame] | 15 | |
| 16 | from oslo_log import log as logging |
| 17 | |
Andrea Frittoli | cd36841 | 2017-08-14 21:37:56 +0100 | [diff] [blame] | 18 | from tempest.common import utils |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 19 | from tempest import config |
Steve Heyman | 33735f2 | 2016-05-24 09:28:08 -0500 | [diff] [blame] | 20 | from tempest.lib.common.utils import test_utils |
Ken'ichi Ohmichi | c85a951 | 2017-01-27 18:34:24 -0800 | [diff] [blame] | 21 | from tempest.lib import decorators |
Slawek Kaplonski | c5c7ba9 | 2018-10-04 15:21:45 +0200 | [diff] [blame] | 22 | from tempest.lib import exceptions |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 23 | from tempest.scenario import manager |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 24 | |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 25 | CONF = config.CONF |
Slawek Kaplonski | c5c7ba9 | 2018-10-04 15:21:45 +0200 | [diff] [blame] | 26 | LOG = logging.getLogger(__name__) |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 27 | |
| 28 | |
| 29 | class TestGettingAddress(manager.NetworkScenarioTest): |
Yair Fried | e198e2f | 2015-07-28 14:43:47 +0300 | [diff] [blame] | 30 | """Test Summary: |
| 31 | |
| 32 | 1. Create network with subnets: |
| 33 | 1.1. one IPv4 and |
| 34 | 1.2. one or more IPv6 in a given address mode |
| 35 | 2. Boot 2 VMs on this network |
| 36 | 3. Allocate and assign 2 FIP4 |
| 37 | 4. Check that vNICs of all VMs gets all addresses actually assigned |
| 38 | 5. Each VM will ping the other's v4 private address |
| 39 | 6. If ping6 available in VM, each VM will ping all of the other's v6 |
| 40 | addresses as well as the router's |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 41 | """ |
| 42 | |
| 43 | @classmethod |
Emily Hugenbruch | 5e2d2a2 | 2015-02-25 21:35:45 +0000 | [diff] [blame] | 44 | def skip_checks(cls): |
| 45 | super(TestGettingAddress, cls).skip_checks() |
Federico Ressi | 2d6bcaa | 2018-04-11 12:37:36 +0200 | [diff] [blame] | 46 | if not (CONF.network_feature_enabled.ipv6 and |
| 47 | CONF.network_feature_enabled.ipv6_subnet_attributes): |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 48 | raise cls.skipException('IPv6 or its attributes not supported') |
Federico Ressi | 2d6bcaa | 2018-04-11 12:37:36 +0200 | [diff] [blame] | 49 | if not (CONF.network.project_networks_reachable or |
| 50 | CONF.network.public_network_id): |
Sean Dague | ed6e586 | 2016-04-04 10:49:13 -0400 | [diff] [blame] | 51 | msg = ('Either project_networks_reachable must be "true", or ' |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 52 | 'public_network_id must be defined.') |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 53 | raise cls.skipException(msg) |
ghanshyam | 929b348 | 2016-12-05 11:47:53 +0900 | [diff] [blame] | 54 | if CONF.network.shared_physical_network: |
Thiago Paiva | 66cded2 | 2016-08-15 14:55:58 -0300 | [diff] [blame] | 55 | msg = 'Deployment uses a shared physical network' |
Adam Gandelman | ab6106d | 2014-12-12 10:38:23 -0800 | [diff] [blame] | 56 | raise cls.skipException(msg) |
Matthew Treinish | 3312de3 | 2017-05-19 12:08:17 -0400 | [diff] [blame] | 57 | if not CONF.network_feature_enabled.floating_ips: |
| 58 | raise cls.skipException("Floating ips are not available") |
Adam Gandelman | 721f80d | 2014-12-12 11:03:14 -0800 | [diff] [blame] | 59 | |
Emily Hugenbruch | 5e2d2a2 | 2015-02-25 21:35:45 +0000 | [diff] [blame] | 60 | @classmethod |
| 61 | def setup_credentials(cls): |
| 62 | # Create no network resources for these tests. |
| 63 | cls.set_network_resources() |
| 64 | super(TestGettingAddress, cls).setup_credentials() |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 65 | |
| 66 | def setUp(self): |
| 67 | super(TestGettingAddress, self).setUp() |
| 68 | self.keypair = self.create_keypair() |
Marc Koderer | 410c782 | 2016-11-08 11:47:00 +0100 | [diff] [blame] | 69 | self.sec_grp = self._create_security_group() |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 70 | |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 71 | def prepare_network(self, address6_mode, n_subnets6=1, dualnet=False): |
Ken'ichi Ohmichi | c4e4f1c | 2015-11-17 08:16:12 +0000 | [diff] [blame] | 72 | """Prepare network |
| 73 | |
| 74 | Creates network with given number of IPv6 subnets in the given mode and |
| 75 | one IPv4 subnet. |
| 76 | Creates router with ports on all subnets. |
| 77 | if dualnet - create IPv6 subnets on a different network |
| 78 | :return: list of created networks |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 79 | """ |
Jordan Pittier | 37b94a0 | 2017-02-21 18:11:55 +0100 | [diff] [blame] | 80 | network = self._create_network() |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 81 | if dualnet: |
Jordan Pittier | 37b94a0 | 2017-02-21 18:11:55 +0100 | [diff] [blame] | 82 | network_v6 = self._create_network() |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 83 | |
zhufl | 5b0a52f | 2017-10-24 15:48:20 +0800 | [diff] [blame] | 84 | sub4 = self.create_subnet(network=network, |
| 85 | namestart='sub4', |
| 86 | ip_version=4) |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 87 | |
Marc Koderer | 410c782 | 2016-11-08 11:47:00 +0100 | [diff] [blame] | 88 | router = self._get_router() |
Steve Heyman | 33735f2 | 2016-05-24 09:28:08 -0500 | [diff] [blame] | 89 | self.routers_client.add_router_interface(router['id'], |
| 90 | subnet_id=sub4['id']) |
| 91 | |
| 92 | self.addCleanup(test_utils.call_and_ignore_notfound_exc, |
| 93 | self.routers_client.remove_router_interface, |
| 94 | router['id'], subnet_id=sub4['id']) |
Kirill Shileev | b1f9752 | 2015-02-19 20:39:05 +0300 | [diff] [blame] | 95 | |
Yair Fried | e198e2f | 2015-07-28 14:43:47 +0300 | [diff] [blame] | 96 | self.subnets_v6 = [] |
Kirill Shileev | b1f9752 | 2015-02-19 20:39:05 +0300 | [diff] [blame] | 97 | for _ in range(n_subnets6): |
Jordan Pittier | 37b94a0 | 2017-02-21 18:11:55 +0100 | [diff] [blame] | 98 | net6 = network_v6 if dualnet else network |
zhufl | 5b0a52f | 2017-10-24 15:48:20 +0800 | [diff] [blame] | 99 | sub6 = self.create_subnet(network=net6, |
| 100 | namestart='sub6', |
| 101 | ip_version=6, |
| 102 | ipv6_ra_mode=address6_mode, |
| 103 | ipv6_address_mode=address6_mode) |
Kirill Shileev | b1f9752 | 2015-02-19 20:39:05 +0300 | [diff] [blame] | 104 | |
Steve Heyman | 33735f2 | 2016-05-24 09:28:08 -0500 | [diff] [blame] | 105 | self.routers_client.add_router_interface(router['id'], |
| 106 | subnet_id=sub6['id']) |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 107 | |
Steve Heyman | 33735f2 | 2016-05-24 09:28:08 -0500 | [diff] [blame] | 108 | self.addCleanup(test_utils.call_and_ignore_notfound_exc, |
| 109 | self.routers_client.remove_router_interface, |
| 110 | router['id'], subnet_id=sub6['id']) |
| 111 | |
| 112 | self.subnets_v6.append(sub6) |
Jordan Pittier | 37b94a0 | 2017-02-21 18:11:55 +0100 | [diff] [blame] | 113 | return [network, network_v6] if dualnet else [network] |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 114 | |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 115 | @staticmethod |
| 116 | def define_server_ips(srv): |
Kirill Shileev | b1f9752 | 2015-02-19 20:39:05 +0300 | [diff] [blame] | 117 | ips = {'4': None, '6': []} |
Béla Vancsics | b6dfa08 | 2017-03-01 10:44:58 +0100 | [diff] [blame] | 118 | for nics in srv['addresses'].values(): |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 119 | for nic in nics: |
| 120 | if nic['version'] == 6: |
Kirill Shileev | b1f9752 | 2015-02-19 20:39:05 +0300 | [diff] [blame] | 121 | ips['6'].append(nic['addr']) |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 122 | else: |
Kirill Shileev | b1f9752 | 2015-02-19 20:39:05 +0300 | [diff] [blame] | 123 | ips['4'] = nic['addr'] |
| 124 | return ips |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 125 | |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 126 | def prepare_server(self, networks=None): |
lanoux | 283273b | 2015-12-04 03:01:54 -0800 | [diff] [blame] | 127 | username = CONF.validation.image_ssh_user |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 128 | |
lanoux | 5fc1452 | 2015-09-21 08:17:35 +0000 | [diff] [blame] | 129 | srv = self.create_server( |
| 130 | key_name=self.keypair['name'], |
| 131 | security_groups=[{'name': self.sec_grp['name']}], |
zhufl | 13c9c89 | 2017-02-10 12:04:07 +0800 | [diff] [blame] | 132 | networks=[{'uuid': n['id']} for n in networks]) |
Soniya Vyas | 0c84f3e | 2020-07-15 15:20:59 +0530 | [diff] [blame] | 133 | fip = self.create_floating_ip(server=srv) |
Kirill Shileev | b1f9752 | 2015-02-19 20:39:05 +0300 | [diff] [blame] | 134 | ips = self.define_server_ips(srv=srv) |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 135 | ssh = self.get_remote_client( |
Steve Heyman | 33735f2 | 2016-05-24 09:28:08 -0500 | [diff] [blame] | 136 | ip_address=fip['floating_ip_address'], |
zhufl | f52c759 | 2017-05-25 13:55:24 +0800 | [diff] [blame] | 137 | username=username, server=srv) |
Ihar Hrachyshka | f9fda2d | 2017-11-06 13:16:09 -0800 | [diff] [blame] | 138 | return ssh, ips, srv |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 139 | |
Jordan Pittier | 37b94a0 | 2017-02-21 18:11:55 +0100 | [diff] [blame] | 140 | def turn_nic6_on(self, ssh, sid, network_id): |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 141 | """Turns the IPv6 vNIC on |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 142 | |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 143 | Required because guest images usually set only the first vNIC on boot. |
| 144 | Searches for the IPv6 vNIC's MAC and brings it up. |
| 145 | |
| 146 | @param ssh: RemoteClient ssh instance to server |
| 147 | @param sid: server uuid |
Jordan Pittier | 37b94a0 | 2017-02-21 18:11:55 +0100 | [diff] [blame] | 148 | @param network_id: the network id the NIC is connected to |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 149 | """ |
Jordan Pittier | 64e6b44 | 2017-02-20 19:29:02 +0100 | [diff] [blame] | 150 | ports = [ |
| 151 | p["mac_address"] for p in |
jeremy.zhang | 5870ff1 | 2017-05-25 11:24:23 +0800 | [diff] [blame] | 152 | self.os_admin.ports_client.list_ports( |
Jordan Pittier | 37b94a0 | 2017-02-21 18:11:55 +0100 | [diff] [blame] | 153 | device_id=sid, network_id=network_id)['ports'] |
Jordan Pittier | 64e6b44 | 2017-02-20 19:29:02 +0100 | [diff] [blame] | 154 | ] |
Jordan Pittier | 37b94a0 | 2017-02-21 18:11:55 +0100 | [diff] [blame] | 155 | |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 156 | self.assertEqual(1, len(ports), |
Ken'ichi Ohmichi | 695ac5c | 2015-10-13 03:07:17 +0000 | [diff] [blame] | 157 | message=("Multiple IPv6 ports found on network %s. " |
| 158 | "ports: %s") |
Jordan Pittier | 37b94a0 | 2017-02-21 18:11:55 +0100 | [diff] [blame] | 159 | % (network_id, ports)) |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 160 | mac6 = ports[0] |
Ken'ichi Ohmichi | 126fe98 | 2017-03-17 10:41:44 -0700 | [diff] [blame] | 161 | nic = ssh.get_nic_name_by_mac(mac6) |
Slawek Kaplonski | c5c7ba9 | 2018-10-04 15:21:45 +0200 | [diff] [blame] | 162 | # NOTE(slaweq): on RHEL based OS ifcfg file for new interface is |
| 163 | # needed to make IPv6 working on it, so if |
| 164 | # /etc/sysconfig/network-scripts directory exists ifcfg-%(nic)s file |
| 165 | # should be added in it |
| 166 | if self._sysconfig_network_scripts_dir_exists(ssh): |
| 167 | try: |
| 168 | ssh.exec_command( |
Martin Kopec | 65c8911 | 2019-05-03 18:46:17 +0000 | [diff] [blame] | 169 | 'echo -e "DEVICE=%(nic)s\\nNAME=%(nic)s\\nIPV6INIT=yes" | ' |
Slawek Kaplonski | c5c7ba9 | 2018-10-04 15:21:45 +0200 | [diff] [blame] | 170 | 'sudo tee /etc/sysconfig/network-scripts/ifcfg-%(nic)s; ' |
Martin Kopec | 65c8911 | 2019-05-03 18:46:17 +0000 | [diff] [blame] | 171 | 'sudo nmcli connection reload' % {'nic': nic}) |
| 172 | ssh.exec_command('sudo nmcli connection up %s' % nic) |
Slawek Kaplonski | c5c7ba9 | 2018-10-04 15:21:45 +0200 | [diff] [blame] | 173 | except exceptions.SSHExecCommandFailed as e: |
| 174 | # NOTE(slaweq): Sometimes it can happen that this SSH command |
| 175 | # will fail because of some error from network manager in |
| 176 | # guest os. |
| 177 | # But even then doing ip link set up below is fine and |
| 178 | # IP address should be configured properly. |
| 179 | LOG.debug("Error during restarting %(nic)s interface on " |
| 180 | "instance. Error message: %(error)s", |
| 181 | {'nic': nic, 'error': e}) |
Ken'ichi Ohmichi | 126fe98 | 2017-03-17 10:41:44 -0700 | [diff] [blame] | 182 | ssh.exec_command("sudo ip link set %s up" % nic) |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 183 | |
Slawek Kaplonski | c5c7ba9 | 2018-10-04 15:21:45 +0200 | [diff] [blame] | 184 | def _sysconfig_network_scripts_dir_exists(self, ssh): |
| 185 | return "False" not in ssh.exec_command( |
| 186 | 'test -d /etc/sysconfig/network-scripts/ || echo "False"') |
| 187 | |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 188 | def _prepare_and_test(self, address6_mode, n_subnets6=1, dualnet=False): |
| 189 | net_list = self.prepare_network(address6_mode=address6_mode, |
| 190 | n_subnets6=n_subnets6, |
| 191 | dualnet=dualnet) |
| 192 | |
Ihar Hrachyshka | f9fda2d | 2017-11-06 13:16:09 -0800 | [diff] [blame] | 193 | sshv4_1, ips_from_api_1, srv1 = self.prepare_server(networks=net_list) |
| 194 | sshv4_2, ips_from_api_2, srv2 = self.prepare_server(networks=net_list) |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 195 | |
Henry Gessau | 0efcfb9 | 2015-02-27 15:24:39 -0500 | [diff] [blame] | 196 | def guest_has_address(ssh, addr): |
Ken'ichi Ohmichi | 84aeba6 | 2017-03-01 18:31:20 -0800 | [diff] [blame] | 197 | return addr in ssh.exec_command("ip address") |
Henry Gessau | 0efcfb9 | 2015-02-27 15:24:39 -0500 | [diff] [blame] | 198 | |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 199 | # Turn on 2nd NIC for Cirros when dualnet |
| 200 | if dualnet: |
Ferenc Horváth | bce1fcf | 2017-06-07 11:19:51 +0200 | [diff] [blame] | 201 | _, network_v6 = net_list |
Ihar Hrachyshka | f9fda2d | 2017-11-06 13:16:09 -0800 | [diff] [blame] | 202 | self.turn_nic6_on(sshv4_1, srv1['id'], network_v6['id']) |
| 203 | self.turn_nic6_on(sshv4_2, srv2['id'], network_v6['id']) |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 204 | |
Kirill Shileev | b1f9752 | 2015-02-19 20:39:05 +0300 | [diff] [blame] | 205 | # get addresses assigned to vNIC as reported by 'ip address' utility |
Ken'ichi Ohmichi | 84aeba6 | 2017-03-01 18:31:20 -0800 | [diff] [blame] | 206 | ips_from_ip_1 = sshv4_1.exec_command("ip address") |
| 207 | ips_from_ip_2 = sshv4_2.exec_command("ip address") |
Kirill Shileev | b1f9752 | 2015-02-19 20:39:05 +0300 | [diff] [blame] | 208 | self.assertIn(ips_from_api_1['4'], ips_from_ip_1) |
| 209 | self.assertIn(ips_from_api_2['4'], ips_from_ip_2) |
| 210 | for i in range(n_subnets6): |
| 211 | # v6 should be configured since the image supports it |
| 212 | # It can take time for ipv6 automatic address to get assigned |
Ihar Hrachyshka | f9fda2d | 2017-11-06 13:16:09 -0800 | [diff] [blame] | 213 | for srv, ssh, ips in ( |
| 214 | (srv1, sshv4_1, ips_from_api_1), |
| 215 | (srv2, sshv4_2, ips_from_api_2)): |
| 216 | ip = ips['6'][i] |
| 217 | result = test_utils.call_until_true( |
| 218 | guest_has_address, |
| 219 | CONF.validation.ping_timeout, 1, ssh, ip) |
| 220 | if not result: |
| 221 | self._log_console_output(servers=[srv]) |
| 222 | self.fail( |
| 223 | 'Address %s not configured for instance %s, ' |
| 224 | 'ip address output is\n%s' % |
| 225 | (ip, srv['id'], ssh.exec_command("ip address"))) |
Kirill Shileev | b1f9752 | 2015-02-19 20:39:05 +0300 | [diff] [blame] | 226 | |
YAMAMOTO Takashi | 4c3ebb0 | 2017-01-25 16:04:30 +0900 | [diff] [blame] | 227 | self.check_remote_connectivity(sshv4_1, ips_from_api_2['4']) |
| 228 | self.check_remote_connectivity(sshv4_2, ips_from_api_1['4']) |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 229 | |
Sean M. Collins | c037848 | 2015-10-26 12:59:47 +0900 | [diff] [blame] | 230 | for i in range(n_subnets6): |
YAMAMOTO Takashi | 4c3ebb0 | 2017-01-25 16:04:30 +0900 | [diff] [blame] | 231 | self.check_remote_connectivity(sshv4_1, |
| 232 | ips_from_api_2['6'][i]) |
| 233 | self.check_remote_connectivity(sshv4_1, |
| 234 | self.subnets_v6[i]['gateway_ip']) |
| 235 | self.check_remote_connectivity(sshv4_2, |
| 236 | ips_from_api_1['6'][i]) |
| 237 | self.check_remote_connectivity(sshv4_2, |
| 238 | self.subnets_v6[i]['gateway_ip']) |
Yair Fried | e198e2f | 2015-07-28 14:43:47 +0300 | [diff] [blame] | 239 | |
Jordan Pittier | 3b46d27 | 2017-04-12 16:17:28 +0200 | [diff] [blame] | 240 | @decorators.attr(type='slow') |
Ken'ichi Ohmichi | c85a951 | 2017-01-27 18:34:24 -0800 | [diff] [blame] | 241 | @decorators.idempotent_id('2c92df61-29f0-4eaa-bee3-7c65bef62a43') |
Andrea Frittoli | cd36841 | 2017-08-14 21:37:56 +0100 | [diff] [blame] | 242 | @utils.services('compute', 'network') |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 243 | def test_slaac_from_os(self): |
| 244 | self._prepare_and_test(address6_mode='slaac') |
| 245 | |
Jordan Pittier | 3b46d27 | 2017-04-12 16:17:28 +0200 | [diff] [blame] | 246 | @decorators.attr(type='slow') |
Ken'ichi Ohmichi | c85a951 | 2017-01-27 18:34:24 -0800 | [diff] [blame] | 247 | @decorators.idempotent_id('d7e1f858-187c-45a6-89c9-bdafde619a9f') |
Andrea Frittoli | cd36841 | 2017-08-14 21:37:56 +0100 | [diff] [blame] | 248 | @utils.services('compute', 'network') |
Kirill Shileev | 1411357 | 2014-11-21 16:58:02 +0300 | [diff] [blame] | 249 | def test_dhcp6_stateless_from_os(self): |
| 250 | self._prepare_and_test(address6_mode='dhcpv6-stateless') |
Kirill Shileev | b1f9752 | 2015-02-19 20:39:05 +0300 | [diff] [blame] | 251 | |
Jordan Pittier | 3b46d27 | 2017-04-12 16:17:28 +0200 | [diff] [blame] | 252 | @decorators.attr(type='slow') |
Ken'ichi Ohmichi | c85a951 | 2017-01-27 18:34:24 -0800 | [diff] [blame] | 253 | @decorators.idempotent_id('7ab23f41-833b-4a16-a7c9-5b42fe6d4123') |
Andrea Frittoli | cd36841 | 2017-08-14 21:37:56 +0100 | [diff] [blame] | 254 | @utils.services('compute', 'network') |
Kirill Shileev | b1f9752 | 2015-02-19 20:39:05 +0300 | [diff] [blame] | 255 | def test_multi_prefix_dhcpv6_stateless(self): |
| 256 | self._prepare_and_test(address6_mode='dhcpv6-stateless', n_subnets6=2) |
| 257 | |
Jordan Pittier | 3b46d27 | 2017-04-12 16:17:28 +0200 | [diff] [blame] | 258 | @decorators.attr(type='slow') |
Ken'ichi Ohmichi | c85a951 | 2017-01-27 18:34:24 -0800 | [diff] [blame] | 259 | @decorators.idempotent_id('dec222b1-180c-4098-b8c5-cc1b8342d611') |
Andrea Frittoli | cd36841 | 2017-08-14 21:37:56 +0100 | [diff] [blame] | 260 | @utils.services('compute', 'network') |
Kirill Shileev | b1f9752 | 2015-02-19 20:39:05 +0300 | [diff] [blame] | 261 | def test_multi_prefix_slaac(self): |
| 262 | self._prepare_and_test(address6_mode='slaac', n_subnets6=2) |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 263 | |
Jordan Pittier | 3b46d27 | 2017-04-12 16:17:28 +0200 | [diff] [blame] | 264 | @decorators.attr(type='slow') |
Ken'ichi Ohmichi | c85a951 | 2017-01-27 18:34:24 -0800 | [diff] [blame] | 265 | @decorators.idempotent_id('b6399d76-4438-4658-bcf5-0d6c8584fde2') |
Andrea Frittoli | cd36841 | 2017-08-14 21:37:56 +0100 | [diff] [blame] | 266 | @utils.services('compute', 'network') |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 267 | def test_dualnet_slaac_from_os(self): |
| 268 | self._prepare_and_test(address6_mode='slaac', dualnet=True) |
| 269 | |
Jordan Pittier | 3b46d27 | 2017-04-12 16:17:28 +0200 | [diff] [blame] | 270 | @decorators.attr(type='slow') |
Ken'ichi Ohmichi | c85a951 | 2017-01-27 18:34:24 -0800 | [diff] [blame] | 271 | @decorators.idempotent_id('76f26acd-9688-42b4-bc3e-cd134c4cb09e') |
Andrea Frittoli | cd36841 | 2017-08-14 21:37:56 +0100 | [diff] [blame] | 272 | @utils.services('compute', 'network') |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 273 | def test_dualnet_dhcp6_stateless_from_os(self): |
| 274 | self._prepare_and_test(address6_mode='dhcpv6-stateless', dualnet=True) |
| 275 | |
Jordan Pittier | 3b46d27 | 2017-04-12 16:17:28 +0200 | [diff] [blame] | 276 | @decorators.attr(type='slow') |
Ken'ichi Ohmichi | c85a951 | 2017-01-27 18:34:24 -0800 | [diff] [blame] | 277 | @decorators.idempotent_id('cf1c4425-766b-45b8-be35-e2959728eb00') |
Andrea Frittoli | cd36841 | 2017-08-14 21:37:56 +0100 | [diff] [blame] | 278 | @utils.services('compute', 'network') |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 279 | def test_dualnet_multi_prefix_dhcpv6_stateless(self): |
| 280 | self._prepare_and_test(address6_mode='dhcpv6-stateless', n_subnets6=2, |
| 281 | dualnet=True) |
| 282 | |
Ken'ichi Ohmichi | c85a951 | 2017-01-27 18:34:24 -0800 | [diff] [blame] | 283 | @decorators.idempotent_id('9178ad42-10e4-47e9-8987-e02b170cc5cd') |
ghanshyam | bd8cc59 | 2018-11-02 08:00:21 +0000 | [diff] [blame] | 284 | @decorators.attr(type='slow') |
Andrea Frittoli | cd36841 | 2017-08-14 21:37:56 +0100 | [diff] [blame] | 285 | @utils.services('compute', 'network') |
Daniel Mellado | 9e3e106 | 2015-08-06 18:07:05 +0200 | [diff] [blame] | 286 | def test_dualnet_multi_prefix_slaac(self): |
| 287 | self._prepare_and_test(address6_mode='slaac', n_subnets6=2, |
| 288 | dualnet=True) |