diff --git a/.stestr.conf b/.stestr.conf index f89d3980d..85e4e1278 100644 --- a/.stestr.conf +++ b/.stestr.conf @@ -1,3 +1,3 @@ [DEFAULT] -test_path=./nova/tests/unit +test_path=./placement/tests/unit top_dir=./ diff --git a/setup.cfg b/setup.cfg index 39bfe2feb..a8f809e8b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,11 +1,11 @@ [metadata] -name = nova -summary = Cloud computing fabric controller +name = 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/nova/latest/ +home-page = https://docs.openstack.org/placement/latest/ classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -23,23 +23,14 @@ setup-hooks = pbr.hooks.setup_hook [files] -data_files = - etc/nova = - etc/nova/api-paste.ini - etc/nova/rootwrap.conf - etc/nova/rootwrap.d = etc/nova/rootwrap.d/* packages = - nova + placement [entry_points] oslo.config.opts = - nova.conf = nova.conf.opts:list_opts - -oslo.config.opts.defaults = - nova.conf = nova.common.config:set_middleware_defaults + placement.conf = placement.conf.opts:list_opts oslo.policy.enforcer = - nova = nova.policy:get_enforcer placement = placement.policy:get_enforcer oslo.policy.policies = @@ -47,46 +38,15 @@ oslo.policy.policies = # 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. - nova = nova.policies:list_rules placement = placement.policies:list_rules -nova.compute.monitors.cpu = - virt_driver = nova.compute.monitors.cpu.virt_driver:Monitor - console_scripts = - nova-api = nova.cmd.api:main - nova-api-metadata = nova.cmd.api_metadata:main - nova-api-os-compute = nova.cmd.api_os_compute:main - nova-cells = nova.cmd.cells:main - nova-compute = nova.cmd.compute:main - nova-conductor = nova.cmd.conductor:main - nova-console = nova.cmd.console:main - nova-consoleauth = nova.cmd.consoleauth:main - nova-dhcpbridge = nova.cmd.dhcpbridge:main - nova-manage = nova.cmd.manage:main - nova-network = nova.cmd.network:main - nova-novncproxy = nova.cmd.novncproxy:main - nova-policy = nova.cmd.policy:main - nova-rootwrap = oslo_rootwrap.cmd:main - nova-rootwrap-daemon = oslo_rootwrap.cmd:daemon - nova-scheduler = nova.cmd.scheduler:main - nova-serialproxy = nova.cmd.serialproxy:main - nova-spicehtml5proxy = nova.cmd.spicehtml5proxy:main - nova-status = nova.cmd.status:main - nova-xvpvncproxy = nova.cmd.xvpvncproxy:main + # TODO(cdent): We will need some kind of placement-manage and + # placement-status, eventually + # nova-manage = nova.cmd.manage:main + # nova-status = nova.cmd.status:main wsgi_scripts = - nova-placement-api = placement.wsgi:init_application - nova-api-wsgi = compute.wsgi:init_application - nova-metadata-wsgi = nova.api.metadata.wsgi:init_application - -nova.ipv6_backend = - rfc2462 = nova.ipv6.rfc2462 - account_identifier = nova.ipv6.account_identifier - -nova.scheduler.driver = - filter_scheduler = nova.scheduler.filter_scheduler:FilterScheduler - caching_scheduler = nova.scheduler.caching_scheduler:CachingScheduler - fake_scheduler = nova.tests.unit.scheduler.fakes:FakeScheduler + placement-api = placement.wsgi:init_application [egg_info] tag_build = @@ -94,22 +54,20 @@ tag_date = 0 tag_svn_revision = 0 [compile_catalog] -directory = nova/locale -domain = nova +# TODO(cdent): Create translation infrastructure. +# See: https://docs.openstack.org/oslo.i18n/latest/user/usage.html +directory = placement/locale +domain = placement [update_catalog] -domain = nova -output_dir = nova/locale -input_file = nova/locale/nova.pot +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 = nova/locale/nova.pot +output_file = placement/locale/placement.pot [wheel] universal = 1 - -[extras] -osprofiler = - osprofiler>=1.4.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 720af3fed..5af5eaa4f 100644 --- a/tox.ini +++ b/tox.ini @@ -35,7 +35,6 @@ basepython = python2.7 commands = {[testenv]commands} stestr run {posargs} - env TEST_OSPROFILER=1 stestr run --combine --no-discover 'nova.tests.unit.test_profiler' stestr slowest [testenv:py35] @@ -44,7 +43,6 @@ basepython = python3.5 commands = {[testenv]commands} stestr run {posargs} - env TEST_OSPROFILER=1 stestr run --combine --no-discover 'nova.tests.unit.test_profiler' [testenv:py36] # TODO(efried): Remove this once https://github.com/tox-dev/tox/issues/425 is fixed. @@ -58,10 +56,6 @@ description = envdir = {toxworkdir}/shared commands = bash tools/flake8wrap.sh {posargs} - # Check that all JSON files don't have \r\n in line. - bash -c "! find doc/ -type f -name *.json | xargs grep -U -n $'\r'" - # Check that all included JSON files are valid JSON - bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python' [testenv:fast8] description = @@ -86,7 +80,7 @@ commands = # special way. See the following for more details. # http://stestr.readthedocs.io/en/latest/MANUAL.html#grouping-tests # https://gabbi.readthedocs.io/en/latest/#purpose - stestr --test-path=./nova/tests/functional --group_regex=nova\.tests\.functional\.api\.openstack\.placement\.test_placement_api(?:\.|_)([^_]+) run {posargs} + stestr --test-path=./placement/tests/functional --group_regex=placement\.tests\.functional\.test_placement_api(?:\.|_)([^_]+) run {posargs} stestr slowest # TODO(gcb) Merge this into [testenv:functional] when functional tests are gating @@ -105,31 +99,16 @@ setenv = {[testenv]setenv} commands = {[testenv:functional]commands} -[testenv:api-samples] -envdir = {toxworkdir}/shared -setenv = - {[testenv]setenv} - GENERATE_SAMPLES=True - PYTHONHASHSEED=0 -commands = - {[testenv]commands} - stestr --test-path=./nova/tests/functional/api_sample_tests run {posargs} - stestr slowest - +# TODO(cdent): Config generator not yet present. [testenv:genconfig] envdir = {toxworkdir}/shared commands = - oslo-config-generator --config-file=etc/nova/nova-config-generator.conf + oslo-config-generator --config-file=etc/placement/placement-config-generator.conf [testenv:genpolicy] envdir = {toxworkdir}/shared commands = - oslopolicy-sample-generator --config-file=etc/nova/nova-policy-generator.conf - -[testenv:genplacementpolicy] -envdir = {toxworkdir}/shared -commands = - oslopolicy-sample-generator --config-file=etc/nova/placement-policy-generator.conf + oslopolicy-sample-generator --config-file=etc/placement/placement-policy-generator.conf [testenv:cover] # TODO(stephenfin): Remove the PYTHON hack below in favour of a [coverage] @@ -139,7 +118,7 @@ commands = envdir = {toxworkdir}/shared setenv = {[testenv]setenv} - PYTHON=coverage run --source nova --parallel-mode + PYTHON=coverage run --source placement --parallel-mode commands = {[testenv]commands} coverage erase @@ -169,25 +148,10 @@ description = deps = -r{toxinidir}/doc/requirements.txt commands = rm -rf doc/build - # Check that all JSON files don't have \r\n in line. - bash -c "! find doc/ -type f -name *.json | xargs grep -U -n $'\r'" - # Check that all included JSON files are valid JSON - bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python' sphinx-build -W -b html doc/source doc/build/html # Test the redirects. This must run after the main docs build whereto doc/build/html/.htaccess doc/test/redirect-tests.txt - {[testenv:api-guide]commands} {[testenv:api-ref]commands} - {[testenv:placement-api-ref]commands} - -[testenv:api-guide] -description = - Generate the API guide. Called from CI scripts to test and publish to developer.openstack.org. -envdir = {toxworkdir}/docs -deps = {[testenv:docs]deps} -commands = - rm -rf api-guide/build - sphinx-build -W -b html -d api-guide/build/doctrees api-guide/source api-guide/build/html [testenv:api-ref] description = @@ -198,15 +162,6 @@ commands = rm -rf api-ref/build sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html -[testenv:placement-api-ref] -description = - Generate the Placement API ref. Called from CI scripts to test and publish to developer.openstack.org. -envdir = {toxworkdir}/docs -deps = {[testenv:docs]deps} -commands = - rm -rf placement-api-ref/build - sphinx-build -W -b html -d placement-api-ref/build/doctrees placement-api-ref/source placement-api-ref/build/html - [testenv:releasenotes] description = Generate release notes. @@ -220,7 +175,7 @@ commands = # NOTE(browne): This is required for the integration test job of the bandit # project. Please do not remove. envdir = {toxworkdir}/shared -commands = bandit -r nova -x tests -n 5 -ll +commands = bandit -r placement -x tests -n 5 -ll [flake8] # E125 is deliberately excluded. See @@ -238,7 +193,7 @@ commands = bandit -r nova -x tests -n 5 -ll # E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301 enable-extensions = H106,H203,H904 ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405 -exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,tools/xenserver*,releasenotes +exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,releasenotes # To get a list of functions that are more complex than 25, set max-complexity # to 25 and run 'tox -epep8'. # 34 is currently the most complex thing we have @@ -246,8 +201,7 @@ exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,tools/xenserver*,release max-complexity=35 [hacking] -local-check-factory = nova.hacking.checks.factory -import_exceptions = nova.i18n +import_exceptions = placement.i18n [testenv:bindep] # Do not install any requirements. We want this to be fast and work even if