Commit Graph

6 Commits

Author SHA1 Message Date
Chris Dent 70a2879b2c Delete the placement code
This finalizes the removal of the placement code from nova.
This change primarily removes code and makes fixes to cmd,
test and migration tooling to adapt to the removal.

Placement tests and documention were already removed in
early patches.

A database migration that calls
consumer_obj.create_incomplete_consumers in nova-manage has been
removed.

A functional test which confirms the default incomplete
consumer user and project id has been changes so its its use of
conf.placement.incomplete_* (now removed) is replaced with a
constant. The placement server, running in the functional
test, provides its own config.

placement-related configuration is updated to only register those
opts which are relevant on the nova side. This mostly means
ksa-related opts. placement-database configuration is removed
from nova/conf/database.

tox.ini is updated to remove the group_regex required by the
placement gabbi tests. This should probably have gone when the
placement functional tests went, but was overlooked.

A release note is added which describes that this is cleanup,
the main action already happened, but points people to the
nova to placement upgrade instructions in case they haven't
done it yet.

Change-Id: I4181f39dea7eb10b84e6f5057938767b3e422aff
2019-04-28 20:06:15 +00:00
Chris Dent 27617ee193 Switch to using os-resource-classes
With the extraction of placement we ended up with resource class names
being duplicated between nova and placement. To address that, the
os-resource-classes library [1] was created to provide a single
authority for standard resource classes and the format of custom
classes.

This patch changes nova to use it, removing the use of the rc_fields
module which used to have the information. A method left in it
(normalize_name) has been moved to utils.py, renamed as
normalize_rc_name, and callers and tests updated accordingly.

Because the placement code is being kept in nova for the time being,
that code's use of rc_fields is maintained, and the module too.
A note is added in the module explain that. Backporting the changes
from extracted-placement to placement-in-nova was considered but
because we no longer have placement tests in nova, that didn't seem
like the right thing to do.

requirements and lower-constraints have been updated.
os-resource-classes is already in global requirements.

For reference the related placement change is at [2].

[1] https://docs.openstack.org/os-resource-classes
[2] https://review.openstack.org/#/c/623556/

Change-Id: I8e579920c0eaca81b563a87429c930b21b3d4dc5
2019-02-07 11:11:09 +00:00
Balazs Gibizer b93b40c6c0 Add bandwidth related standard resource classes
Introduce NET_BW_EGR_KILOBIT_PER_SEC and
NET_BW_IGR_KILOBIT_PER_SEC resource classes.

blueprint bandwidth-resource-provider

Change-Id: I996bf705b14b564106426a2e57299638fb178750
2018-11-05 17:47:13 -05:00
Eric Fried 8de155f817 Nix unused raise_if_custom_resource_class_pre_v1_1
The only reference to
nova.db.sqlalchemy.resource_class_cache.raise_if_custom_resource_class_pre_v1_1
was removed in Ideca0f09f5dc4ba6bb194a2413ed93cf592dd963.  This was also the
only place nova.rc_fields.ResourceClass.V1_0 was used.  This patch removes
both.

Change-Id: I17081666db55e2cca21852bb5f520accb2c807a2
2018-06-18 19:52:45 +00:00
Eric Fried 7fd2de85b6 Make ResourceClass.normalize_name handle sharp S
Fixes ResourceClass.normalize_name to produce the same result in py2 and
py3 even when sharp S ('ß') is part of the input.

We do this by waiting until after replacing non-alphanumerics to upcase.

Change-Id: I431fa29d36d0d633374973fc25168344042d6c1a
Closes-Bug: #1762789
2018-04-10 12:24:40 -05:00
Chris Dent f346913594 Move resource class fields
Move the ResourceClass field to its own package, and move that package
to the top of the nova hierarchy since it is used by both nova tooling
and placement tooling but we don't want the placement version to have to
incorporate the nova code. Eventually we'd like to see an
os-resource-classes library, similar to os-traits, which will serve this
functionality. This is a step in that direction.

Changes in this patch are quite widespread, but are mostly only changes
of imports.

Change-Id: Iea182341f9419cb514a044f76864d6bec60a3683
2018-03-13 09:01:30 +00:00