Tempest: Use network client result instead of OO

Upstream tempest has removed neutron OO wrapper in the following
patch: I3879ae24e47590d12fb09a4bb4697f139f57caf7. In the scenario
test, we should use results from clients directly instead of using
objected-oriented wrappers around neutron objects.

Change-Id: I61bdbff5fed29d9cdc88bcae10b029d31fbe0fcb
This commit is contained in:
Tong Liu 2016-06-20 19:10:45 +00:00
parent 79de437e42
commit fa25cbbc7f

View File

@ -94,7 +94,7 @@ class TestMultiHVNetworkOps(manager.NetworkScenarioTest):
keypair = self.create_keypair()
self.keypairs[keypair['name']] = keypair
security_groups = [{'name': self.security_group['name']}]
network = {'uuid': network.id}
network = {'uuid': network['id']}
server = self.create_server(name=name, networks=[network],
key_name=keypair['name'],
security_groups=security_groups,
@ -112,7 +112,7 @@ class TestMultiHVNetworkOps(manager.NetworkScenarioTest):
# test internal connectivity to the network ports on the network
network_ips = (p['fixed_ips'][0]['ip_address'] for p in
self._list_ports(tenant_id=server['tenant_id'],
network_id=network.id)
network_id=network['id'])
if p['device_owner'].startswith('network'))
self._check_server_connectivity(floating_ip,
network_ips,
@ -124,7 +124,7 @@ class TestMultiHVNetworkOps(manager.NetworkScenarioTest):
# test internal connectivity to the other VM on the same network
compute_ips = (p['fixed_ips'][0]['ip_address'] for p in
self._list_ports(tenant_id=server['tenant_id'],
network_id=network.id)
network_id=network['id'])
if p['device_owner'].startswith('compute'))
self._check_server_connectivity(floating_ip,
compute_ips,
@ -132,7 +132,7 @@ class TestMultiHVNetworkOps(manager.NetworkScenarioTest):
def _check_server_connectivity(self, floating_ip, address_list,
should_connect=True):
ip_address = floating_ip.floating_ip_address
ip_address = floating_ip['floating_ip_address']
private_key = self._get_server_key(self.floating_ip_tuple.server)
ssh_source = self.get_remote_client(ip_address,
private_key=private_key)