diff --git a/neutron/tests/tools.py b/neutron/tests/tools.py index 63f730f8c21..a16e98be2fd 100644 --- a/neutron/tests/tools.py +++ b/neutron/tests/tools.py @@ -13,6 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. +import platform import warnings import fixtures @@ -121,3 +122,14 @@ class UnorderedList(list): def __neq__(self, other): return not self == other + + +def is_bsd(): + """Return True on BSD-based systems.""" + + system = platform.system() + if system == 'Darwin': + return True + if 'bsd' in system.lower(): + return True + return False diff --git a/neutron/tests/unit/db/test_db_base_plugin_v2.py b/neutron/tests/unit/db/test_db_base_plugin_v2.py index dea0296ac20..f739aef1b09 100644 --- a/neutron/tests/unit/db/test_db_base_plugin_v2.py +++ b/neutron/tests/unit/db/test_db_base_plugin_v2.py @@ -23,6 +23,7 @@ from oslo_config import cfg from oslo_utils import importutils import six from sqlalchemy import orm +import testtools from testtools import matchers import webob.exc @@ -3414,6 +3415,7 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase): ipv6_ra_mode=constants.IPV6_SLAAC, ipv6_address_mode=constants.IPV6_SLAAC) + @testtools.skipIf(tools.is_bsd(), 'bug/1484837') def test_create_subnet_ipv6_pd_gw_values(self): cidr = constants.PROVISIONAL_IPV6_PD_PREFIX # Gateway is last IP in IPv6 DHCPv6 Stateless subnet @@ -3540,6 +3542,7 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase): cidr=cidr, ip_version=6, allocation_pools=allocation_pools) + @testtools.skipIf(tools.is_bsd(), 'bug/1484837') def test_create_subnet_with_v6_pd_allocation_pool(self): gateway_ip = '::1' cidr = constants.PROVISIONAL_IPV6_PD_PREFIX