Rename from Ironic to Tuskar
Change-Id: I4b6c7a70fe8ce1e3ac4cbfc4784b9320399cc8c2
This commit is contained in:
parent
608ed5b5e3
commit
2f9930a149
|
@ -1,4 +1,4 @@
|
|||
[gerrit]
|
||||
host=review.openstack.org
|
||||
port=29418
|
||||
project=openstack/ironic.git
|
||||
#host=review.openstack.org
|
||||
#port=29418
|
||||
#project=stackforge/tuskar.git
|
||||
|
|
|
@ -1,17 +1 @@
|
|||
If you would like to contribute to the development of OpenStack,
|
||||
you must follow the steps in the "If you're a developer, start here"
|
||||
section of this page:
|
||||
|
||||
http://wiki.openstack.org/HowToContribute
|
||||
|
||||
Once those steps have been completed, changes to OpenStack
|
||||
should be submitted for review via the Gerrit tool, following
|
||||
the workflow documented at:
|
||||
|
||||
http://wiki.openstack.org/GerritWorkflow
|
||||
|
||||
Pull requests submitted through GitHub will be ignored.
|
||||
|
||||
Bugs should be filed on Launchpad, not GitHub:
|
||||
|
||||
https://bugs.launchpad.net/ironic
|
||||
Send pull requests!
|
||||
|
|
92
README.rst
92
README.rst
|
@ -1,100 +1,21 @@
|
|||
Ironic
|
||||
Tuskar
|
||||
======
|
||||
|
||||
Ironic is an Incubated OpenStack project which aims to provision
|
||||
bare metal machines instead of virtual machines, forked from the
|
||||
Nova Baremetal driver. It is best thought of as a bare metal
|
||||
hypervisor **API** and a set of plugins which interact with
|
||||
the bare metal hypervisors. By default, it will use PXE and IPMI
|
||||
in concert to provision and turn on/off machines, but Ironic
|
||||
also supports vendor-specific plugins which may implement additional
|
||||
functionality.
|
||||
|
||||
-----------------
|
||||
Project Resources
|
||||
-----------------
|
||||
|
||||
Project status, bugs, and blueprints are tracked on Launchpad:
|
||||
|
||||
http://launchpad.net/ironic
|
||||
|
||||
Additional resources are linked from the project wiki page:
|
||||
|
||||
https://wiki.openstack.org/wiki/Ironic
|
||||
|
||||
Developers wishing to contribute to an OpenStack project should
|
||||
find plenty of helpful resources here:
|
||||
|
||||
https://wiki.openstack.org/wiki/Getting_Started
|
||||
|
||||
All OpenStack projects use Gerrit for code reviews.
|
||||
A good reference for that is here:
|
||||
|
||||
https://wiki.openstack.org/wiki/GerritWorkflow
|
||||
|
||||
--------------------
|
||||
Project Architecture
|
||||
--------------------
|
||||
|
||||
An Ironic deployment will be composed of the following components:
|
||||
|
||||
- A **RESTful API** service, by which operators and other services may interact
|
||||
with the managed bare metal servers.
|
||||
- A **Manager** service, which does the bulk of the work. Functionality is
|
||||
exposed via the API service. The Manager and API services communicate via
|
||||
RPC.
|
||||
- One or more **Deployment Agents**, which provide local control over the
|
||||
hardware which is not available remotely to the Manager. A ramdisk should be
|
||||
built which contains one of these agents, eg. with
|
||||
https://github.com/stackforge/diskimage-builder, and this ramdisk can be
|
||||
booted on-demand. The agent is never run inside a tenant instance.
|
||||
- A **Database** and a DB API for storing persistent state of the Manager and
|
||||
Drivers.
|
||||
|
||||
The internal driver API provides a consistent interface between the
|
||||
Manager service and the driver implementations. There are two types of drivers:
|
||||
|
||||
- ControlDrivers manage the hardware, performing functions such as power
|
||||
on/off, toggle boot device, etc.
|
||||
- DeployDrivers handle the task of booting a temporary ramdisk, formatting
|
||||
drives, and putting a persistent image onto the hardware.
|
||||
- Driver implementations are loaded and instantiated via entrypoints when the
|
||||
ManagerService starts. Each Node record stored in the database indicates
|
||||
which drivers should manage it. When a task is started on that node,
|
||||
information about the node and task is passed to the corresponding driver.
|
||||
In this way, heterogeneous hardware deployments can be managed by a single
|
||||
Manager service.
|
||||
|
||||
In addition to the two types of drivers, there are three categories of driver
|
||||
functionality: core, common, and vendor:
|
||||
|
||||
- "Core" functionality represents the minimal API for that driver type, eg.
|
||||
power on/off for a ControlDriver.
|
||||
- "Common" functionality represents an extended but supported API, and any
|
||||
driver which implements it must be consistent with all other driver
|
||||
implementations of that functionality. For example, if a driver supports
|
||||
enumerating PCI devices, it must return that list as well-structured JSON. In
|
||||
this case, Ironic may validate the API input's structure, but will pass it
|
||||
unaltered to the driver. This ensures compatibility for common features
|
||||
across drivers.
|
||||
- "Vendor" functionality allows an excemption to the API contract when a vendor
|
||||
wishes to expose unique functionality provided by their hardware and is
|
||||
unable to do so within the core or common APIs. In this case, Ironic will
|
||||
neither store nor introspect the messages passed between the API and the
|
||||
driver.
|
||||
Tuskar is playground for some ideas for an OpenStack management API.
|
||||
|
||||
Send pull requests!
|
||||
|
||||
-----------
|
||||
Development
|
||||
-----------
|
||||
|
||||
Ironic source code should be pulled directly from git::
|
||||
Tuskar source code should be pulled directly from git::
|
||||
|
||||
git clone https://github.com/openstack/ironic
|
||||
git clone https://github.com/openstack/tuskar
|
||||
|
||||
Setting up a local environment for development can be done with tox::
|
||||
|
||||
cd <your_src_dir>/ironic
|
||||
cd <your_src_dir>/tuskar
|
||||
|
||||
# install prerequisites
|
||||
* Ubuntu/Debian:
|
||||
|
@ -122,4 +43,3 @@ Setting up a local environment for development can be done with tox::
|
|||
|
||||
# deactivate the virtualenv
|
||||
deactivate
|
||||
|
||||
|
|
|
@ -32,4 +32,4 @@ module=uuidutils
|
|||
module=version
|
||||
|
||||
# The base module to hold the copy of openstack.common
|
||||
base=ironic
|
||||
base=tuskar
|
||||
|
|
|
@ -10,17 +10,10 @@ lxml>=2.3
|
|||
WebOb==1.2.3
|
||||
greenlet>=0.3.1
|
||||
sqlalchemy-migrate>=0.7.2
|
||||
netaddr>=0.7.6
|
||||
suds>=0.4
|
||||
paramiko
|
||||
Babel>=0.9.6
|
||||
iso8601>=0.1.4
|
||||
setuptools_git>=0.4
|
||||
python-quantumclient>=2.2.0,<3.0.0
|
||||
python-glanceclient>=0.5.0,<2
|
||||
python-keystoneclient>=0.2.0
|
||||
stevedore>=0.7
|
||||
websockify<0.4
|
||||
oslo.config>=1.1.0
|
||||
Flask==0.9
|
||||
pecan>=0.2.0
|
||||
|
|
39
setup.cfg
39
setup.cfg
|
@ -1,12 +1,12 @@
|
|||
[metadata]
|
||||
name = ironic
|
||||
name = tuskar
|
||||
version = 2013.2
|
||||
summary = OpenStack Bare Metal Provisioning
|
||||
summary = An OpenStack Management Service
|
||||
description-file =
|
||||
README.rst
|
||||
author = OpenStack
|
||||
author-email = openstack-dev@lists.openstack.org
|
||||
home-page = http://www.openstack.org/
|
||||
author = Mark McLoughlin
|
||||
author-email = markmc@redhat.com
|
||||
home-page = https://github.com/markmc/tuskar
|
||||
classifier =
|
||||
Environment :: OpenStack
|
||||
Intended Audience :: Information Technology
|
||||
|
@ -24,22 +24,13 @@ setup-hooks =
|
|||
|
||||
[files]
|
||||
packages =
|
||||
ironic
|
||||
tuskar
|
||||
|
||||
[entry_points]
|
||||
console_scripts =
|
||||
ironic-api = ironic.cmd.api:main
|
||||
ironic-dbsync = ironic.cmd.dbsync:main
|
||||
ironic-manager = ironic.cmd.manager:main
|
||||
|
||||
ironic.controllers =
|
||||
fake = ironic.drivers.fake:FakeControlDriver
|
||||
ipmi = ironic.drivers.ipmi:IPMIPowerDriver
|
||||
# vpd = ironic.drivers.vpd:VirtualPowerDriver
|
||||
|
||||
ironic.deployers =
|
||||
fake = ironic.drivers.fake:FakeDeployDriver
|
||||
# pxe = ironic.drivers.pxe.PXEDeployDriver
|
||||
tuskar-api = tuskar.cmd.api:main
|
||||
tuskar-dbsync = tuskar.cmd.dbsync:main
|
||||
tuskar-manager = tuskar.cmd.manager:main
|
||||
|
||||
[build_sphinx]
|
||||
all_files = 1
|
||||
|
@ -52,15 +43,15 @@ tag_date = 0
|
|||
tag_svn_revision = 0
|
||||
|
||||
[compile_catalog]
|
||||
directory = ironic/locale
|
||||
domain = ironic
|
||||
directory = tuskar/locale
|
||||
domain = tuskar
|
||||
|
||||
[update_catalog]
|
||||
domain = ironic
|
||||
output_dir = ironic/locale
|
||||
input_file = ironic/locale/ironic.pot
|
||||
domain = tuskar
|
||||
output_dir = tuskar/locale
|
||||
input_file = tuskar/locale/tuskar.pot
|
||||
|
||||
[extract_messages]
|
||||
keywords = _ gettext ngettext l_ lazy_gettext
|
||||
mapping_file = babel.cfg
|
||||
output_file = ironic/locale/ironic.pot
|
||||
output_file = tuskar/locale/tuskar.pot
|
||||
|
|
6
setup.py
6
setup.py
|
@ -16,14 +16,14 @@
|
|||
|
||||
import setuptools
|
||||
|
||||
from ironic.openstack.common import setup as common_setup
|
||||
from tuskar.openstack.common import setup as common_setup
|
||||
|
||||
project = 'ironic'
|
||||
project = 'tuskar'
|
||||
|
||||
setuptools.setup(
|
||||
name=project,
|
||||
version=common_setup.get_version(project, '2013.1'),
|
||||
description='Bare Metal controller',
|
||||
description='An OpenStack Management Service',
|
||||
classifiers=[
|
||||
'Environment :: OpenStack',
|
||||
'Intended Audience :: Information Technology',
|
||||
|
|
|
@ -40,7 +40,7 @@ def main(argv):
|
|||
os.path.join(root, 'tools', 'test-requires'),
|
||||
])
|
||||
py_version = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
|
||||
project = 'ironic'
|
||||
project = 'tuskar'
|
||||
install = install_venv.InstallVenv(root, venv, pip_requires, test_requires,
|
||||
py_version, project)
|
||||
#NOTE(dprince): For Tox we only run post_process (which patches files, etc)
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -31,4 +31,4 @@ commands = {posargs}
|
|||
[flake8]
|
||||
ignore = E12
|
||||
builtins = _
|
||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,*ironic/nova*,*ironic/tests/nova*,tools
|
||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
|
||||
|
|
|
@ -18,18 +18,18 @@
|
|||
import flask.helpers
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common import jsonutils
|
||||
from tuskar.openstack.common import jsonutils
|
||||
|
||||
flask.helpers.json = jsonutils
|
||||
|
||||
API_SERVICE_OPTS = [
|
||||
cfg.StrOpt('ironic_api_bind_ip',
|
||||
cfg.StrOpt('tuskar_api_bind_ip',
|
||||
default='0.0.0.0',
|
||||
help='IP for the Ironic API server to bind to',
|
||||
help='IP for the Tuskar API server to bind to',
|
||||
),
|
||||
cfg.IntOpt('ironic_api_port',
|
||||
cfg.IntOpt('tuskar_api_port',
|
||||
default=6385,
|
||||
help='The port for the Ironic API server',
|
||||
help='The port for the Tuskar API server',
|
||||
),
|
||||
]
|
||||
|
|
@ -23,7 +23,7 @@ from oslo.config import cfg
|
|||
from pecan import hooks
|
||||
from webob import exc
|
||||
|
||||
from ironic.common import policy
|
||||
from tuskar.common import policy
|
||||
|
||||
|
||||
OPT_GROUP_NAME = 'keystone_authtoken'
|
|
@ -19,9 +19,9 @@
|
|||
from oslo.config import cfg
|
||||
import pecan
|
||||
|
||||
from ironic.api import acl
|
||||
from ironic.api import config
|
||||
from ironic.api import hooks
|
||||
from tuskar.api import acl
|
||||
from tuskar.api import config
|
||||
from tuskar.api import hooks
|
||||
|
||||
auth_opts = [
|
||||
cfg.StrOpt('auth_strategy',
|
|
@ -6,10 +6,10 @@ server = {
|
|||
|
||||
# Pecan Application Configurations
|
||||
app = {
|
||||
'root': 'ironic.api.controllers.root.RootController',
|
||||
'modules': ['ironic.api'],
|
||||
'root': 'tuskar.api.controllers.root.RootController',
|
||||
'modules': ['tuskar.api'],
|
||||
'static_root': '%(confdir)s/public',
|
||||
'template_path': '%(confdir)s/ironic/api/templates',
|
||||
'template_path': '%(confdir)s/tuskar/api/templates',
|
||||
'debug': False,
|
||||
'enable_acl': False,
|
||||
}
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
import pecan
|
||||
|
||||
from ironic.api.controllers import v1
|
||||
from tuskar.api.controllers import v1
|
||||
|
||||
|
||||
class RootController(object):
|
|
@ -16,10 +16,7 @@
|
|||
# under the License.
|
||||
|
||||
"""
|
||||
Version 1 of the Ironic API
|
||||
|
||||
Should maintain feature parity with Nova Baremetal Extension.
|
||||
Specification in ironic/doc/api/v1.rst
|
||||
Version 1 of the Tuskar API
|
||||
"""
|
||||
|
||||
import pecan
|
||||
|
@ -29,7 +26,7 @@ import wsme
|
|||
from wsme import types as wtypes
|
||||
import wsmeext.pecan as wsme_pecan
|
||||
|
||||
from ironic.openstack.common import log
|
||||
from tuskar.openstack.common import log
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
from oslo.config import cfg
|
||||
from pecan import hooks
|
||||
|
||||
from ironic.db import api as dbapi
|
||||
from tuskar.db import api as dbapi
|
||||
|
||||
|
||||
class ConfigHook(hooks.PecanHook):
|
|
@ -1,5 +1,5 @@
|
|||
<%def name="title()">
|
||||
Ironic API v1
|
||||
Tuskar API v1
|
||||
</%def>
|
||||
|
||||
<header>
|
|
@ -13,7 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# TODO(deva): move eventlet imports to ironic.__init__ once we move to PBR
|
||||
# TODO(deva): move eventlet imports to tuskar.__init__ once we move to PBR
|
||||
import os
|
||||
|
||||
os.environ['EVENTLET_NO_GREENDNS'] = 'yes'
|
||||
|
@ -22,5 +22,5 @@ import eventlet
|
|||
|
||||
eventlet.monkey_patch(os=False)
|
||||
|
||||
from ironic.openstack.common import gettextutils
|
||||
gettextutils.install('ironic')
|
||||
from tuskar.openstack.common import gettextutils
|
||||
gettextutils.install('tuskar')
|
|
@ -18,7 +18,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""The Ironic Service API."""
|
||||
"""The Tuskar Service API."""
|
||||
|
||||
import logging
|
||||
import sys
|
||||
|
@ -26,20 +26,20 @@ import sys
|
|||
from oslo.config import cfg
|
||||
from wsgiref import simple_server
|
||||
|
||||
from ironic.api import app
|
||||
from ironic.common import service as ironic_service
|
||||
from ironic.openstack.common import log
|
||||
from tuskar.api import app
|
||||
from tuskar.common import service as tuskar_service
|
||||
from tuskar.openstack.common import log
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
def main():
|
||||
# Pase config file and command line options, then start logging
|
||||
ironic_service.prepare_service(sys.argv)
|
||||
tuskar_service.prepare_service(sys.argv)
|
||||
|
||||
# Build and start the WSGI app
|
||||
host = CONF.ironic_api_bind_ip
|
||||
port = CONF.ironic_api_port
|
||||
host = CONF.tuskar_api_bind_ip
|
||||
port = CONF.tuskar_api_port
|
||||
wsgi = simple_server.make_server(
|
||||
host, port,
|
||||
app.VersionSelectorApplication())
|
|
@ -24,8 +24,8 @@ Run storage database migration.
|
|||
|
||||
import sys
|
||||
|
||||
from ironic.common import service
|
||||
from ironic.db import migration
|
||||
from tuskar.common import service
|
||||
from tuskar.db import migration
|
||||
|
||||
|
||||
def main():
|
|
@ -19,26 +19,26 @@
|
|||
# under the License.
|
||||
|
||||
"""
|
||||
The Ironic Management Service
|
||||
The Tuskar Management Service
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common import service
|
||||
from tuskar.openstack.common import service
|
||||
|
||||
from ironic.common import service as ironic_service
|
||||
from ironic.manager import manager
|
||||
from tuskar.common import service as tuskar_service
|
||||
from tuskar.manager import manager
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
def main():
|
||||
# Pase config file and command line options, then start logging
|
||||
ironic_service.prepare_service(sys.argv)
|
||||
tuskar_service.prepare_service(sys.argv)
|
||||
|
||||
topic = 'ironic.manager'
|
||||
topic = 'tuskar.manager'
|
||||
mgr = manager.ManagerService(CONF.host, topic)
|
||||
launcher = service.launch(mgr)
|
||||
launcher.wait()
|
|
@ -19,19 +19,19 @@
|
|||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.common import paths
|
||||
from ironic.openstack.common.db.sqlalchemy import session as db_session
|
||||
from ironic.openstack.common import rpc
|
||||
from ironic import version
|
||||
from tuskar.common import paths
|
||||
from tuskar.openstack.common.db.sqlalchemy import session as db_session
|
||||
from tuskar.openstack.common import rpc
|
||||
from tuskar import version
|
||||
|
||||
_DEFAULT_SQL_CONNECTION = 'sqlite:///' + paths.state_path_def('$sqlite_db')
|
||||
|
||||
|
||||
def parse_args(argv, default_config_files=None):
|
||||
db_session.set_defaults(sql_connection=_DEFAULT_SQL_CONNECTION,
|
||||
sqlite_db='ironic.sqlite')
|
||||
rpc.set_defaults(control_exchange='ironic')
|
||||
sqlite_db='tuskar.sqlite')
|
||||
rpc.set_defaults(control_exchange='tuskar')
|
||||
cfg.CONF(argv[1:],
|
||||
project='ironic',
|
||||
project='tuskar',
|
||||
version=version.version_string(),
|
||||
default_config_files=default_config_files)
|
|
@ -22,11 +22,11 @@
|
|||
import copy
|
||||
import uuid
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.common import policy
|
||||
from ironic.openstack.common import local
|
||||
from ironic.openstack.common import log as logging
|
||||
from ironic.openstack.common import timeutils
|
||||
from tuskar.common import exception
|
||||
from tuskar.common import policy
|
||||
from tuskar.openstack.common import local
|
||||
from tuskar.openstack.common import log as logging
|
||||
from tuskar.openstack.common import timeutils
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
|
@ -16,9 +16,9 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""Ironic base exception handling.
|
||||
"""Tuskar base exception handling.
|
||||
|
||||
Includes decorator for re-raising Ironic-type exceptions.
|
||||
Includes decorator for re-raising Tuskar-type exceptions.
|
||||
|
||||
SHOULD include dedicated exception logging.
|
||||
|
||||
|
@ -28,9 +28,9 @@ import functools
|
|||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.common import safe_utils
|
||||
from ironic.openstack.common import excutils
|
||||
from ironic.openstack.common import log as logging
|
||||
from tuskar.common import safe_utils
|
||||
from tuskar.openstack.common import excutils
|
||||
from tuskar.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -108,8 +108,8 @@ def wrap_exception(notifier=None, publisher_id=None, event_type=None,
|
|||
return inner
|
||||
|
||||
|
||||
class IronicException(Exception):
|
||||
"""Base Ironic Exception
|
||||
class TuskarException(Exception):
|
||||
"""Base Tuskar Exception
|
||||
|
||||
To correctly use this class, inherit from it and define
|
||||
a 'message' property. That message will get printf'd
|
||||
|
@ -147,7 +147,7 @@ class IronicException(Exception):
|
|||
# at least get the core message out if something happened
|
||||
message = self.message
|
||||
|
||||
super(IronicException, self).__init__(message)
|
||||
super(TuskarException, self).__init__(message)
|
||||
|
||||
def format_message(self):
|
||||
if self.__class__.__name__.endswith('_Remote'):
|
||||
|
@ -156,7 +156,7 @@ class IronicException(Exception):
|
|||
return unicode(self)
|
||||
|
||||
|
||||
class NotAuthorized(IronicException):
|
||||
class NotAuthorized(TuskarException):
|
||||
message = _("Not authorized.")
|
||||
code = 403
|
||||
|
||||
|
@ -169,7 +169,7 @@ class PolicyNotAuthorized(NotAuthorized):
|
|||
message = _("Policy doesn't allow %(action)s to be performed.")
|
||||
|
||||
|
||||
class Invalid(IronicException):
|
||||
class Invalid(TuskarException):
|
||||
message = _("Unacceptable parameters.")
|
||||
code = 400
|
||||
|
||||
|
@ -200,7 +200,7 @@ class InvalidParameterValue(Invalid):
|
|||
message = _("%(err)s")
|
||||
|
||||
|
||||
class NotFound(IronicException):
|
||||
class NotFound(TuskarException):
|
||||
message = _("Resource could not be found.")
|
||||
code = 404
|
||||
|
||||
|
@ -245,7 +245,7 @@ class PortNotFound(NotFound):
|
|||
message = _("Port %(port)s could not be found.")
|
||||
|
||||
|
||||
class PowerStateFailure(IronicException):
|
||||
class PowerStateFailure(TuskarException):
|
||||
message = _("Failed to set node power state to %(pstate)s.")
|
||||
|
||||
|
||||
|
@ -254,5 +254,5 @@ class ExclusiveLockRequired(NotAuthorized):
|
|||
"but the current context has a shared lock.")
|
||||
|
||||
|
||||
class IPMIFailure(IronicException):
|
||||
class IPMIFailure(TuskarException):
|
||||
message = _("IPMI command failed: %(cmd)s.")
|
|
@ -15,15 +15,15 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""Policy Engine For Ironic."""
|
||||
"""Policy Engine For Tuskar."""
|
||||
|
||||
import os.path
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.common import utils
|
||||
from ironic.openstack.common import policy
|
||||
from tuskar.common import exception
|
||||
from tuskar.common import utils
|
||||
from tuskar.openstack.common import policy
|
||||
|
||||
|
||||
policy_opts = [
|
||||
|
@ -71,7 +71,7 @@ def _set_rules(data):
|
|||
def enforce(context, action, target, do_raise=True):
|
||||
"""Verifies that the action is valid on the target in this context.
|
||||
|
||||
:param context: ironic context
|
||||
:param context: tuskar context
|
||||
:param action: string representing the action to be checked
|
||||
this should be colon separated for clarity.
|
||||
i.e. ``compute:create_instance``,
|
|
@ -21,10 +21,10 @@ import socket
|
|||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common import context
|
||||
from ironic.openstack.common import log
|
||||
from ironic.openstack.common import rpc
|
||||
from ironic.openstack.common.rpc import service as rpc_service
|
||||
from tuskar.openstack.common import context
|
||||
from tuskar.openstack.common import log
|
||||
from tuskar.openstack.common import rpc
|
||||
from tuskar.openstack.common.rpc import service as rpc_service
|
||||
|
||||
|
||||
cfg.CONF.register_opts([
|
||||
|
@ -52,7 +52,7 @@ class PeriodicService(rpc_service.Service):
|
|||
|
||||
|
||||
def prepare_service(argv=[]):
|
||||
rpc.set_defaults(control_exchange='ironic')
|
||||
rpc.set_defaults(control_exchange='tuskar')
|
||||
cfg.set_defaults(log.log_opts,
|
||||
default_log_levels=['amqplib=WARN',
|
||||
'qpid.messaging=INFO',
|
||||
|
@ -61,5 +61,5 @@ def prepare_service(argv=[]):
|
|||
'stevedore=INFO',
|
||||
'eventlet.wsgi.server=WARN'
|
||||
])
|
||||
cfg.CONF(argv[1:], project='ironic')
|
||||
log.setup('ironic')
|
||||
cfg.CONF(argv[1:], project='tuskar')
|
||||
log.setup('tuskar')
|
|
@ -24,8 +24,8 @@ import os
|
|||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.openstack.common import log as logging
|
||||
from tuskar.common import exception
|
||||
from tuskar.openstack.common import log as logging
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -48,7 +48,7 @@ class LazyPluggable(object):
|
|||
backend_name = CONF[self.__config_group][self.__pivot]
|
||||
if backend_name not in self.__backends:
|
||||
msg = _('Invalid backend: %s') % backend_name
|
||||
raise exception.IronicException(msg)
|
||||
raise exception.TuskarException(msg)
|
||||
|
||||
backend = self.__backends[backend_name]
|
||||
if isinstance(backend, tuple):
|
|
@ -20,9 +20,9 @@ Base classes for storage engines
|
|||
|
||||
import abc
|
||||
|
||||
from ironic.openstack.common.db import api as db_api
|
||||
from tuskar.openstack.common.db import api as db_api
|
||||
|
||||
_BACKEND_MAPPING = {'sqlalchemy': 'ironic.db.sqlalchemy.api'}
|
||||
_BACKEND_MAPPING = {'sqlalchemy': 'tuskar.db.sqlalchemy.api'}
|
||||
IMPL = db_api.DBAPI(backend_mapping=_BACKEND_MAPPING)
|
||||
|
||||
|
|
@ -20,17 +20,17 @@
|
|||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.common import utils
|
||||
from tuskar.common import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('backend',
|
||||
'ironic.openstack.common.db.api',
|
||||
'tuskar.openstack.common.db.api',
|
||||
group='database')
|
||||
|
||||
IMPL = utils.LazyPluggable(
|
||||
pivot='backend',
|
||||
config_group='database',
|
||||
sqlalchemy='ironic.db.sqlalchemy.migration')
|
||||
sqlalchemy='tuskar.db.sqlalchemy.migration')
|
||||
|
||||
INIT_VERSION = 0
|
||||
|
|
@ -22,17 +22,17 @@ from oslo.config import cfg
|
|||
# TODO(deva): import MultipleResultsFound and handle it appropriately
|
||||
from sqlalchemy.orm.exc import NoResultFound
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.common import utils
|
||||
from ironic.db import api
|
||||
from ironic.db.sqlalchemy import models
|
||||
from ironic.openstack.common.db.sqlalchemy import session as db_session
|
||||
from ironic.openstack.common import log
|
||||
from ironic.openstack.common import uuidutils
|
||||
from tuskar.common import exception
|
||||
from tuskar.common import utils
|
||||
from tuskar.db import api
|
||||
from tuskar.db.sqlalchemy import models
|
||||
from tuskar.openstack.common.db.sqlalchemy import session as db_session
|
||||
from tuskar.openstack.common import log
|
||||
from tuskar.openstack.common import uuidutils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('connection',
|
||||
'ironic.openstack.common.db.sqlalchemy.session',
|
||||
'tuskar.openstack.common.db.sqlalchemy.session',
|
||||
group='database')
|
||||
|
||||
LOG = log.getLogger(__name__)
|
|
@ -1,7 +1,7 @@
|
|||
[db_settings]
|
||||
# Used to identify which repository this database is versioned under.
|
||||
# You can use the name of your project.
|
||||
repository_id=ironic
|
||||
repository_id=tuskar
|
||||
|
||||
# The name of the database table used to track the schema version.
|
||||
# This name shouldn't already be used by your project.
|
|
@ -20,7 +20,7 @@ from migrate.changeset import UniqueConstraint
|
|||
from sqlalchemy import Table, Column, ForeignKey, MetaData
|
||||
from sqlalchemy import DateTime, Integer, String, Text
|
||||
|
||||
from ironic.openstack.common import log as logging
|
||||
from tuskar.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -23,9 +23,9 @@ import migrate
|
|||
from migrate.versioning import util as migrate_util
|
||||
import sqlalchemy
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.db import migration
|
||||
from ironic.openstack.common.db.sqlalchemy import session as db_session
|
||||
from tuskar.common import exception
|
||||
from tuskar.db import migration
|
||||
from tuskar.openstack.common.db.sqlalchemy import session as db_session
|
||||
|
||||
|
||||
@migrate_util.decorator
|
||||
|
@ -65,7 +65,7 @@ def db_sync(version=None):
|
|||
try:
|
||||
version = int(version)
|
||||
except ValueError:
|
||||
raise exception.IronicException(_("version should be an integer"))
|
||||
raise exception.TuskarException(_("version should be an integer"))
|
||||
|
||||
current_version = db_version()
|
||||
repository = _find_migrate_repo()
|
||||
|
@ -91,7 +91,7 @@ def db_version():
|
|||
else:
|
||||
# Some pre-Essex DB's may not be version controlled.
|
||||
# Require them to upgrade using Essex first.
|
||||
raise exception.IronicException(
|
||||
raise exception.TuskarException(
|
||||
_("Upgrade DB using Essex release first."))
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ from sqlalchemy import Integer, String, Text
|
|||
from sqlalchemy.ext.declarative import declarative_base
|
||||
from sqlalchemy.types import TypeDecorator, VARCHAR
|
||||
|
||||
from ironic.openstack.common.db.sqlalchemy import models
|
||||
from tuskar.openstack.common.db.sqlalchemy import models
|
||||
|
||||
sql_opts = [
|
||||
cfg.StrOpt('mysql_engine',
|
||||
|
@ -64,7 +64,7 @@ class JSONEncodedDict(TypeDecorator):
|
|||
return value
|
||||
|
||||
|
||||
class IronicBase(models.TimestampMixin,
|
||||
class TuskarBase(models.TimestampMixin,
|
||||
models.ModelBase):
|
||||
|
||||
metadata = None
|
||||
|
@ -76,7 +76,7 @@ class IronicBase(models.TimestampMixin,
|
|||
return d
|
||||
|
||||
|
||||
Base = declarative_base(cls=IronicBase)
|
||||
Base = declarative_base(cls=TuskarBase)
|
||||
|
||||
|
||||
class Blaa(Base):
|
|
@ -16,22 +16,17 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from ironic.common import service
|
||||
from ironic.openstack.common import log
|
||||
from tuskar.common import service
|
||||
from tuskar.openstack.common import log
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
|
||||
class ManagerService(service.PeriodicService):
|
||||
"""Ironic Manager Service.
|
||||
"""Tuskar Manager Service.
|
||||
|
||||
A single instance of this class is created within the ironic-manager
|
||||
process. It is responsible for performing all actions on Chassis, Nodes,
|
||||
and Ports, and tracks these actions via Trackers.
|
||||
|
||||
Tracker instances are created on-demand and destroyed when the
|
||||
operation(s) are complete. Persistent state is stored in a database,
|
||||
which is also used to coordinate locks between ManagerServices.
|
||||
A single instance of this class is created within the tuskar-manager
|
||||
process.
|
||||
"""
|
||||
|
||||
def __init__(self, host, topic):
|
|
@ -24,7 +24,7 @@ context or provide additional information in their specific WSGI pipeline.
|
|||
|
||||
import itertools
|
||||
|
||||
from ironic.openstack.common import uuidutils
|
||||
from tuskar.openstack.common import uuidutils
|
||||
|
||||
|
||||
def generate_request_id():
|
|
@ -40,8 +40,8 @@ import functools
|
|||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common import importutils
|
||||
from ironic.openstack.common import lockutils
|
||||
from tuskar.openstack.common import importutils
|
||||
from tuskar.openstack.common import lockutils
|
||||
|
||||
|
||||
db_opts = [
|
||||
|
@ -69,7 +69,7 @@ class DBAPI(object):
|
|||
self.__backend = None
|
||||
self.__backend_mapping = backend_mapping
|
||||
|
||||
@lockutils.synchronized('dbapi_backend', 'ironic-')
|
||||
@lockutils.synchronized('dbapi_backend', 'tuskar-')
|
||||
def __get_backend(self):
|
||||
"""Get the actual backend. May be a module or an instance of
|
||||
a class. Doesn't matter to us. We do this synchronized as it's
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
"""DB related custom exceptions."""
|
||||
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
|
||||
|
||||
class DBError(Exception):
|
|
@ -26,8 +26,8 @@ from sqlalchemy import Column, Integer
|
|||
from sqlalchemy import DateTime
|
||||
from sqlalchemy.orm import object_mapper
|
||||
|
||||
from ironic.openstack.common.db.sqlalchemy.session import get_session
|
||||
from ironic.openstack.common import timeutils
|
||||
from tuskar.openstack.common.db.sqlalchemy.session import get_session
|
||||
from tuskar.openstack.common import timeutils
|
||||
|
||||
|
||||
class ModelBase(object):
|
|
@ -26,8 +26,8 @@ Initializing:
|
|||
Example:
|
||||
|
||||
session.set_defaults(
|
||||
sql_connection="sqlite:///var/lib/ironic/sqlite.db",
|
||||
sqlite_db="/var/lib/ironic/sqlite.db")
|
||||
sql_connection="sqlite:///var/lib/tuskar/sqlite.db",
|
||||
sqlite_db="/var/lib/tuskar/sqlite.db")
|
||||
|
||||
Recommended ways to use sessions within this framework:
|
||||
|
||||
|
@ -255,16 +255,16 @@ import sqlalchemy.orm
|
|||
from sqlalchemy.pool import NullPool, StaticPool
|
||||
from sqlalchemy.sql.expression import literal_column
|
||||
|
||||
from ironic.openstack.common.db import exception
|
||||
from ironic.openstack.common import log as logging
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import timeutils
|
||||
from tuskar.openstack.common.db import exception
|
||||
from tuskar.openstack.common import log as logging
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import timeutils
|
||||
|
||||
DEFAULT = 'DEFAULT'
|
||||
|
||||
sqlite_db_opts = [
|
||||
cfg.StrOpt('sqlite_db',
|
||||
default='ironic.sqlite',
|
||||
default='tuskar.sqlite',
|
||||
help='the filename to use with sqlite'),
|
||||
cfg.BoolOpt('sqlite_synchronous',
|
||||
default=True,
|
||||
|
@ -679,8 +679,8 @@ def _patch_mysqldb_with_stacktrace_comments():
|
|||
# db/api is just a wrapper around db/sqlalchemy/api
|
||||
if file.endswith('db/api.py'):
|
||||
continue
|
||||
# only trace inside ironic
|
||||
index = file.rfind('ironic')
|
||||
# only trace inside tuskar
|
||||
index = file.rfind('tuskar')
|
||||
if index == -1:
|
||||
continue
|
||||
stack += "File:%s:%s Method:%s() Line:%s | " \
|
|
@ -22,8 +22,8 @@
|
|||
|
||||
import sqlalchemy
|
||||
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import log as logging
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
|
@ -24,7 +24,7 @@ import logging
|
|||
import sys
|
||||
import traceback
|
||||
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
|
@ -20,14 +20,14 @@ gettext for openstack-common modules.
|
|||
|
||||
Usual usage in an openstack.common module:
|
||||
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
"""
|
||||
|
||||
import gettext
|
||||
import os
|
||||
|
||||
_localedir = os.environ.get('ironic'.upper() + '_LOCALEDIR')
|
||||
_t = gettext.translation('ironic', localedir=_localedir, fallback=True)
|
||||
_localedir = os.environ.get('tuskar'.upper() + '_LOCALEDIR')
|
||||
_t = gettext.translation('tuskar', localedir=_localedir, fallback=True)
|
||||
|
||||
|
||||
def _(msg):
|
|
@ -43,7 +43,7 @@ import xmlrpclib
|
|||
|
||||
import six
|
||||
|
||||
from ironic.openstack.common import timeutils
|
||||
from tuskar.openstack.common import timeutils
|
||||
|
||||
|
||||
_nasty_type_tests = [inspect.ismodule, inspect.isclass, inspect.ismethod,
|
|
@ -27,10 +27,10 @@ import weakref
|
|||
from eventlet import semaphore
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common import fileutils
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import local
|
||||
from ironic.openstack.common import log as logging
|
||||
from tuskar.openstack.common import fileutils
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import local
|
||||
from tuskar.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
|
@ -42,10 +42,10 @@ import traceback
|
|||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import importutils
|
||||
from ironic.openstack.common import jsonutils
|
||||
from ironic.openstack.common import local
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import importutils
|
||||
from tuskar.openstack.common import jsonutils
|
||||
from tuskar.openstack.common import local
|
||||
|
||||
|
||||
_DEFAULT_LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
|
||||
|
@ -418,7 +418,7 @@ def _setup_logging_from_conf():
|
|||
|
||||
if CONF.publish_errors:
|
||||
handler = importutils.import_object(
|
||||
"ironic.openstack.common.log_handler.PublishErrorsHandler",
|
||||
"tuskar.openstack.common.log_handler.PublishErrorsHandler",
|
||||
logging.ERROR)
|
||||
log_root.addHandler(handler)
|
||||
|
|
@ -15,14 +15,14 @@
|
|||
# under the License.
|
||||
import logging
|
||||
|
||||
from ironic.openstack.common import notifier
|
||||
from tuskar.openstack.common import notifier
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
|
||||
class PublishErrorsHandler(logging.Handler):
|
||||
def emit(self, record):
|
||||
if ('ironic.openstack.common.notifier.log_notifier' in
|
||||
if ('tuskar.openstack.common.notifier.log_notifier' in
|
||||
cfg.CONF.notification_driver):
|
||||
return
|
||||
notifier.api.notify(None, 'error.publisher',
|
|
@ -22,9 +22,9 @@ import sys
|
|||
from eventlet import event
|
||||
from eventlet import greenthread
|
||||
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import log as logging
|
||||
from ironic.openstack.common import timeutils
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import log as logging
|
||||
from tuskar.openstack.common import timeutils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
Network-related utilities and helper functions.
|
||||
"""
|
||||
|
||||
from ironic.openstack.common import log as logging
|
||||
from tuskar.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
|
@ -17,12 +17,12 @@ import uuid
|
|||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common import context
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import importutils
|
||||
from ironic.openstack.common import jsonutils
|
||||
from ironic.openstack.common import log as logging
|
||||
from ironic.openstack.common import timeutils
|
||||
from tuskar.openstack.common import context
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import importutils
|
||||
from tuskar.openstack.common import jsonutils
|
||||
from tuskar.openstack.common import log as logging
|
||||
from tuskar.openstack.common import timeutils
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common import jsonutils
|
||||
from ironic.openstack.common import log as logging
|
||||
from tuskar.openstack.common import jsonutils
|
||||
from tuskar.openstack.common import log as logging
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
@ -30,6 +30,6 @@ def notify(_context, message):
|
|||
CONF.default_notification_level)
|
||||
priority = priority.lower()
|
||||
logger = logging.getLogger(
|
||||
'ironic.openstack.common.notification.%s' %
|
||||
'tuskar.openstack.common.notification.%s' %
|
||||
message['event_type'])
|
||||
getattr(logger, priority)(jsonutils.dumps(message))
|
|
@ -15,10 +15,10 @@
|
|||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common import context as req_context
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import log as logging
|
||||
from ironic.openstack.common import rpc
|
||||
from tuskar.openstack.common import context as req_context
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import log as logging
|
||||
from tuskar.openstack.common import rpc
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -17,10 +17,10 @@
|
|||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common import context as req_context
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import log as logging
|
||||
from ironic.openstack.common import rpc
|
||||
from tuskar.openstack.common import context as req_context
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import log as logging
|
||||
from tuskar.openstack.common import rpc
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -18,9 +18,9 @@ import time
|
|||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import log as logging
|
||||
from ironic.openstack.common import timeutils
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import log as logging
|
||||
from tuskar.openstack.common import timeutils
|
||||
|
||||
|
||||
periodic_opts = [
|
|
@ -13,8 +13,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from ironic.openstack.common import log as logging
|
||||
from ironic.openstack.common.plugin import plugin
|
||||
from tuskar.openstack.common import log as logging
|
||||
from tuskar.openstack.common.plugin import plugin
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
|
@ -13,7 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from ironic.openstack.common import log as logging
|
||||
from tuskar.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
|
@ -17,9 +17,9 @@ import pkg_resources
|
|||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import log as logging
|
||||
from ironic.openstack.common.notifier import api as notifier_api
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import log as logging
|
||||
from tuskar.openstack.common.notifier import api as notifier_api
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
|
@ -63,9 +63,9 @@ import urllib
|
|||
import six
|
||||
import urllib2
|
||||
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import jsonutils
|
||||
from ironic.openstack.common import log as logging
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import jsonutils
|
||||
from tuskar.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
|
@ -27,8 +27,8 @@ import signal
|
|||
from eventlet.green import subprocess
|
||||
from eventlet import greenthread
|
||||
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import log as logging
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
|
@ -20,14 +20,14 @@
|
|||
|
||||
Filters which commands a service is allowed to run as another user.
|
||||
|
||||
To use this with ironic, you should set the following in
|
||||
ironic.conf:
|
||||
rootwrap_config=/etc/ironic/rootwrap.conf
|
||||
To use this with tuskar, you should set the following in
|
||||
tuskar.conf:
|
||||
rootwrap_config=/etc/tuskar/rootwrap.conf
|
||||
|
||||
You also need to let the ironic user run ironic-rootwrap
|
||||
You also need to let the tuskar user run tuskar-rootwrap
|
||||
as root in sudoers:
|
||||
ironic ALL = (root) NOPASSWD: /usr/bin/ironic-rootwrap
|
||||
/etc/ironic/rootwrap.conf *
|
||||
tuskar ALL = (root) NOPASSWD: /usr/bin/tuskar-rootwrap
|
||||
/etc/tuskar/rootwrap.conf *
|
||||
|
||||
Service packaging should deploy .filters files only on nodes where
|
||||
they are needed, to avoid allowing more than is necessary.
|
||||
|
@ -75,10 +75,10 @@ def main():
|
|||
# Add ../ to sys.path to allow running from branch
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(execname),
|
||||
os.pardir, os.pardir))
|
||||
if os.path.exists(os.path.join(possible_topdir, "ironic", "__init__.py")):
|
||||
if os.path.exists(os.path.join(possible_topdir, "tuskar", "__init__.py")):
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
from ironic.openstack.common.rootwrap import wrapper
|
||||
from tuskar.openstack.common.rootwrap import wrapper
|
||||
|
||||
# Load configuration
|
||||
try:
|
|
@ -22,7 +22,7 @@ import logging.handlers
|
|||
import os
|
||||
import string
|
||||
|
||||
from ironic.openstack.common.rootwrap import filters
|
||||
from tuskar.openstack.common.rootwrap import filters
|
||||
|
||||
|
||||
class NoFilterMatched(Exception):
|
|
@ -29,10 +29,10 @@ import inspect
|
|||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import importutils
|
||||
from ironic.openstack.common import local
|
||||
from ironic.openstack.common import log as logging
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import importutils
|
||||
from tuskar.openstack.common import local
|
||||
from tuskar.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -56,7 +56,7 @@ rpc_opts = [
|
|||
help='Seconds to wait before a cast expires (TTL). '
|
||||
'Only supported by impl_zmq.'),
|
||||
cfg.ListOpt('allowed_rpc_exception_modules',
|
||||
default=['ironic.openstack.common.exception',
|
||||
default=['tuskar.openstack.common.exception',
|
||||
'nova.exception',
|
||||
'cinder.exception',
|
||||
'exceptions',
|
|
@ -39,11 +39,11 @@ from eventlet import semaphore
|
|||
# option is removed.
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common import excutils
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import local
|
||||
from ironic.openstack.common import log as logging
|
||||
from ironic.openstack.common.rpc import common as rpc_common
|
||||
from tuskar.openstack.common import excutils
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import local
|
||||
from tuskar.openstack.common import log as logging
|
||||
from tuskar.openstack.common.rpc import common as rpc_common
|
||||
|
||||
|
||||
# TODO(pekowski): Remove this option in Havana.
|
|
@ -24,11 +24,11 @@ import traceback
|
|||
from oslo.config import cfg
|
||||
import six
|
||||
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import importutils
|
||||
from ironic.openstack.common import jsonutils
|
||||
from ironic.openstack.common import local
|
||||
from ironic.openstack.common import log as logging
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import importutils
|
||||
from tuskar.openstack.common import jsonutils
|
||||
from tuskar.openstack.common import local
|
||||
from tuskar.openstack.common import log as logging
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
|
@ -83,8 +83,8 @@ On the client side, the same changes should be made as in example 1. The
|
|||
minimum version that supports the new parameter should be specified.
|
||||
"""
|
||||
|
||||
from ironic.openstack.common.rpc import common as rpc_common
|
||||
from ironic.openstack.common.rpc import serializer as rpc_serializer
|
||||
from tuskar.openstack.common.rpc import common as rpc_common
|
||||
from tuskar.openstack.common.rpc import serializer as rpc_serializer
|
||||
|
||||
|
||||
class RpcDispatcher(object):
|
|
@ -27,7 +27,7 @@ import time
|
|||
|
||||
import eventlet
|
||||
|
||||
from ironic.openstack.common.rpc import common as rpc_common
|
||||
from tuskar.openstack.common.rpc import common as rpc_common
|
||||
|
||||
CONSUMERS = {}
|
||||
|
|
@ -30,10 +30,10 @@ import kombu.entity
|
|||
import kombu.messaging
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import network_utils
|
||||
from ironic.openstack.common.rpc import amqp as rpc_amqp
|
||||
from ironic.openstack.common.rpc import common as rpc_common
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import network_utils
|
||||
from tuskar.openstack.common.rpc import amqp as rpc_amqp
|
||||
from tuskar.openstack.common.rpc import common as rpc_common
|
||||
|
||||
kombu_opts = [
|
||||
cfg.StrOpt('kombu_ssl_version',
|
|
@ -24,12 +24,12 @@ import eventlet
|
|||
import greenlet
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import importutils
|
||||
from ironic.openstack.common import jsonutils
|
||||
from ironic.openstack.common import log as logging
|
||||
from ironic.openstack.common.rpc import amqp as rpc_amqp
|
||||
from ironic.openstack.common.rpc import common as rpc_common
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import importutils
|
||||
from tuskar.openstack.common import jsonutils
|
||||
from tuskar.openstack.common import log as logging
|
||||
from tuskar.openstack.common.rpc import amqp as rpc_amqp
|
||||
from tuskar.openstack.common.rpc import common as rpc_common
|
||||
|
||||
qpid_messaging = importutils.try_import("qpid.messaging")
|
||||
qpid_exceptions = importutils.try_import("qpid.messaging.exceptions")
|
|
@ -26,12 +26,12 @@ import eventlet
|
|||
import greenlet
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common import excutils
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import importutils
|
||||
from ironic.openstack.common import jsonutils
|
||||
from ironic.openstack.common import processutils as utils
|
||||
from ironic.openstack.common.rpc import common as rpc_common
|
||||
from tuskar.openstack.common import excutils
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import importutils
|
||||
from tuskar.openstack.common import jsonutils
|
||||
from tuskar.openstack.common import processutils as utils
|
||||
from tuskar.openstack.common.rpc import common as rpc_common
|
||||
|
||||
zmq = importutils.try_import('eventlet.green.zmq')
|
||||
|
||||
|
@ -52,7 +52,7 @@ zmq_opts = [
|
|||
# The module.Class to use for matchmaking.
|
||||
cfg.StrOpt(
|
||||
'rpc_zmq_matchmaker',
|
||||
default=('ironic.openstack.common.rpc.'
|
||||
default=('tuskar.openstack.common.rpc.'
|
||||
'matchmaker.MatchMakerLocalhost'),
|
||||
help='MatchMaker driver',
|
||||
),
|
|
@ -23,8 +23,8 @@ import contextlib
|
|||
import eventlet
|
||||
from oslo.config import cfg
|
||||
|
||||
from ironic.openstack.common.gettextutils import _
|
||||
from ironic.openstack.common import log as logging
|
||||
from tuskar.openstack.common.gettextutils import _
|
||||
from tuskar.openstack.common import log as logging
|
||||
|
||||
|
||||
matchmaker_opts = [
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue