Change IPv6 ICMP security group rule check
A neutron change, https://review.opendev.org/#/c/453346/ is standardizing the protocol name for IPv6 ICMP in security group rules to be 'ipv6-icmp', even if 'icmp' or 'icmpv6' was passed during creation. Change the IPv6 ICMP test to use 'ipv6-icmp' as the protocol name when the ethertype is IPv6. Change-Id: I7c0e0caf67ab39743cdd7600dba099aecacd86db Partial-Bug: #1582500
This commit is contained in:
parent
6555d7c98d
commit
13731b0206
@ -170,7 +170,14 @@ class SecGroupTest(base.BaseSecGroupTest):
|
|||||||
|
|
||||||
sg_id = group_create_body['security_group']['id']
|
sg_id = group_create_body['security_group']['id']
|
||||||
direction = 'ingress'
|
direction = 'ingress'
|
||||||
protocol = 'icmp'
|
# The Neutron API accepts 'icmp', 'icmpv6' and 'ipv6-icmp' for
|
||||||
|
# IPv6 ICMP protocol names, but the latter is preferred and the
|
||||||
|
# others considered "legacy". Use 'ipv6-icmp' as the API could
|
||||||
|
# change to return only that value, see
|
||||||
|
# https://review.opendev.org/#/c/453346/
|
||||||
|
# The neutron-tempest-plugin API tests pass all three and verify
|
||||||
|
# the output, so there is no need to duplicate that here.
|
||||||
|
protocol = 'ipv6-icmp' if self._ip_version == 6 else 'icmp'
|
||||||
icmp_type_codes = [(3, 2), (3, 0), (8, 0), (0, 0), (11, None)]
|
icmp_type_codes = [(3, 2), (3, 0), (8, 0), (0, 0), (11, None)]
|
||||||
for icmp_type, icmp_code in icmp_type_codes:
|
for icmp_type, icmp_code in icmp_type_codes:
|
||||||
self._create_verify_security_group_rule(sg_id, direction,
|
self._create_verify_security_group_rule(sg_id, direction,
|
||||||
|
Loading…
Reference in New Issue
Block a user