diff --git a/etc/nimble/README.nimble.conf b/etc/nimble/README.nimble.conf index d8cc5b1c..abbab87d 100644 --- a/etc/nimble/README.nimble.conf +++ b/etc/nimble/README.nimble.conf @@ -1,4 +1,4 @@ -To generate the sample nimble.conf file, run the following -command from the top level of the nimble directory: +To generate the sample mogan.conf file, run the following +command from the top level of the mogan directory: tox -egenconfig diff --git a/etc/nimble/policy.json.sample b/etc/nimble/policy.json.sample index 6f6c5031..2e45ac80 100644 --- a/etc/nimble/policy.json.sample +++ b/etc/nimble/policy.json.sample @@ -17,14 +17,14 @@ # Default API access rule "default": "rule:admin_or_owner" # Retrieve Instance records -"nimble:instance:get": "rule:default" +"mogan:instance:get": "rule:default" # View Instance power and provision state -"nimble:instance:get_states": "rule:default" +"mogan:instance:get_states": "rule:default" # Create Instance records -"nimble:instance:create": "rule:allow" +"mogan:instance:create": "rule:allow" # Delete Instance records -"nimble:instance:delete": "rule:default" +"mogan:instance:delete": "rule:default" # Update Instance records -"nimble:instance:update": "rule:default" +"mogan:instance:update": "rule:default" # Change Instance power status -"nimble:instance:set_power_state": "rule:default" +"mogan:instance:set_power_state": "rule:default" diff --git a/nimble/__init__.py b/mogan/__init__.py similarity index 100% rename from nimble/__init__.py rename to mogan/__init__.py diff --git a/nimble/api/__init__.py b/mogan/api/__init__.py similarity index 100% rename from nimble/api/__init__.py rename to mogan/api/__init__.py diff --git a/nimble/api/app.py b/mogan/api/app.py similarity index 93% rename from nimble/api/app.py rename to mogan/api/app.py index 5f39ebef..b9db3534 100644 --- a/nimble/api/app.py +++ b/mogan/api/app.py @@ -16,10 +16,10 @@ from oslo_config import cfg import pecan -from nimble.api import config -from nimble.api import hooks -from nimble.api import middleware -from nimble.api.middleware import auth_token +from mogan.api import config +from mogan.api import hooks +from mogan.api import middleware +from mogan.api.middleware import auth_token def get_pecan_config(): diff --git a/nimble/api/config.py b/mogan/api/config.py similarity index 93% rename from nimble/api/config.py rename to mogan/api/config.py index 353cf7f7..1c893153 100644 --- a/nimble/api/config.py +++ b/mogan/api/config.py @@ -23,8 +23,8 @@ server = { # Pecan Application Configurations # See https://pecan.readthedocs.org/en/latest/configuration.html#application-configuration # noqa app = { - 'root': 'nimble.api.controllers.root.RootController', - 'modules': ['nimble.api'], + 'root': 'mogan.api.controllers.root.RootController', + 'modules': ['mogan.api'], 'static_root': '%(confdir)s/public', 'debug': False, 'acl_public_routes': [ diff --git a/nimble/api/controllers/__init__.py b/mogan/api/controllers/__init__.py similarity index 100% rename from nimble/api/controllers/__init__.py rename to mogan/api/controllers/__init__.py diff --git a/nimble/api/controllers/base.py b/mogan/api/controllers/base.py similarity index 100% rename from nimble/api/controllers/base.py rename to mogan/api/controllers/base.py diff --git a/nimble/api/controllers/link.py b/mogan/api/controllers/link.py similarity index 98% rename from nimble/api/controllers/link.py rename to mogan/api/controllers/link.py index 909267f0..c898f7d2 100644 --- a/nimble/api/controllers/link.py +++ b/mogan/api/controllers/link.py @@ -16,7 +16,7 @@ import pecan from wsme import types as wtypes -from nimble.api.controllers import base +from mogan.api.controllers import base def build_url(resource, resource_args, bookmark=False, base_url=None): diff --git a/nimble/api/controllers/root.py b/mogan/api/controllers/root.py similarity index 84% rename from nimble/api/controllers/root.py rename to mogan/api/controllers/root.py index c05a1f6b..111ec0b8 100644 --- a/nimble/api/controllers/root.py +++ b/mogan/api/controllers/root.py @@ -17,9 +17,9 @@ import pecan from pecan import rest from wsme import types as wtypes -from nimble.api.controllers import base -from nimble.api.controllers import v1 -from nimble.api import expose +from mogan.api.controllers import base +from mogan.api.controllers import v1 +from mogan.api import expose ID_VERSION1 = 'v1' @@ -35,8 +35,8 @@ class Root(base.APIBase): @staticmethod def convert(): root = Root() - root.name = "OpenStack Nimble API" - root.description = ("Nimble is an OpenStack project which aims to " + root.name = "OpenStack Mogan API" + root.description = ("Mogan is an OpenStack project which aims to " "facilitate baremetal machines management.") return root @@ -59,7 +59,7 @@ class RootController(rest.RestController): def _route(self, args): """Overrides the default routing behavior. - It redirects the request to the default version of the nimble API + It redirects the request to the default version of the mogan API if the version number is not specified in the url. """ diff --git a/nimble/api/controllers/v1/__init__.py b/mogan/api/controllers/v1/__init__.py similarity index 91% rename from nimble/api/controllers/v1/__init__.py rename to mogan/api/controllers/v1/__init__.py index e6966da7..49d5109d 100644 --- a/nimble/api/controllers/v1/__init__.py +++ b/mogan/api/controllers/v1/__init__.py @@ -23,12 +23,12 @@ import pecan from pecan import rest from wsme import types as wtypes -from nimble.api.controllers import base -from nimble.api.controllers import link -from nimble.api.controllers.v1 import availability_zone -from nimble.api.controllers.v1 import instance_types -from nimble.api.controllers.v1 import instances -from nimble.api import expose +from mogan.api.controllers import base +from mogan.api.controllers import link +from mogan.api.controllers.v1 import availability_zone +from mogan.api.controllers.v1 import instance_types +from mogan.api.controllers.v1 import instances +from mogan.api import expose class V1(base.APIBase): diff --git a/nimble/api/controllers/v1/availability_zone.py b/mogan/api/controllers/v1/availability_zone.py similarity index 95% rename from nimble/api/controllers/v1/availability_zone.py rename to mogan/api/controllers/v1/availability_zone.py index f211de06..f4819dcb 100644 --- a/nimble/api/controllers/v1/availability_zone.py +++ b/mogan/api/controllers/v1/availability_zone.py @@ -17,8 +17,8 @@ import pecan from pecan import rest from wsme import types as wtypes -from nimble.api.controllers import base -from nimble.api import expose +from mogan.api.controllers import base +from mogan.api import expose class AvailabilityZones(base.APIBase): diff --git a/nimble/api/controllers/v1/instance_types.py b/mogan/api/controllers/v1/instance_types.py similarity index 96% rename from nimble/api/controllers/v1/instance_types.py rename to mogan/api/controllers/v1/instance_types.py index 7a20f647..de5bf575 100644 --- a/nimble/api/controllers/v1/instance_types.py +++ b/mogan/api/controllers/v1/instance_types.py @@ -19,13 +19,13 @@ from six.moves import http_client import wsme from wsme import types as wtypes -from nimble.api.controllers import base -from nimble.api.controllers import link -from nimble.api.controllers.v1 import types -from nimble.api import expose -from nimble.common import exception -from nimble.common.i18n import _ -from nimble import objects +from mogan.api.controllers import base +from mogan.api.controllers import link +from mogan.api.controllers.v1 import types +from mogan.api import expose +from mogan.common import exception +from mogan.common.i18n import _ +from mogan import objects class InstanceType(base.APIBase): diff --git a/nimble/api/controllers/v1/instances.py b/mogan/api/controllers/v1/instances.py similarity index 95% rename from nimble/api/controllers/v1/instances.py rename to mogan/api/controllers/v1/instances.py index 09bea689..cdcb74bc 100644 --- a/nimble/api/controllers/v1/instances.py +++ b/mogan/api/controllers/v1/instances.py @@ -23,17 +23,17 @@ from six.moves import http_client import wsme from wsme import types as wtypes -from nimble.api.controllers import base -from nimble.api.controllers import link -from nimble.api.controllers.v1 import types -from nimble.api.controllers.v1 import utils as api_utils -from nimble.api import expose -from nimble.common import exception -from nimble.common.i18n import _ -from nimble.common.i18n import _LW -from nimble.common import policy -from nimble.engine.baremetal import ironic_states as ir_states -from nimble import objects +from mogan.api.controllers import base +from mogan.api.controllers import link +from mogan.api.controllers.v1 import types +from mogan.api.controllers.v1 import utils as api_utils +from mogan.api import expose +from mogan.common import exception +from mogan.common.i18n import _ +from mogan.common.i18n import _LW +from mogan.common import policy +from mogan.engine.baremetal import ironic_states as ir_states +from mogan import objects _DEFAULT_INSTANCE_RETURN_FIELDS = ('uuid', 'name', 'description', 'status') @@ -112,7 +112,7 @@ class InstanceStatesController(rest.RestController): self._resource = objects.Instance.get(pecan.request.context, uuid) return self._resource - @policy.authorize_wsgi("nimble:instance", "get_states") + @policy.authorize_wsgi("mogan:instance", "get_states") @expose.expose(InstanceStates, types.uuid) def get(self, instance_uuid): """List the states of the instance, just support power state at present. @@ -125,7 +125,7 @@ class InstanceStatesController(rest.RestController): rpc_instance) return InstanceStates(**rpc_states) - @policy.authorize_wsgi("nimble:instance", "set_power_state") + @policy.authorize_wsgi("mogan:instance", "set_power_state") @expose.expose(None, types.uuid, wtypes.text, status_code=http_client.ACCEPTED) def power(self, instance_uuid, target): @@ -304,7 +304,7 @@ class InstanceController(rest.RestController): if node_list: node_dict = {node['instance_uuid']: node for node in node_list if node['instance_uuid']} - # Merge nimble instance info with ironic node power state + # Merge mogan instance info with ironic node power state for instance_data in instances_data: uuid = instance_data['uuid'] if uuid in node_dict: @@ -330,7 +330,7 @@ class InstanceController(rest.RestController): return self._get_instance_collection(fields=fields, all_tenants=all_tenants) - @policy.authorize_wsgi("nimble:instance", "get") + @policy.authorize_wsgi("mogan:instance", "get") @expose.expose(Instance, types.uuid, types.listtype) def get_one(self, instance_uuid, fields=None): """Retrieve information about the given instance. @@ -368,7 +368,7 @@ class InstanceController(rest.RestController): raise exception.NotFound() return self._get_instance_collection(all_tenants=all_tenants) - @policy.authorize_wsgi("nimble:instance", "create", False) + @policy.authorize_wsgi("mogan:instance", "create", False) @expose.expose(Instance, body=types.jsontype, status_code=http_client.CREATED) def post(self, instance): @@ -418,7 +418,7 @@ class InstanceController(rest.RestController): pecan.response.location = link.build_url('instance', instance.uuid) return Instance.convert_with_links(instance) - @policy.authorize_wsgi("nimble:instance", "update") + @policy.authorize_wsgi("mogan:instance", "update") @wsme.validate(types.uuid, [InstancePatchType]) @expose.expose(Instance, types.uuid, body=[InstancePatchType]) def patch(self, instance_uuid, patch): @@ -451,7 +451,7 @@ class InstanceController(rest.RestController): return Instance.convert_with_links(rpc_instance) - @policy.authorize_wsgi("nimble:instance", "delete") + @policy.authorize_wsgi("mogan:instance", "delete") @expose.expose(None, types.uuid, status_code=http_client.NO_CONTENT) def delete(self, instance_uuid): """Delete a instance. diff --git a/nimble/api/controllers/v1/types.py b/mogan/api/controllers/v1/types.py similarity index 97% rename from nimble/api/controllers/v1/types.py rename to mogan/api/controllers/v1/types.py index 77212217..cd0bd6d2 100644 --- a/nimble/api/controllers/v1/types.py +++ b/mogan/api/controllers/v1/types.py @@ -22,8 +22,8 @@ import six import wsme from wsme import types as wtypes -from nimble.common import exception -from nimble.common.i18n import _ +from mogan.common import exception +from mogan.common.i18n import _ class UuidType(wtypes.UserType): @@ -133,7 +133,7 @@ class JsonPatchType(wtypes.Base): value = wsme.wsattr(jsontype, default=wtypes.Unset) # The class of the objects being patched. Override this in subclasses. - # Should probably be a subclass of nimble.api.controllers.base.APIBase. + # Should probably be a subclass of mogan.api.controllers.base.APIBase. _api_base = None # Attributes that are not required for construction, but which may not be diff --git a/nimble/api/controllers/v1/utils.py b/mogan/api/controllers/v1/utils.py similarity index 98% rename from nimble/api/controllers/v1/utils.py rename to mogan/api/controllers/v1/utils.py index 8b484f7b..d18986ed 100644 --- a/nimble/api/controllers/v1/utils.py +++ b/mogan/api/controllers/v1/utils.py @@ -17,7 +17,7 @@ import jsonpatch from oslo_config import cfg import wsme -from nimble.common.i18n import _ +from mogan.common.i18n import _ CONF = cfg.CONF diff --git a/nimble/api/expose.py b/mogan/api/expose.py similarity index 100% rename from nimble/api/expose.py rename to mogan/api/expose.py diff --git a/nimble/api/hooks.py b/mogan/api/hooks.py similarity index 97% rename from nimble/api/hooks.py rename to mogan/api/hooks.py index 177447a5..52930078 100644 --- a/nimble/api/hooks.py +++ b/mogan/api/hooks.py @@ -19,9 +19,9 @@ from oslo_context import context from pecan import hooks from six.moves import http_client -from nimble.common import policy -from nimble.db import api as dbapi -from nimble.engine import api as engineapi +from mogan.common import policy +from mogan.db import api as dbapi +from mogan.engine import api as engineapi class ConfigHook(hooks.PecanHook): diff --git a/nimble/api/middleware/__init__.py b/mogan/api/middleware/__init__.py similarity index 89% rename from nimble/api/middleware/__init__.py rename to mogan/api/middleware/__init__.py index 1036f565..adf668af 100644 --- a/nimble/api/middleware/__init__.py +++ b/mogan/api/middleware/__init__.py @@ -12,8 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -from nimble.api.middleware import auth_token -from nimble.api.middleware import parsable_error +from mogan.api.middleware import auth_token +from mogan.api.middleware import parsable_error ParsableErrorMiddleware = parsable_error.ParsableErrorMiddleware diff --git a/nimble/api/middleware/auth_token.py b/mogan/api/middleware/auth_token.py similarity index 95% rename from nimble/api/middleware/auth_token.py rename to mogan/api/middleware/auth_token.py index 69128ad8..50018269 100644 --- a/nimble/api/middleware/auth_token.py +++ b/mogan/api/middleware/auth_token.py @@ -17,9 +17,9 @@ import re from keystonemiddleware import auth_token from oslo_log import log -from nimble.common import exception -from nimble.common.i18n import _ -from nimble.common import utils +from mogan.common import exception +from mogan.common.i18n import _ +from mogan.common import utils LOG = log.getLogger(__name__) diff --git a/nimble/api/middleware/parsable_error.py b/mogan/api/middleware/parsable_error.py similarity index 100% rename from nimble/api/middleware/parsable_error.py rename to mogan/api/middleware/parsable_error.py diff --git a/nimble/cmd/__init__.py b/mogan/cmd/__init__.py similarity index 96% rename from nimble/cmd/__init__.py rename to mogan/cmd/__init__.py index 9b100f75..0ef4879d 100644 --- a/nimble/cmd/__init__.py +++ b/mogan/cmd/__init__.py @@ -15,4 +15,4 @@ import oslo_i18n as i18n -i18n.install('nimble') +i18n.install('mogan') diff --git a/nimble/cmd/api.py b/mogan/cmd/api.py similarity index 77% rename from nimble/cmd/api.py rename to mogan/cmd/api.py index 088dbed6..6624d37e 100644 --- a/nimble/cmd/api.py +++ b/mogan/cmd/api.py @@ -13,23 +13,23 @@ # License for the specific language governing permissions and limitations # under the License. -"""The Nimble Service API.""" +"""The Mogan Service API.""" import sys from oslo_config import cfg -from nimble.common import service as nimble_service +from mogan.common import service as mogan_service CONF = cfg.CONF def main(): # Parse config file and command line options, then start logging - nimble_service.prepare_service(sys.argv) + mogan_service.prepare_service(sys.argv) # Build and start the WSGI app - launcher = nimble_service.process_launcher() - server = nimble_service.WSGIService('nimble_api', CONF.api.enable_ssl_api) + launcher = mogan_service.process_launcher() + server = mogan_service.WSGIService('mogan_api', CONF.api.enable_ssl_api) launcher.launch_service(server, workers=server.workers) launcher.wait() diff --git a/nimble/cmd/dbsync.py b/mogan/cmd/dbsync.py similarity index 95% rename from nimble/cmd/dbsync.py rename to mogan/cmd/dbsync.py index 7cd20645..0d352eb4 100644 --- a/nimble/cmd/dbsync.py +++ b/mogan/cmd/dbsync.py @@ -21,10 +21,10 @@ import sys from oslo_config import cfg -from nimble.common.i18n import _ -from nimble.common import service -from nimble.conf import CONF -from nimble.db import migration +from mogan.common.i18n import _ +from mogan.common import service +from mogan.conf import CONF +from mogan.db import migration class DBCommand(object): diff --git a/nimble/cmd/engine.py b/mogan/cmd/engine.py similarity index 69% rename from nimble/cmd/engine.py rename to mogan/cmd/engine.py index 06b71779..1323301e 100644 --- a/nimble/cmd/engine.py +++ b/mogan/cmd/engine.py @@ -14,7 +14,7 @@ # under the License. """ -The Nimble Management Service +The Mogan Management Service """ import sys @@ -22,20 +22,20 @@ import sys from oslo_config import cfg from oslo_service import service -from nimble.common import constants -from nimble.common import service as nimble_service +from mogan.common import constants +from mogan.common import service as mogan_service CONF = cfg.CONF def main(): # Parse config file and command line options, then start logging - nimble_service.prepare_service(sys.argv) + mogan_service.prepare_service(sys.argv) - mgr = nimble_service.RPCService(CONF.host, - 'nimble.engine.manager', - 'EngineManager', - constants.MANAGER_TOPIC) + mgr = mogan_service.RPCService(CONF.host, + 'mogan.engine.manager', + 'EngineManager', + constants.MANAGER_TOPIC) launcher = service.launch(CONF, mgr) launcher.wait() diff --git a/nimble/common/__init__.py b/mogan/common/__init__.py similarity index 100% rename from nimble/common/__init__.py rename to mogan/common/__init__.py diff --git a/nimble/common/config.py b/mogan/common/config.py similarity index 86% rename from nimble/common/config.py rename to mogan/common/config.py index a8cbc4b6..5f260461 100644 --- a/nimble/common/config.py +++ b/mogan/common/config.py @@ -15,14 +15,14 @@ from oslo_config import cfg -from nimble.common import rpc -from nimble import version +from mogan.common import rpc +from mogan import version def parse_args(argv, default_config_files=None): - rpc.set_defaults(control_exchange='nimble') + rpc.set_defaults(control_exchange='mogan') cfg.CONF(argv[1:], - project='nimble', + project='mogan', version=version.version_info.release_string(), default_config_files=default_config_files) rpc.init(cfg.CONF) diff --git a/nimble/common/constants.py b/mogan/common/constants.py similarity index 94% rename from nimble/common/constants.py rename to mogan/common/constants.py index d9f86947..d2f3abfa 100644 --- a/nimble/common/constants.py +++ b/mogan/common/constants.py @@ -14,4 +14,4 @@ # under the License. -MANAGER_TOPIC = 'nimble.engine_manager' +MANAGER_TOPIC = 'mogan.engine_manager' diff --git a/nimble/common/exception.py b/mogan/common/exception.py similarity index 97% rename from nimble/common/exception.py rename to mogan/common/exception.py index 9c7166d0..920d1a87 100644 --- a/nimble/common/exception.py +++ b/mogan/common/exception.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -"""Nimble base exception handling. +"""Mogan base exception handling. SHOULD include dedicated exception logging. @@ -24,15 +24,15 @@ from oslo_versionedobjects import exception as obj_exc import six from six.moves import http_client -from nimble.common.i18n import _ -from nimble.common.i18n import _LE -from nimble.conf import CONF +from mogan.common.i18n import _ +from mogan.common.i18n import _LE +from mogan.conf import CONF LOG = logging.getLogger(__name__) class NimbleException(Exception): - """Base Nimble Exception + """Base Mogan Exception To correctly use this class, inherit from it and define a '_msg_fmt' property. That message will get printf'd diff --git a/nimble/common/flow_utils.py b/mogan/common/flow_utils.py similarity index 98% rename from nimble/common/flow_utils.py rename to mogan/common/flow_utils.py index 73ce80e6..b89c8b89 100644 --- a/nimble/common/flow_utils.py +++ b/mogan/common/flow_utils.py @@ -31,7 +31,7 @@ def _make_task_name(cls, addons=None): class NimbleTask(task.Task): - """The root task class for all nimble tasks. + """The root task class for all mogan tasks. It automatically names the given task using the module and class that implement the given task as the task name. diff --git a/nimble/common/i18n.py b/mogan/common/i18n.py similarity index 94% rename from nimble/common/i18n.py rename to mogan/common/i18n.py index 27e3f63d..fbe9d9c3 100644 --- a/nimble/common/i18n.py +++ b/mogan/common/i18n.py @@ -15,7 +15,7 @@ import oslo_i18n as i18n -_translators = i18n.TranslatorFactory(domain='nimble') +_translators = i18n.TranslatorFactory(domain='mogan') # The primary translation function using the well-known name "_" _ = _translators.primary diff --git a/nimble/common/ironic.py b/mogan/common/ironic.py similarity index 98% rename from nimble/common/ironic.py rename to mogan/common/ironic.py index e0107771..2adef959 100644 --- a/nimble/common/ironic.py +++ b/mogan/common/ironic.py @@ -18,8 +18,8 @@ from ironicclient import exc as ironic_exc from oslo_config import cfg from oslo_log import log as logging -from nimble.common import exception -from nimble.common.i18n import _ +from mogan.common import exception +from mogan.common.i18n import _ LOG = logging.getLogger(__name__) diff --git a/nimble/common/keystone.py b/mogan/common/keystone.py similarity index 96% rename from nimble/common/keystone.py rename to mogan/common/keystone.py index bdddc37a..c98083a6 100644 --- a/nimble/common/keystone.py +++ b/mogan/common/keystone.py @@ -20,11 +20,11 @@ from oslo_log import log as logging import six from six.moves.urllib import parse # for legacy options loading only -from nimble.common import exception -from nimble.common.i18n import _ -from nimble.common.i18n import _LE -from nimble.conf import auth as nimble_auth -from nimble.conf import CONF +from mogan.common import exception +from mogan.common.i18n import _ +from mogan.common.i18n import _LE +from mogan.conf import auth as nimble_auth +from mogan.conf import CONF LOG = logging.getLogger(__name__) diff --git a/nimble/common/paths.py b/mogan/common/paths.py similarity index 98% rename from nimble/common/paths.py rename to mogan/common/paths.py index 556fc00b..aacb4eea 100644 --- a/nimble/common/paths.py +++ b/mogan/common/paths.py @@ -17,7 +17,7 @@ import os -from nimble.conf import CONF +from mogan.conf import CONF def basedir_def(*args): diff --git a/nimble/common/policy.py b/mogan/common/policy.py similarity index 94% rename from nimble/common/policy.py rename to mogan/common/policy.py index bd23be1a..3c2b94a9 100644 --- a/nimble/common/policy.py +++ b/mogan/common/policy.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -"""Policy Engine For Nimble.""" +"""Policy Engine For Mogan.""" import functools from oslo_concurrency import lockutils @@ -25,8 +25,8 @@ import pecan import sys import wsme -from nimble.common import exception -from nimble.common.i18n import _LW +from mogan.common import exception +from mogan.common.i18n import _LW _ENFORCER = None CONF = cfg.CONF @@ -76,22 +76,22 @@ default_policies = [ # depend on their existence throughout the code. instance_policies = [ - policy.RuleDefault('nimble:instance:get', + policy.RuleDefault('mogan:instance:get', 'rule:default', description='Retrieve Instance records'), - policy.RuleDefault('nimble:instance:get_states', + policy.RuleDefault('mogan:instance:get_states', 'rule:default', description='View Instance power and provision state'), - policy.RuleDefault('nimble:instance:create', + policy.RuleDefault('mogan:instance:create', 'rule:allow', description='Create Instance records'), - policy.RuleDefault('nimble:instance:delete', + policy.RuleDefault('mogan:instance:delete', 'rule:default', description='Delete Instance records'), - policy.RuleDefault('nimble:instance:update', + policy.RuleDefault('mogan:instance:update', 'rule:default', description='Update Instance records'), - policy.RuleDefault('nimble:instance:set_power_state', + policy.RuleDefault('mogan:instance:set_power_state', 'rule:default', description='Change Instance power status'), ] @@ -103,7 +103,7 @@ def list_policies(): return policies -@lockutils.synchronized('policy_enforcer', 'nimble-') +@lockutils.synchronized('policy_enforcer', 'mogan-') def init_enforcer(policy_file=None, rules=None, default_rule=None, use_conf=True): """Synchronously initializes the policy enforcer @@ -178,7 +178,7 @@ def authorize_wsgi(api_name, act=None, need_target=True): from magnum.common import policy class InstancesController(rest.RestController): .... - @policy.authorize_wsgi("nimble:instance", "delete") + @policy.authorize_wsgi("mogan:instance", "delete") @wsme_pecan.wsexpose(None, types.uuid_or_name, status_code=204) def delete(self, bay_ident): ... @@ -261,7 +261,7 @@ def enforce(rule, target, creds, do_raise=False, exc=None, *args, **kwargs): # backwards compatibility in case it has been used downstream. # It may be removed in the Pike cycle. LOG.warning(_LW( - "Deprecation warning: calls to nimble.common.policy.enforce() " + "Deprecation warning: calls to mogan.common.policy.enforce() " "should be replaced with authorize(). This method may be removed " "in a future release.")) diff --git a/nimble/common/rpc.py b/mogan/common/rpc.py similarity index 99% rename from nimble/common/rpc.py rename to mogan/common/rpc.py index c79f96eb..37081e99 100644 --- a/nimble/common/rpc.py +++ b/mogan/common/rpc.py @@ -17,7 +17,7 @@ from oslo_config import cfg from oslo_context import context as nimble_context import oslo_messaging as messaging -from nimble.common import exception +from mogan.common import exception CONF = cfg.CONF diff --git a/nimble/common/service.py b/mogan/common/service.py similarity index 91% rename from nimble/common/service.py rename to mogan/common/service.py index 3367c7e6..ede80ceb 100644 --- a/nimble/common/service.py +++ b/mogan/common/service.py @@ -20,16 +20,16 @@ from oslo_service import service from oslo_service import wsgi from oslo_utils import importutils -from nimble.api import app -from nimble.common import config -from nimble.common import exception -from nimble.common.i18n import _ -from nimble.common.i18n import _LE -from nimble.common.i18n import _LI -from nimble.common import rpc -from nimble.conf import CONF -from nimble import objects -from nimble.objects import base as objects_base +from mogan.api import app +from mogan.common import config +from mogan.common import exception +from mogan.common.i18n import _ +from mogan.common.i18n import _LE +from mogan.common.i18n import _LI +from mogan.common import rpc +from mogan.conf import CONF +from mogan import objects +from mogan.objects import base as objects_base LOG = log.getLogger(__name__) @@ -90,7 +90,7 @@ def prepare_service(argv=None): log.set_defaults(default_log_levels=CONF.default_log_levels + [ 'eventlet.wsgi.server=INFO', 'neutronclient=WARNING']) config.parse_args(argv) - log.setup(CONF, 'nimble') + log.setup(CONF, 'mogan') objects.register_all() @@ -99,7 +99,7 @@ def process_launcher(): class WSGIService(service.ServiceBase): - """Provides ability to launch nimble API from wsgi app.""" + """Provides ability to launch mogan API from wsgi app.""" def __init__(self, name, use_ssl=False): """Initialize, but do not start the WSGI server. diff --git a/nimble/common/utils.py b/mogan/common/utils.py similarity index 97% rename from nimble/common/utils.py rename to mogan/common/utils.py index df5ac9a2..fcc6889a 100644 --- a/nimble/common/utils.py +++ b/mogan/common/utils.py @@ -20,8 +20,8 @@ import re from oslo_log import log as logging import six -from nimble.common import exception -from nimble.common.i18n import _LW +from mogan.common import exception +from mogan.common.i18n import _LW LOG = logging.getLogger(__name__) diff --git a/nimble/conf/__init__.py b/mogan/conf/__init__.py similarity index 76% rename from nimble/conf/__init__.py rename to mogan/conf/__init__.py index f9f6dd61..73306cc9 100644 --- a/nimble/conf/__init__.py +++ b/mogan/conf/__init__.py @@ -15,15 +15,15 @@ from oslo_config import cfg -from nimble.conf import api -from nimble.conf import database -from nimble.conf import default -from nimble.conf import engine -from nimble.conf import glance -from nimble.conf import ironic -from nimble.conf import keystone -from nimble.conf import neutron -from nimble.conf import scheduler +from mogan.conf import api +from mogan.conf import database +from mogan.conf import default +from mogan.conf import engine +from mogan.conf import glance +from mogan.conf import ironic +from mogan.conf import keystone +from mogan.conf import neutron +from mogan.conf import scheduler CONF = cfg.CONF diff --git a/nimble/conf/api.py b/mogan/conf/api.py similarity index 85% rename from nimble/conf/api.py rename to mogan/conf/api.py index 17f104d2..d585b513 100644 --- a/nimble/conf/api.py +++ b/mogan/conf/api.py @@ -15,28 +15,28 @@ from oslo_config import cfg -from nimble.common.i18n import _ +from mogan.common.i18n import _ opts = [ cfg.StrOpt('host_ip', default='0.0.0.0', - help=_('The IP address on which nimble-api listens.')), + help=_('The IP address on which mogan-api listens.')), cfg.PortOpt('port', default=6688, - help=_('The TCP port on which nimble-api listens.')), + help=_('The TCP port on which mogan-api listens.')), cfg.IntOpt('max_limit', default=1000, help=_('The maximum number of items returned in a single ' 'response from a collection resource.')), cfg.StrOpt('public_endpoint', help=_("Public URL to use when building the links to the API " - "resources (for example, \"https://nimble.rocks:6688\")." + "resources (for example, \"https://mogan.rocks:6688\")." " If None the links will be built using the request's " "host URL. If the API is operating behind a proxy, you " "will want to change this to represent the proxy's URL. " "Defaults to None.")), cfg.IntOpt('api_workers', - help=_('Number of workers for OpenStack Nimble API service. ' + help=_('Number of workers for OpenStack Mogan API service. ' 'The default is equal to the number of CPUs available ' 'if that can be determined, else a default worker ' 'count of 1 is returned.')), @@ -51,7 +51,7 @@ opts = [ ] opt_group = cfg.OptGroup(name='api', - title='Options for the nimble-api service') + title='Options for the mogan-api service') def register_opts(conf): diff --git a/nimble/conf/auth.py b/mogan/conf/auth.py similarity index 100% rename from nimble/conf/auth.py rename to mogan/conf/auth.py diff --git a/nimble/conf/database.py b/mogan/conf/database.py similarity index 96% rename from nimble/conf/database.py rename to mogan/conf/database.py index f73914b3..ee869275 100644 --- a/nimble/conf/database.py +++ b/mogan/conf/database.py @@ -15,7 +15,7 @@ from oslo_config import cfg -from nimble.common.i18n import _ +from mogan.common.i18n import _ opts = [ cfg.StrOpt('mysql_engine', diff --git a/nimble/conf/default.py b/mogan/conf/default.py similarity index 88% rename from nimble/conf/default.py rename to mogan/conf/default.py index 8cabe93f..d7f97f7f 100644 --- a/nimble/conf/default.py +++ b/mogan/conf/default.py @@ -18,7 +18,7 @@ import socket from oslo_config import cfg -from nimble.common.i18n import _ +from mogan.common.i18n import _ api_opts = [ cfg.BoolOpt('debug_tracebacks_in_api', @@ -41,15 +41,15 @@ path_opts = [ cfg.StrOpt('pybasedir', default=os.path.abspath(os.path.join(os.path.dirname(__file__), '../')), - sample_default='/usr/lib/python/site-packages/nimble/nimble', - help=_('Directory where the nimble python module is ' + sample_default='/usr/lib/python/site-packages/mogan/mogan', + help=_('Directory where the mogan python module is ' 'installed.')), cfg.StrOpt('bindir', default='$pybasedir/bin', - help=_('Directory where nimble binaries are installed.')), + help=_('Directory where mogan binaries are installed.')), cfg.StrOpt('state_path', default='$pybasedir', - help=_("Top-level directory for maintaining nimble's state.")), + help=_("Top-level directory for maintaining mogan's state.")), ] service_opts = [ diff --git a/nimble/conf/engine.py b/mogan/conf/engine.py similarity index 91% rename from nimble/conf/engine.py rename to mogan/conf/engine.py index 9aee9077..cad314b8 100644 --- a/nimble/conf/engine.py +++ b/mogan/conf/engine.py @@ -15,14 +15,14 @@ from oslo_config import cfg -from nimble.common.i18n import _ +from mogan.common.i18n import _ opts = [ cfg.IntOpt('workers_pool_size', default=100, help=_('The size of the workers greenthread pool.')), cfg.StrOpt('api_url', - help=_('URL of Nimble API service. If not set nimble can ' + help=_('URL of Mogan API service. If not set mogan can ' 'get the current value from the keystone service ' 'catalog.')), cfg.IntOpt('periodic_max_workers', @@ -35,7 +35,7 @@ opts = [ help=_('Interval between syncing the node resources from ' 'ironic, in seconds.')), cfg.StrOpt('scheduler_driver', - default='nimble.engine.scheduler.filter_scheduler.' + default='mogan.engine.scheduler.filter_scheduler.' 'FilterScheduler', help=_('Default scheduler driver to use')), cfg.StrOpt('default_schedule_zone', diff --git a/nimble/conf/glance.py b/mogan/conf/glance.py similarity index 97% rename from nimble/conf/glance.py rename to mogan/conf/glance.py index fffb28ce..40bf56c9 100644 --- a/nimble/conf/glance.py +++ b/mogan/conf/glance.py @@ -17,12 +17,12 @@ from oslo_config import cfg -from nimble.common.i18n import _ +from mogan.common.i18n import _ opts = [ cfg.ListOpt('glance_api_servers', required=True, - help=_('A list of the glance api servers available to nimble. ' + help=_('A list of the glance api servers available to mogan. ' 'Prefix with https:// for SSL-based glance API ' 'servers. Format is [hostname|IP]:port.')), cfg.BoolOpt('glance_api_insecure', diff --git a/nimble/conf/ironic.py b/mogan/conf/ironic.py similarity index 100% rename from nimble/conf/ironic.py rename to mogan/conf/ironic.py diff --git a/nimble/conf/keystone.py b/mogan/conf/keystone.py similarity index 96% rename from nimble/conf/keystone.py rename to mogan/conf/keystone.py index fb50e88b..6fa84a60 100644 --- a/nimble/conf/keystone.py +++ b/mogan/conf/keystone.py @@ -13,7 +13,7 @@ from oslo_config import cfg -from nimble.common.i18n import _ +from mogan.common.i18n import _ opts = [ cfg.StrOpt('region_name', diff --git a/nimble/conf/neutron.py b/mogan/conf/neutron.py similarity index 95% rename from nimble/conf/neutron.py rename to mogan/conf/neutron.py index 634934e2..4b36888f 100644 --- a/nimble/conf/neutron.py +++ b/mogan/conf/neutron.py @@ -13,8 +13,8 @@ from oslo_config import cfg -from nimble.common.i18n import _ -from nimble.conf import auth +from mogan.common.i18n import _ +from mogan.conf import auth opts = [ cfg.StrOpt('url', diff --git a/nimble/conf/opts.py b/mogan/conf/opts.py similarity index 54% rename from nimble/conf/opts.py rename to mogan/conf/opts.py index 8be1adf8..caba82e0 100644 --- a/nimble/conf/opts.py +++ b/mogan/conf/opts.py @@ -12,44 +12,44 @@ import itertools -import nimble.conf.api -import nimble.conf.database -import nimble.conf.default -import nimble.conf.engine -import nimble.conf.glance -import nimble.conf.ironic -import nimble.conf.keystone -import nimble.conf.neutron -import nimble.conf.scheduler +import mogan.conf.api +import mogan.conf.database +import mogan.conf.default +import mogan.conf.engine +import mogan.conf.glance +import mogan.conf.ironic +import mogan.conf.keystone +import mogan.conf.neutron +import mogan.conf.scheduler _default_opt_lists = [ - nimble.conf.default.api_opts, - nimble.conf.default.exc_log_opts, - nimble.conf.default.path_opts, - nimble.conf.default.service_opts, + mogan.conf.default.api_opts, + mogan.conf.default.exc_log_opts, + mogan.conf.default.path_opts, + mogan.conf.default.service_opts, ] _opts = [ ('DEFAULT', itertools.chain(*_default_opt_lists)), - ('api', nimble.conf.api.opts), - ('database', nimble.conf.database.opts), - ('engine', nimble.conf.engine.opts), - ('glance', nimble.conf.glance.opts), - ('ironic', nimble.conf.ironic.opts), - ('keystone', nimble.conf.keystone.opts), - ('neutron', nimble.conf.neutron.opts), - ('scheduler', nimble.conf.scheduler.opts), + ('api', mogan.conf.api.opts), + ('database', mogan.conf.database.opts), + ('engine', mogan.conf.engine.opts), + ('glance', mogan.conf.glance.opts), + ('ironic', mogan.conf.ironic.opts), + ('keystone', mogan.conf.keystone.opts), + ('neutron', mogan.conf.neutron.opts), + ('scheduler', mogan.conf.scheduler.opts), ] def list_opts(): - """Return a list of oslo.config options available in Nimble code. + """Return a list of oslo.config options available in Mogan code. The returned list includes all oslo.config options. Each element of the list is a tuple. The first element is the name of the group, the second element is the options. - The function is discoverable via the 'nimble' entry point under the + The function is discoverable via the 'mogan' entry point under the 'oslo.config.opts' namespace. The function is used by Oslo sample config file generator to discover the diff --git a/nimble/conf/scheduler.py b/mogan/conf/scheduler.py similarity index 89% rename from nimble/conf/scheduler.py rename to mogan/conf/scheduler.py index 2a76f23e..e32577a8 100644 --- a/nimble/conf/scheduler.py +++ b/mogan/conf/scheduler.py @@ -15,15 +15,15 @@ from oslo_config import cfg -from nimble.common.i18n import _ +from mogan.common.i18n import _ opts = [ cfg.StrOpt('scheduler_driver', - default='nimble.engine.scheduler.filter_scheduler.' + default='mogan.engine.scheduler.filter_scheduler.' 'FilterScheduler', help=_('Default scheduler driver to use')), cfg.StrOpt('scheduler_node_manager', - default='nimble.engine.scheduler.node_manager.NodeManager', + default='mogan.engine.scheduler.node_manager.NodeManager', help=_('The scheduler node manager class to use')), cfg.IntOpt('scheduler_max_attempts', default=3, @@ -44,7 +44,7 @@ opts = [ help=_('Which weigher class names to use for weighing ' 'nodes.')), cfg.StrOpt('scheduler_weight_handler', - default='nimble.engine.scheduler.weights.' + default='mogan.engine.scheduler.weights.' 'OrderedNodeWeightHandler', help=_('Which handler to use for selecting the node after ' 'weighing')), diff --git a/nimble/db/__init__.py b/mogan/db/__init__.py similarity index 100% rename from nimble/db/__init__.py rename to mogan/db/__init__.py diff --git a/nimble/db/api.py b/mogan/db/api.py similarity index 97% rename from nimble/db/api.py rename to mogan/db/api.py index e1c4a09a..a2f5926e 100644 --- a/nimble/db/api.py +++ b/mogan/db/api.py @@ -23,7 +23,7 @@ from oslo_db import api as db_api import six -_BACKEND_MAPPING = {'sqlalchemy': 'nimble.db.sqlalchemy.api'} +_BACKEND_MAPPING = {'sqlalchemy': 'mogan.db.sqlalchemy.api'} IMPL = db_api.DBAPI.from_config(cfg.CONF, backend_mapping=_BACKEND_MAPPING, lazy=True) diff --git a/nimble/db/migration.py b/mogan/db/migration.py similarity index 95% rename from nimble/db/migration.py rename to mogan/db/migration.py index aa780fb6..14438879 100644 --- a/nimble/db/migration.py +++ b/mogan/db/migration.py @@ -26,7 +26,7 @@ def get_backend(): global _IMPL if not _IMPL: cfg.CONF.import_opt('backend', 'oslo_db.options', group='database') - _IMPL = driver.DriverManager("nimble.database.migration_backend", + _IMPL = driver.DriverManager("mogan.database.migration_backend", cfg.CONF.database.backend).driver return _IMPL diff --git a/nimble/db/sqlalchemy/__init__.py b/mogan/db/sqlalchemy/__init__.py similarity index 100% rename from nimble/db/sqlalchemy/__init__.py rename to mogan/db/sqlalchemy/__init__.py diff --git a/nimble/db/sqlalchemy/alembic.ini b/mogan/db/sqlalchemy/alembic.ini similarity index 100% rename from nimble/db/sqlalchemy/alembic.ini rename to mogan/db/sqlalchemy/alembic.ini diff --git a/nimble/db/sqlalchemy/alembic/README b/mogan/db/sqlalchemy/alembic/README similarity index 100% rename from nimble/db/sqlalchemy/alembic/README rename to mogan/db/sqlalchemy/alembic/README diff --git a/nimble/db/sqlalchemy/alembic/env.py b/mogan/db/sqlalchemy/alembic/env.py similarity index 97% rename from nimble/db/sqlalchemy/alembic/env.py rename to mogan/db/sqlalchemy/alembic/env.py index 6169f63c..6baa4179 100644 --- a/nimble/db/sqlalchemy/alembic/env.py +++ b/mogan/db/sqlalchemy/alembic/env.py @@ -22,7 +22,7 @@ try: except ImportError: pass -from nimble.db.sqlalchemy import models +from mogan.db.sqlalchemy import models # this is the Alembic Config object, which provides # access to the values within the .ini file in use. diff --git a/nimble/db/sqlalchemy/alembic/script.py.mako b/mogan/db/sqlalchemy/alembic/script.py.mako similarity index 100% rename from nimble/db/sqlalchemy/alembic/script.py.mako rename to mogan/db/sqlalchemy/alembic/script.py.mako diff --git a/nimble/db/sqlalchemy/alembic/versions/91941bf1ebc9_initial_migration.py b/mogan/db/sqlalchemy/alembic/versions/91941bf1ebc9_initial_migration.py similarity index 100% rename from nimble/db/sqlalchemy/alembic/versions/91941bf1ebc9_initial_migration.py rename to mogan/db/sqlalchemy/alembic/versions/91941bf1ebc9_initial_migration.py diff --git a/nimble/db/sqlalchemy/api.py b/mogan/db/sqlalchemy/api.py similarity index 98% rename from nimble/db/sqlalchemy/api.py rename to mogan/db/sqlalchemy/api.py index c4791457..5bebbdaf 100644 --- a/nimble/db/sqlalchemy/api.py +++ b/mogan/db/sqlalchemy/api.py @@ -25,10 +25,10 @@ from oslo_utils import uuidutils from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.orm import joinedload -from nimble.common import exception -from nimble.common.i18n import _ -from nimble.db import api -from nimble.db.sqlalchemy import models +from mogan.common import exception +from mogan.common.i18n import _ +from mogan.db import api +from mogan.db.sqlalchemy import models _CONTEXT = threading.local() diff --git a/nimble/db/sqlalchemy/migration.py b/mogan/db/sqlalchemy/migration.py similarity index 98% rename from nimble/db/sqlalchemy/migration.py rename to mogan/db/sqlalchemy/migration.py index bd77b5ee..88c785fb 100644 --- a/nimble/db/sqlalchemy/migration.py +++ b/mogan/db/sqlalchemy/migration.py @@ -22,7 +22,7 @@ import alembic.migration as alembic_migration from oslo_db import exception as db_exc from oslo_db.sqlalchemy import enginefacade -from nimble.db.sqlalchemy import models +from mogan.db.sqlalchemy import models def _alembic_config(): diff --git a/nimble/db/sqlalchemy/models.py b/mogan/db/sqlalchemy/models.py similarity index 95% rename from nimble/db/sqlalchemy/models.py rename to mogan/db/sqlalchemy/models.py index e3a96c5f..15e0ae4b 100644 --- a/nimble/db/sqlalchemy/models.py +++ b/mogan/db/sqlalchemy/models.py @@ -26,13 +26,13 @@ from sqlalchemy import orm from sqlalchemy import schema, String, Integer from sqlalchemy.ext.declarative import declarative_base -from nimble.common import paths -from nimble.conf import CONF +from mogan.common import paths +from mogan.conf import CONF -_DEFAULT_SQL_CONNECTION = 'sqlite:///' + paths.state_path_def('nimble.sqlite') +_DEFAULT_SQL_CONNECTION = 'sqlite:///' + paths.state_path_def('mogan.sqlite') -db_options.set_defaults(CONF, _DEFAULT_SQL_CONNECTION, 'nimble.sqlite') +db_options.set_defaults(CONF, _DEFAULT_SQL_CONNECTION, 'mogan.sqlite') def table_args(): diff --git a/nimble/engine/__init__.py b/mogan/engine/__init__.py similarity index 100% rename from nimble/engine/__init__.py rename to mogan/engine/__init__.py diff --git a/nimble/engine/api.py b/mogan/engine/api.py similarity index 96% rename from nimble/engine/api.py rename to mogan/engine/api.py index 635c68ab..b9f6a1fc 100644 --- a/nimble/engine/api.py +++ b/mogan/engine/api.py @@ -18,12 +18,12 @@ from oslo_log import log from oslo_utils import timeutils -from nimble.common import exception -from nimble.conf import CONF -from nimble.engine import rpcapi -from nimble.engine import status -from nimble import image -from nimble import objects +from mogan.common import exception +from mogan.conf import CONF +from mogan.engine import rpcapi +from mogan.engine import status +from mogan import image +from mogan import objects LOG = log.getLogger(__name__) diff --git a/nimble/engine/baremetal/__init__.py b/mogan/engine/baremetal/__init__.py similarity index 100% rename from nimble/engine/baremetal/__init__.py rename to mogan/engine/baremetal/__init__.py diff --git a/nimble/engine/baremetal/ironic.py b/mogan/engine/baremetal/ironic.py similarity index 98% rename from nimble/engine/baremetal/ironic.py rename to mogan/engine/baremetal/ironic.py index 83aa9832..adbf314d 100644 --- a/nimble/engine/baremetal/ironic.py +++ b/mogan/engine/baremetal/ironic.py @@ -16,8 +16,8 @@ from ironicclient import exceptions as client_e from oslo_log import log as logging -from nimble.common.i18n import _LE -from nimble.engine.baremetal import ironic_states +from mogan.common.i18n import _LE +from mogan.engine.baremetal import ironic_states LOG = logging.getLogger(__name__) diff --git a/nimble/engine/baremetal/ironic_states.py b/mogan/engine/baremetal/ironic_states.py similarity index 100% rename from nimble/engine/baremetal/ironic_states.py rename to mogan/engine/baremetal/ironic_states.py diff --git a/nimble/engine/base_manager.py b/mogan/engine/base_manager.py similarity index 91% rename from nimble/engine/base_manager.py rename to mogan/engine/base_manager.py index 185d2a10..ff022444 100644 --- a/nimble/engine/base_manager.py +++ b/mogan/engine/base_manager.py @@ -19,13 +19,13 @@ from eventlet import greenpool from oslo_service import periodic_task from oslo_utils import importutils -from nimble.common.i18n import _ -from nimble.common import ironic -from nimble.common import rpc -from nimble.conf import CONF -from nimble.db import api as dbapi -from nimble.engine import rpcapi -from nimble import network +from mogan.common.i18n import _ +from mogan.common import ironic +from mogan.common import rpc +from mogan.conf import CONF +from mogan.db import api as dbapi +from mogan.engine import rpcapi +from mogan import network class BaseEngineManager(periodic_task.PeriodicTasks): diff --git a/nimble/engine/flows/__init__.py b/mogan/engine/flows/__init__.py similarity index 100% rename from nimble/engine/flows/__init__.py rename to mogan/engine/flows/__init__.py diff --git a/nimble/engine/flows/create_instance.py b/mogan/engine/flows/create_instance.py similarity index 97% rename from nimble/engine/flows/create_instance.py rename to mogan/engine/flows/create_instance.py index e53571b4..084c354d 100644 --- a/nimble/engine/flows/create_instance.py +++ b/mogan/engine/flows/create_instance.py @@ -22,15 +22,15 @@ from oslo_utils import timeutils import taskflow.engines from taskflow.patterns import linear_flow -from nimble.common import exception -from nimble.common import flow_utils -from nimble.common.i18n import _ -from nimble.common.i18n import _LE -from nimble.common.i18n import _LI -from nimble.common import utils -from nimble.engine.baremetal import ironic -from nimble.engine.baremetal import ironic_states -from nimble.engine import status +from mogan.common import exception +from mogan.common import flow_utils +from mogan.common.i18n import _ +from mogan.common.i18n import _LE +from mogan.common.i18n import _LI +from mogan.common import utils +from mogan.engine.baremetal import ironic +from mogan.engine.baremetal import ironic_states +from mogan.engine import status LOG = logging.getLogger(__name__) diff --git a/nimble/engine/manager.py b/mogan/engine/manager.py similarity index 95% rename from nimble/engine/manager.py rename to mogan/engine/manager.py index b02e16c3..3f671b96 100644 --- a/nimble/engine/manager.py +++ b/mogan/engine/manager.py @@ -22,18 +22,18 @@ from oslo_service import loopingcall from oslo_service import periodic_task import six -from nimble.common import exception -from nimble.common import flow_utils -from nimble.common.i18n import _ -from nimble.common.i18n import _LE -from nimble.common.i18n import _LI -from nimble.common.i18n import _LW -from nimble.conf import CONF -from nimble.engine.baremetal import ironic -from nimble.engine.baremetal import ironic_states -from nimble.engine import base_manager -from nimble.engine.flows import create_instance -from nimble.engine import status +from mogan.common import exception +from mogan.common import flow_utils +from mogan.common.i18n import _ +from mogan.common.i18n import _LE +from mogan.common.i18n import _LI +from mogan.common.i18n import _LW +from mogan.conf import CONF +from mogan.engine.baremetal import ironic +from mogan.engine.baremetal import ironic_states +from mogan.engine import base_manager +from mogan.engine.flows import create_instance +from mogan.engine import status LOG = log.getLogger(__name__) @@ -43,7 +43,7 @@ _UNPROVISION_STATES = (ironic_states.ACTIVE, ironic_states.DEPLOYFAIL, class EngineManager(base_manager.BaseEngineManager): - """Nimble Engine manager main class.""" + """Mogan Engine manager main class.""" RPC_API_VERSION = '1.0' diff --git a/nimble/engine/rpcapi.py b/mogan/engine/rpcapi.py similarity index 97% rename from nimble/engine/rpcapi.py rename to mogan/engine/rpcapi.py index 09610ef2..389bb4f4 100644 --- a/nimble/engine/rpcapi.py +++ b/mogan/engine/rpcapi.py @@ -18,9 +18,9 @@ Client side of the engine RPC API. from oslo_config import cfg import oslo_messaging as messaging -from nimble.common import constants -from nimble.common import rpc -from nimble.objects import base as objects_base +from mogan.common import constants +from mogan.common import rpc +from mogan.objects import base as objects_base CONF = cfg.CONF diff --git a/nimble/engine/scheduler/__init__.py b/mogan/engine/scheduler/__init__.py similarity index 100% rename from nimble/engine/scheduler/__init__.py rename to mogan/engine/scheduler/__init__.py diff --git a/nimble/engine/scheduler/base_filter.py b/mogan/engine/scheduler/base_filter.py similarity index 98% rename from nimble/engine/scheduler/base_filter.py rename to mogan/engine/scheduler/base_filter.py index f8359cad..e21bee8d 100644 --- a/nimble/engine/scheduler/base_filter.py +++ b/mogan/engine/scheduler/base_filter.py @@ -19,8 +19,8 @@ Filter support from oslo_log import log as logging import six -from nimble.common.i18n import _LI -from nimble.engine.scheduler import base_handler +from mogan.common.i18n import _LI +from mogan.engine.scheduler import base_handler LOG = logging.getLogger(__name__) diff --git a/nimble/engine/scheduler/base_handler.py b/mogan/engine/scheduler/base_handler.py similarity index 100% rename from nimble/engine/scheduler/base_handler.py rename to mogan/engine/scheduler/base_handler.py diff --git a/nimble/engine/scheduler/base_weight.py b/mogan/engine/scheduler/base_weight.py similarity index 98% rename from nimble/engine/scheduler/base_weight.py rename to mogan/engine/scheduler/base_weight.py index b7811446..ea39f5e5 100644 --- a/nimble/engine/scheduler/base_weight.py +++ b/mogan/engine/scheduler/base_weight.py @@ -21,7 +21,7 @@ import abc import six -from nimble.engine.scheduler import base_handler +from mogan.engine.scheduler import base_handler def normalize(weight_list, minval=None, maxval=None): diff --git a/nimble/engine/scheduler/driver.py b/mogan/engine/scheduler/driver.py similarity index 97% rename from nimble/engine/scheduler/driver.py rename to mogan/engine/scheduler/driver.py index 6d26807b..1e778baa 100644 --- a/nimble/engine/scheduler/driver.py +++ b/mogan/engine/scheduler/driver.py @@ -22,7 +22,7 @@ Scheduler base class that all Schedulers should inherit from from oslo_config import cfg from oslo_utils import importutils -from nimble.common.i18n import _ +from mogan.common.i18n import _ CONF = cfg.CONF diff --git a/nimble/engine/scheduler/filter_scheduler.py b/mogan/engine/scheduler/filter_scheduler.py similarity index 95% rename from nimble/engine/scheduler/filter_scheduler.py rename to mogan/engine/scheduler/filter_scheduler.py index e094667a..bf83cfbf 100644 --- a/nimble/engine/scheduler/filter_scheduler.py +++ b/mogan/engine/scheduler/filter_scheduler.py @@ -20,10 +20,12 @@ from oslo_config import cfg from oslo_log import log as logging from oslo_serialization import jsonutils -from nimble.common import exception -from nimble.common.i18n import _, _LE, _LW -from nimble.engine.scheduler import driver -from nimble.engine.scheduler import scheduler_options +from mogan.common import exception +from mogan.common.i18n import _ +from mogan.common.i18n import _LE +from mogan.common.i18n import _LW +from mogan.engine.scheduler import driver +from mogan.engine.scheduler import scheduler_options CONF = cfg.CONF LOG = logging.getLogger(__name__) @@ -124,7 +126,7 @@ class FilterScheduler(driver.Scheduler): Returned list is ordered by their fitness. """ - # Since Nimble is using mixed filters from Oslo and it's own, which + # Since Mogan is using mixed filters from Oslo and it's own, which # takes 'resource_XX' and 'instance_XX' as input respectively, copying # 'instance_type' to 'resource_type' will make both filters happy. instance_type = resource_type = request_spec.get("instance_type") diff --git a/nimble/engine/scheduler/filters/__init__.py b/mogan/engine/scheduler/filters/__init__.py similarity index 96% rename from nimble/engine/scheduler/filters/__init__.py rename to mogan/engine/scheduler/filters/__init__.py index d256b46f..b468f30f 100644 --- a/nimble/engine/scheduler/filters/__init__.py +++ b/mogan/engine/scheduler/filters/__init__.py @@ -17,7 +17,7 @@ Scheduler node filters """ -from nimble.engine.scheduler import base_filter +from mogan.engine.scheduler import base_filter class BaseNodeFilter(base_filter.BaseFilter): diff --git a/nimble/engine/scheduler/filters/availability_zone_filter.py b/mogan/engine/scheduler/filters/availability_zone_filter.py similarity index 96% rename from nimble/engine/scheduler/filters/availability_zone_filter.py rename to mogan/engine/scheduler/filters/availability_zone_filter.py index 1b79503e..88de3233 100644 --- a/nimble/engine/scheduler/filters/availability_zone_filter.py +++ b/mogan/engine/scheduler/filters/availability_zone_filter.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from nimble.engine.scheduler import filters +from mogan.engine.scheduler import filters class AvailabilityZoneFilter(filters.BaseNodeFilter): diff --git a/nimble/engine/scheduler/filters/capabilities_filter.py b/mogan/engine/scheduler/filters/capabilities_filter.py similarity index 96% rename from nimble/engine/scheduler/filters/capabilities_filter.py rename to mogan/engine/scheduler/filters/capabilities_filter.py index fa03202e..1c6b5bf6 100644 --- a/nimble/engine/scheduler/filters/capabilities_filter.py +++ b/mogan/engine/scheduler/filters/capabilities_filter.py @@ -15,8 +15,8 @@ from oslo_log import log as logging -from nimble.engine.scheduler import filters -from nimble.engine.scheduler.filters import extra_specs_ops +from mogan.engine.scheduler import filters +from mogan.engine.scheduler.filters import extra_specs_ops LOG = logging.getLogger(__name__) diff --git a/nimble/engine/scheduler/filters/extra_specs_ops.py b/mogan/engine/scheduler/filters/extra_specs_ops.py similarity index 100% rename from nimble/engine/scheduler/filters/extra_specs_ops.py rename to mogan/engine/scheduler/filters/extra_specs_ops.py diff --git a/nimble/engine/scheduler/filters/instance_type_filter.py b/mogan/engine/scheduler/filters/instance_type_filter.py similarity index 96% rename from nimble/engine/scheduler/filters/instance_type_filter.py rename to mogan/engine/scheduler/filters/instance_type_filter.py index 1fc0ec08..2c4d0e90 100644 --- a/nimble/engine/scheduler/filters/instance_type_filter.py +++ b/mogan/engine/scheduler/filters/instance_type_filter.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from nimble.engine.scheduler import filters +from mogan.engine.scheduler import filters class InstanceTypeFilter(filters.BaseNodeFilter): diff --git a/nimble/engine/scheduler/filters/json_filter.py b/mogan/engine/scheduler/filters/json_filter.py similarity index 99% rename from nimble/engine/scheduler/filters/json_filter.py rename to mogan/engine/scheduler/filters/json_filter.py index c0780ee8..02fc7a08 100644 --- a/nimble/engine/scheduler/filters/json_filter.py +++ b/mogan/engine/scheduler/filters/json_filter.py @@ -18,7 +18,7 @@ import operator from oslo_serialization import jsonutils import six -from nimble.engine.scheduler import filters +from mogan.engine.scheduler import filters class JsonFilter(filters.BaseNodeFilter): diff --git a/nimble/engine/scheduler/node_manager.py b/mogan/engine/scheduler/node_manager.py similarity index 96% rename from nimble/engine/scheduler/node_manager.py rename to mogan/engine/scheduler/node_manager.py index 135ca0a8..70ee1ab2 100644 --- a/nimble/engine/scheduler/node_manager.py +++ b/mogan/engine/scheduler/node_manager.py @@ -21,8 +21,8 @@ from oslo_config import cfg from oslo_log import log as logging from oslo_utils import importutils -from nimble.common import exception -from nimble.engine.scheduler import filters +from mogan.common import exception +from mogan.engine.scheduler import filters CONF = cfg.CONF @@ -46,12 +46,12 @@ class NodeManager(object): node_state_cls = NodeState def __init__(self): - self.filter_handler = filters.NodeFilterHandler('nimble.engine.' + self.filter_handler = filters.NodeFilterHandler('mogan.engine.' 'scheduler.filters') self.filter_classes = self.filter_handler.get_all_classes() self.weight_handler = importutils.import_object( CONF.scheduler.scheduler_weight_handler, - 'nimble.engine.scheduler.weights') + 'mogan.engine.scheduler.weights') self.weight_classes = self.weight_handler.get_all_classes() def _choose_node_filters(self, filter_cls_names): diff --git a/nimble/engine/scheduler/scheduler_options.py b/mogan/engine/scheduler/scheduler_options.py similarity index 98% rename from nimble/engine/scheduler/scheduler_options.py rename to mogan/engine/scheduler/scheduler_options.py index 998fa60b..eb3994da 100644 --- a/nimble/engine/scheduler/scheduler_options.py +++ b/mogan/engine/scheduler/scheduler_options.py @@ -28,7 +28,7 @@ from oslo_config import cfg from oslo_log import log as logging from oslo_utils import timeutils -from nimble.common.i18n import _LE +from mogan.common.i18n import _LE CONF = cfg.CONF diff --git a/nimble/engine/scheduler/weights/__init__.py b/mogan/engine/scheduler/weights/__init__.py similarity index 96% rename from nimble/engine/scheduler/weights/__init__.py rename to mogan/engine/scheduler/weights/__init__.py index b2dbca5c..477a83f1 100644 --- a/nimble/engine/scheduler/weights/__init__.py +++ b/mogan/engine/scheduler/weights/__init__.py @@ -17,7 +17,7 @@ Scheduler node weights """ -from nimble.engine.scheduler import base_weight +from mogan.engine.scheduler import base_weight class WeighedNode(base_weight.WeighedObject): diff --git a/nimble/engine/status.py b/mogan/engine/status.py similarity index 100% rename from nimble/engine/status.py rename to mogan/engine/status.py diff --git a/nimble/image/__init__.py b/mogan/image/__init__.py similarity index 91% rename from nimble/image/__init__.py rename to mogan/image/__init__.py index 5691fd69..1c49f7f5 100644 --- a/nimble/image/__init__.py +++ b/mogan/image/__init__.py @@ -13,5 +13,5 @@ def API(): # Needed to prevent circular import... - import nimble.image.api - return nimble.image.api.API() + import mogan.image.api + return mogan.image.api.API() diff --git a/nimble/image/api.py b/mogan/image/api.py similarity index 92% rename from nimble/image/api.py rename to mogan/image/api.py index 67787da4..1dca2d9d 100644 --- a/nimble/image/api.py +++ b/mogan/image/api.py @@ -15,13 +15,13 @@ Main abstraction layer for retrieving and storing information about disk images used by the compute layer. """ -from nimble.image import glance +from mogan.image import glance class API(object): """Responsible for exposing a relatively stable internal API for other - modules in Nimble to retrieve information about disk images. + modules in Mogan to retrieve information about disk images. """ def get(self, context, image_id): diff --git a/nimble/image/glance.py b/mogan/image/glance.py similarity index 98% rename from nimble/image/glance.py rename to mogan/image/glance.py index 6fcc4f6d..77485f23 100644 --- a/nimble/image/glance.py +++ b/mogan/image/glance.py @@ -31,9 +31,9 @@ from oslo_utils import timeutils import six from six.moves import range -from nimble.common import exception -from nimble.common.i18n import _LE -from nimble import conf +from mogan.common import exception +from mogan.common.i18n import _LE +from mogan import conf LOG = logging.getLogger(__name__) CONF = conf.CONF diff --git a/nimble/network/__init__.py b/mogan/network/__init__.py similarity index 90% rename from nimble/network/__init__.py rename to mogan/network/__init__.py index 97d29928..407eb3fa 100644 --- a/nimble/network/__init__.py +++ b/mogan/network/__init__.py @@ -13,5 +13,5 @@ def API(): # Needed to prevent circular import... - import nimble.network.api - return nimble.network.api.API() + import mogan.network.api + return mogan.network.api.API() diff --git a/nimble/network/api.py b/mogan/network/api.py similarity index 96% rename from nimble/network/api.py rename to mogan/network/api.py index d0bfdbe0..a666f53f 100644 --- a/nimble/network/api.py +++ b/mogan/network/api.py @@ -14,10 +14,10 @@ from neutronclient.common import exceptions as neutron_exceptions from neutronclient.v2_0 import client as clientv20 from oslo_log import log as logging -from nimble.common import exception -from nimble.common.i18n import _ -from nimble.common import keystone -from nimble.conf import CONF +from mogan.common import exception +from mogan.common.i18n import _ +from mogan.common import keystone +from mogan.conf import CONF LOG = logging.getLogger(__name__) diff --git a/nimble/notifications/__init__.py b/mogan/notifications/__init__.py similarity index 100% rename from nimble/notifications/__init__.py rename to mogan/notifications/__init__.py diff --git a/nimble/notifications/objects/__init__.py b/mogan/notifications/objects/__init__.py similarity index 100% rename from nimble/notifications/objects/__init__.py rename to mogan/notifications/objects/__init__.py diff --git a/nimble/notifications/objects/base.py b/mogan/notifications/objects/base.py similarity index 98% rename from nimble/notifications/objects/base.py rename to mogan/notifications/objects/base.py index 92919097..c68fe748 100644 --- a/nimble/notifications/objects/base.py +++ b/mogan/notifications/objects/base.py @@ -12,9 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. -from nimble.common import rpc -from nimble.objects import base -from nimble.objects import fields +from mogan.common import rpc +from mogan.objects import base +from mogan.objects import fields @base.NimbleObjectRegistry.register_if(False) diff --git a/nimble/objects/__init__.py b/mogan/objects/__init__.py similarity index 93% rename from nimble/objects/__init__.py rename to mogan/objects/__init__.py index a7efbe5a..e323017a 100644 --- a/nimble/objects/__init__.py +++ b/mogan/objects/__init__.py @@ -25,5 +25,5 @@ def register_all(): # NOTE(danms): You must make sure your object gets imported in this # function in order for it to be registered by services that may # need to receive it via RPC. - __import__('nimble.objects.instance_type') - __import__('nimble.objects.instance') + __import__('mogan.objects.instance_type') + __import__('mogan.objects.instance') diff --git a/nimble/objects/base.py b/mogan/objects/base.py similarity index 94% rename from nimble/objects/base.py rename to mogan/objects/base.py index 6f5e3df0..60a63f9f 100644 --- a/nimble/objects/base.py +++ b/mogan/objects/base.py @@ -13,13 +13,13 @@ # License for the specific language governing permissions and limitations # under the License. -"""Nimble common internal object model""" +"""Mogan common internal object model""" from oslo_utils import versionutils from oslo_versionedobjects import base as object_base -from nimble import objects -from nimble.objects import fields as object_fields +from mogan import objects +from mogan.objects import fields as object_fields class NimbleObjectRegistry(object_base.VersionedObjectRegistry): @@ -28,7 +28,7 @@ class NimbleObjectRegistry(object_base.VersionedObjectRegistry): def registration_hook(self, cls, index): # NOTE(jroll): blatantly stolen from nova # NOTE(danms): This is called when an object is registered, - # and is responsible for maintaining nimble.objects.$OBJECT + # and is responsible for maintaining mogan.objects.$OBJECT # as the highest-versioned implementation of a given object. version = versionutils.convert_version_to_tuple(cls.VERSION) if not hasattr(objects, cls.obj_name()): @@ -70,7 +70,7 @@ class NimbleObject(object_base.VersionedObject): """ OBJ_SERIAL_NAMESPACE = 'nimble_object' - OBJ_PROJECT_NAMESPACE = 'nimble' + OBJ_PROJECT_NAMESPACE = 'mogan' # TODO(lintan) Refactor these fields and create PersistentObject and # TimeStampObject like Nova when it is necessary. diff --git a/nimble/objects/fields.py b/mogan/objects/fields.py similarity index 99% rename from nimble/objects/fields.py rename to mogan/objects/fields.py index ed0d2ed9..220707cb 100644 --- a/nimble/objects/fields.py +++ b/mogan/objects/fields.py @@ -20,7 +20,7 @@ import six from oslo_versionedobjects import fields as object_fields -from nimble.common import utils +from mogan.common import utils Field = object_fields.Field ObjectField = object_fields.ObjectField diff --git a/nimble/objects/instance.py b/mogan/objects/instance.py similarity index 96% rename from nimble/objects/instance.py rename to mogan/objects/instance.py index 66c9258e..6cab4f90 100644 --- a/nimble/objects/instance.py +++ b/mogan/objects/instance.py @@ -16,9 +16,9 @@ from oslo_versionedobjects import base as object_base -from nimble.db import api as dbapi -from nimble.objects import base -from nimble.objects import fields as object_fields +from mogan.db import api as dbapi +from mogan.objects import base +from mogan.objects import fields as object_fields @base.NimbleObjectRegistry.register diff --git a/nimble/objects/instance_type.py b/mogan/objects/instance_type.py similarity index 97% rename from nimble/objects/instance_type.py rename to mogan/objects/instance_type.py index ed9f5c90..5fcbdcc0 100644 --- a/nimble/objects/instance_type.py +++ b/mogan/objects/instance_type.py @@ -16,9 +16,9 @@ from oslo_versionedobjects import base as object_base -from nimble.db import api as dbapi -from nimble.objects import base -from nimble.objects import fields as object_fields +from mogan.db import api as dbapi +from mogan.objects import base +from mogan.objects import fields as object_fields @base.NimbleObjectRegistry.register diff --git a/nimble/tests/__init__.py b/mogan/tests/__init__.py similarity index 100% rename from nimble/tests/__init__.py rename to mogan/tests/__init__.py diff --git a/nimble/tests/base.py b/mogan/tests/base.py similarity index 98% rename from nimble/tests/base.py rename to mogan/tests/base.py index 19f01e08..9e15c901 100644 --- a/nimble/tests/base.py +++ b/mogan/tests/base.py @@ -29,8 +29,8 @@ import six import testscenarios import testtools -from nimble.common import config as nimble_config -from nimble.tests import policy_fixture +from mogan.common import config as nimble_config +from mogan.tests import policy_fixture CONF = cfg.CONF diff --git a/nimble/tests/functional/__init__.py b/mogan/tests/functional/__init__.py similarity index 100% rename from nimble/tests/functional/__init__.py rename to mogan/tests/functional/__init__.py diff --git a/nimble/tests/functional/api/__init__.py b/mogan/tests/functional/api/__init__.py similarity index 97% rename from nimble/tests/functional/api/__init__.py rename to mogan/tests/functional/api/__init__.py index dee06534..cc41915c 100644 --- a/nimble/tests/functional/api/__init__.py +++ b/mogan/tests/functional/api/__init__.py @@ -22,8 +22,8 @@ from oslo_serialization import jsonutils import pecan import pecan.testing -from nimble import objects -from nimble.tests.unit.db import base +from mogan import objects +from mogan.tests.unit.db import base cfg.CONF.import_group('keystone_authtoken', 'keystonemiddleware.auth_token') @@ -59,8 +59,8 @@ class BaseApiTest(base.DbTestCase): self.app_config = { 'app': { - 'root': 'nimble.api.controllers.root.RootController', - 'modules': ['nimble.api'], + 'root': 'mogan.api.controllers.root.RootController', + 'modules': ['mogan.api'], 'static_root': '%s/public' % root_dir, 'template_path': '%s/api/templates' % root_dir, 'acl_public_routes': ['/', '/v1/.*'], @@ -232,7 +232,7 @@ class BaseApiTest(base.DbTestCase): 'X-User-Domain-Name': ct.get("domain_name") or "no_domain", 'X-Auth-Token': ct.get("auth_token") or "6aff71c33a274bc3ab7f0b29ca1be162", - 'X-Roles': ct.get("roles") or "nimble" + 'X-Roles': ct.get("roles") or "mogan" } return headers diff --git a/nimble/tests/functional/api/test_root.py b/mogan/tests/functional/api/test_root.py similarity index 89% rename from nimble/tests/functional/api/test_root.py rename to mogan/tests/functional/api/test_root.py index f0673243..ee6c3974 100644 --- a/nimble/tests/functional/api/test_root.py +++ b/mogan/tests/functional/api/test_root.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from nimble.tests.functional import api +from mogan.tests.functional import api class TestRoot(api.BaseApiTest): @@ -23,5 +23,5 @@ class TestRoot(api.BaseApiTest): # Check fields are not empty [self.assertNotIn(f, ['', []]) for f in response] - self.assertEqual('OpenStack Nimble API', response['name']) + self.assertEqual('OpenStack Mogan API', response['name']) self.assertTrue(response['description']) diff --git a/nimble/tests/functional/api/v1/__init__.py b/mogan/tests/functional/api/v1/__init__.py similarity index 94% rename from nimble/tests/functional/api/v1/__init__.py rename to mogan/tests/functional/api/v1/__init__.py index faf186b7..18172478 100644 --- a/nimble/tests/functional/api/v1/__init__.py +++ b/mogan/tests/functional/api/v1/__init__.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from nimble.tests.functional import api +from mogan.tests.functional import api class APITestV1(api.BaseApiTest): diff --git a/nimble/tests/functional/api/v1/test_availability_zones.py b/mogan/tests/functional/api/v1/test_availability_zones.py similarity index 89% rename from nimble/tests/functional/api/v1/test_availability_zones.py rename to mogan/tests/functional/api/v1/test_availability_zones.py index bd16b55e..40186d92 100644 --- a/nimble/tests/functional/api/v1/test_availability_zones.py +++ b/mogan/tests/functional/api/v1/test_availability_zones.py @@ -14,7 +14,7 @@ import mock -from nimble.tests.functional.api import v1 as v1_test +from mogan.tests.functional.api import v1 as v1_test class TestAvailabilityZone(v1_test.APITestV1): @@ -22,7 +22,7 @@ class TestAvailabilityZone(v1_test.APITestV1): def setUp(self): super(TestAvailabilityZone, self).setUp() - @mock.patch('nimble.engine.api.API.list_availability_zones') + @mock.patch('mogan.engine.api.API.list_availability_zones') def test_availability_zone_get_all(self, list_azs): list_azs.return_value = {'availability_zones': ['az1', 'az2']} resp = self.get_json('/availability_zones') diff --git a/nimble/tests/functional/api/v1/test_instance_types.py b/mogan/tests/functional/api/v1/test_instance_types.py similarity index 99% rename from nimble/tests/functional/api/v1/test_instance_types.py rename to mogan/tests/functional/api/v1/test_instance_types.py index 8a057119..5032c071 100644 --- a/nimble/tests/functional/api/v1/test_instance_types.py +++ b/mogan/tests/functional/api/v1/test_instance_types.py @@ -18,7 +18,7 @@ import six from oslo_serialization import jsonutils -from nimble.tests.functional.api import v1 as v1_test +from mogan.tests.functional.api import v1 as v1_test class TestInstanceType(v1_test.APITestV1): diff --git a/nimble/tests/functional/api/v1/test_instances.py b/mogan/tests/functional/api/v1/test_instances.py similarity index 97% rename from nimble/tests/functional/api/v1/test_instances.py rename to mogan/tests/functional/api/v1/test_instances.py index 62b410a4..2c94d7a4 100644 --- a/nimble/tests/functional/api/v1/test_instances.py +++ b/mogan/tests/functional/api/v1/test_instances.py @@ -17,7 +17,7 @@ import mock from oslotest import mockpatch import six -from nimble.tests.functional.api import v1 as v1_test +from mogan.tests.functional.api import v1 as v1_test def _get_fake_image(**kwargs): @@ -75,10 +75,10 @@ class TestInstances(v1_test.APITestV1): def setUp(self): self.rpc_api = mock.Mock() - self.useFixture(mockpatch.Patch('nimble.engine.rpcapi.EngineAPI', + self.useFixture(mockpatch.Patch('mogan.engine.rpcapi.EngineAPI', return_value=self.rpc_api)) self.image_api = mock.Mock() - self.useFixture(mockpatch.Patch('nimble.image.api.API', + self.useFixture(mockpatch.Patch('mogan.image.api.API', return_value=self.image_api)) self.rpc_api.get_ironic_node.return_value = _get_fake_node() self.rpc_api.list_availability_zones.return_value = { diff --git a/nimble/tests/policy_fixture.py b/mogan/tests/policy_fixture.py similarity index 96% rename from nimble/tests/policy_fixture.py rename to mogan/tests/policy_fixture.py index 8ef3c229..8ee73a45 100644 --- a/nimble/tests/policy_fixture.py +++ b/mogan/tests/policy_fixture.py @@ -18,7 +18,7 @@ import fixtures from oslo_config import cfg from oslo_policy import opts as policy_opts -from nimble.common import policy as nimble_policy +from mogan.common import policy as nimble_policy CONF = cfg.CONF diff --git a/nimble/tests/tempest/__init__.py b/mogan/tests/tempest/__init__.py similarity index 100% rename from nimble/tests/tempest/__init__.py rename to mogan/tests/tempest/__init__.py diff --git a/nimble/tests/tempest/api/__init__.py b/mogan/tests/tempest/api/__init__.py similarity index 100% rename from nimble/tests/tempest/api/__init__.py rename to mogan/tests/tempest/api/__init__.py diff --git a/nimble/tests/tempest/api/base.py b/mogan/tests/tempest/api/base.py similarity index 94% rename from nimble/tests/tempest/api/base.py rename to mogan/tests/tempest/api/base.py index 1c29c79d..61c1749e 100644 --- a/nimble/tests/tempest/api/base.py +++ b/mogan/tests/tempest/api/base.py @@ -18,7 +18,7 @@ from tempest import config from tempest.lib import exceptions as lib_exc import tempest.test -from nimble.tests.tempest.service import client +from mogan.tests.tempest.service import client CONF = config.CONF @@ -33,7 +33,7 @@ class BaseBaremetalComputeTest(tempest.test.BaseTestCase): def skip_checks(cls): super(BaseBaremetalComputeTest, cls).skip_checks() if not CONF.service_available.nimble_plugin: - raise cls.skipException("Nimble support is required") + raise cls.skipException("Mogan support is required") @classmethod def setup_clients(cls): diff --git a/nimble/tests/tempest/api/test_instance_types.py b/mogan/tests/tempest/api/test_instance_types.py similarity index 90% rename from nimble/tests/tempest/api/test_instance_types.py rename to mogan/tests/tempest/api/test_instance_types.py index f37e94d9..784722c4 100644 --- a/nimble/tests/tempest/api/test_instance_types.py +++ b/mogan/tests/tempest/api/test_instance_types.py @@ -19,7 +19,7 @@ from tempest.common.utils import data_utils from tempest.lib import exceptions as lib_exc from tempest import test -from nimble.tests.tempest.api import base +from mogan.tests.tempest.api import base class BaremetalComputeAPITest(base.BaseBaremetalComputeTest): @@ -29,7 +29,7 @@ class BaremetalComputeAPITest(base.BaseBaremetalComputeTest): super(BaremetalComputeAPITest, cls).resource_setup() for i in six.moves.xrange(3): body = {"name": data_utils.rand_name('nimble_instance_type'), - "description": "nimble instance type description", + "description": "mogan instance type description", 'is_public': bool(data_utils.rand_int_id(0, 1))} resp = cls.baremetal_compute_client.create_instance_type(**body) cls.type_ids.append(resp['uuid']) @@ -51,11 +51,11 @@ class BaremetalComputeAPITest(base.BaseBaremetalComputeTest): def test_type_create_show_delete(self): # Create an instance type body = {"name": 'nimble_type_create', - "description": "nimble instance type description", + "description": "mogan instance type description", 'is_public': True} resp = self.baremetal_compute_client.create_instance_type(**body) self.assertEqual('nimble_type_create', resp['name']) - self.assertEqual('nimble instance type description', + self.assertEqual('mogan instance type description', resp['description']) self.assertEqual(True, resp['is_public']) self.assertIn('uuid', resp) @@ -63,7 +63,7 @@ class BaremetalComputeAPITest(base.BaseBaremetalComputeTest): self.assertIn('links', resp) resp = self.baremetal_compute_client.show_instance_type(resp['uuid']) self.assertEqual('nimble_type_create', resp['name']) - self.assertEqual('nimble instance type description', + self.assertEqual('mogan instance type description', resp['description']) self.assertEqual(True, resp['is_public']) self.assertIn('uuid', resp) diff --git a/nimble/tests/tempest/config.py b/mogan/tests/tempest/config.py similarity index 95% rename from nimble/tests/tempest/config.py rename to mogan/tests/tempest/config.py index b819d23a..0cde4503 100644 --- a/nimble/tests/tempest/config.py +++ b/mogan/tests/tempest/config.py @@ -21,7 +21,7 @@ service_available_group = cfg.OptGroup(name="service_available", ServiceAvailableGroup = [ cfg.BoolOpt("nimble_plugin", default=True, - help="Whether or not Nimble is expected to be available"), + help="Whether or not Mogan is expected to be available"), ] baremetal_compute_group = cfg.OptGroup( diff --git a/nimble/tests/tempest/plugin.py b/mogan/tests/tempest/plugin.py similarity index 86% rename from nimble/tests/tempest/plugin.py rename to mogan/tests/tempest/plugin.py index be800b8c..c4f2358f 100644 --- a/nimble/tests/tempest/plugin.py +++ b/mogan/tests/tempest/plugin.py @@ -18,15 +18,15 @@ import os from tempest import config from tempest.test_discover import plugins -import nimble -from nimble.tests.tempest import config as tempest_config +import mogan +from mogan.tests.tempest import config as tempest_config -class NimbleTempestPlugin(plugins.TempestPlugin): +class MoganTempestPlugin(plugins.TempestPlugin): def load_tests(self): base_path = os.path.split(os.path.dirname( - os.path.abspath(nimble.__file__)))[0] - test_dir = "nimble/tests/tempest" + os.path.abspath(mogan.__file__)))[0] + test_dir = "mogan/tests/tempest" full_test_dir = os.path.join(base_path, test_dir) return full_test_dir, base_path diff --git a/nimble/tests/tempest/service/__init__.py b/mogan/tests/tempest/service/__init__.py similarity index 100% rename from nimble/tests/tempest/service/__init__.py rename to mogan/tests/tempest/service/__init__.py diff --git a/nimble/tests/tempest/service/client.py b/mogan/tests/tempest/service/client.py similarity index 97% rename from nimble/tests/tempest/service/client.py rename to mogan/tests/tempest/service/client.py index ad29be5f..e52cbe89 100644 --- a/nimble/tests/tempest/service/client.py +++ b/mogan/tests/tempest/service/client.py @@ -23,7 +23,7 @@ CONF = config.CONF class BaremetalComputeClient(rest_client.RestClient): version = '1' - # TODO(liusheng) since the endpoints of Nimble includes '/v1', + # TODO(liusheng) since the endpoints of Mogan includes '/v1', # here we shouldn't add this, may remove the 'v1' in endpoint urls # uri_prefix = "v1" uri_prefix = "" diff --git a/nimble/tests/unit/__init__.py b/mogan/tests/unit/__init__.py similarity index 89% rename from nimble/tests/unit/__init__.py rename to mogan/tests/unit/__init__.py index cc352538..5d8cb675 100644 --- a/nimble/tests/unit/__init__.py +++ b/mogan/tests/unit/__init__.py @@ -14,14 +14,14 @@ # under the License. """ -:mod:`nimble.tests.unit` -- nimble unit tests +:mod:`mogan.tests.unit` -- mogan unit tests ===================================================== -.. automodule:: nimble.tests.unit +.. automodule:: mogan.tests.unit :platform: Unix """ -from nimble import objects +from mogan import objects # NOTE(Shaohe Feng): Make sure we have all of the objects loaded. We do this # at module import time, because we may be using mock decorators in our diff --git a/nimble/tests/unit/api/__init__.py b/mogan/tests/unit/api/__init__.py similarity index 100% rename from nimble/tests/unit/api/__init__.py rename to mogan/tests/unit/api/__init__.py diff --git a/nimble/tests/unit/api/test_hooks.py b/mogan/tests/unit/api/test_hooks.py similarity index 98% rename from nimble/tests/unit/api/test_hooks.py rename to mogan/tests/unit/api/test_hooks.py index c79d4647..89eeec9a 100644 --- a/nimble/tests/unit/api/test_hooks.py +++ b/mogan/tests/unit/api/test_hooks.py @@ -19,8 +19,8 @@ import mock from oslo_config import cfg from oslo_context import context -from nimble.api import hooks -from nimble.tests import base +from mogan.api import hooks +from mogan.tests import base class FakeRequest(object): @@ -72,7 +72,7 @@ def fake_headers(admin=False): 'X-User-Domain-Name': 'Default', 'X-User-Id': '604ab2a197c442c2a84aba66708a9e1e', 'X-User-Name': 'foo', - 'X-OpenStack-Nimble-API-Version': '1.0' + 'X-OpenStack-Mogan-API-Version': '1.0' } if admin: headers.update({ diff --git a/nimble/tests/unit/api/v1/__init__.py b/mogan/tests/unit/api/v1/__init__.py similarity index 100% rename from nimble/tests/unit/api/v1/__init__.py rename to mogan/tests/unit/api/v1/__init__.py diff --git a/nimble/tests/unit/api/v1/test_instance.py b/mogan/tests/unit/api/v1/test_instance.py similarity index 95% rename from nimble/tests/unit/api/v1/test_instance.py rename to mogan/tests/unit/api/v1/test_instance.py index ee16465d..10822c86 100644 --- a/nimble/tests/unit/api/v1/test_instance.py +++ b/mogan/tests/unit/api/v1/test_instance.py @@ -19,8 +19,8 @@ from oslo_utils import timeutils from oslo_utils import uuidutils from six.moves import http_client -from nimble.tests.functional.api import v1 as v1_test -from nimble.tests.unit.db import utils +from mogan.tests.functional.api import v1 as v1_test +from mogan.tests.unit.db import utils def gen_post_body(**kw): @@ -46,7 +46,7 @@ def gen_post_body(**kw): class TestInstanceAuthorization(v1_test.APITestV1): - DENY_MESSAGE = "Access was denied to the following resource: nimble:%s" + DENY_MESSAGE = "Access was denied to the following resource: mogan:%s" def setUp(self): super(TestInstanceAuthorization, self).setUp() @@ -56,8 +56,8 @@ class TestInstanceAuthorization(v1_test.APITestV1): self.instance1 = utils.create_test_instance( name="T1", project_id=project_id) - @mock.patch('nimble.engine.api.API.create') - @mock.patch('nimble.objects.InstanceType.get') + @mock.patch('mogan.engine.api.API.create') + @mock.patch('mogan.objects.InstanceType.get') def test_instance_post(self, mock_get, mock_engine_create): mock_get.side_effect = None mock_engine_create.side_effect = None @@ -70,7 +70,7 @@ class TestInstanceAuthorization(v1_test.APITestV1): headers = self.gen_headers(self.context) self.post_json('/instances', body, headers=headers, status=201) - @mock.patch('nimble.engine.api.API.get_ironic_node') + @mock.patch('mogan.engine.api.API.get_ironic_node') def test_instance_get_one_by_owner(self, mock_get_node): mock_get_node.return_value = {'power_state': 'power on'} # not admin but the owner @@ -78,7 +78,7 @@ class TestInstanceAuthorization(v1_test.APITestV1): headers = self.gen_headers(self.context, roles="no-admin") self.get_json('/instances/%s' % self.instance1.uuid, headers=headers) - @mock.patch('nimble.engine.api.API.get_ironic_node') + @mock.patch('mogan.engine.api.API.get_ironic_node') def test_instance_get_one_by_admin(self, mock_get_node): mock_get_node.return_value = {'power_state': 'power on'} # when the evil tenant is admin, he can do everything. @@ -116,7 +116,7 @@ class TestPatch(v1_test.APITestV1): self.assertEqual('application/json', response.content_type) self.assertTrue(response.json['error_message']) - @mock.patch('nimble.engine.api.API.get_ironic_node') + @mock.patch('mogan.engine.api.API.get_ironic_node') @mock.patch.object(timeutils, 'utcnow') def test_replace_singular(self, mock_utcnow, mock_get_node): mock_get_node.return_value = {'power_state': 'power on'} @@ -137,7 +137,7 @@ class TestPatch(v1_test.APITestV1): result['updated_at']).replace(tzinfo=None) self.assertEqual(test_time, return_updated_at) - @mock.patch('nimble.engine.api.API.get_ironic_node') + @mock.patch('mogan.engine.api.API.get_ironic_node') def test_replace_multi(self, mock_get_node): mock_get_node.return_value = {'power_state': 'power on'} extra = {"foo1": "bar1", "foo2": "bar2", "foo3": "bar3"} @@ -157,7 +157,7 @@ class TestPatch(v1_test.APITestV1): extra["foo2"] = new_value self.assertEqual(extra, result['extra']) - @mock.patch('nimble.engine.api.API.get_ironic_node') + @mock.patch('mogan.engine.api.API.get_ironic_node') def test_remove_singular(self, mock_get_node): mock_get_node.return_value = {'power_state': 'power on'} uuid = uuidutils.generate_uuid() @@ -176,7 +176,7 @@ class TestPatch(v1_test.APITestV1): self.assertEqual(instance.uuid, result['uuid']) self.assertEqual(instance.extra, result['extra']) - @mock.patch('nimble.engine.api.API.get_ironic_node') + @mock.patch('mogan.engine.api.API.get_ironic_node') def test_remove_multi(self, mock_get_node): mock_get_node.return_value = {'power_state': 'power on'} extra = {"foo1": "bar1", "foo2": "bar2", "foo3": "bar3"} @@ -235,7 +235,7 @@ class TestPatch(v1_test.APITestV1): self.assertEqual(http_client.BAD_REQUEST, response.status_int) self.assertTrue(response.json['error_message']) - @mock.patch('nimble.engine.api.API.get_ironic_node') + @mock.patch('mogan.engine.api.API.get_ironic_node') def test_add_multi(self, mock_get_node): mock_get_node.return_value = {'power_state': 'power on'} response = self.patch_json('/instances/%s' % self.instance.uuid, diff --git a/nimble/tests/unit/cmd/__init__.py b/mogan/tests/unit/cmd/__init__.py similarity index 100% rename from nimble/tests/unit/cmd/__init__.py rename to mogan/tests/unit/cmd/__init__.py diff --git a/nimble/tests/unit/cmd/test_dbsync.py b/mogan/tests/unit/cmd/test_dbsync.py similarity index 92% rename from nimble/tests/unit/cmd/test_dbsync.py rename to mogan/tests/unit/cmd/test_dbsync.py index 216051c4..4e0cbe02 100644 --- a/nimble/tests/unit/cmd/test_dbsync.py +++ b/mogan/tests/unit/cmd/test_dbsync.py @@ -15,8 +15,8 @@ # License for the specific language governing permissions and limitations # under the License. -from nimble.db import migration -from nimble.tests.unit.db import base +from mogan.db import migration +from mogan.tests.unit.db import base class DbSyncTestCase(base.DbTestCase): diff --git a/nimble/tests/unit/common/__init__.py b/mogan/tests/unit/common/__init__.py similarity index 100% rename from nimble/tests/unit/common/__init__.py rename to mogan/tests/unit/common/__init__.py diff --git a/nimble/tests/unit/common/test_exception.py b/mogan/tests/unit/common/test_exception.py similarity index 93% rename from nimble/tests/unit/common/test_exception.py rename to mogan/tests/unit/common/test_exception.py index b5e019c2..b4c0a695 100644 --- a/nimble/tests/unit/common/test_exception.py +++ b/mogan/tests/unit/common/test_exception.py @@ -13,8 +13,8 @@ import six -from nimble.common import exception -from nimble.tests import base +from mogan.common import exception +from mogan.tests import base class TestNimbleException(base.TestCase): diff --git a/nimble/tests/unit/common/test_rpc.py b/mogan/tests/unit/common/test_rpc.py similarity index 97% rename from nimble/tests/unit/common/test_rpc.py rename to mogan/tests/unit/common/test_rpc.py index 80d9e065..b398548a 100644 --- a/nimble/tests/unit/common/test_rpc.py +++ b/mogan/tests/unit/common/test_rpc.py @@ -16,8 +16,8 @@ from oslo_config import cfg from oslo_context import context as nimble_context import oslo_messaging as messaging -from nimble.common import rpc -from nimble.tests import base +from mogan.common import rpc +from mogan.tests import base CONF = cfg.CONF @@ -116,7 +116,7 @@ class TestRequestContextSerializer(base.TestCase): self.context.tenant = 'fake-tenant' serialize_values = self.context.to_dict() new_context = self.serializer.deserialize_context(serialize_values) - # Nimble RequestContext from_dict will pop 'user' and 'tenant' and + # Mogan RequestContext from_dict will pop 'user' and 'tenant' and # initialize to None. self.assertEqual('fake-user', new_context.user) self.assertEqual('fake-tenant', new_context.tenant) diff --git a/nimble/tests/unit/common/test_service.py b/mogan/tests/unit/common/test_service.py similarity index 93% rename from nimble/tests/unit/common/test_service.py rename to mogan/tests/unit/common/test_service.py index c7e8e2f7..914c7f36 100644 --- a/nimble/tests/unit/common/test_service.py +++ b/mogan/tests/unit/common/test_service.py @@ -16,13 +16,13 @@ from oslo_config import cfg import oslo_messaging from oslo_service import service as base_service -from nimble.common import constants -from nimble.common import exception -from nimble.common import rpc -from nimble.common import service -from nimble.engine import manager -from nimble.objects import base as objects_base -from nimble.tests import base +from mogan.common import constants +from mogan.common import exception +from mogan.common import rpc +from mogan.common import service +from mogan.engine import manager +from mogan.objects import base as objects_base +from mogan.tests import base CONF = cfg.CONF @@ -33,7 +33,7 @@ class TestRPCService(base.TestCase): def setUp(self): super(TestRPCService, self).setUp() host = "fake_host" - mgr_module = "nimble.engine.manager" + mgr_module = "mogan.engine.manager" mgr_class = "EngineManager" self.rpc_svc = service.RPCService(host, mgr_module, mgr_class, constants.MANAGER_TOPIC) diff --git a/nimble/tests/unit/conf/__init__.py b/mogan/tests/unit/conf/__init__.py similarity index 100% rename from nimble/tests/unit/conf/__init__.py rename to mogan/tests/unit/conf/__init__.py diff --git a/nimble/tests/unit/conf/test_auth.py b/mogan/tests/unit/conf/test_auth.py similarity index 97% rename from nimble/tests/unit/conf/test_auth.py rename to mogan/tests/unit/conf/test_auth.py index 89d5b76d..0c688f8c 100644 --- a/nimble/tests/unit/conf/test_auth.py +++ b/mogan/tests/unit/conf/test_auth.py @@ -16,8 +16,8 @@ from keystoneauth1 import identity as kaidentity from keystoneauth1 import loading as kaloading from oslo_config import cfg -from nimble.conf import auth as nimble_auth -from nimble.tests import base +from mogan.conf import auth as nimble_auth +from mogan.tests import base class AuthConfTestCase(base.TestCase): diff --git a/nimble/tests/unit/db/__init__.py b/mogan/tests/unit/db/__init__.py similarity index 100% rename from nimble/tests/unit/db/__init__.py rename to mogan/tests/unit/db/__init__.py diff --git a/nimble/tests/unit/db/base.py b/mogan/tests/unit/db/base.py similarity index 91% rename from nimble/tests/unit/db/base.py rename to mogan/tests/unit/db/base.py index c06fcfef..d546276d 100644 --- a/nimble/tests/unit/db/base.py +++ b/mogan/tests/unit/db/base.py @@ -13,16 +13,16 @@ # License for the specific language governing permissions and limitations # under the License. -"""Nimble DB test base class.""" +"""Mogan DB test base class.""" import fixtures from oslo_config import cfg from oslo_db.sqlalchemy import enginefacade -from nimble.db import api as dbapi -from nimble.db.sqlalchemy import migration -from nimble.db.sqlalchemy import models -from nimble.tests import base +from mogan.db import api as dbapi +from mogan.db.sqlalchemy import migration +from mogan.db.sqlalchemy import models +from mogan.tests import base CONF = cfg.CONF diff --git a/nimble/tests/unit/db/sqlalchemy/__init__.py b/mogan/tests/unit/db/sqlalchemy/__init__.py similarity index 100% rename from nimble/tests/unit/db/sqlalchemy/__init__.py rename to mogan/tests/unit/db/sqlalchemy/__init__.py diff --git a/nimble/tests/unit/db/sqlalchemy/test_migrations.py b/mogan/tests/unit/db/sqlalchemy/test_migrations.py similarity index 98% rename from nimble/tests/unit/db/sqlalchemy/test_migrations.py rename to mogan/tests/unit/db/sqlalchemy/test_migrations.py index 97a0267b..0cf5c26d 100644 --- a/nimble/tests/unit/db/sqlalchemy/test_migrations.py +++ b/mogan/tests/unit/db/sqlalchemy/test_migrations.py @@ -47,10 +47,10 @@ from oslo_log import log as logging import sqlalchemy import sqlalchemy.exc -from nimble.common.i18n import _LE -from nimble.db.sqlalchemy import migration -from nimble.db.sqlalchemy import models -from nimble.tests import base +from mogan.common.i18n import _LE +from mogan.db.sqlalchemy import migration +from mogan.db.sqlalchemy import models +from mogan.tests import base LOG = logging.getLogger(__name__) diff --git a/nimble/tests/unit/db/test_instance_type_extra_specs.py b/mogan/tests/unit/db/test_instance_type_extra_specs.py similarity index 95% rename from nimble/tests/unit/db/test_instance_type_extra_specs.py rename to mogan/tests/unit/db/test_instance_type_extra_specs.py index a78a9d64..3b58a158 100644 --- a/nimble/tests/unit/db/test_instance_type_extra_specs.py +++ b/mogan/tests/unit/db/test_instance_type_extra_specs.py @@ -15,9 +15,9 @@ """Tests for manipulating Instance Type Extra Specs via the DB API""" -from nimble.common import exception -from nimble.tests.unit.db import base -from nimble.tests.unit.db import utils +from mogan.common import exception +from mogan.tests.unit.db import base +from mogan.tests.unit.db import utils class DbInstanceTypeExtraSpecsTestCase(base.DbTestCase): diff --git a/nimble/tests/unit/db/test_instance_types.py b/mogan/tests/unit/db/test_instance_types.py similarity index 96% rename from nimble/tests/unit/db/test_instance_types.py rename to mogan/tests/unit/db/test_instance_types.py index 351245f1..2c7a0258 100644 --- a/nimble/tests/unit/db/test_instance_types.py +++ b/mogan/tests/unit/db/test_instance_types.py @@ -18,9 +18,9 @@ from oslo_utils import uuidutils import six -from nimble.common import exception -from nimble.tests.unit.db import base -from nimble.tests.unit.db import utils +from mogan.common import exception +from mogan.tests.unit.db import base +from mogan.tests.unit.db import utils class DbInstanceTypeTestCase(base.DbTestCase): diff --git a/nimble/tests/unit/db/test_instances.py b/mogan/tests/unit/db/test_instances.py similarity index 97% rename from nimble/tests/unit/db/test_instances.py rename to mogan/tests/unit/db/test_instances.py index 66e4a3c4..43e7c384 100644 --- a/nimble/tests/unit/db/test_instances.py +++ b/mogan/tests/unit/db/test_instances.py @@ -18,9 +18,9 @@ from oslo_utils import uuidutils import six -from nimble.common import exception -from nimble.tests.unit.db import base -from nimble.tests.unit.db import utils +from mogan.common import exception +from mogan.tests.unit.db import base +from mogan.tests.unit.db import utils class DbInstanceTestCase(base.DbTestCase): diff --git a/nimble/tests/unit/db/utils.py b/mogan/tests/unit/db/utils.py similarity index 97% rename from nimble/tests/unit/db/utils.py rename to mogan/tests/unit/db/utils.py index b0f74d1f..bd7d01a8 100644 --- a/nimble/tests/unit/db/utils.py +++ b/mogan/tests/unit/db/utils.py @@ -12,12 +12,12 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -"""Nimble test utilities.""" +"""Mogan test utilities.""" from oslo_utils import uuidutils -from nimble.db import api as db_api -from nimble.engine import status +from mogan.db import api as db_api +from mogan.engine import status def get_test_instance(**kw): diff --git a/nimble/tests/unit/engine/__init__.py b/mogan/tests/unit/engine/__init__.py similarity index 100% rename from nimble/tests/unit/engine/__init__.py rename to mogan/tests/unit/engine/__init__.py diff --git a/nimble/tests/unit/engine/flows/__init__.py b/mogan/tests/unit/engine/flows/__init__.py similarity index 100% rename from nimble/tests/unit/engine/flows/__init__.py rename to mogan/tests/unit/engine/flows/__init__.py diff --git a/nimble/tests/unit/engine/flows/test_create_instance_flow.py b/mogan/tests/unit/engine/flows/test_create_instance_flow.py similarity index 94% rename from nimble/tests/unit/engine/flows/test_create_instance_flow.py rename to mogan/tests/unit/engine/flows/test_create_instance_flow.py index a11e0c32..7b4327bd 100644 --- a/nimble/tests/unit/engine/flows/test_create_instance_flow.py +++ b/mogan/tests/unit/engine/flows/test_create_instance_flow.py @@ -18,12 +18,12 @@ import mock from oslo_context import context from oslo_utils import uuidutils -from nimble.engine.baremetal import ironic -from nimble.engine.flows import create_instance -from nimble.engine.scheduler import filter_scheduler as scheduler -from nimble import objects -from nimble.tests import base -from nimble.tests.unit.objects import utils as obj_utils +from mogan.engine.baremetal import ironic +from mogan.engine.flows import create_instance +from mogan.engine.scheduler import filter_scheduler as scheduler +from mogan import objects +from mogan.tests import base +from mogan.tests.unit.objects import utils as obj_utils class CreateInstanceFlowTestCase(base.TestCase): diff --git a/nimble/tests/unit/engine/mgr_utils.py b/mogan/tests/unit/engine/mgr_utils.py similarity index 93% rename from nimble/tests/unit/engine/mgr_utils.py rename to mogan/tests/unit/engine/mgr_utils.py index e0c3bc2d..4ee5f7a7 100644 --- a/nimble/tests/unit/engine/mgr_utils.py +++ b/mogan/tests/unit/engine/mgr_utils.py @@ -10,9 +10,9 @@ # License for the specific language governing permissions and limitations # under the License. -"""Test utils for Nimble Managers.""" +"""Test utils for Mogan Managers.""" -from nimble.engine import manager +from mogan.engine import manager class ServiceSetUpMixin(object): diff --git a/nimble/tests/unit/engine/scheduler/__init__.py b/mogan/tests/unit/engine/scheduler/__init__.py similarity index 100% rename from nimble/tests/unit/engine/scheduler/__init__.py rename to mogan/tests/unit/engine/scheduler/__init__.py diff --git a/nimble/tests/unit/engine/scheduler/fakes.py b/mogan/tests/unit/engine/scheduler/fakes.py similarity index 92% rename from nimble/tests/unit/engine/scheduler/fakes.py rename to mogan/tests/unit/engine/scheduler/fakes.py index 7626b704..afe48e75 100644 --- a/nimble/tests/unit/engine/scheduler/fakes.py +++ b/mogan/tests/unit/engine/scheduler/fakes.py @@ -20,10 +20,10 @@ Fakes For Scheduler tests. from oslo_versionedobjects import base as object_base -from nimble.engine.scheduler import filter_scheduler -from nimble.engine.scheduler import node_manager -from nimble.objects import base -from nimble.objects import fields as object_fields +from mogan.engine.scheduler import filter_scheduler +from mogan.engine.scheduler import node_manager +from mogan.objects import base +from mogan.objects import fields as object_fields class FakeFilterScheduler(filter_scheduler.FilterScheduler): diff --git a/nimble/tests/unit/engine/scheduler/test_base_filter.py b/mogan/tests/unit/engine/scheduler/test_base_filter.py similarity index 98% rename from nimble/tests/unit/engine/scheduler/test_base_filter.py rename to mogan/tests/unit/engine/scheduler/test_base_filter.py index e43b889b..0288e9ba 100644 --- a/nimble/tests/unit/engine/scheduler/test_base_filter.py +++ b/mogan/tests/unit/engine/scheduler/test_base_filter.py @@ -15,8 +15,8 @@ import mock -from nimble.engine.scheduler import base_filter -from nimble.tests import base as test +from mogan.engine.scheduler import base_filter +from mogan.tests import base as test class TestBaseFilter(test.TestCase): diff --git a/nimble/tests/unit/engine/scheduler/test_node_manager.py b/mogan/tests/unit/engine/scheduler/test_node_manager.py similarity index 89% rename from nimble/tests/unit/engine/scheduler/test_node_manager.py rename to mogan/tests/unit/engine/scheduler/test_node_manager.py index c5494610..3ac64484 100644 --- a/nimble/tests/unit/engine/scheduler/test_node_manager.py +++ b/mogan/tests/unit/engine/scheduler/test_node_manager.py @@ -18,12 +18,12 @@ Tests For NodeManager import mock -from nimble.common import exception -from nimble.engine.scheduler import filters -from nimble.engine.scheduler import node_manager -from nimble.engine.scheduler.node_manager import NodeState -from nimble.tests import base as test -from nimble.tests.unit.engine.scheduler import fakes +from mogan.common import exception +from mogan.engine.scheduler import filters +from mogan.engine.scheduler import node_manager +from mogan.engine.scheduler.node_manager import NodeState +from mogan.tests import base as test +from mogan.tests.unit.engine.scheduler import fakes class FakeFilterClass1(filters.BaseNodeFilter): @@ -66,7 +66,7 @@ class NodeManagerTestCase(test.TestCase): self.assertEqual(1, len(filter_classes)) self.assertEqual('FakeFilterClass2', filter_classes[0].__name__) - @mock.patch('nimble.engine.scheduler.node_manager.NodeManager.' + @mock.patch('mogan.engine.scheduler.node_manager.NodeManager.' '_choose_node_filters') def test_get_filtered_nodes(self, _mock_choose_node_filters): filter_class = FakeFilterClass1 diff --git a/nimble/tests/unit/engine/scheduler/test_scheduler_options.py b/mogan/tests/unit/engine/scheduler/test_scheduler_options.py similarity index 98% rename from nimble/tests/unit/engine/scheduler/test_scheduler_options.py rename to mogan/tests/unit/engine/scheduler/test_scheduler_options.py index 1a4933ab..39ac9386 100644 --- a/nimble/tests/unit/engine/scheduler/test_scheduler_options.py +++ b/mogan/tests/unit/engine/scheduler/test_scheduler_options.py @@ -21,8 +21,8 @@ import datetime from oslo_serialization import jsonutils import six -from nimble.engine.scheduler import scheduler_options -from nimble.tests import base as test +from mogan.engine.scheduler import scheduler_options +from mogan.tests import base as test class FakeSchedulerOptions(scheduler_options.SchedulerOptions): diff --git a/nimble/tests/unit/engine/scheduler/test_weights.py b/mogan/tests/unit/engine/scheduler/test_weights.py similarity index 95% rename from nimble/tests/unit/engine/scheduler/test_weights.py rename to mogan/tests/unit/engine/scheduler/test_weights.py index 3d0b753b..4f7527a5 100644 --- a/nimble/tests/unit/engine/scheduler/test_weights.py +++ b/mogan/tests/unit/engine/scheduler/test_weights.py @@ -17,8 +17,8 @@ Tests For Scheduler weights. """ -from nimble.engine.scheduler import base_weight -from nimble.tests import base as test +from mogan.engine.scheduler import base_weight +from mogan.tests import base as test class TestWeightHandler(test.TestCase): diff --git a/nimble/tests/unit/engine/test_base_manager.py b/mogan/tests/unit/engine/test_base_manager.py similarity index 86% rename from nimble/tests/unit/engine/test_base_manager.py rename to mogan/tests/unit/engine/test_base_manager.py index 956fd137..6b08ea4e 100644 --- a/nimble/tests/unit/engine/test_base_manager.py +++ b/mogan/tests/unit/engine/test_base_manager.py @@ -10,15 +10,15 @@ # License for the specific language governing permissions and limitations # under the License. -"""Test class for Nimble BaseEngineManager.""" +"""Test class for Mogan BaseEngineManager.""" import eventlet import mock from oslo_config import cfg -from nimble.engine.baremetal import ironic -from nimble.tests.unit.db import base as tests_db_base -from nimble.tests.unit.engine import mgr_utils +from mogan.engine.baremetal import ironic +from mogan.tests.unit.db import base as tests_db_base +from mogan.tests.unit.engine import mgr_utils CONF = cfg.CONF diff --git a/nimble/tests/unit/engine/test_engine_api.py b/mogan/tests/unit/engine/test_engine_api.py similarity index 91% rename from nimble/tests/unit/engine/test_engine_api.py rename to mogan/tests/unit/engine/test_engine_api.py index e067d775..78699256 100644 --- a/nimble/tests/unit/engine/test_engine_api.py +++ b/mogan/tests/unit/engine/test_engine_api.py @@ -19,13 +19,13 @@ import mock from oslo_config import cfg from oslo_context import context -from nimble.common import exception -from nimble.engine import api as engine_api -from nimble.engine import rpcapi as engine_rpcapi -from nimble.engine import status -from nimble import objects -from nimble.tests.unit.db import base -from nimble.tests.unit.db import utils as db_utils +from mogan.common import exception +from mogan.engine import api as engine_api +from mogan.engine import rpcapi as engine_rpcapi +from mogan.engine import status +from mogan import objects +from mogan.tests.unit.db import base +from mogan.tests.unit.db import utils as db_utils class ComputeAPIUnitTest(base.DbTestCase): @@ -81,9 +81,9 @@ class ComputeAPIUnitTest(base.DbTestCase): mock_inst_create.assert_called_once_with() @mock.patch.object(engine_rpcapi.EngineAPI, 'create_instance') - @mock.patch('nimble.engine.api.API._provision_instances') - @mock.patch('nimble.engine.api.API._get_image') - @mock.patch('nimble.engine.api.API._validate_and_build_base_options') + @mock.patch('mogan.engine.api.API._provision_instances') + @mock.patch('mogan.engine.api.API._get_image') + @mock.patch('mogan.engine.api.API._validate_and_build_base_options') @mock.patch.object(engine_rpcapi.EngineAPI, 'list_availability_zones') def test_create(self, mock_list_az, mock_validate, mock_get_image, mock_provision, mock_create): @@ -122,9 +122,9 @@ class ComputeAPIUnitTest(base.DbTestCase): self.assertTrue(mock_get_image.called) @mock.patch.object(engine_rpcapi.EngineAPI, 'create_instance') - @mock.patch('nimble.engine.api.API._provision_instances') - @mock.patch('nimble.engine.api.API._get_image') - @mock.patch('nimble.engine.api.API._validate_and_build_base_options') + @mock.patch('mogan.engine.api.API._provision_instances') + @mock.patch('mogan.engine.api.API._get_image') + @mock.patch('mogan.engine.api.API._validate_and_build_base_options') @mock.patch.object(engine_rpcapi.EngineAPI, 'list_availability_zones') def test_create_default_az(self, mock_list_az, mock_validate, mock_get_image, mock_provision, mock_create): diff --git a/nimble/tests/unit/engine/test_manager.py b/mogan/tests/unit/engine/test_manager.py similarity index 95% rename from nimble/tests/unit/engine/test_manager.py rename to mogan/tests/unit/engine/test_manager.py index d3d39d0c..1ca5bf46 100644 --- a/nimble/tests/unit/engine/test_manager.py +++ b/mogan/tests/unit/engine/test_manager.py @@ -13,19 +13,19 @@ # License for the specific language governing permissions and limitations # under the License. -"""Test class for Nimble ManagerService.""" +"""Test class for Mogan ManagerService.""" import mock from oslo_config import cfg -from nimble.common import exception -from nimble.engine.baremetal import ironic -from nimble.engine.baremetal import ironic_states -from nimble.engine import manager -from nimble.network import api as network_api -from nimble.tests.unit.db import base as tests_db_base -from nimble.tests.unit.engine import mgr_utils -from nimble.tests.unit.objects import utils as obj_utils +from mogan.common import exception +from mogan.engine.baremetal import ironic +from mogan.engine.baremetal import ironic_states +from mogan.engine import manager +from mogan.network import api as network_api +from mogan.tests.unit.db import base as tests_db_base +from mogan.tests.unit.engine import mgr_utils +from mogan.tests.unit.objects import utils as obj_utils CONF = cfg.CONF diff --git a/nimble/tests/unit/engine/test_rpcapi.py b/mogan/tests/unit/engine/test_rpcapi.py similarity index 93% rename from nimble/tests/unit/engine/test_rpcapi.py rename to mogan/tests/unit/engine/test_rpcapi.py index 1452fc56..bfb42e2d 100644 --- a/nimble/tests/unit/engine/test_rpcapi.py +++ b/mogan/tests/unit/engine/test_rpcapi.py @@ -11,7 +11,7 @@ # License for the specific language governing permissions and limitations # under the License. """ -Unit Tests for :py:class:`nimble.engine.rpcapi.EngineAPI`. +Unit Tests for :py:class:`mogan.engine.rpcapi.EngineAPI`. """ import copy @@ -20,12 +20,12 @@ import mock from oslo_config import cfg from oslo_messaging import _utils as messaging_utils -from nimble.engine import manager as engine_manager -from nimble.engine import rpcapi as engine_rpcapi -from nimble import objects -from nimble.tests import base as tests_base -from nimble.tests.unit.db import base -from nimble.tests.unit.db import utils as dbutils +from mogan.engine import manager as engine_manager +from mogan.engine import rpcapi as engine_rpcapi +from mogan import objects +from mogan.tests import base as tests_base +from mogan.tests.unit.db import base +from mogan.tests.unit.db import utils as dbutils CONF = cfg.CONF diff --git a/nimble/tests/unit/notifications/__init__.py b/mogan/tests/unit/notifications/__init__.py similarity index 100% rename from nimble/tests/unit/notifications/__init__.py rename to mogan/tests/unit/notifications/__init__.py diff --git a/nimble/tests/unit/notifications/test_notification.py b/mogan/tests/unit/notifications/test_notification.py similarity index 94% rename from nimble/tests/unit/notifications/test_notification.py rename to mogan/tests/unit/notifications/test_notification.py index 3892ecb0..590e63fa 100644 --- a/nimble/tests/unit/notifications/test_notification.py +++ b/mogan/tests/unit/notifications/test_notification.py @@ -14,10 +14,10 @@ import mock -from nimble.notifications.objects import base as notification -from nimble.objects import base -from nimble.objects import fields -from nimble.tests import base as test_base +from mogan.notifications.objects import base as notification +from mogan.objects import base +from mogan.objects import fields +from mogan.tests import base as test_base class TestNotificationBase(test_base.TestCase): @@ -81,7 +81,7 @@ class TestNotificationBase(test_base.TestCase): 'field_1': 'test1', 'field_2': 42}, 'nimble_object.version': '1.0', - 'nimble_object.namespace': 'nimble'} + 'nimble_object.namespace': 'mogan'} def setUp(self): super(TestNotificationBase, self).setUp() @@ -116,7 +116,7 @@ class TestNotificationBase(test_base.TestCase): actual_payload = mock_notify.call_args[1]['payload'] self.assertJsonEqual(expected_payload, actual_payload) - @mock.patch('nimble.common.rpc.NOTIFIER') + @mock.patch('mogan.common.rpc.NOTIFIER') def test_emit_notification(self, mock_notifier): mock_context = mock.Mock() mock_context.to_dict.return_value = {} @@ -128,7 +128,7 @@ class TestNotificationBase(test_base.TestCase): expected_event_type='test_object.update.start', expected_payload=self.expected_payload) - @mock.patch('nimble.common.rpc.NOTIFIER') + @mock.patch('mogan.common.rpc.NOTIFIER') def test_emit_with_host_and_binary_as_publisher(self, mock_notifier): noti = self.TestNotification( event_type=notification.EventType( @@ -149,7 +149,7 @@ class TestNotificationBase(test_base.TestCase): expected_event_type='test_object.update', expected_payload=self.expected_payload) - @mock.patch('nimble.common.rpc.NOTIFIER') + @mock.patch('mogan.common.rpc.NOTIFIER') def test_emit_event_type_without_phase(self, mock_notifier): noti = self.TestNotification( event_type=notification.EventType( @@ -170,7 +170,7 @@ class TestNotificationBase(test_base.TestCase): expected_event_type='test_object.update', expected_payload=self.expected_payload) - @mock.patch('nimble.common.rpc.NOTIFIER') + @mock.patch('mogan.common.rpc.NOTIFIER') def test_not_possible_to_emit_if_not_populated(self, mock_notifier): non_populated_payload = self.TestNotificationPayload( extra_field='test string') @@ -187,7 +187,7 @@ class TestNotificationBase(test_base.TestCase): self.assertRaises(AssertionError, noti.emit, mock_context) self.assertFalse(mock_notifier.called) - @mock.patch('nimble.common.rpc.NOTIFIER') + @mock.patch('mogan.common.rpc.NOTIFIER') def test_empty_schema(self, mock_notifier): non_populated_payload = self.TestNotificationPayloadEmptySchema( extra_field='test string') @@ -212,7 +212,7 @@ class TestNotificationBase(test_base.TestCase): 'nimble_object.name': 'TestNotificationPayloadEmptySchema', 'nimble_object.data': {'extra_field': u'test string'}, 'nimble_object.version': '1.0', - 'nimble_object.namespace': 'nimble'}) + 'nimble_object.namespace': 'mogan'}) def test_sample_decorator(self): self.assertEqual(2, len(self.TestNotification.samples)) diff --git a/nimble/tests/unit/objects/__init__.py b/mogan/tests/unit/objects/__init__.py similarity index 100% rename from nimble/tests/unit/objects/__init__.py rename to mogan/tests/unit/objects/__init__.py diff --git a/nimble/tests/unit/objects/test_fields.py b/mogan/tests/unit/objects/test_fields.py similarity index 98% rename from nimble/tests/unit/objects/test_fields.py rename to mogan/tests/unit/objects/test_fields.py index fb814847..f82eccae 100644 --- a/nimble/tests/unit/objects/test_fields.py +++ b/mogan/tests/unit/objects/test_fields.py @@ -14,8 +14,8 @@ from oslo_versionedobjects import fields as object_fields -from nimble.objects import fields -from nimble.tests import base as test_base +from mogan.objects import fields +from mogan.tests import base as test_base class FakeFieldType(object_fields.FieldType): diff --git a/nimble/tests/unit/objects/test_instance.py b/mogan/tests/unit/objects/test_instance.py similarity index 95% rename from nimble/tests/unit/objects/test_instance.py rename to mogan/tests/unit/objects/test_instance.py index 087cd97e..4f79676f 100644 --- a/nimble/tests/unit/objects/test_instance.py +++ b/mogan/tests/unit/objects/test_instance.py @@ -16,10 +16,10 @@ import mock from oslo_context import context -from nimble import objects -from nimble.tests.unit.db import base -from nimble.tests.unit.db import utils -from nimble.tests.unit.objects import utils as obj_utils +from mogan import objects +from mogan.tests.unit.db import base +from mogan.tests.unit.db import utils +from mogan.tests.unit.objects import utils as obj_utils class TestInstanceObject(base.DbTestCase): diff --git a/nimble/tests/unit/objects/test_instance_type.py b/mogan/tests/unit/objects/test_instance_type.py similarity index 97% rename from nimble/tests/unit/objects/test_instance_type.py rename to mogan/tests/unit/objects/test_instance_type.py index 6b5063cd..8eaf3c1e 100644 --- a/nimble/tests/unit/objects/test_instance_type.py +++ b/mogan/tests/unit/objects/test_instance_type.py @@ -14,9 +14,9 @@ import mock from oslo_context import context -from nimble import objects -from nimble.tests.unit.db import base -from nimble.tests.unit.db import utils +from mogan import objects +from mogan.tests.unit.db import base +from mogan.tests.unit.db import utils class TestInstanceTypeObject(base.DbTestCase): diff --git a/nimble/tests/unit/objects/test_objects.py b/mogan/tests/unit/objects/test_objects.py similarity index 97% rename from nimble/tests/unit/objects/test_objects.py rename to mogan/tests/unit/objects/test_objects.py index 4cccec0c..344c6ec0 100644 --- a/nimble/tests/unit/objects/test_objects.py +++ b/mogan/tests/unit/objects/test_objects.py @@ -23,11 +23,11 @@ from oslo_versionedobjects import exception as object_exception from oslo_versionedobjects import fixture as object_fixture import six -from nimble.objects import base -from nimble.objects import fields -from nimble.tests import base as test_base +from mogan.objects import base +from mogan.objects import fields +from mogan.tests import base as test_base -gettext.install('nimble') +gettext.install('mogan') @base.NimbleObjectRegistry.register @@ -96,14 +96,14 @@ class TestSubclassedObject(MyObj): class _TestObject(object): def test_hydration_type_error(self): primitive = {'nimble_object.name': 'MyObj', - 'nimble_object.namespace': 'nimble', + 'nimble_object.namespace': 'mogan', 'nimble_object.version': '1.5', 'nimble_object.data': {'foo': 'a'}} self.assertRaises(ValueError, MyObj.obj_from_primitive, primitive) def test_hydration(self): primitive = {'nimble_object.name': 'MyObj', - 'nimble_object.namespace': 'nimble', + 'nimble_object.namespace': 'mogan', 'nimble_object.version': '1.5', 'nimble_object.data': {'foo': 1}} obj = MyObj.obj_from_primitive(primitive) @@ -119,7 +119,7 @@ class _TestObject(object): def test_dehydration(self): expected = {'nimble_object.name': 'MyObj', - 'nimble_object.namespace': 'nimble', + 'nimble_object.namespace': 'mogan', 'nimble_object.version': '1.5', 'nimble_object.data': {'foo': 1}} obj = MyObj(self.context) @@ -168,7 +168,7 @@ class _TestObject(object): obj.obj_reset_changes() self.assertEqual('loaded!', obj.bar) expected = {'nimble_object.name': 'MyObj', - 'nimble_object.namespace': 'nimble', + 'nimble_object.namespace': 'mogan', 'nimble_object.version': '1.5', 'nimble_object.changes': ['bar'], 'nimble_object.data': {'foo': 1, @@ -256,7 +256,7 @@ class _TestObject(object): obj.created_at = dt obj.updated_at = dt expected = {'nimble_object.name': 'MyObj', - 'nimble_object.namespace': 'nimble', + 'nimble_object.namespace': 'mogan', 'nimble_object.version': '1.5', 'nimble_object.changes': ['created_at', 'updated_at'], @@ -431,7 +431,7 @@ class TestObjectSerializer(test_base.TestCase): class TestRegistry(test_base.TestCase): - @mock.patch('nimble.objects.base.objects') + @mock.patch('mogan.objects.base.objects') def test_hook_chooses_newer_properly(self, mock_objects): reg = base.NimbleObjectRegistry() reg.registration_hook(MyObj, 0) diff --git a/nimble/tests/unit/objects/utils.py b/mogan/tests/unit/objects/utils.py similarity index 92% rename from nimble/tests/unit/objects/utils.py rename to mogan/tests/unit/objects/utils.py index bed4bbe8..2b6be590 100644 --- a/nimble/tests/unit/objects/utils.py +++ b/mogan/tests/unit/objects/utils.py @@ -12,13 +12,13 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -"""Nimble object test utilities.""" +"""Mogan object test utilities.""" import six -from nimble.common import exception -from nimble.common.i18n import _ -from nimble import objects -from nimble.tests.unit.db import utils as db_utils +from mogan.common import exception +from mogan.common.i18n import _ +from mogan import objects +from mogan.tests.unit.db import utils as db_utils def check_keyword_arguments(func): diff --git a/nimble/version.py b/mogan/version.py similarity index 93% rename from nimble/version.py rename to mogan/version.py index 473d6199..621bfb0c 100644 --- a/nimble/version.py +++ b/mogan/version.py @@ -15,4 +15,4 @@ import pbr.version -version_info = pbr.version.VersionInfo('nimble') +version_info = pbr.version.VersionInfo('mogan') diff --git a/setup.cfg b/setup.cfg index bb44bd27..da456c30 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,7 +5,7 @@ description-file = README.rst author = OpenStack author-email = openstack-dev@lists.openstack.org -home-page = https://wiki.openstack.org/wiki/Nimble +home-page = https://wiki.openstack.org/wiki/Mogan classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -25,28 +25,28 @@ packages = nimble [entry_points] -nimble.engine.scheduler.filters = - AvailabilityZoneFilter = nimble.engine.scheduler.filters.availability_zone_filter:AvailabilityZoneFilter - InstanceTypeFilter = nimble.engine.scheduler.filters.instance_type_filter:InstanceTypeFilter - CapabilitiesFilter = nimble.engine.scheduler.filters.capabilities_filter:CapabilitiesFilter - JsonFilter = nimble.engine.scheduler.filters.json_filter:JsonFilter +mogan.engine.scheduler.filters = + AvailabilityZoneFilter = mogan.engine.scheduler.filters.availability_zone_filter:AvailabilityZoneFilter + InstanceTypeFilter = mogan.engine.scheduler.filters.instance_type_filter:InstanceTypeFilter + CapabilitiesFilter = mogan.engine.scheduler.filters.capabilities_filter:CapabilitiesFilter + JsonFilter = mogan.engine.scheduler.filters.json_filter:JsonFilter oslo.config.opts = - nimble = nimble.conf.opts:list_opts + nimble = mogan.conf.opts:list_opts oslo.policy.policies = - nimble.api = nimble.common.policy:list_policies + nimble.api = mogan.common.policy:list_policies console_scripts = - nimble-api = nimble.cmd.api:main - nimble-engine = nimble.cmd.engine:main - nimble-dbsync = nimble.cmd.dbsync:main + nimble-api = mogan.cmd.api:main + nimble-engine = mogan.cmd.engine:main + nimble-dbsync = mogan.cmd.dbsync:main -nimble.database.migration_backend = - sqlalchemy = nimble.db.sqlalchemy.migration +mogan.database.migration_backend = + sqlalchemy = mogan.db.sqlalchemy.migration tempest.test_plugins = - nimble_tests = nimble.tests.tempest.plugin:NimbleTempestPlugin + nimble_tests = mogan.tests.tempest.plugin:MoganTempestPlugin [build_sphinx] source-dir = doc/source diff --git a/tox.ini b/tox.ini index 3626e7aa..72db001a 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,7 @@ usedevelop = True install_command = {[testenv:common-constraints]install_command} setenv = VIRTUAL_ENV={envdir} - OS_TEST_PATH=nimble/tests/unit + OS_TEST_PATH=mogan/tests/unit deps = -r{toxinidir}/test-requirements.txt commands = python setup.py test --slowest --testr-args='{posargs}' @@ -55,7 +55,7 @@ commands = python setup.py build_sphinx commands = oslo_debug_helper {posargs} [testenv:functional] -setenv = OS_TEST_PATH=nimble/tests/functional/ +setenv = OS_TEST_PATH=mogan/tests/functional/ commands = python setup.py testr --slowest --testr-args="{posargs}" [testenv:debug-constraints] @@ -93,4 +93,4 @@ builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build [hacking] -import_exceptions = nimble.common.i18n +import_exceptions = mogan.common.i18n