![Chris Dent](/assets/img/avatar_default.png)
This change adds a rudimentary command line tool, 'placement-manage' that can do three things: * placement-manage --version: report the current version of the software * placement-manage db sync: sync the db to the 'head' alembic version * placement-manage db version: report the current version of the db It is written following the examples set by both nova and ironic for using oslo config driven command line parsing. It is not as full featured as the nova version (with decorators for argument handling and help text etc) because we don't need that yet. There's plenty of room for improvement, but the intention here is to keep things simple until we need them to be otherwise. The provided unit tests cover that the arg parsing behaves as expected and that the right commands are connected the right args. The actual functionality of the 'db sync' command (a migration.upgrade) is tested in runs that use devstack as well as the test_migrations functional test. Errors during the migration simply raise exceptions which will output noisily to the console. At this stage this is desirable and suitable. A new doc for the cli is added, with basic information for placement-manage. Note that at this time the deployment documentation has not been updated. That will be done in a later change. Future changes may include (if we can't avoid it) tools for initiating online migrations from the command line. Needed-By: https://review.openstack.org/600162/ Change-Id: I1ff472106610150a587f5286f26a6bd7c1aa84f4
72 lines
1.9 KiB
INI
72 lines
1.9 KiB
INI
[metadata]
|
|
name = openstack-placement
|
|
summary = Resource provider inventory usage and allocation service
|
|
description-file =
|
|
README.rst
|
|
author = OpenStack
|
|
author-email = openstack-dev@lists.openstack.org
|
|
home-page = https://docs.openstack.org/placement/latest/
|
|
classifier =
|
|
Environment :: OpenStack
|
|
Intended Audience :: Information Technology
|
|
Intended Audience :: System Administrators
|
|
License :: OSI Approved :: Apache Software License
|
|
Operating System :: POSIX :: Linux
|
|
Programming Language :: Python
|
|
Programming Language :: Python :: 2
|
|
Programming Language :: Python :: 2.7
|
|
Programming Language :: Python :: 3
|
|
Programming Language :: Python :: 3.5
|
|
|
|
[global]
|
|
setup-hooks =
|
|
pbr.hooks.setup_hook
|
|
|
|
[files]
|
|
packages =
|
|
placement
|
|
|
|
[entry_points]
|
|
oslo.config.opts =
|
|
placement.conf = placement.conf.opts:list_opts
|
|
|
|
oslo.policy.enforcer =
|
|
placement = placement.policy:get_enforcer
|
|
|
|
oslo.policy.policies =
|
|
# The sample policies will be ordered by entry point and then by list
|
|
# returned from that entry point. If more control is desired split out each
|
|
# list_rules method into a separate entry point rather than using the
|
|
# aggregate method.
|
|
placement = placement.policies:list_rules
|
|
|
|
console_scripts =
|
|
# TODO(cdent): We will need some kind of placement-status, eventually
|
|
placement-manage = placement.cmd.manage:main
|
|
wsgi_scripts =
|
|
placement-api = placement.wsgi:init_application
|
|
|
|
[egg_info]
|
|
tag_build =
|
|
tag_date = 0
|
|
tag_svn_revision = 0
|
|
|
|
[compile_catalog]
|
|
# TODO(cdent): Create translation infrastructure.
|
|
# See: https://docs.openstack.org/oslo.i18n/latest/user/usage.html
|
|
directory = placement/locale
|
|
domain = placement
|
|
|
|
[update_catalog]
|
|
domain = placement
|
|
output_dir = placement/locale
|
|
input_file = placement/locale/placement.pot
|
|
|
|
[extract_messages]
|
|
keywords = _ gettext ngettext l_ lazy_gettext
|
|
mapping_file = babel.cfg
|
|
output_file = placement/locale/placement.pot
|
|
|
|
[wheel]
|
|
universal = 1
|