Renaming gbp package to gbpservice

Top level gbp directory is renamed to gbpservice. This results
in a changes to all gbp imports and other build artifacts.

Change-Id: I87cbb7c91b4206c1b8a0caa4ab7a7dc2e8f3e25e
Closes-bug: 1406623
This commit is contained in:
Sumit Naiksatam 2014-12-31 01:06:31 -08:00
parent d539fb77e4
commit 67b74e0aec
122 changed files with 240 additions and 203 deletions

View File

@ -24,8 +24,9 @@ from neutron.openstack.common import log as logging
from neutron.openstack.common import uuidutils
from neutron.plugins.common import constants
from gbp.neutron.extensions import group_policy as gpolicy
from gbp.neutron.services.grouppolicy.common import constants as gp_constants
from gbpservice.neutron.extensions import group_policy as gpolicy
from gbpservice.neutron.services.grouppolicy.common import (
constants as gp_constants)
LOG = logging.getLogger(__name__)

View File

@ -18,7 +18,7 @@ from neutron.db import model_base
from neutron.openstack.common import log as logging
from neutron.openstack.common import uuidutils
from gbp.neutron.db.grouppolicy import group_policy_db as gpdb
from gbpservice.neutron.db.grouppolicy import group_policy_db as gpdb
LOG = logging.getLogger(__name__)

View File

@ -19,7 +19,7 @@ from oslo.db.sqlalchemy import session
import sqlalchemy as sa
from sqlalchemy import event
from gbp.neutron.db.migration.models import head # noqa
from gbpservice.neutron.db.migration.models import head # noqa
# Mirror of the Neutron's env, plus some tweaks in order to set cross DB
# FKs.

View File

@ -13,7 +13,7 @@
# under the License.
#
"""gbp-classifiers_actions_rules
"""gbp_classifiers_actions_rules
Revision ID: 4ae51f13395a
Create Date: 2014-07-30 14:16:05.660561
@ -29,7 +29,8 @@ from alembic import op
from neutron.plugins.common import constants
import sqlalchemy as sa
from gbp.neutron.services.grouppolicy.common import constants as gp_constants
from gbpservice.neutron.services.grouppolicy.common import (
constants as gp_constants)
def upgrade(active_plugins=None, options=None):

View File

@ -16,8 +16,9 @@ from neutron.db.migration.cli import * # noqa
def main():
config = alembic_config.Config(
os.path.join(os.path.dirname(__file__), 'alembic.ini'))
config.set_main_option('script_location',
'gbp.neutron.db.migration:alembic_migrations')
config.set_main_option(
'script_location',
'gbpservice.neutron.db.migration:alembic_migrations')
config.neutron_config = CONF
CONF()
CONF.command.func(config, CONF.command.name)

View File

@ -14,8 +14,8 @@
# under the License.
from gbp.neutron.db.grouppolicy import group_policy_db # noqa
from gbp.neutron.db.grouppolicy import group_policy_mapping_db # noqa
from gbpservice.neutron.db.grouppolicy import group_policy_db # noqa
from gbpservice.neutron.db.grouppolicy import group_policy_mapping_db # noqa
from neutron.db import model_base

View File

@ -23,7 +23,7 @@ from neutron.openstack.common import jsonutils
from neutron.openstack.common import log as logging
from neutron.openstack.common import uuidutils
from gbp.neutron.extensions import servicechain as schain
from gbpservice.neutron.extensions import servicechain as schain
LOG = logging.getLogger(__name__)
MAX_IPV4_SUBNET_PREFIX_LENGTH = 31

View File

