From 7a285a7fcc96767ab7825d04071ea70247964f38 Mon Sep 17 00:00:00 2001 From: Boden R Date: Wed, 6 Mar 2019 14:52:56 -0700 Subject: [PATCH] consume is_bsd from neutron-lib The test tool function is_bsd() lives in neutron-lib. This patch removes the function from neutron and uses it from neutron-lib instead. NeutronLibImpact Change-Id: Ib48f7f1c89e215e9e94d62de31776c492f810f54 --- neutron/tests/tools.py | 12 ------------ neutron/tests/unit/db/test_db_base_plugin_v2.py | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/neutron/tests/tools.py b/neutron/tests/tools.py index 89d96486dd8..adca9b667d0 100644 --- a/neutron/tests/tools.py +++ b/neutron/tests/tools.py @@ -15,7 +15,6 @@ import datetime import os -import platform import random import time import warnings @@ -334,17 +333,6 @@ def get_random_network_segment_range_network_type(): constants.TYPE_GENEVE]) -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 - - def reset_random_seed(): # reset random seed to make sure other processes extracting values from RNG # don't get the same results (useful especially when you then use the 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 bab4afca6a8..0f42a841b45 100644 --- a/neutron/tests/unit/db/test_db_base_plugin_v2.py +++ b/neutron/tests/unit/db/test_db_base_plugin_v2.py @@ -30,6 +30,7 @@ from neutron_lib.db import api as db_api from neutron_lib import exceptions as lib_exc from neutron_lib import fixture from neutron_lib.plugins import directory +from neutron_lib.tests import tools from neutron_lib.utils import helpers from neutron_lib.utils import net from oslo_concurrency import lockutils @@ -63,7 +64,6 @@ from neutron.objects import router as l3_obj from neutron.plugins.ml2.common import exceptions as ml2_exceptions from neutron import policy from neutron.tests import base -from neutron.tests import tools from neutron.tests.unit.api import test_extensions from neutron.tests.unit import testlib_api