neutron-lib cleanup in neutron-fwaas

This cleans up a few bits of code to use neutron-lib or removing them if
neutron is imported but nothing is done.

* neutron_fwaas/tests/functional/test_fwaas_driver.py imported neutron but was
  a no-op.  Deleted.
* neutron_fwaas/db/models/head.py was a shift from neutron-lib to neutron for
  where model_base comes from.
* neutron_fwaas/tests/functional/db/test_migrations.py imported neutron mixins
  for database test classes specific to MySQL and PostgreSQL, but those classes
  were just 'pass'.  Deleted.

Change-Id: Ifc2e5f8cde3238531cec6c00168b601ce045205a
This commit is contained in:
Nate Johnston 2016-11-30 18:56:38 +00:00
parent fffd6bcb5a
commit bc3629645f
3 changed files with 2 additions and 46 deletions

View File

@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from neutron.db.migration.models import head
from neutron_lib.db import model_base
from neutron_fwaas.db.firewall import firewall_db # noqa
from neutron_fwaas.db.firewall import firewall_router_insertion_db # noqa
@ -18,4 +18,4 @@ from neutron_fwaas.db.firewall.v2 import firewall_db_v2 # noqa
def get_metadata():
return head.model_base.BASEV2.metadata
return model_base.BASEV2.metadata

View File

@ -15,7 +15,6 @@ from oslo_config import cfg
from neutron.db.migration.alembic_migrations import external
from neutron.db.migration import cli as migration
from neutron.tests.functional.db import test_migrations
from neutron.tests.unit import testlib_api
from neutron_fwaas.db.models import head
@ -48,15 +47,3 @@ class _TestModelsMigrationsFWaaS(test_migrations._TestModelsMigrations):
if type_ == 'index' and reflected and name.startswith("idx_autoinc_"):
return False
return True
class TestModelsMigrationsMysql(testlib_api.MySQLTestCaseMixin,
_TestModelsMigrationsFWaaS,
testlib_api.SqlTestCaseLight):
pass
class TestModelsMigrationsPostgresql(testlib_api.PostgreSQLTestCaseMixin,
_TestModelsMigrationsFWaaS,
testlib_api.SqlTestCaseLight):
pass

View File

@ -1,31 +0,0 @@
# Copyright (c) 2015 Cisco Systems, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# NOTE: The purpose of this module is to provide a nop test to verify that
# the functional gate is working.
from neutron.tests.functional import base
class TestFWaaSDriver(base.BaseSudoTestCase):
"""Test the iptables implementation of the FWaaS driver."""
# NOTE: Tests may be added/removed/changed, when this is fleshed out
# in future commits.
def test_status_reporting(self):
"""Test status reported correctly to agent."""
pass