tempest test case expecting Conflict error but received mismatch error from contrail neutron plugin.
30 @test.idempotent_id('55100aa8-b24f-333c-0bef-64eefd85f15c')
31 def test_update_default_security_group_name(self):
32 sg_list = self.client.list_security_groups(name='default')
33 sg = sg_list['security_groups'][0]
34 import pdb; pdb.set_trace()
35 -> self.assertRaises(lib_exc.Conflict, self.client.update_security_group,
36 sg['id'], name='test')
37
(Pdb) print sg
{u'description': u'Default security group', u'contrail:fq_name': [u'default-domain', u'tempest-NegativeSecGroupTest-634125556', u'default'], u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'security_group_rules': [{u'remote_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'direction': u'ingress', u'remote_ip_prefix': None, u'protocol': u'any', u'ethertype': u'IPv4', u'port_range_max': 65535, u'security_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'port_range_min': 0, u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'id': u'42033bef-730c-43c3-88ff-8d7cb679258e'}, {u'remote_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'direction': u'ingress', u'remote_ip_prefix': None, u'protocol': u'any', u'ethertype': u'IPv6', u'port_range_max': 65535, u'security_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'port_range_min': 0, u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'id': u'2ea6bac0-af2f-4e7e-b7e6-2c24447bc83e'}, {u'remote_group_id': None, u'direction': u'egress', u'remote_ip_prefix': u'0.0.0.0/0', u'protocol': u'any', u'ethertype': u'IPv4', u'port_range_max': 65535, u'security_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'port_range_min': 0, u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'id': u'140ed5d3-d810-4ede-9a8a-ad1cb518db69'}, {u'remote_group_id': None, u'direction': u'egress', u'remote_ip_prefix': u'::/0', u'protocol': u'any', u'ethertype': u'IPv6', u'port_range_max': 65535, u'security_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'port_range_min': 0, u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'id': u'59d92d8a-95f3-45c9-bb8f-80a7db421302'}], u'id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'name': u'default'}
(Pdb) self.assertRaises(lib_exc.Conflict, self.client.update_security_group,sg['id'], name='test')
*** MismatchError: <function _update at 0x4b930c8> returned {u'security_group': {u'description': u'Default security group', u'contrail:fq_name': [u'default-domain', u'tempest-NegativeSecGroupTest-634125556', u'default'], u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'security_group_rules': [{u'remote_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'direction': u'ingress', u'remote_ip_prefix': None, u'protocol': u'any', u'ethertype': u'IPv4', u'port_range_max': 65535, u'security_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'port_range_min': 0, u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'id': u'42033bef-730c-43c3-88ff-8d7cb679258e'}, {u'remote_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'direction': u'ingress', u'remote_ip_prefix': None, u'protocol': u'any', u'ethertype': u'IPv6', u'port_range_max': 65535, u'security_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'port_range_min': 0, u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'id': u'2ea6bac0-af2f-4e7e-b7e6-2c24447bc83e'}, {u'remote_group_id': None, u'direction': u'egress', u'remote_ip_prefix': u'0.0.0.0/0', u'protocol': u'any', u'ethertype': u'IPv4', u'port_range_max': 65535, u'security_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'port_range_min': 0, u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'id': u'140ed5d3-d810-4ede-9a8a-ad1cb518db69'}, {u'remote_group_id': None, u'direction': u'egress', u'remote_ip_prefix': u'::/0', u'protocol': u'any', u'ethertype': u'IPv6', u'port_range_max': 65535, u'security_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'port_range_min': 0, u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'id': u'59d92d8a-95f3-45c9-bb8f-80a7db421302'}], u'id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'name': u'test'}}
(Pdb)
Review in progress for https://review.opencontrail.org/31209
Submitter: <email address hidden> (<email address hidden>)