Rename nimble to mogan(part three)
This part includes codes folder renaming. Co-Authored-By: Zhenguo Niu <Niu.ZGlinux@gmail.com> Change-Id: I919f17a769baee44ce19f65bab900f9d6bd8b982
This commit is contained in:
parent
7555c2ae5b
commit
4fd1aab5b3
@ -1,4 +1,4 @@
|
|||||||
To generate the sample nimble.conf file, run the following
|
To generate the sample mogan.conf file, run the following
|
||||||
command from the top level of the nimble directory:
|
command from the top level of the mogan directory:
|
||||||
|
|
||||||
tox -egenconfig
|
tox -egenconfig
|
||||||
|
@ -17,14 +17,14 @@
|
|||||||
# Default API access rule
|
# Default API access rule
|
||||||
"default": "rule:admin_or_owner"
|
"default": "rule:admin_or_owner"
|
||||||
# Retrieve Instance records
|
# Retrieve Instance records
|
||||||
"nimble:instance:get": "rule:default"
|
"mogan:instance:get": "rule:default"
|
||||||
# View Instance power and provision state
|
# View Instance power and provision state
|
||||||
"nimble:instance:get_states": "rule:default"
|
"mogan:instance:get_states": "rule:default"
|
||||||
# Create Instance records
|
# Create Instance records
|
||||||
"nimble:instance:create": "rule:allow"
|
"mogan:instance:create": "rule:allow"
|
||||||
# Delete Instance records
|
# Delete Instance records
|
||||||
"nimble:instance:delete": "rule:default"
|
"mogan:instance:delete": "rule:default"
|
||||||
# Update Instance records
|
# Update Instance records
|
||||||
"nimble:instance:update": "rule:default"
|
"mogan:instance:update": "rule:default"
|
||||||
# Change Instance power status
|
# Change Instance power status
|
||||||
"nimble:instance:set_power_state": "rule:default"
|
"mogan:instance:set_power_state": "rule:default"
|
||||||
|
@ -16,10 +16,10 @@
|
|||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
import pecan
|
import pecan
|
||||||
|
|
||||||
from nimble.api import config
|
from mogan.api import config
|
||||||
from nimble.api import hooks
|
from mogan.api import hooks
|
||||||
from nimble.api import middleware
|
from mogan.api import middleware
|
||||||
from nimble.api.middleware import auth_token
|
from mogan.api.middleware import auth_token
|
||||||
|
|
||||||
|
|
||||||
def get_pecan_config():
|
def get_pecan_config():
|
@ -23,8 +23,8 @@ server = {
|
|||||||
# Pecan Application Configurations
|
# Pecan Application Configurations
|
||||||
# See https://pecan.readthedocs.org/en/latest/configuration.html#application-configuration # noqa
|
# See https://pecan.readthedocs.org/en/latest/configuration.html#application-configuration # noqa
|
||||||
app = {
|
app = {
|
||||||
'root': 'nimble.api.controllers.root.RootController',
|
'root': 'mogan.api.controllers.root.RootController',
|
||||||
'modules': ['nimble.api'],
|
'modules': ['mogan.api'],
|
||||||
'static_root': '%(confdir)s/public',
|
'static_root': '%(confdir)s/public',
|
||||||
'debug': False,
|
'debug': False,
|
||||||
'acl_public_routes': [
|
'acl_public_routes': [
|
@ -16,7 +16,7 @@
|
|||||||
import pecan
|
import pecan
|
||||||
from wsme import types as wtypes
|
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):
|
def build_url(resource, resource_args, bookmark=False, base_url=None):
|
@ -17,9 +17,9 @@ import pecan
|
|||||||
from pecan import rest
|
from pecan import rest
|
||||||
from wsme import types as wtypes
|
from wsme import types as wtypes
|
||||||
|
|
||||||
from nimble.api.controllers import base
|
from mogan.api.controllers import base
|
||||||
from nimble.api.controllers import v1
|
from mogan.api.controllers import v1
|
||||||
from nimble.api import expose
|
from mogan.api import expose
|
||||||
|
|
||||||
ID_VERSION1 = 'v1'
|
ID_VERSION1 = 'v1'
|
||||||
|
|
||||||
@ -35,8 +35,8 @@ class Root(base.APIBase):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def convert():
|
def convert():
|
||||||
root = Root()
|
root = Root()
|
||||||
root.name = "OpenStack Nimble API"
|
root.name = "OpenStack Mogan API"
|
||||||
root.description = ("Nimble is an OpenStack project which aims to "
|
root.description = ("Mogan is an OpenStack project which aims to "
|
||||||
"facilitate baremetal machines management.")
|
"facilitate baremetal machines management.")
|
||||||
return root
|
return root
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ class RootController(rest.RestController):
|
|||||||
def _route(self, args):
|
def _route(self, args):
|
||||||
"""Overrides the default routing behavior.
|
"""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.
|
if the version number is not specified in the url.
|
||||||
"""
|
"""
|
||||||
|
|
@ -23,12 +23,12 @@ import pecan
|
|||||||
from pecan import rest
|
from pecan import rest
|
||||||
from wsme import types as wtypes
|
from wsme import types as wtypes
|
||||||
|
|
||||||
from nimble.api.controllers import base
|
from mogan.api.controllers import base
|
||||||
from nimble.api.controllers import link
|
from mogan.api.controllers import link
|
||||||
from nimble.api.controllers.v1 import availability_zone
|
from mogan.api.controllers.v1 import availability_zone
|
||||||
from nimble.api.controllers.v1 import instance_types
|
from mogan.api.controllers.v1 import instance_types
|
||||||
from nimble.api.controllers.v1 import instances
|
from mogan.api.controllers.v1 import instances
|
||||||
from nimble.api import expose
|
from mogan.api import expose
|
||||||
|
|
||||||
|
|
||||||
class V1(base.APIBase):
|
class V1(base.APIBase):
|
@ -17,8 +17,8 @@ import pecan
|
|||||||
from pecan import rest
|
from pecan import rest
|
||||||
from wsme import types as wtypes
|
from wsme import types as wtypes
|
||||||
|
|
||||||
from nimble.api.controllers import base
|
from mogan.api.controllers import base
|
||||||
from nimble.api import expose
|
from mogan.api import expose
|
||||||
|
|
||||||
|
|
||||||
class AvailabilityZones(base.APIBase):
|
class AvailabilityZones(base.APIBase):
|
@ -19,13 +19,13 @@ from six.moves import http_client
|
|||||||
import wsme
|
import wsme
|
||||||
from wsme import types as wtypes
|
from wsme import types as wtypes
|
||||||
|
|
||||||
from nimble.api.controllers import base
|
from mogan.api.controllers import base
|
||||||
from nimble.api.controllers import link
|
from mogan.api.controllers import link
|
||||||
from nimble.api.controllers.v1 import types
|
from mogan.api.controllers.v1 import types
|
||||||
from nimble.api import expose
|
from mogan.api import expose
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
from nimble import objects
|
from mogan import objects
|
||||||
|
|
||||||
|
|
||||||
class InstanceType(base.APIBase):
|
class InstanceType(base.APIBase):
|
@ -23,17 +23,17 @@ from six.moves import http_client
|
|||||||
import wsme
|
import wsme
|
||||||
from wsme import types as wtypes
|
from wsme import types as wtypes
|
||||||
|
|
||||||
from nimble.api.controllers import base
|
from mogan.api.controllers import base
|
||||||
from nimble.api.controllers import link
|
from mogan.api.controllers import link
|
||||||
from nimble.api.controllers.v1 import types
|
from mogan.api.controllers.v1 import types
|
||||||
from nimble.api.controllers.v1 import utils as api_utils
|
from mogan.api.controllers.v1 import utils as api_utils
|
||||||
from nimble.api import expose
|
from mogan.api import expose
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
from nimble.common.i18n import _LW
|
from mogan.common.i18n import _LW
|
||||||
from nimble.common import policy
|
from mogan.common import policy
|
||||||
from nimble.engine.baremetal import ironic_states as ir_states
|
from mogan.engine.baremetal import ironic_states as ir_states
|
||||||
from nimble import objects
|
from mogan import objects
|
||||||
|
|
||||||
_DEFAULT_INSTANCE_RETURN_FIELDS = ('uuid', 'name', 'description',
|
_DEFAULT_INSTANCE_RETURN_FIELDS = ('uuid', 'name', 'description',
|
||||||
'status')
|
'status')
|
||||||
@ -112,7 +112,7 @@ class InstanceStatesController(rest.RestController):
|
|||||||
self._resource = objects.Instance.get(pecan.request.context, uuid)
|
self._resource = objects.Instance.get(pecan.request.context, uuid)
|
||||||
return self._resource
|
return self._resource
|
||||||
|
|
||||||
@policy.authorize_wsgi("nimble:instance", "get_states")
|
@policy.authorize_wsgi("mogan:instance", "get_states")
|
||||||
@expose.expose(InstanceStates, types.uuid)
|
@expose.expose(InstanceStates, types.uuid)
|
||||||
def get(self, instance_uuid):
|
def get(self, instance_uuid):
|
||||||
"""List the states of the instance, just support power state at present.
|
"""List the states of the instance, just support power state at present.
|
||||||
@ -125,7 +125,7 @@ class InstanceStatesController(rest.RestController):
|
|||||||
rpc_instance)
|
rpc_instance)
|
||||||
return InstanceStates(**rpc_states)
|
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,
|
@expose.expose(None, types.uuid, wtypes.text,
|
||||||
status_code=http_client.ACCEPTED)
|
status_code=http_client.ACCEPTED)
|
||||||
def power(self, instance_uuid, target):
|
def power(self, instance_uuid, target):
|
||||||
@ -304,7 +304,7 @@ class InstanceController(rest.RestController):
|
|||||||
if node_list:
|
if node_list:
|
||||||
node_dict = {node['instance_uuid']: node for node in node_list
|
node_dict = {node['instance_uuid']: node for node in node_list
|
||||||
if node['instance_uuid']}
|
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:
|
for instance_data in instances_data:
|
||||||
uuid = instance_data['uuid']
|
uuid = instance_data['uuid']
|
||||||
if uuid in node_dict:
|
if uuid in node_dict:
|
||||||
@ -330,7 +330,7 @@ class InstanceController(rest.RestController):
|
|||||||
return self._get_instance_collection(fields=fields,
|
return self._get_instance_collection(fields=fields,
|
||||||
all_tenants=all_tenants)
|
all_tenants=all_tenants)
|
||||||
|
|
||||||
@policy.authorize_wsgi("nimble:instance", "get")
|
@policy.authorize_wsgi("mogan:instance", "get")
|
||||||
@expose.expose(Instance, types.uuid, types.listtype)
|
@expose.expose(Instance, types.uuid, types.listtype)
|
||||||
def get_one(self, instance_uuid, fields=None):
|
def get_one(self, instance_uuid, fields=None):
|
||||||
"""Retrieve information about the given instance.
|
"""Retrieve information about the given instance.
|
||||||
@ -368,7 +368,7 @@ class InstanceController(rest.RestController):
|
|||||||
raise exception.NotFound()
|
raise exception.NotFound()
|
||||||
return self._get_instance_collection(all_tenants=all_tenants)
|
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,
|
@expose.expose(Instance, body=types.jsontype,
|
||||||
status_code=http_client.CREATED)
|
status_code=http_client.CREATED)
|
||||||
def post(self, instance):
|
def post(self, instance):
|
||||||
@ -418,7 +418,7 @@ class InstanceController(rest.RestController):
|
|||||||
pecan.response.location = link.build_url('instance', instance.uuid)
|
pecan.response.location = link.build_url('instance', instance.uuid)
|
||||||
return Instance.convert_with_links(instance)
|
return Instance.convert_with_links(instance)
|
||||||
|
|
||||||
@policy.authorize_wsgi("nimble:instance", "update")
|
@policy.authorize_wsgi("mogan:instance", "update")
|
||||||
@wsme.validate(types.uuid, [InstancePatchType])
|
@wsme.validate(types.uuid, [InstancePatchType])
|
||||||
@expose.expose(Instance, types.uuid, body=[InstancePatchType])
|
@expose.expose(Instance, types.uuid, body=[InstancePatchType])
|
||||||
def patch(self, instance_uuid, patch):
|
def patch(self, instance_uuid, patch):
|
||||||
@ -451,7 +451,7 @@ class InstanceController(rest.RestController):
|
|||||||
|
|
||||||
return Instance.convert_with_links(rpc_instance)
|
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)
|
@expose.expose(None, types.uuid, status_code=http_client.NO_CONTENT)
|
||||||
def delete(self, instance_uuid):
|
def delete(self, instance_uuid):
|
||||||
"""Delete a instance.
|
"""Delete a instance.
|
@ -22,8 +22,8 @@ import six
|
|||||||
import wsme
|
import wsme
|
||||||
from wsme import types as wtypes
|
from wsme import types as wtypes
|
||||||
|
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
|
|
||||||
|
|
||||||
class UuidType(wtypes.UserType):
|
class UuidType(wtypes.UserType):
|
||||||
@ -133,7 +133,7 @@ class JsonPatchType(wtypes.Base):
|
|||||||
value = wsme.wsattr(jsontype, default=wtypes.Unset)
|
value = wsme.wsattr(jsontype, default=wtypes.Unset)
|
||||||
|
|
||||||
# The class of the objects being patched. Override this in subclasses.
|
# 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
|
_api_base = None
|
||||||
|
|
||||||
# Attributes that are not required for construction, but which may not be
|
# Attributes that are not required for construction, but which may not be
|
@ -17,7 +17,7 @@ import jsonpatch
|
|||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
import wsme
|
import wsme
|
||||||
|
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
@ -19,9 +19,9 @@ from oslo_context import context
|
|||||||
from pecan import hooks
|
from pecan import hooks
|
||||||
from six.moves import http_client
|
from six.moves import http_client
|
||||||
|
|
||||||
from nimble.common import policy
|
from mogan.common import policy
|
||||||
from nimble.db import api as dbapi
|
from mogan.db import api as dbapi
|
||||||
from nimble.engine import api as engineapi
|
from mogan.engine import api as engineapi
|
||||||
|
|
||||||
|
|
||||||
class ConfigHook(hooks.PecanHook):
|
class ConfigHook(hooks.PecanHook):
|
@ -12,8 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from nimble.api.middleware import auth_token
|
from mogan.api.middleware import auth_token
|
||||||
from nimble.api.middleware import parsable_error
|
from mogan.api.middleware import parsable_error
|
||||||
|
|
||||||
|
|
||||||
ParsableErrorMiddleware = parsable_error.ParsableErrorMiddleware
|
ParsableErrorMiddleware = parsable_error.ParsableErrorMiddleware
|
@ -17,9 +17,9 @@ import re
|
|||||||
from keystonemiddleware import auth_token
|
from keystonemiddleware import auth_token
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
from nimble.common import utils
|
from mogan.common import utils
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
@ -15,4 +15,4 @@
|
|||||||
|
|
||||||
import oslo_i18n as i18n
|
import oslo_i18n as i18n
|
||||||
|
|
||||||
i18n.install('nimble')
|
i18n.install('mogan')
|
@ -13,23 +13,23 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
"""The Nimble Service API."""
|
"""The Mogan Service API."""
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from nimble.common import service as nimble_service
|
from mogan.common import service as mogan_service
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# Parse config file and command line options, then start logging
|
# 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
|
# Build and start the WSGI app
|
||||||
launcher = nimble_service.process_launcher()
|
launcher = mogan_service.process_launcher()
|
||||||
server = nimble_service.WSGIService('nimble_api', CONF.api.enable_ssl_api)
|
server = mogan_service.WSGIService('mogan_api', CONF.api.enable_ssl_api)
|
||||||
launcher.launch_service(server, workers=server.workers)
|
launcher.launch_service(server, workers=server.workers)
|
||||||
launcher.wait()
|
launcher.wait()
|
@ -21,10 +21,10 @@ import sys
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
from nimble.common import service
|
from mogan.common import service
|
||||||
from nimble.conf import CONF
|
from mogan.conf import CONF
|
||||||
from nimble.db import migration
|
from mogan.db import migration
|
||||||
|
|
||||||
|
|
||||||
class DBCommand(object):
|
class DBCommand(object):
|
@ -14,7 +14,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
The Nimble Management Service
|
The Mogan Management Service
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
@ -22,20 +22,20 @@ import sys
|
|||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_service import service
|
from oslo_service import service
|
||||||
|
|
||||||
from nimble.common import constants
|
from mogan.common import constants
|
||||||
from nimble.common import service as nimble_service
|
from mogan.common import service as mogan_service
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# Parse config file and command line options, then start logging
|
# 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,
|
mgr = mogan_service.RPCService(CONF.host,
|
||||||
'nimble.engine.manager',
|
'mogan.engine.manager',
|
||||||
'EngineManager',
|
'EngineManager',
|
||||||
constants.MANAGER_TOPIC)
|
constants.MANAGER_TOPIC)
|
||||||
|
|
||||||
launcher = service.launch(CONF, mgr)
|
launcher = service.launch(CONF, mgr)
|
||||||
launcher.wait()
|
launcher.wait()
|
@ -15,14 +15,14 @@
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from nimble.common import rpc
|
from mogan.common import rpc
|
||||||
from nimble import version
|
from mogan import version
|
||||||
|
|
||||||
|
|
||||||
def parse_args(argv, default_config_files=None):
|
def parse_args(argv, default_config_files=None):
|
||||||
rpc.set_defaults(control_exchange='nimble')
|
rpc.set_defaults(control_exchange='mogan')
|
||||||
cfg.CONF(argv[1:],
|
cfg.CONF(argv[1:],
|
||||||
project='nimble',
|
project='mogan',
|
||||||
version=version.version_info.release_string(),
|
version=version.version_info.release_string(),
|
||||||
default_config_files=default_config_files)
|
default_config_files=default_config_files)
|
||||||
rpc.init(cfg.CONF)
|
rpc.init(cfg.CONF)
|
@ -14,4 +14,4 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
MANAGER_TOPIC = 'nimble.engine_manager'
|
MANAGER_TOPIC = 'mogan.engine_manager'
|
@ -13,7 +13,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
"""Nimble base exception handling.
|
"""Mogan base exception handling.
|
||||||
|
|
||||||
SHOULD include dedicated exception logging.
|
SHOULD include dedicated exception logging.
|
||||||
|
|
||||||
@ -24,15 +24,15 @@ from oslo_versionedobjects import exception as obj_exc
|
|||||||
import six
|
import six
|
||||||
from six.moves import http_client
|
from six.moves import http_client
|
||||||
|
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
from nimble.common.i18n import _LE
|
from mogan.common.i18n import _LE
|
||||||
from nimble.conf import CONF
|
from mogan.conf import CONF
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class NimbleException(Exception):
|
class NimbleException(Exception):
|
||||||
"""Base Nimble Exception
|
"""Base Mogan Exception
|
||||||
|
|
||||||
To correctly use this class, inherit from it and define
|
To correctly use this class, inherit from it and define
|
||||||
a '_msg_fmt' property. That message will get printf'd
|
a '_msg_fmt' property. That message will get printf'd
|
@ -31,7 +31,7 @@ def _make_task_name(cls, addons=None):
|
|||||||
|
|
||||||
|
|
||||||
class NimbleTask(task.Task):
|
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
|
It automatically names the given task using the module and class that
|
||||||
implement the given task as the task name.
|
implement the given task as the task name.
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
import oslo_i18n as i18n
|
import oslo_i18n as i18n
|
||||||
|
|
||||||
_translators = i18n.TranslatorFactory(domain='nimble')
|
_translators = i18n.TranslatorFactory(domain='mogan')
|
||||||
|
|
||||||
# The primary translation function using the well-known name "_"
|
# The primary translation function using the well-known name "_"
|
||||||
_ = _translators.primary
|
_ = _translators.primary
|
@ -18,8 +18,8 @@ from ironicclient import exc as ironic_exc
|
|||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
@ -20,11 +20,11 @@ from oslo_log import log as logging
|
|||||||
import six
|
import six
|
||||||
from six.moves.urllib import parse # for legacy options loading only
|
from six.moves.urllib import parse # for legacy options loading only
|
||||||
|
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
from nimble.common.i18n import _LE
|
from mogan.common.i18n import _LE
|
||||||
from nimble.conf import auth as nimble_auth
|
from mogan.conf import auth as nimble_auth
|
||||||
from nimble.conf import CONF
|
from mogan.conf import CONF
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from nimble.conf import CONF
|
from mogan.conf import CONF
|
||||||
|
|
||||||
|
|
||||||
def basedir_def(*args):
|
def basedir_def(*args):
|
@ -13,7 +13,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
"""Policy Engine For Nimble."""
|
"""Policy Engine For Mogan."""
|
||||||
|
|
||||||
import functools
|
import functools
|
||||||
from oslo_concurrency import lockutils
|
from oslo_concurrency import lockutils
|
||||||
@ -25,8 +25,8 @@ import pecan
|
|||||||
import sys
|
import sys
|
||||||
import wsme
|
import wsme
|
||||||
|
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.common.i18n import _LW
|
from mogan.common.i18n import _LW
|
||||||
|
|
||||||
_ENFORCER = None
|
_ENFORCER = None
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
@ -76,22 +76,22 @@ default_policies = [
|
|||||||
# depend on their existence throughout the code.
|
# depend on their existence throughout the code.
|
||||||
|
|
||||||
instance_policies = [
|
instance_policies = [
|
||||||
policy.RuleDefault('nimble:instance:get',
|
policy.RuleDefault('mogan:instance:get',
|
||||||
'rule:default',
|
'rule:default',
|
||||||
description='Retrieve Instance records'),
|
description='Retrieve Instance records'),
|
||||||
policy.RuleDefault('nimble:instance:get_states',
|
policy.RuleDefault('mogan:instance:get_states',
|
||||||
'rule:default',
|
'rule:default',
|
||||||
description='View Instance power and provision state'),
|
description='View Instance power and provision state'),
|
||||||
policy.RuleDefault('nimble:instance:create',
|
policy.RuleDefault('mogan:instance:create',
|
||||||
'rule:allow',
|
'rule:allow',
|
||||||
description='Create Instance records'),
|
description='Create Instance records'),
|
||||||
policy.RuleDefault('nimble:instance:delete',
|
policy.RuleDefault('mogan:instance:delete',
|
||||||
'rule:default',
|
'rule:default',
|
||||||
description='Delete Instance records'),
|
description='Delete Instance records'),
|
||||||
policy.RuleDefault('nimble:instance:update',
|
policy.RuleDefault('mogan:instance:update',
|
||||||
'rule:default',
|
'rule:default',
|
||||||
description='Update Instance records'),
|
description='Update Instance records'),
|
||||||
policy.RuleDefault('nimble:instance:set_power_state',
|
policy.RuleDefault('mogan:instance:set_power_state',
|
||||||
'rule:default',
|
'rule:default',
|
||||||
description='Change Instance power status'),
|
description='Change Instance power status'),
|
||||||
]
|
]
|
||||||
@ -103,7 +103,7 @@ def list_policies():
|
|||||||
return policies
|
return policies
|
||||||
|
|
||||||
|
|
||||||
@lockutils.synchronized('policy_enforcer', 'nimble-')
|
@lockutils.synchronized('policy_enforcer', 'mogan-')
|
||||||
def init_enforcer(policy_file=None, rules=None,
|
def init_enforcer(policy_file=None, rules=None,
|
||||||
default_rule=None, use_conf=True):
|
default_rule=None, use_conf=True):
|
||||||
"""Synchronously initializes the policy enforcer
|
"""Synchronously initializes the policy enforcer
|
||||||
@ -178,7 +178,7 @@ def authorize_wsgi(api_name, act=None, need_target=True):
|
|||||||
from magnum.common import policy
|
from magnum.common import policy
|
||||||
class InstancesController(rest.RestController):
|
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)
|
@wsme_pecan.wsexpose(None, types.uuid_or_name, status_code=204)
|
||||||
def delete(self, bay_ident):
|
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.
|
# backwards compatibility in case it has been used downstream.
|
||||||
# It may be removed in the Pike cycle.
|
# It may be removed in the Pike cycle.
|
||||||
LOG.warning(_LW(
|
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 "
|
"should be replaced with authorize(). This method may be removed "
|
||||||
"in a future release."))
|
"in a future release."))
|
||||||
|
|
@ -17,7 +17,7 @@ from oslo_config import cfg
|
|||||||
from oslo_context import context as nimble_context
|
from oslo_context import context as nimble_context
|
||||||
import oslo_messaging as messaging
|
import oslo_messaging as messaging
|
||||||
|
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
@ -20,16 +20,16 @@ from oslo_service import service
|
|||||||
from oslo_service import wsgi
|
from oslo_service import wsgi
|
||||||
from oslo_utils import importutils
|
from oslo_utils import importutils
|
||||||
|
|
||||||
from nimble.api import app
|
from mogan.api import app
|
||||||
from nimble.common import config
|
from mogan.common import config
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
from nimble.common.i18n import _LE
|
from mogan.common.i18n import _LE
|
||||||
from nimble.common.i18n import _LI
|
from mogan.common.i18n import _LI
|
||||||
from nimble.common import rpc
|
from mogan.common import rpc
|
||||||
from nimble.conf import CONF
|
from mogan.conf import CONF
|
||||||
from nimble import objects
|
from mogan import objects
|
||||||
from nimble.objects import base as objects_base
|
from mogan.objects import base as objects_base
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ def prepare_service(argv=None):
|
|||||||
log.set_defaults(default_log_levels=CONF.default_log_levels + [
|
log.set_defaults(default_log_levels=CONF.default_log_levels + [
|
||||||
'eventlet.wsgi.server=INFO', 'neutronclient=WARNING'])
|
'eventlet.wsgi.server=INFO', 'neutronclient=WARNING'])
|
||||||
config.parse_args(argv)
|
config.parse_args(argv)
|
||||||
log.setup(CONF, 'nimble')
|
log.setup(CONF, 'mogan')
|
||||||
objects.register_all()
|
objects.register_all()
|
||||||
|
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ def process_launcher():
|
|||||||
|
|
||||||
|
|
||||||
class WSGIService(service.ServiceBase):
|
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):
|
def __init__(self, name, use_ssl=False):
|
||||||
"""Initialize, but do not start the WSGI server.
|
"""Initialize, but do not start the WSGI server.
|
@ -20,8 +20,8 @@ import re
|
|||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.common.i18n import _LW
|
from mogan.common.i18n import _LW
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
@ -15,15 +15,15 @@
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from nimble.conf import api
|
from mogan.conf import api
|
||||||
from nimble.conf import database
|
from mogan.conf import database
|
||||||
from nimble.conf import default
|
from mogan.conf import default
|
||||||
from nimble.conf import engine
|
from mogan.conf import engine
|
||||||
from nimble.conf import glance
|
from mogan.conf import glance
|
||||||
from nimble.conf import ironic
|
from mogan.conf import ironic
|
||||||
from nimble.conf import keystone
|
from mogan.conf import keystone
|
||||||
from nimble.conf import neutron
|
from mogan.conf import neutron
|
||||||
from nimble.conf import scheduler
|
from mogan.conf import scheduler
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
@ -15,28 +15,28 @@
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
|
|
||||||
opts = [
|
opts = [
|
||||||
cfg.StrOpt('host_ip',
|
cfg.StrOpt('host_ip',
|
||||||
default='0.0.0.0',
|
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',
|
cfg.PortOpt('port',
|
||||||
default=6688,
|
default=6688,
|
||||||
help=_('The TCP port on which nimble-api listens.')),
|
help=_('The TCP port on which mogan-api listens.')),
|
||||||
cfg.IntOpt('max_limit',
|
cfg.IntOpt('max_limit',
|
||||||
default=1000,
|
default=1000,
|
||||||
help=_('The maximum number of items returned in a single '
|
help=_('The maximum number of items returned in a single '
|
||||||
'response from a collection resource.')),
|
'response from a collection resource.')),
|
||||||
cfg.StrOpt('public_endpoint',
|
cfg.StrOpt('public_endpoint',
|
||||||
help=_("Public URL to use when building the links to the API "
|
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 "
|
" If None the links will be built using the request's "
|
||||||
"host URL. If the API is operating behind a proxy, you "
|
"host URL. If the API is operating behind a proxy, you "
|
||||||
"will want to change this to represent the proxy's URL. "
|
"will want to change this to represent the proxy's URL. "
|
||||||
"Defaults to None.")),
|
"Defaults to None.")),
|
||||||
cfg.IntOpt('api_workers',
|
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 '
|
'The default is equal to the number of CPUs available '
|
||||||
'if that can be determined, else a default worker '
|
'if that can be determined, else a default worker '
|
||||||
'count of 1 is returned.')),
|
'count of 1 is returned.')),
|
||||||
@ -51,7 +51,7 @@ opts = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
opt_group = cfg.OptGroup(name='api',
|
opt_group = cfg.OptGroup(name='api',
|
||||||
title='Options for the nimble-api service')
|
title='Options for the mogan-api service')
|
||||||
|
|
||||||
|
|
||||||
def register_opts(conf):
|
def register_opts(conf):
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
|
|
||||||
opts = [
|
opts = [
|
||||||
cfg.StrOpt('mysql_engine',
|
cfg.StrOpt('mysql_engine',
|
@ -18,7 +18,7 @@ import socket
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
|
|
||||||
api_opts = [
|
api_opts = [
|
||||||
cfg.BoolOpt('debug_tracebacks_in_api',
|
cfg.BoolOpt('debug_tracebacks_in_api',
|
||||||
@ -41,15 +41,15 @@ path_opts = [
|
|||||||
cfg.StrOpt('pybasedir',
|
cfg.StrOpt('pybasedir',
|
||||||
default=os.path.abspath(os.path.join(os.path.dirname(__file__),
|
default=os.path.abspath(os.path.join(os.path.dirname(__file__),
|
||||||
'../')),
|
'../')),
|
||||||
sample_default='/usr/lib/python/site-packages/nimble/nimble',
|
sample_default='/usr/lib/python/site-packages/mogan/mogan',
|
||||||
help=_('Directory where the nimble python module is '
|
help=_('Directory where the mogan python module is '
|
||||||
'installed.')),
|
'installed.')),
|
||||||
cfg.StrOpt('bindir',
|
cfg.StrOpt('bindir',
|
||||||
default='$pybasedir/bin',
|
default='$pybasedir/bin',
|
||||||
help=_('Directory where nimble binaries are installed.')),
|
help=_('Directory where mogan binaries are installed.')),
|
||||||
cfg.StrOpt('state_path',
|
cfg.StrOpt('state_path',
|
||||||
default='$pybasedir',
|
default='$pybasedir',
|
||||||
help=_("Top-level directory for maintaining nimble's state.")),
|
help=_("Top-level directory for maintaining mogan's state.")),
|
||||||
]
|
]
|
||||||
|
|
||||||
service_opts = [
|
service_opts = [
|
@ -15,14 +15,14 @@
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
|
|
||||||
opts = [
|
opts = [
|
||||||
cfg.IntOpt('workers_pool_size',
|
cfg.IntOpt('workers_pool_size',
|
||||||
default=100,
|
default=100,
|
||||||
help=_('The size of the workers greenthread pool.')),
|
help=_('The size of the workers greenthread pool.')),
|
||||||
cfg.StrOpt('api_url',
|
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 '
|
'get the current value from the keystone service '
|
||||||
'catalog.')),
|
'catalog.')),
|
||||||
cfg.IntOpt('periodic_max_workers',
|
cfg.IntOpt('periodic_max_workers',
|
||||||
@ -35,7 +35,7 @@ opts = [
|
|||||||
help=_('Interval between syncing the node resources from '
|
help=_('Interval between syncing the node resources from '
|
||||||
'ironic, in seconds.')),
|
'ironic, in seconds.')),
|
||||||
cfg.StrOpt('scheduler_driver',
|
cfg.StrOpt('scheduler_driver',
|
||||||
default='nimble.engine.scheduler.filter_scheduler.'
|
default='mogan.engine.scheduler.filter_scheduler.'
|
||||||
'FilterScheduler',
|
'FilterScheduler',
|
||||||
help=_('Default scheduler driver to use')),
|
help=_('Default scheduler driver to use')),
|
||||||
cfg.StrOpt('default_schedule_zone',
|
cfg.StrOpt('default_schedule_zone',
|
@ -17,12 +17,12 @@
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
|
|
||||||
opts = [
|
opts = [
|
||||||
cfg.ListOpt('glance_api_servers',
|
cfg.ListOpt('glance_api_servers',
|
||||||
required=True,
|
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 '
|
'Prefix with https:// for SSL-based glance API '
|
||||||
'servers. Format is [hostname|IP]:port.')),
|
'servers. Format is [hostname|IP]:port.')),
|
||||||
cfg.BoolOpt('glance_api_insecure',
|
cfg.BoolOpt('glance_api_insecure',
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
|
|
||||||
opts = [
|
opts = [
|
||||||
cfg.StrOpt('region_name',
|
cfg.StrOpt('region_name',
|
@ -13,8 +13,8 @@
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
from nimble.conf import auth
|
from mogan.conf import auth
|
||||||
|
|
||||||
opts = [
|
opts = [
|
||||||
cfg.StrOpt('url',
|
cfg.StrOpt('url',
|
@ -12,44 +12,44 @@
|
|||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
|
|
||||||
import nimble.conf.api
|
import mogan.conf.api
|
||||||
import nimble.conf.database
|
import mogan.conf.database
|
||||||
import nimble.conf.default
|
import mogan.conf.default
|
||||||
import nimble.conf.engine
|
import mogan.conf.engine
|
||||||
import nimble.conf.glance
|
import mogan.conf.glance
|
||||||
import nimble.conf.ironic
|
import mogan.conf.ironic
|
||||||
import nimble.conf.keystone
|
import mogan.conf.keystone
|
||||||
import nimble.conf.neutron
|
import mogan.conf.neutron
|
||||||
import nimble.conf.scheduler
|
import mogan.conf.scheduler
|
||||||
|
|
||||||
_default_opt_lists = [
|
_default_opt_lists = [
|
||||||
nimble.conf.default.api_opts,
|
mogan.conf.default.api_opts,
|
||||||
nimble.conf.default.exc_log_opts,
|
mogan.conf.default.exc_log_opts,
|
||||||
nimble.conf.default.path_opts,
|
mogan.conf.default.path_opts,
|
||||||
nimble.conf.default.service_opts,
|
mogan.conf.default.service_opts,
|
||||||
]
|
]
|
||||||
|
|
||||||
_opts = [
|
_opts = [
|
||||||
('DEFAULT', itertools.chain(*_default_opt_lists)),
|
('DEFAULT', itertools.chain(*_default_opt_lists)),
|
||||||
('api', nimble.conf.api.opts),
|
('api', mogan.conf.api.opts),
|
||||||
('database', nimble.conf.database.opts),
|
('database', mogan.conf.database.opts),
|
||||||
('engine', nimble.conf.engine.opts),
|
('engine', mogan.conf.engine.opts),
|
||||||
('glance', nimble.conf.glance.opts),
|
('glance', mogan.conf.glance.opts),
|
||||||
('ironic', nimble.conf.ironic.opts),
|
('ironic', mogan.conf.ironic.opts),
|
||||||
('keystone', nimble.conf.keystone.opts),
|
('keystone', mogan.conf.keystone.opts),
|
||||||
('neutron', nimble.conf.neutron.opts),
|
('neutron', mogan.conf.neutron.opts),
|
||||||
('scheduler', nimble.conf.scheduler.opts),
|
('scheduler', mogan.conf.scheduler.opts),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def list_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 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
|
the list is a tuple. The first element is the name of the group, the
|
||||||
second element is the options.
|
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.
|
'oslo.config.opts' namespace.
|
||||||
|
|
||||||
The function is used by Oslo sample config file generator to discover the
|
The function is used by Oslo sample config file generator to discover the
|
@ -15,15 +15,15 @@
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
|
|
||||||
opts = [
|
opts = [
|
||||||
cfg.StrOpt('scheduler_driver',
|
cfg.StrOpt('scheduler_driver',
|
||||||
default='nimble.engine.scheduler.filter_scheduler.'
|
default='mogan.engine.scheduler.filter_scheduler.'
|
||||||
'FilterScheduler',
|
'FilterScheduler',
|
||||||
help=_('Default scheduler driver to use')),
|
help=_('Default scheduler driver to use')),
|
||||||
cfg.StrOpt('scheduler_node_manager',
|
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')),
|
help=_('The scheduler node manager class to use')),
|
||||||
cfg.IntOpt('scheduler_max_attempts',
|
cfg.IntOpt('scheduler_max_attempts',
|
||||||
default=3,
|
default=3,
|
||||||
@ -44,7 +44,7 @@ opts = [
|
|||||||
help=_('Which weigher class names to use for weighing '
|
help=_('Which weigher class names to use for weighing '
|
||||||
'nodes.')),
|
'nodes.')),
|
||||||
cfg.StrOpt('scheduler_weight_handler',
|
cfg.StrOpt('scheduler_weight_handler',
|
||||||
default='nimble.engine.scheduler.weights.'
|
default='mogan.engine.scheduler.weights.'
|
||||||
'OrderedNodeWeightHandler',
|
'OrderedNodeWeightHandler',
|
||||||
help=_('Which handler to use for selecting the node after '
|
help=_('Which handler to use for selecting the node after '
|
||||||
'weighing')),
|
'weighing')),
|
@ -23,7 +23,7 @@ from oslo_db import api as db_api
|
|||||||
import six
|
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,
|
IMPL = db_api.DBAPI.from_config(cfg.CONF, backend_mapping=_BACKEND_MAPPING,
|
||||||
lazy=True)
|
lazy=True)
|
||||||
|
|
@ -26,7 +26,7 @@ def get_backend():
|
|||||||
global _IMPL
|
global _IMPL
|
||||||
if not _IMPL:
|
if not _IMPL:
|
||||||
cfg.CONF.import_opt('backend', 'oslo_db.options', group='database')
|
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
|
cfg.CONF.database.backend).driver
|
||||||
return _IMPL
|
return _IMPL
|
||||||
|
|
@ -22,7 +22,7 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
from nimble.db.sqlalchemy import models
|
from mogan.db.sqlalchemy import models
|
||||||
|
|
||||||
# this is the Alembic Config object, which provides
|
# this is the Alembic Config object, which provides
|
||||||
# access to the values within the .ini file in use.
|
# access to the values within the .ini file in use.
|
@ -25,10 +25,10 @@ from oslo_utils import uuidutils
|
|||||||
from sqlalchemy.orm.exc import NoResultFound
|
from sqlalchemy.orm.exc import NoResultFound
|
||||||
from sqlalchemy.orm import joinedload
|
from sqlalchemy.orm import joinedload
|
||||||
|
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
from nimble.db import api
|
from mogan.db import api
|
||||||
from nimble.db.sqlalchemy import models
|
from mogan.db.sqlalchemy import models
|
||||||
|
|
||||||
|
|
||||||
_CONTEXT = threading.local()
|
_CONTEXT = threading.local()
|
@ -22,7 +22,7 @@ import alembic.migration as alembic_migration
|
|||||||
from oslo_db import exception as db_exc
|
from oslo_db import exception as db_exc
|
||||||
from oslo_db.sqlalchemy import enginefacade
|
from oslo_db.sqlalchemy import enginefacade
|
||||||
|
|
||||||
from nimble.db.sqlalchemy import models
|
from mogan.db.sqlalchemy import models
|
||||||
|
|
||||||
|
|
||||||
def _alembic_config():
|
def _alembic_config():
|
@ -26,13 +26,13 @@ from sqlalchemy import orm
|
|||||||
from sqlalchemy import schema, String, Integer
|
from sqlalchemy import schema, String, Integer
|
||||||
from sqlalchemy.ext.declarative import declarative_base
|
from sqlalchemy.ext.declarative import declarative_base
|
||||||
|
|
||||||
from nimble.common import paths
|
from mogan.common import paths
|
||||||
from nimble.conf import CONF
|
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():
|
def table_args():
|
@ -18,12 +18,12 @@
|
|||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
|
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.conf import CONF
|
from mogan.conf import CONF
|
||||||
from nimble.engine import rpcapi
|
from mogan.engine import rpcapi
|
||||||
from nimble.engine import status
|
from mogan.engine import status
|
||||||
from nimble import image
|
from mogan import image
|
||||||
from nimble import objects
|
from mogan import objects
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
@ -16,8 +16,8 @@
|
|||||||
from ironicclient import exceptions as client_e
|
from ironicclient import exceptions as client_e
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from nimble.common.i18n import _LE
|
from mogan.common.i18n import _LE
|
||||||
from nimble.engine.baremetal import ironic_states
|
from mogan.engine.baremetal import ironic_states
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
@ -19,13 +19,13 @@ from eventlet import greenpool
|
|||||||
from oslo_service import periodic_task
|
from oslo_service import periodic_task
|
||||||
from oslo_utils import importutils
|
from oslo_utils import importutils
|
||||||
|
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
from nimble.common import ironic
|
from mogan.common import ironic
|
||||||
from nimble.common import rpc
|
from mogan.common import rpc
|
||||||
from nimble.conf import CONF
|
from mogan.conf import CONF
|
||||||
from nimble.db import api as dbapi
|
from mogan.db import api as dbapi
|
||||||
from nimble.engine import rpcapi
|
from mogan.engine import rpcapi
|
||||||
from nimble import network
|
from mogan import network
|
||||||
|
|
||||||
|
|
||||||
class BaseEngineManager(periodic_task.PeriodicTasks):
|
class BaseEngineManager(periodic_task.PeriodicTasks):
|
@ -22,15 +22,15 @@ from oslo_utils import timeutils
|
|||||||
import taskflow.engines
|
import taskflow.engines
|
||||||
from taskflow.patterns import linear_flow
|
from taskflow.patterns import linear_flow
|
||||||
|
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.common import flow_utils
|
from mogan.common import flow_utils
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
from nimble.common.i18n import _LE
|
from mogan.common.i18n import _LE
|
||||||
from nimble.common.i18n import _LI
|
from mogan.common.i18n import _LI
|
||||||
from nimble.common import utils
|
from mogan.common import utils
|
||||||
from nimble.engine.baremetal import ironic
|
from mogan.engine.baremetal import ironic
|
||||||
from nimble.engine.baremetal import ironic_states
|
from mogan.engine.baremetal import ironic_states
|
||||||
from nimble.engine import status
|
from mogan.engine import status
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
@ -22,18 +22,18 @@ from oslo_service import loopingcall
|
|||||||
from oslo_service import periodic_task
|
from oslo_service import periodic_task
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.common import flow_utils
|
from mogan.common import flow_utils
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
from nimble.common.i18n import _LE
|
from mogan.common.i18n import _LE
|
||||||
from nimble.common.i18n import _LI
|
from mogan.common.i18n import _LI
|
||||||
from nimble.common.i18n import _LW
|
from mogan.common.i18n import _LW
|
||||||
from nimble.conf import CONF
|
from mogan.conf import CONF
|
||||||
from nimble.engine.baremetal import ironic
|
from mogan.engine.baremetal import ironic
|
||||||
from nimble.engine.baremetal import ironic_states
|
from mogan.engine.baremetal import ironic_states
|
||||||
from nimble.engine import base_manager
|
from mogan.engine import base_manager
|
||||||
from nimble.engine.flows import create_instance
|
from mogan.engine.flows import create_instance
|
||||||
from nimble.engine import status
|
from mogan.engine import status
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ _UNPROVISION_STATES = (ironic_states.ACTIVE, ironic_states.DEPLOYFAIL,
|
|||||||
|
|
||||||
|
|
||||||
class EngineManager(base_manager.BaseEngineManager):
|
class EngineManager(base_manager.BaseEngineManager):
|
||||||
"""Nimble Engine manager main class."""
|
"""Mogan Engine manager main class."""
|
||||||
|
|
||||||
RPC_API_VERSION = '1.0'
|
RPC_API_VERSION = '1.0'
|
||||||
|
|
@ -18,9 +18,9 @@ Client side of the engine RPC API.
|
|||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
import oslo_messaging as messaging
|
import oslo_messaging as messaging
|
||||||
|
|
||||||
from nimble.common import constants
|
from mogan.common import constants
|
||||||
from nimble.common import rpc
|
from mogan.common import rpc
|
||||||
from nimble.objects import base as objects_base
|
from mogan.objects import base as objects_base
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
@ -19,8 +19,8 @@ Filter support
|
|||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from nimble.common.i18n import _LI
|
from mogan.common.i18n import _LI
|
||||||
from nimble.engine.scheduler import base_handler
|
from mogan.engine.scheduler import base_handler
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
@ -21,7 +21,7 @@ import abc
|
|||||||
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from nimble.engine.scheduler import base_handler
|
from mogan.engine.scheduler import base_handler
|
||||||
|
|
||||||
|
|
||||||
def normalize(weight_list, minval=None, maxval=None):
|
def normalize(weight_list, minval=None, maxval=None):
|
@ -22,7 +22,7 @@ Scheduler base class that all Schedulers should inherit from
|
|||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_utils import importutils
|
from oslo_utils import importutils
|
||||||
|
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
@ -20,10 +20,12 @@ from oslo_config import cfg
|
|||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
|
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.common.i18n import _, _LE, _LW
|
from mogan.common.i18n import _
|
||||||
from nimble.engine.scheduler import driver
|
from mogan.common.i18n import _LE
|
||||||
from nimble.engine.scheduler import scheduler_options
|
from mogan.common.i18n import _LW
|
||||||
|
from mogan.engine.scheduler import driver
|
||||||
|
from mogan.engine.scheduler import scheduler_options
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
@ -124,7 +126,7 @@ class FilterScheduler(driver.Scheduler):
|
|||||||
|
|
||||||
Returned list is ordered by their fitness.
|
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
|
# takes 'resource_XX' and 'instance_XX' as input respectively, copying
|
||||||
# 'instance_type' to 'resource_type' will make both filters happy.
|
# 'instance_type' to 'resource_type' will make both filters happy.
|
||||||
instance_type = resource_type = request_spec.get("instance_type")
|
instance_type = resource_type = request_spec.get("instance_type")
|
@ -17,7 +17,7 @@
|
|||||||
Scheduler node filters
|
Scheduler node filters
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from nimble.engine.scheduler import base_filter
|
from mogan.engine.scheduler import base_filter
|
||||||
|
|
||||||
|
|
||||||
class BaseNodeFilter(base_filter.BaseFilter):
|
class BaseNodeFilter(base_filter.BaseFilter):
|
@ -13,7 +13,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from nimble.engine.scheduler import filters
|
from mogan.engine.scheduler import filters
|
||||||
|
|
||||||
|
|
||||||
class AvailabilityZoneFilter(filters.BaseNodeFilter):
|
class AvailabilityZoneFilter(filters.BaseNodeFilter):
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from nimble.engine.scheduler import filters
|
from mogan.engine.scheduler import filters
|
||||||
from nimble.engine.scheduler.filters import extra_specs_ops
|
from mogan.engine.scheduler.filters import extra_specs_ops
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
@ -13,7 +13,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from nimble.engine.scheduler import filters
|
from mogan.engine.scheduler import filters
|
||||||
|
|
||||||
|
|
||||||
class InstanceTypeFilter(filters.BaseNodeFilter):
|
class InstanceTypeFilter(filters.BaseNodeFilter):
|
@ -18,7 +18,7 @@ import operator
|
|||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from nimble.engine.scheduler import filters
|
from mogan.engine.scheduler import filters
|
||||||
|
|
||||||
|
|
||||||
class JsonFilter(filters.BaseNodeFilter):
|
class JsonFilter(filters.BaseNodeFilter):
|
@ -21,8 +21,8 @@ from oslo_config import cfg
|
|||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_utils import importutils
|
from oslo_utils import importutils
|
||||||
|
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.engine.scheduler import filters
|
from mogan.engine.scheduler import filters
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
@ -46,12 +46,12 @@ class NodeManager(object):
|
|||||||
node_state_cls = NodeState
|
node_state_cls = NodeState
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.filter_handler = filters.NodeFilterHandler('nimble.engine.'
|
self.filter_handler = filters.NodeFilterHandler('mogan.engine.'
|
||||||
'scheduler.filters')
|
'scheduler.filters')
|
||||||
self.filter_classes = self.filter_handler.get_all_classes()
|
self.filter_classes = self.filter_handler.get_all_classes()
|
||||||
self.weight_handler = importutils.import_object(
|
self.weight_handler = importutils.import_object(
|
||||||
CONF.scheduler.scheduler_weight_handler,
|
CONF.scheduler.scheduler_weight_handler,
|
||||||
'nimble.engine.scheduler.weights')
|
'mogan.engine.scheduler.weights')
|
||||||
self.weight_classes = self.weight_handler.get_all_classes()
|
self.weight_classes = self.weight_handler.get_all_classes()
|
||||||
|
|
||||||
def _choose_node_filters(self, filter_cls_names):
|
def _choose_node_filters(self, filter_cls_names):
|
@ -28,7 +28,7 @@ from oslo_config import cfg
|
|||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
|
|
||||||
from nimble.common.i18n import _LE
|
from mogan.common.i18n import _LE
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
@ -17,7 +17,7 @@
|
|||||||
Scheduler node weights
|
Scheduler node weights
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from nimble.engine.scheduler import base_weight
|
from mogan.engine.scheduler import base_weight
|
||||||
|
|
||||||
|
|
||||||
class WeighedNode(base_weight.WeighedObject):
|
class WeighedNode(base_weight.WeighedObject):
|
@ -13,5 +13,5 @@
|
|||||||
|
|
||||||
def API():
|
def API():
|
||||||
# Needed to prevent circular import...
|
# Needed to prevent circular import...
|
||||||
import nimble.image.api
|
import mogan.image.api
|
||||||
return nimble.image.api.API()
|
return mogan.image.api.API()
|
@ -15,13 +15,13 @@ Main abstraction layer for retrieving and storing information about disk
|
|||||||
images used by the compute layer.
|
images used by the compute layer.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from nimble.image import glance
|
from mogan.image import glance
|
||||||
|
|
||||||
|
|
||||||
class API(object):
|
class API(object):
|
||||||
|
|
||||||
"""Responsible for exposing a relatively stable internal API for other
|
"""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):
|
def get(self, context, image_id):
|
@ -31,9 +31,9 @@ from oslo_utils import timeutils
|
|||||||
import six
|
import six
|
||||||
from six.moves import range
|
from six.moves import range
|
||||||
|
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.common.i18n import _LE
|
from mogan.common.i18n import _LE
|
||||||
from nimble import conf
|
from mogan import conf
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
CONF = conf.CONF
|
CONF = conf.CONF
|
@ -13,5 +13,5 @@
|
|||||||
|
|
||||||
def API():
|
def API():
|
||||||
# Needed to prevent circular import...
|
# Needed to prevent circular import...
|
||||||
import nimble.network.api
|
import mogan.network.api
|
||||||
return nimble.network.api.API()
|
return mogan.network.api.API()
|
@ -14,10 +14,10 @@ from neutronclient.common import exceptions as neutron_exceptions
|
|||||||
from neutronclient.v2_0 import client as clientv20
|
from neutronclient.v2_0 import client as clientv20
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from nimble.common import exception
|
from mogan.common import exception
|
||||||
from nimble.common.i18n import _
|
from mogan.common.i18n import _
|
||||||
from nimble.common import keystone
|
from mogan.common import keystone
|
||||||
from nimble.conf import CONF
|
from mogan.conf import CONF
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
@ -12,9 +12,9 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from nimble.common import rpc
|
from mogan.common import rpc
|
||||||
from nimble.objects import base
|
from mogan.objects import base
|
||||||
from nimble.objects import fields
|
from mogan.objects import fields
|
||||||
|
|
||||||
|
|
||||||
@base.NimbleObjectRegistry.register_if(False)
|
@base.NimbleObjectRegistry.register_if(False)
|
@ -25,5 +25,5 @@ def register_all():
|
|||||||
# NOTE(danms): You must make sure your object gets imported in this
|
# NOTE(danms): You must make sure your object gets imported in this
|
||||||
# function in order for it to be registered by services that may
|
# function in order for it to be registered by services that may
|
||||||
# need to receive it via RPC.
|
# need to receive it via RPC.
|
||||||
__import__('nimble.objects.instance_type')
|
__import__('mogan.objects.instance_type')
|
||||||
__import__('nimble.objects.instance')
|
__import__('mogan.objects.instance')
|
@ -13,13 +13,13 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
"""Nimble common internal object model"""
|
"""Mogan common internal object model"""
|
||||||
|
|
||||||
from oslo_utils import versionutils
|
from oslo_utils import versionutils
|
||||||
from oslo_versionedobjects import base as object_base
|
from oslo_versionedobjects import base as object_base
|
||||||
|
|
||||||
from nimble import objects
|
from mogan import objects
|
||||||
from nimble.objects import fields as object_fields
|
from mogan.objects import fields as object_fields
|
||||||
|
|
||||||
|
|
||||||
class NimbleObjectRegistry(object_base.VersionedObjectRegistry):
|
class NimbleObjectRegistry(object_base.VersionedObjectRegistry):
|
||||||
@ -28,7 +28,7 @@ class NimbleObjectRegistry(object_base.VersionedObjectRegistry):
|
|||||||
def registration_hook(self, cls, index):
|
def registration_hook(self, cls, index):
|
||||||
# NOTE(jroll): blatantly stolen from nova
|
# NOTE(jroll): blatantly stolen from nova
|
||||||
# NOTE(danms): This is called when an object is registered,
|
# 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.
|
# as the highest-versioned implementation of a given object.
|
||||||
version = versionutils.convert_version_to_tuple(cls.VERSION)
|
version = versionutils.convert_version_to_tuple(cls.VERSION)
|
||||||
if not hasattr(objects, cls.obj_name()):
|
if not hasattr(objects, cls.obj_name()):
|
||||||
@ -70,7 +70,7 @@ class NimbleObject(object_base.VersionedObject):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
OBJ_SERIAL_NAMESPACE = 'nimble_object'
|
OBJ_SERIAL_NAMESPACE = 'nimble_object'
|
||||||
OBJ_PROJECT_NAMESPACE = 'nimble'
|
OBJ_PROJECT_NAMESPACE = 'mogan'
|
||||||
|
|
||||||
# TODO(lintan) Refactor these fields and create PersistentObject and
|
# TODO(lintan) Refactor these fields and create PersistentObject and
|
||||||
# TimeStampObject like Nova when it is necessary.
|
# TimeStampObject like Nova when it is necessary.
|
@ -20,7 +20,7 @@ import six
|
|||||||
|
|
||||||
from oslo_versionedobjects import fields as object_fields
|
from oslo_versionedobjects import fields as object_fields
|
||||||
|
|
||||||
from nimble.common import utils
|
from mogan.common import utils
|
||||||
|
|
||||||
Field = object_fields.Field
|
Field = object_fields.Field
|
||||||
ObjectField = object_fields.ObjectField
|
ObjectField = object_fields.ObjectField
|
@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
from oslo_versionedobjects import base as object_base
|
from oslo_versionedobjects import base as object_base
|
||||||
|
|
||||||
from nimble.db import api as dbapi
|
from mogan.db import api as dbapi
|
||||||
from nimble.objects import base
|
from mogan.objects import base
|
||||||
from nimble.objects import fields as object_fields
|
from mogan.objects import fields as object_fields
|
||||||
|
|
||||||
|
|
||||||
@base.NimbleObjectRegistry.register
|
@base.NimbleObjectRegistry.register
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user