Merge "Fix Quota error while running tests"
diff --git a/neutron/tests/tempest/api/test_auto_allocated_topology.py b/neutron/tests/tempest/api/test_auto_allocated_topology.py
index 7a6d5ac..0db7602 100644
--- a/neutron/tests/tempest/api/test_auto_allocated_topology.py
+++ b/neutron/tests/tempest/api/test_auto_allocated_topology.py
@@ -54,6 +54,9 @@
# Ensure the public external network is the default external network
public_net_id = cfg.CONF.network.public_network_id
cls.admin_client.update_network(public_net_id, is_default=True)
+ # Ensure that is_default does not accidentally flip back to False
+ # because of network_update requests that do not contain is_default.
+ cls.admin_client.update_network(public_net_id, description="gman")
def _count_topology_resources(self):
'''Count the resources whose names begin with 'auto_allocated_'.'''
diff --git a/neutron/tests/tempest/api/test_tag.py b/neutron/tests/tempest/api/test_tag.py
index 8ed44ae..70a2d44 100644
--- a/neutron/tests/tempest/api/test_tag.py
+++ b/neutron/tests/tempest/api/test_tag.py
@@ -315,3 +315,35 @@
@test.requires_ext(extension="tag-ext", service="network")
def test_filter_router_tags(self):
self._test_filter_tags()
+
+
+class UpdateTagsTest(base.BaseAdminNetworkTest):
+
+ @classmethod
+ @test.requires_ext(extension="tag", service="network")
+ def resource_setup(cls):
+ super(UpdateTagsTest, cls).resource_setup()
+
+ def _get_and_compare_tags(self, tags, res_id):
+ # nothing specific about networks here, just a resource that is
+ # available in all setups
+ res_body = self.client.get_tags('networks', res_id)
+ self.assertItemsEqual(tags, res_body['tags'])
+
+ @test.attr(type='smoke')
+ @decorators.idempotent_id('74c56fb1-a3b1-4a62-a8d2-d04dca6bd4cd')
+ def test_update_tags_affects_only_updated_resource(self):
+ res1 = self.create_network()
+ res2 = self.create_network()
+
+ self.client.update_tags('networks', res1['id'], ['red', 'blue'])
+ self._get_and_compare_tags(['red', 'blue'], res1['id'])
+
+ self.client.update_tags('networks', res2['id'], ['red'])
+ self._get_and_compare_tags(['red'], res2['id'])
+
+ self.client.update_tags('networks', res2['id'], [])
+ self._get_and_compare_tags([], res2['id'])
+
+ # check that updates on res2 hasn't dropped tags from res1
+ self._get_and_compare_tags(['red', 'blue'], res1['id'])
diff --git a/neutron/tests/tempest/scenario/test_trunk.py b/neutron/tests/tempest/scenario/test_trunk.py
index fb3e947..54399aa 100644
--- a/neutron/tests/tempest/scenario/test_trunk.py
+++ b/neutron/tests/tempest/scenario/test_trunk.py
@@ -13,8 +13,8 @@
# under the License.
import netaddr
-from tempest.common.utils.linux import remote_client
from tempest.common import waiters
+from tempest.lib.common import ssh
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest import test
@@ -121,11 +121,10 @@
server, fip = self._create_server_with_fip(parent_port['id'])
self.addCleanup(self._detach_and_delete_trunk, server, trunk)
- server_ssh_client = remote_client.RemoteClient(
+ server_ssh_client = ssh.Client(
fip['floating_ip_address'],
CONF.validation.image_ssh_user,
- pkey=self.keypair['private_key'],
- server=server)
+ pkey=self.keypair['private_key'])
return {
'server': server,
@@ -238,6 +237,20 @@
command = CONFIGURE_VLAN_INTERFACE_COMMANDS % {'tag': vlan_tag}
server['ssh_client'].exec_command(command)
- # Ping from server1 to server2 via VLAN interface
- servers[0]['ssh_client'].ping_host(
- servers[1]['subport']['fixed_ips'][0]['ip_address'])
+ # Ping from server1 to server2 via VLAN interface should fail because
+ # we haven't allowed ICMP
+ self.check_remote_connectivity(
+ servers[0]['ssh_client'],
+ servers[1]['subport']['fixed_ips'][0]['ip_address'],
+ should_succeed=False
+ )
+ # allow intra-securitygroup traffic
+ self.client.create_security_group_rule(
+ security_group_id=self.secgroup['security_group']['id'],
+ direction='ingress', ethertype='IPv4', protocol='icmp',
+ remote_group_id=self.secgroup['security_group']['id'])
+ self.check_remote_connectivity(
+ servers[0]['ssh_client'],
+ servers[1]['subport']['fixed_ips'][0]['ip_address'],
+ should_succeed=True
+ )