55 lines
2.0 KiB
INI
Raw Normal View History

[metadata]
name = openstack-placement
summary = Resource provider inventory usage and allocation service
description_file =
README.rst
author = OpenStack
author_email = openstack-discuss@lists.openstack.org
url = https://docs.openstack.org/placement/latest/
project_urls =
Bug Tracker = https://bugs.launchpad.net/placement
Documentation = https://docs.openstack.org/placement/latest/
API Reference = https://docs.openstack.org/api-ref/placement/
Source Code = https://opendev.org/openstack/placement
Release Notes = https://docs.openstack.org/releasenotes/placement/
python_requires = >=3.9
classifier =
Development Status :: 5 - Production/Stable
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 :: Implementation :: CPython
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
[files]
packages =
placement
Package db migration scripts in placement pypi dist Having the db migration scripts within the openstack-placement pypi distribution is desirable for deployment tools, such as openstack-ansible. It provides a known good location for the script, available with a pip install. There are several ways to distribute files with a python package. The method used here was chosen because it works both with tarballs and wheels (the files are already in the tarball, as a result of the way pbr works, but not in the wheel). Here's what's done: * The db migrate scripts are put in their own direcory, placement_db_tools, so that only they are packaged, not the other tools. * To preserve how grenade interacts with these files as well as not disrupt the docs, symlinks from tools to placement_db_tools have been created. * placement_db_tools is added to the list of packages included in the openstack-placement distro. This means that when 'pip install openstack-placement' happens, the python environment will then include placement and placement_db_tools directories. The end result is that the true path to the script can be found with: pkg_resources.resource_filename('placement_db_tools', 'mysql-migrate-db.sh') This has been noted in the to-stein.rst document. A different package was chosen to not muddy the waters of what is "actually placement". Similarly, the 'data_files' functionality provided by pbr was not used, because that requires the file be written to a location on the local filesystem, relative to the install prefix. Dirtying the filesystem outside the python lib with this sort of thing is inappropriate. Change-Id: Ie326ce8a2a0692d20793bc18be606e034fa94a44 Story: 2005535 Task: 30671
2019-05-01 16:05:23 -06:00
placement_db_tools
[entry_points]
oslo.config.opts =
placement.conf = placement.conf.opts:list_opts
oslo.config.opts.defaults =
nova.conf = placement.conf.base:set_lib_defaults
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 =
Add a placement-manage CLI 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
2018-09-05 18:28:10 +01:00
placement-manage = placement.cmd.manage:main
placement-status = placement.cmd.status:main
wsgi_scripts =
placement-api = placement.wsgi:init_application