@ -23,14 +23,15 @@ from neutron.openstack.common import uuidutils
from neutron.plugins.common import constants
from neutron.services import service_base
import gbp.neutron.extensions
from gbp.neutron.services.grouppolicy.common import constants as gp_constants
import gbpservice.neutron.extensions
from gbpservice.neutron.services.grouppolicy.common import (
constants as gp_constants)
# The code below is a monkey patch of key Neutron's modules. This is needed for
# the GBP service to be loaded correctly. GBP extensions' path is added
# to Neutron's so that it's found at extension scanning time.
extensions.append_api_extensions_path(gbp.neutron.extensions.__path__)
extensions.append_api_extensions_path(gbpservice.neutron.extensions.__path__)
constants.GROUP_POLICY = "GROUP_POLICY"
constants.COMMON_PREFIXES["GROUP_POLICY"] = "/grouppolicy"
constants.EXT_TO_SERVICE_MAPPING['gp'] = constants.GROUP_POLICY

View File

@ -12,7 +12,7 @@
from neutron.api.v2 import attributes as attr
from gbp.neutron.extensions import group_policy as gp
from gbpservice.neutron.extensions import group_policy as gp
# Extended attributes for Group Policy resource to map to Neutron constructs

View File

@ -23,13 +23,13 @@ from neutron.openstack.common import log as logging
from neutron.plugins.common import constants
from neutron.services import service_base
import gbp.neutron.extensions
import gbpservice.neutron.extensions
# The code below is a monkey patch of key Neutron's modules. This is needed for
# the GBP service to be loaded correctly. GBP extensions' path is added
# to Neutron's so that it's found at extension scanning time.
extensions.append_api_extensions_path(gbp.neutron.extensions.__path__)
extensions.append_api_extensions_path(gbpservice.neutron.extensions.__path__)
constants.SERVICECHAIN = "SERVICECHAIN"
constants.COMMON_PREFIXES["SERVICECHAIN"] = "/servicechain"

View File

@ -17,7 +17,8 @@ from neutron.common import constants as n_constants
from neutron.openstack.common import log
from neutron.plugins.ml2 import driver_api as api
from gbp.neutron.services.grouppolicy.drivers.cisco.apic import apic_mapping
from gbpservice.neutron.services.grouppolicy.drivers.cisco.apic import (
apic_mapping as amap)
LOG = log.getLogger(__name__)
@ -30,7 +31,7 @@ class APICMechanismGBPDriver(api.MechanismDriver):
@property
def apic_gbp(self):
if not self._apic_gbp:
self._apic_gbp = (apic_mapping.ApicMappingDriver.
self._apic_gbp = (amap.ApicMappingDriver.
get_initialized_instance())
return self._apic_gbp

View File

@ -16,7 +16,7 @@
from neutron.plugins.ml2 import driver_api as api
from neutron.plugins.nuage.common import constants as nuage_const
from gbp.neutron.services.grouppolicy.drivers.nuage import driver
from gbpservice.neutron.services.grouppolicy.drivers.nuage import driver
class NuageMechanismGBPDriver(api.MechanismDriver):

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from gbp.neutron.services.grouppolicy.drivers.odl import odl_mapping
from gbpservice.neutron.services.grouppolicy.drivers.odl import odl_mapping
from neutron.common import constants as n_constants
from neutron.extensions import portbindings
from neutron.openstack.common import log

View File

@ -18,12 +18,13 @@ group_policy_opts = [
default=['dummy'],
help=_("An ordered list of group policy driver "
"entrypoints to be loaded from the "
"gbp.neutron.group_policy.policy_drivers namespace.")),
"gbpservice.neutron.group_policy.policy_drivers "
"namespace.")),
cfg.ListOpt('extension_drivers',
default=[],
help=_("An ordered list of extension driver "
"entrypoints to be loaded from the "
"gbp.neutron.group_policy.extension_drivers "
"gbpservice.neutron.group_policy.extension_drivers "
"namespace.")),
]

View File

