Rename files to remove 'placement'

When part of Nova, many files were named in such a way as to indicate
that they were separate from the nova files that did the same thing. Now
that that distinction is no longer needed, we can rename them to sound
more natural.

Additionally, references to these file names in other parts of the code
have been updated.

Change-Id: Id4439b4af827b64bbac213085ac74d1283c96db0
This commit is contained in:
EdLeafe 2018-09-06 18:44:17 +00:00
parent 9b584fcd1d
commit 5794b857b4
13 changed files with 16 additions and 16 deletions

View File

@ -58,7 +58,7 @@ bug_project = 'nova'
bug_tag = 'docs'
policy_generator_config_file = [
('../../etc/placement/placement-policy-generator.conf',
('../../etc/placement/policy-generator.conf',
'_static/placement')
]

View File

@ -25,10 +25,10 @@ Policy
Placement, like most OpenStack projects, uses a policy language to restrict
permissions on REST API actions.
* :doc:`Policy Reference <placement-policy>`: A complete
* :doc:`Policy Reference <policy>`: A complete
reference of all policy points in placement and what they impact.
* :doc:`Sample Policy File <sample-placement-policy>`: A sample
* :doc:`Sample Policy File <sample-policy>`: A sample
placement policy file with inline documentation.
@ -38,8 +38,8 @@ permissions on REST API actions.
.. toctree::
:hidden:
placement-policy
sample-placement-policy
policy
sample-policy
.. TODO(efried):: get these working
config

View File

@ -4,7 +4,7 @@ Placement Policies
The following is an overview of all available policies in Placement.
For a sample configuration file, refer to
:doc:`/configuration/sample-placement-policy`.
:doc:`/configuration/sample-policy`.
.. show-policy::
:config-file: etc/placement/placement-policy-generator.conf
:config-file: etc/placement/policy-generator.conf

View File

@ -318,21 +318,21 @@ number of tests it makes sense to have more YAML files with fewer tests,
divided up by the arc of API interaction that they test.
The gabbi tests are integrated into the functional tox target, loaded via
``nova/tests/functional/api/openstack/placement/test_placement_api.py``. If you
``nova/tests/functional/api/openstack/placement/test_api.py``. If you
want to run just the gabbi tests one way to do so is::
tox -efunctional test_placement_api
tox -efunctional test_api
If you want to run just one yaml file (in this example ``inventory.yaml``)::
tox -efunctional placement_api.inventory
tox -efunctional api.inventory
It is also possible to run just one test from within one file. When you do this
every test prior to the one you asked for will also be run. This is because
the YAML represents a sequence of dependent requests. Select the test by using
the name in the yaml file, replacing space with ``_``::
tox -efunctional placement_api.inventory_post_new_ipv4_address_inventory
tox -efunctional api.inventory_post_new_ipv4_address_inventory
.. note:: ``tox.ini`` in the nova repository is configured by a ``group_regex``
so that each gabbi YAML is considered a group. Thus, all tests in the

View File

@ -21,4 +21,4 @@ from the top level of the nova directory:
For a pre-generated example of the latest placement policy.yaml, see:
https://docs.openstack.org/nova/latest/configuration/sample-placement-policy.html
https://docs.openstack.org/nova/latest/configuration/sample-policy.html

View File

@ -42,8 +42,8 @@ is determined.
cfg.StrOpt(
'policy_file',
# This default matches what is in
# etc/nova/placement-policy-generator.conf
default='placement-policy.yaml',
# etc/nova/policy-generator.conf
default='policy.yaml',
help='The file that defines placement policies. This can be an '
'absolute path or relative to the configuration file.'),
cfg.StrOpt(

View File

@ -80,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=./placement/tests/functional --group_regex=placement\.tests\.functional\.test_placement_api(?:\.|_)([^_]+) run {posargs}
stestr --test-path=./placement/tests/functional --group_regex=placement\.tests\.functional\.test_api(?:\.|_)([^_]+) run {posargs}
stestr slowest
# TODO(gcb) Merge this into [testenv:functional] when functional tests are gating
@ -108,7 +108,7 @@ commands =
[testenv:genpolicy]
envdir = {toxworkdir}/shared
commands =
oslopolicy-sample-generator --config-file=etc/placement/placement-policy-generator.conf
oslopolicy-sample-generator --config-file=etc/placement/policy-generator.conf
[testenv:cover]
# TODO(stephenfin): Remove the PYTHON hack below in favour of a [coverage]