'Tests that subnet\'s extra configuration details are affecting VMs.
This test relies on non-shared, isolated tenant networks.
NOTE: Neutron subnets push data to servers via dhcp-agent, so any
update in subnet requires server to actively renew its DHCP lease.
1. Configure subnet with dns nameserver
2. retrieve the VM\'s configured dns and verify it matches the one
configured for the subnet.
3. update subnet\'s dns
4. retrieve the VM\'s configured dns and verify it matches the new one
configured for the subnet.
TODO(yfried): add host_routes
any resolution check would be testing either:
* l3 forwarding (tested in test_network_basic_ops)
* Name resolution of an external DNS nameserver - out of scope for
Tempest'

@decorators.idempotent_id('d8bb918e-e2df-48b2-97cd-b73c95450980')
@testtools.skipIf(CONF.network.shared_physical_network, 'network    isolation    not    available')
@testtools.skipUnless(CONF.scenario.dhcp_client, 'DHCP    client    is    not    available.')
@decorators.attr(type='slow')
@test.services('compute', 'network')
def test_subnet_details(self):

    initial_dns_server = '1.2.3.4'
    alt_dns_server = '9.8.7.6'
    renew_delay = CONF.network.build_interval
    renew_timeout = CONF.network.build_timeout
    self._setup_network_and_servers(dns_nameservers=[initial_dns_server])
    self.check_public_network_connectivity(should_connect=True)
    (floating_ip, server) = self.floating_ip_tuple
    ip_address = floating_ip['floating_ip_address']
    private_key = self._get_server_key(server)
    ssh_client = self.get_remote_client(ip_address, private_key=private_key, server=server)
    dns_servers = [initial_dns_server]
    servers = ssh_client.get_dns_servers()
    self.assertEqual(set(dns_servers), set(servers), 'Looking    for    servers:    {trgt_serv}.    Retrieved    DNS    nameservers:    {act_serv}    From    host:    {host}.'.format(host=ssh_client.ssh_client.host, act_serv=servers, trgt_serv=dns_servers))
    self.subnet = self.subnets_client.update_subnet(self.subnet['id'], dns_nameservers=[alt_dns_server])['subnet']
    self.assertEqual([alt_dns_server], self.subnet['dns_nameservers'], "Failed    to    update    subnet's    nameservers")
    def check_new_dns_server():
        ssh_client.renew_lease(fixed_ip=floating_ip['fixed_ip_address'], dhcp_client=CONF.scenario.dhcp_client)
        if (ssh_client.get_dns_servers() != [alt_dns_server]):
            LOG.debug('Failed    to    update    DNS    nameservers')
            return False
        return True
    self.assertTrue(test_utils.call_until_true(check_new_dns_server, renew_timeout, renew_delay), msg='DHCP    renewal    failed    to    fetch    new    DNS    nameservers')