@ -24,10 +24,11 @@ from neutron.plugins.ml2.drivers.cisco.apic import config
from neutron.plugins.ml2 import models
from oslo.config import cfg
from gbp.neutron.db.grouppolicy import group_policy_mapping_db as gpdb
from gbp.neutron.services.grouppolicy.common import constants as g_const
from gbp.neutron.services.grouppolicy.common import exceptions as gpexc
from gbp.neutron.services.grouppolicy.drivers import resource_mapping as api
from gbpservice.neutron.db.grouppolicy import group_policy_mapping_db as gpdb
from gbpservice.neutron.services.grouppolicy.common import constants as g_const
from gbpservice.neutron.services.grouppolicy.common import exceptions as gpexc
from gbpservice.neutron.services.grouppolicy.drivers import (
resource_mapping as api)
LOG = logging.getLogger(__name__)

View File

@ -12,7 +12,8 @@
from neutron.common import log
from gbp.neutron.services.grouppolicy import group_policy_driver_api as api
from gbpservice.neutron.services.grouppolicy import (
group_policy_driver_api as api)
class NoopDriver(api.PolicyDriver):

View File

@ -17,8 +17,9 @@ from neutron.common import log
from neutron.db import model_base
from neutron.openstack.common import log as logging
from gbp.neutron.services.grouppolicy.common import exceptions as exc
from gbp.neutron.services.grouppolicy import group_policy_driver_api as api
from gbpservice.neutron.services.grouppolicy import (
group_policy_driver_api as api)
from gbpservice.neutron.services.grouppolicy.common import exceptions as exc
LOG = logging.getLogger(__name__)

View File

@ -16,8 +16,9 @@ from neutron.openstack.common import importutils
from neutron.openstack.common import log as logging
from oslo.config import cfg
from gbp.neutron.services.grouppolicy.drivers.nuage.common import config
from gbp.neutron.services.grouppolicy.drivers import resource_mapping as api
from gbpservice.neutron.services.grouppolicy.drivers import (
resource_mapping as api)
from gbpservice.neutron.services.grouppolicy.drivers.nuage.common import config
LOG = logging.getLogger(__name__)

View File

