]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix protocol value for SG IPV6 RA rule
authorsridhargaddam <sridhar.gaddam@enovance.com>
Thu, 24 Apr 2014 19:51:01 +0000 (01:21 +0530)
committersridhargaddam <sridhar.gaddam@enovance.com>
Fri, 25 Apr 2014 16:11:19 +0000 (21:41 +0530)
The ingress SG rule for RA has a wrong value for protocol
field.

Change-Id: I4d3bca4b758540cf857eb13d36ee18f8ebc28272
Closes-Bug: #1312392

neutron/db/securitygroups_rpc_base.py
neutron/tests/unit/test_security_groups_rpc.py

index 38d01fb22323cb2ed75d1ef26ddf4e3eee3db0dc..b9db8b394191ad7a75dc2f1070507f5fca988165 100644 (file)
@@ -337,7 +337,7 @@ class SecurityGroupServerRpcCallbackMixin(object):
 
             ra_rule = {'direction': 'ingress',
                        'ethertype': q_const.IPv6,
-                       'protocol': 'icmp',
+                       'protocol': q_const.PROTO_NAME_ICMP_V6,
                        'source_ip_prefix': ra_ip,
                        'source_port_range_min': q_const.ICMPV6_TYPE_RA}
             port['security_group_rules'].append(ra_rule)
index 17bd3976baf1bf13291e1f53c5d934ba00303a35..60646c23cd7ab166e9bbe6e9b052db12cc0139c1 100644 (file)
@@ -356,7 +356,7 @@ class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase):
                              'port_range_min': 23,
                              'source_ip_prefix': fake_prefix},
                             {'direction': 'ingress',
-                             'protocol': const.PROTO_NAME_ICMP,
+                             'protocol': const.PROTO_NAME_ICMP_V6,
                              'ethertype': const.IPv6,
                              'source_ip_prefix': fake_gateway,
                              'source_port_range_min': const.ICMPV6_TYPE_RA},
@@ -420,7 +420,7 @@ class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase):
                              'security_group_id': sg1_id,
                              'port_range_min': 22},
                             {'direction': 'ingress',
-                             'protocol': const.PROTO_NAME_ICMP,
+                             'protocol': const.PROTO_NAME_ICMP_V6,
                              'ethertype': const.IPv6,
                              'source_ip_prefix': gateway_lla_ip,
                              'source_port_range_min': const.ICMPV6_TYPE_RA},
@@ -496,7 +496,7 @@ class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase):
                              'security_group_id': sg1_id,
                              'port_range_min': 22},
                             {'direction': 'ingress',
-                             'protocol': const.PROTO_NAME_ICMP,
+                             'protocol': const.PROTO_NAME_ICMP_V6,
                              'ethertype': const.IPv6,
                              'source_ip_prefix': gateway_lla_ip,
                              'source_port_range_min': const.ICMPV6_TYPE_RA},
@@ -555,7 +555,7 @@ class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase):
                              'security_group_id': sg1_id,
                              'port_range_min': 22},
                             {'direction': 'ingress',
-                             'protocol': const.PROTO_NAME_ICMP,
+                             'protocol': const.PROTO_NAME_ICMP_V6,
                              'ethertype': const.IPv6,
                              'source_ip_prefix': fake_gateway,
                              'source_port_range_min': const.ICMPV6_TYPE_RA},
@@ -666,7 +666,7 @@ class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase):
                              'port_range_min': 23,
                              'dest_ip_prefix': fake_prefix},
                             {'direction': 'ingress',
-                             'protocol': const.PROTO_NAME_ICMP,
+                             'protocol': const.PROTO_NAME_ICMP_V6,
                              'ethertype': const.IPv6,
                              'source_ip_prefix': fake_gateway,
                              'source_port_range_min': const.ICMPV6_TYPE_RA},
@@ -734,7 +734,7 @@ class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase):
                              'remote_group_id': sg2_id,
                              'security_group_id': sg1_id},
                             {'direction': 'ingress',
-                             'protocol': const.PROTO_NAME_ICMP,
+                             'protocol': const.PROTO_NAME_ICMP_V6,
                              'ethertype': const.IPv6,
                              'source_ip_prefix': fake_gateway,
                              'source_port_range_min': const.ICMPV6_TYPE_RA},