Merge "Revert "Hide ipv6 subnet API attributes""
This commit is contained in:
commit
054de0c148
@ -727,17 +727,15 @@ RESOURCE_ATTRIBUTE_MAP = {
|
|||||||
'default': True,
|
'default': True,
|
||||||
'convert_to': convert_to_boolean,
|
'convert_to': convert_to_boolean,
|
||||||
'is_visible': True},
|
'is_visible': True},
|
||||||
# NOTE: The following two attributes will be made visible once IPv6
|
'ipv6_ra_mode': {'allow_post': True, 'allow_put': True,
|
||||||
# will be fully supported
|
|
||||||
'ipv6_ra_mode': {'allow_post': False, 'allow_put': False,
|
|
||||||
'default': ATTR_NOT_SPECIFIED,
|
'default': ATTR_NOT_SPECIFIED,
|
||||||
'validate': {'type:values': constants.IPV6_MODES},
|
'validate': {'type:values': constants.IPV6_MODES},
|
||||||
'is_visible': False},
|
'is_visible': True},
|
||||||
'ipv6_address_mode': {'allow_post': False, 'allow_put': False,
|
'ipv6_address_mode': {'allow_post': True, 'allow_put': True,
|
||||||
'default': ATTR_NOT_SPECIFIED,
|
'default': ATTR_NOT_SPECIFIED,
|
||||||
'validate': {'type:values':
|
'validate': {'type:values':
|
||||||
constants.IPV6_MODES},
|
constants.IPV6_MODES},
|
||||||
'is_visible': False},
|
'is_visible': True},
|
||||||
SHARED: {'allow_post': False,
|
SHARED: {'allow_post': False,
|
||||||
'allow_put': False,
|
'allow_put': False,
|
||||||
'default': False,
|
'default': False,
|
||||||
|
@ -1158,9 +1158,9 @@ class NeutronDbPluginV2(neutron_plugin_base_v2.NeutronPluginBaseV2,
|
|||||||
'gateway_ip': s['gateway_ip'],
|
'gateway_ip': s['gateway_ip'],
|
||||||
'shared': network.shared}
|
'shared': network.shared}
|
||||||
if s['ip_version'] == 6 and s['enable_dhcp']:
|
if s['ip_version'] == 6 and s['enable_dhcp']:
|
||||||
if attributes.is_attr_set(s.get('ipv6_ra_mode')):
|
if attributes.is_attr_set(s['ipv6_ra_mode']):
|
||||||
args['ipv6_ra_mode'] = s['ipv6_ra_mode']
|
args['ipv6_ra_mode'] = s['ipv6_ra_mode']
|
||||||
if attributes.is_attr_set(s.get('ipv6_address_mode')):
|
if attributes.is_attr_set(s['ipv6_address_mode']):
|
||||||
args['ipv6_address_mode'] = s['ipv6_address_mode']
|
args['ipv6_address_mode'] = s['ipv6_address_mode']
|
||||||
subnet = models_v2.Subnet(**args)
|
subnet = models_v2.Subnet(**args)
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ class SecurityGroupServerRpcCallbackMixin(object):
|
|||||||
# TODO(xuhanp): Figure out how to call the following code
|
# TODO(xuhanp): Figure out how to call the following code
|
||||||
# each time router is created or updated.
|
# each time router is created or updated.
|
||||||
if not netaddr.IPAddress(gateway_ip).is_link_local():
|
if not netaddr.IPAddress(gateway_ip).is_link_local():
|
||||||
if subnet.get('ipv6_ra_mode'):
|
if subnet['ipv6_ra_mode']:
|
||||||
gateway_ip = self._get_lla_gateway_ip_for_subnet(context,
|
gateway_ip = self._get_lla_gateway_ip_for_subnet(context,
|
||||||
subnet)
|
subnet)
|
||||||
else:
|
else:
|
||||||
|
@ -22,7 +22,6 @@ import os
|
|||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
from testtools import matchers
|
from testtools import matchers
|
||||||
from testtools import testcase
|
|
||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
import neutron
|
import neutron
|
||||||
@ -2999,7 +2998,6 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase):
|
|||||||
res = subnet_req.get_response(self.api)
|
res = subnet_req.get_response(self.api)
|
||||||
self.assertEqual(res.status_int, webob.exc.HTTPClientError.code)
|
self.assertEqual(res.status_int, webob.exc.HTTPClientError.code)
|
||||||
|
|
||||||
@testcase.skip("Skipped until bug 1304093 is fixed")
|
|
||||||
def test_create_subnet_ipv6_attributes(self):
|
def test_create_subnet_ipv6_attributes(self):
|
||||||
gateway_ip = 'fe80::1'
|
gateway_ip = 'fe80::1'
|
||||||
cidr = 'fe80::/80'
|
cidr = 'fe80::/80'
|
||||||
@ -3010,7 +3008,6 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase):
|
|||||||
ipv6_ra_mode=mode,
|
ipv6_ra_mode=mode,
|
||||||
ipv6_address_mode=mode)
|
ipv6_address_mode=mode)
|
||||||
|
|
||||||
@testcase.skip("Skipped until bug 1304093 is fixed")
|
|
||||||
def test_create_subnet_ipv6_attributes_no_dhcp_enabled(self):
|
def test_create_subnet_ipv6_attributes_no_dhcp_enabled(self):
|
||||||
gateway_ip = 'fe80::1'
|
gateway_ip = 'fe80::1'
|
||||||
cidr = 'fe80::/80'
|
cidr = 'fe80::/80'
|
||||||
@ -3061,7 +3058,6 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase):
|
|||||||
self.assertEqual(ctx_manager.exception.code,
|
self.assertEqual(ctx_manager.exception.code,
|
||||||
webob.exc.HTTPClientError.code)
|
webob.exc.HTTPClientError.code)
|
||||||
|
|
||||||
@testcase.skip("Skipped until bug 1304093 is fixed")
|
|
||||||
def test_create_subnet_ipv6_single_attribute_set(self):
|
def test_create_subnet_ipv6_single_attribute_set(self):
|
||||||
gateway_ip = 'fe80::1'
|
gateway_ip = 'fe80::1'
|
||||||
cidr = 'fe80::/80'
|
cidr = 'fe80::/80'
|
||||||
@ -3236,7 +3232,6 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase):
|
|||||||
self.assertEqual(res.status_int,
|
self.assertEqual(res.status_int,
|
||||||
webob.exc.HTTPConflict.code)
|
webob.exc.HTTPConflict.code)
|
||||||
|
|
||||||
@testcase.skip("Skipped until bug 1304093 is fixed")
|
|
||||||
def test_update_subnet_ipv6_attributes(self):
|
def test_update_subnet_ipv6_attributes(self):
|
||||||
with self.subnet(ip_version=6, cidr='fe80::/80',
|
with self.subnet(ip_version=6, cidr='fe80::/80',
|
||||||
ipv6_ra_mode=constants.IPV6_SLAAC,
|
ipv6_ra_mode=constants.IPV6_SLAAC,
|
||||||
@ -3251,7 +3246,6 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase):
|
|||||||
self.assertEqual(res['subnet']['ipv6_address_mode'],
|
self.assertEqual(res['subnet']['ipv6_address_mode'],
|
||||||
data['subnet']['ipv6_address_mode'])
|
data['subnet']['ipv6_address_mode'])
|
||||||
|
|
||||||
@testcase.skip("Skipped until bug 1304093 is fixed")
|
|
||||||
def test_update_subnet_ipv6_inconsistent_ra_attribute(self):
|
def test_update_subnet_ipv6_inconsistent_ra_attribute(self):
|
||||||
with self.subnet(ip_version=6, cidr='fe80::/80',
|
with self.subnet(ip_version=6, cidr='fe80::/80',
|
||||||
ipv6_ra_mode=constants.IPV6_SLAAC,
|
ipv6_ra_mode=constants.IPV6_SLAAC,
|
||||||
@ -3263,7 +3257,6 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase):
|
|||||||
self.assertEqual(res.status_int,
|
self.assertEqual(res.status_int,
|
||||||
webob.exc.HTTPClientError.code)
|
webob.exc.HTTPClientError.code)
|
||||||
|
|
||||||
@testcase.skip("Skipped until bug 1304093 is fixed")
|
|
||||||
def test_update_subnet_ipv6_inconsistent_address_attribute(self):
|
def test_update_subnet_ipv6_inconsistent_address_attribute(self):
|
||||||
with self.subnet(ip_version=6, cidr='fe80::/80',
|
with self.subnet(ip_version=6, cidr='fe80::/80',
|
||||||
ipv6_ra_mode=constants.IPV6_SLAAC,
|
ipv6_ra_mode=constants.IPV6_SLAAC,
|
||||||
@ -3275,7 +3268,6 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase):
|
|||||||
self.assertEqual(res.status_int,
|
self.assertEqual(res.status_int,
|
||||||
webob.exc.HTTPClientError.code)
|
webob.exc.HTTPClientError.code)
|
||||||
|
|
||||||
@testcase.skip("Skipped until bug 1304093 is fixed")
|
|
||||||
def test_update_subnet_ipv6_inconsistent_enable_dhcp(self):
|
def test_update_subnet_ipv6_inconsistent_enable_dhcp(self):
|
||||||
with self.subnet(ip_version=6, cidr='fe80::/80',
|
with self.subnet(ip_version=6, cidr='fe80::/80',
|
||||||
ipv6_ra_mode=constants.IPV6_SLAAC,
|
ipv6_ra_mode=constants.IPV6_SLAAC,
|
||||||
|
@ -22,7 +22,6 @@ import mock
|
|||||||
from mock import call
|
from mock import call
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
from testtools import matchers
|
from testtools import matchers
|
||||||
from testtools import testcase
|
|
||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
from neutron.agent.common import config
|
from neutron.agent.common import config
|
||||||
@ -366,7 +365,6 @@ class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase):
|
|||||||
expected)
|
expected)
|
||||||
self._delete('ports', port_id1)
|
self._delete('ports', port_id1)
|
||||||
|
|
||||||
@testcase.skip("Skipped until bug 1304093 is fixed")
|
|
||||||
def test_security_group_ra_rules_for_devices_ipv6_gateway_global(self):
|
def test_security_group_ra_rules_for_devices_ipv6_gateway_global(self):
|
||||||
fake_prefix = FAKE_PREFIX[const.IPv6]
|
fake_prefix = FAKE_PREFIX[const.IPv6]
|
||||||
fake_gateway = FAKE_IP['IPv6_GLOBAL']
|
fake_gateway = FAKE_IP['IPv6_GLOBAL']
|
||||||
@ -437,7 +435,6 @@ class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase):
|
|||||||
self.deserialize(self.fmt, req.get_response(self.api))
|
self.deserialize(self.fmt, req.get_response(self.api))
|
||||||
self._delete('ports', gateway_port_id)
|
self._delete('ports', gateway_port_id)
|
||||||
|
|
||||||
@testcase.skip("Skipped until bug 1304093 is fixed")
|
|
||||||
def test_security_group_rule_for_device_ipv6_multi_router_interfaces(self):
|
def test_security_group_rule_for_device_ipv6_multi_router_interfaces(self):
|
||||||
fake_prefix = FAKE_PREFIX[const.IPv6]
|
fake_prefix = FAKE_PREFIX[const.IPv6]
|
||||||
fake_gateway = FAKE_IP['IPv6_GLOBAL']
|
fake_gateway = FAKE_IP['IPv6_GLOBAL']
|
||||||
@ -515,7 +512,6 @@ class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase):
|
|||||||
self._delete('ports', gateway_port_id)
|
self._delete('ports', gateway_port_id)
|
||||||
self._delete('ports', interface_port_id)
|
self._delete('ports', interface_port_id)
|
||||||
|
|
||||||
@testcase.skip("Skipped until bug 1304093 is fixed")
|
|
||||||
def test_security_group_ra_rules_for_devices_ipv6_gateway_lla(self):
|
def test_security_group_ra_rules_for_devices_ipv6_gateway_lla(self):
|
||||||
fake_prefix = FAKE_PREFIX[const.IPv6]
|
fake_prefix = FAKE_PREFIX[const.IPv6]
|
||||||
fake_gateway = FAKE_IP['IPv6_LLA']
|
fake_gateway = FAKE_IP['IPv6_LLA']
|
||||||
@ -568,7 +564,6 @@ class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase):
|
|||||||
expected)
|
expected)
|
||||||
self._delete('ports', port_id1)
|
self._delete('ports', port_id1)
|
||||||
|
|
||||||
@testcase.skip("Skipped until bug 1304093 is fixed")
|
|
||||||
def test_security_group_ra_rules_for_devices_ipv6_no_gateway_port(self):
|
def test_security_group_ra_rules_for_devices_ipv6_no_gateway_port(self):
|
||||||
fake_prefix = FAKE_PREFIX[const.IPv6]
|
fake_prefix = FAKE_PREFIX[const.IPv6]
|
||||||
with self.network() as n:
|
with self.network() as n:
|
||||||
|
Loading…
Reference in New Issue
Block a user