@ -18,17 +18,21 @@ from oslo.serialization import jsonutils
from requests import auth
LOG = logging.getLogger(__name__)
cfg.CONF.import_opt('odl_username',
'gbp.neutron.services.grouppolicy.drivers.odl.config',
cfg.CONF.import_opt(
'odl_username',
'gbpservice.neutron.services.grouppolicy.drivers.odl.config',
group='odl_driver')
cfg.CONF.import_opt('odl_password',
'gbp.neutron.services.grouppolicy.drivers.odl.config',
cfg.CONF.import_opt(
'odl_password',
'gbpservice.neutron.services.grouppolicy.drivers.odl.config',
group='odl_driver')
cfg.CONF.import_opt('odl_host',
'gbp.neutron.services.grouppolicy.drivers.odl.config',
cfg.CONF.import_opt(
'odl_host',
'gbpservice.neutron.services.grouppolicy.drivers.odl.config',
group='odl_driver')
cfg.CONF.import_opt('odl_port',
'gbp.neutron.services.grouppolicy.drivers.odl.config',
cfg.CONF.import_opt(
'odl_port',
'gbpservice.neutron.services.grouppolicy.drivers.odl.config',
group='odl_driver')

View File

@ -12,16 +12,18 @@
import uuid
from gbp.neutron.db.grouppolicy import group_policy_mapping_db as gpdb
from gbp.neutron.services.grouppolicy.common import constants as g_const
from gbp.neutron.services.grouppolicy.common import exceptions as gpexc
from gbp.neutron.services.grouppolicy.drivers.odl import odl_manager
from gbp.neutron.services.grouppolicy.drivers import resource_mapping as api
from neutron import manager
from neutron.openstack.common import lockutils # noqa
from neutron.openstack.common import log as logging
from neutron.plugins.common import constants
from gbpservice.neutron.db.grouppolicy import group_policy_mapping_db as gpdb
from gbpservice.neutron.services.grouppolicy.common import constants as g_const
from gbpservice.neutron.services.grouppolicy.common import exceptions as gpexc
from gbpservice.neutron.services.grouppolicy.drivers import (
resource_mapping as api)
from gbpservice.neutron.services.grouppolicy.drivers.odl import odl_manager
LOG = logging.getLogger(__name__)

View File

@ -19,7 +19,7 @@ import urlparse
from oslo.config import cfg
from gbp.neutron.services.grouppolicy.common import exceptions
from gbpservice.neutron.services.grouppolicy.common import exceptions
from neutron.openstack.common import jsonutils
from neutron.openstack.common import log as logging

View File

@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from gbp.neutron.services.grouppolicy.drivers import (
from gbpservice.neutron.services.grouppolicy.drivers import (
resource_mapping as res_map)
from gbp.neutron.services.grouppolicy.drivers.oneconvergence import (
from gbpservice.neutron.services.grouppolicy.drivers.oneconvergence import (
nvsd_gbp_api as api)
from neutron.common import exceptions as n_exc

View File

@ -29,11 +29,12 @@ from neutron.plugins.common import constants as pconst
from oslo.config import cfg
import sqlalchemy as sa
from gbp.neutron.db.grouppolicy import group_policy_db as gpdb
from gbp.neutron.db import servicechain_db # noqa
from gbp.neutron.services.grouppolicy.common import constants as gconst
from gbp.neutron.services.grouppolicy.common import exceptions as exc
from gbp.neutron.services.grouppolicy import group_policy_driver_api as api
from gbpservice.neutron.db.grouppolicy import group_policy_db as gpdb
from gbpservice.neutron.db import servicechain_db # noqa
from gbpservice.neutron.services.grouppolicy import (
group_policy_driver_api as api)
from gbpservice.neutron.services.grouppolicy.common import constants as gconst
from gbpservice.neutron.services.grouppolicy.common import exceptions as exc
LOG = logging.getLogger(__name__)

View File

@ -29,7 +29,7 @@ class ExtensionManager(stevedore.named.NamedExtensionManager):
LOG.info(_("Configured extension driver names: %s"),
cfg.CONF.group_policy.extension_drivers)
super(ExtensionManager, self).__init__(
'gbp.neutron.group_policy.extension_drivers',
'gbpservice.neutron.group_policy.extension_drivers',
cfg.CONF.group_policy.extension_drivers,
invoke_on_load=True,
name_order=True)

View File

@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from gbp.neutron.services.grouppolicy import group_policy_driver_api as api
from gbpservice.neutron.services.grouppolicy import (
group_policy_driver_api as api)
class GroupPolicyContext(object):

View File

@ -17,13 +17,16 @@ from neutron.common import log
from neutron.openstack.common import excutils
from neutron.openstack.common import log as logging
from gbp.neutron.db.grouppolicy import group_policy_db as gdb
from gbp.neutron.db.grouppolicy import group_policy_mapping_db
from gbp.neutron.extensions import group_policy as gpex
from gbp.neutron.services.grouppolicy.common import exceptions as gp_exc
from gbp.neutron.services.grouppolicy import extension_manager as ext_manager
from gbp.neutron.services.grouppolicy import group_policy_context as p_context
from gbp.neutron.services.grouppolicy import policy_driver_manager as manager
from gbpservice.neutron.db.grouppolicy import group_policy_db as gdb
from gbpservice.neutron.db.grouppolicy import group_policy_mapping_db
from gbpservice.neutron.extensions import group_policy as gpex
from gbpservice.neutron.services.grouppolicy import (
extension_manager as ext_manager)
from gbpservice.neutron.services.grouppolicy import (
group_policy_context as p_context)
from gbpservice.neutron.services.grouppolicy import (
policy_driver_manager as manager)
from gbpservice.neutron.services.grouppolicy.common import exceptions as gp_exc
LOG = logging.getLogger(__name__)

View File

@ -15,12 +15,12 @@ from oslo.config import cfg
import stevedore
from gbp.neutron.services.grouppolicy.common import exceptions as gp_exc
from gbpservice.neutron.services.grouppolicy.common import exceptions as gp_exc
LOG = log.getLogger(__name__)
cfg.CONF.import_opt('policy_drivers',
'gbp.neutron.services.grouppolicy.config',
'gbpservice.neutron.services.grouppolicy.config',
group='group_policy')
@ -66,7 +66,7 @@ class PolicyDriverManager(stevedore.named.NamedExtensionManager):
LOG.info(_("Configured policy driver names: %s"),
cfg.CONF.group_policy.policy_drivers)
super(PolicyDriverManager,
self).__init__('gbp.neutron.group_policy.policy_drivers',
self).__init__('gbpservice.neutron.group_policy.policy_drivers',
cfg.CONF.group_policy.policy_drivers,
invoke_on_load=True,
name_order=True)

View File

@ -18,7 +18,7 @@ service_chain_opts = [
default=['dummy'],
help=_("An ordered list of service chain drivers "
"entrypoints to be loaded from the "
"gbp.neutron.servicechain.servicechain_drivers "
"gbpservice.neutron.servicechain.servicechain_drivers "
"namespace.")),
cfg.StrOpt('heat_uri',
default='http://localhost:8004/v1',

View File

@ -14,12 +14,13 @@ from neutron.openstack.common import log
from oslo.config import cfg
import stevedore
from gbp.neutron.services.servicechain.common import exceptions as sc_exc
from gbpservice.neutron.services.servicechain.common import (
exceptions as sc_exc)
LOG = log.getLogger(__name__)
cfg.CONF.import_opt('servicechain_drivers',
'gbp.neutron.services.servicechain.config',
'gbpservice.neutron.services.servicechain.config',
group='servicechain')
@ -38,10 +39,10 @@ class DriverManager(stevedore.named.NamedExtensionManager):
LOG.info(_("Configured servicechain driver names: %s"),
cfg.CONF.servicechain.servicechain_drivers)
super(DriverManager,
self).__init__('gbp.neutron.servicechain.servicechain_drivers',
self).__init__(
'gbpservice.neutron.servicechain.servicechain_drivers',
cfg.CONF.servicechain.servicechain_drivers,
invoke_on_load=True,
name_order=True)
invoke_on_load=True, name_order=True)
LOG.info(_("Loaded servicechain driver names: %s"), self.names())
self._register_drivers()

View File

@ -23,9 +23,9 @@ from neutron.openstack.common import log as logging
from oslo.config import cfg
import sqlalchemy as sa
from gbp.neutron.services.grouppolicy.drivers.oneconvergence import\
nvsd_gbp_api
from gbp.neutron.services.servicechain.drivers import simplechain_driver
from gbpservice.neutron.services.grouppolicy.drivers.oneconvergence import (
nvsd_gbp_api as napi)
from gbpservice.neutron.services.servicechain.drivers import simplechain_driver
eventlet.monkey_patch()
@ -75,7 +75,7 @@ class OneconvergenceServiceChainDriver(simplechain_driver.SimpleChainDriver):
def __init__(self):
self.pending_chain_insertions = list()
self.nvsd_api = nvsd_gbp_api.NVSDServiceApi()
self.nvsd_api = napi.NVSDServiceApi()
@log.log
def create_servicechain_spec_precommit(self, context):

View File

@ -22,7 +22,7 @@ from oslo.config import cfg
import sqlalchemy as sa
from gbp.neutron.services.servicechain.common import exceptions as exc
from gbpservice.neutron.services.servicechain.common import exceptions as exc
LOG = logging.getLogger(__name__)

View File

@ -14,11 +14,13 @@ from neutron.common import log
from neutron.openstack.common import excutils
from neutron.openstack.common import log as logging
import gbp.neutron.db.servicechain_db as servicechain_db
from gbp.neutron.services.servicechain.common import exceptions as sc_exc
from gbp.neutron.services.servicechain import driver_manager as manager
from gbp.neutron.services.servicechain import servicechain_context as \
servicechain_context
import gbpservice.neutron.db.servicechain_db as servicechain_db
from gbpservice.neutron.services.servicechain import (
driver_manager as manager)
from gbpservice.neutron.services.servicechain import (
servicechain_context as servicechain_context)
from gbpservice.neutron.services.servicechain.common import (
exceptions as sc_exc)
LOG = logging.getLogger(__name__)

View File

@ -24,10 +24,10 @@ from neutron.tests.unit import test_db_plugin
from neutron.tests.unit import test_extensions
from oslo.config import cfg
from gbp.neutron.db.grouppolicy import group_policy_db as gpdb
import gbp.neutron.extensions
from gbp.neutron.extensions import group_policy as gpolicy
from gbp.neutron.tests.unit import common as cm
from gbpservice.neutron.db.grouppolicy import group_policy_db as gpdb
import gbpservice.neutron.extensions
from gbpservice.neutron.extensions import group_policy as gpolicy
from gbpservice.neutron.tests.unit import common as cm
JSON_FORMAT = 'json'
@ -168,7 +168,8 @@ class GroupPolicyDbTestCase(GroupPolicyDBTestBase,
def setUp(self, core_plugin=None, gp_plugin=None, service_plugins=None,
ext_mgr=None):
extensions.append_api_extensions_path(gbp.neutron.extensions.__path__)
extensions.append_api_extensions_path(
gbpservice.neutron.extensions.__path__)
if not gp_plugin:
gp_plugin = DB_GP_PLUGIN_KLASS
self.plugin = importutils.import_object(gp_plugin)

View File

@ -17,8 +17,9 @@ import webob.exc
from neutron.tests.unit import test_l3_plugin
from neutron.tests.unit import testlib_api
from gbp.neutron.db.grouppolicy import group_policy_mapping_db as gpmdb
from gbp.neutron.tests.unit.db.grouppolicy import test_group_policy_db as tgpdb
from gbpservice.neutron.db.grouppolicy import group_policy_mapping_db as gpmdb
from gbpservice.neutron.tests.unit.db.grouppolicy import (
test_group_policy_db as tgpdb)
class GroupPolicyMappingDBTestPlugin(gpmdb.GroupPolicyMappingDbPlugin):
@ -30,7 +31,8 @@ DB_GP_PLUGIN_KLASS = (GroupPolicyMappingDBTestPlugin.__module__ + '.' +
GroupPolicyMappingDBTestPlugin.__name__)
SC_PLUGIN_KLASS = (
"gbp.neutron.services.servicechain.servicechain_plugin.ServiceChainPlugin"
"gbpservice.neutron.services.servicechain.servicechain_plugin."
"ServiceChainPlugin"
)

View File

@ -21,9 +21,9 @@ from neutron.plugins.common import constants
from neutron.tests.unit import test_db_plugin
from neutron.tests.unit import test_extensions
from gbp.neutron.db import servicechain_db as svcchain_db
import gbp.neutron.extensions
from gbp.neutron.extensions import servicechain as service_chain
from gbpservice.neutron.db import servicechain_db as svcchain_db
import gbpservice.neutron.extensions
from gbpservice.neutron.extensions import servicechain as service_chain
JSON_FORMAT = 'json'
@ -212,7 +212,8 @@ class ServiceChainDbTestCase(ServiceChainDBTestBase,
def setUp(self, core_plugin=None, sc_plugin=None, service_plugins=None,
ext_mgr=None):
extensions.append_api_extensions_path(gbp.neutron.extensions.__path__)
extensions.append_api_extensions_path(
gbpservice.neutron.extensions.__path__)
if not sc_plugin:
sc_plugin = DB_GP_PLUGIN_KLASS
self.plugin = importutils.import_object(sc_plugin)

Some files were not shown because too many files have changed in this diff Show More