removing _items() as this method is called only once and also to
ensure policy checks happen in the API methods.
blueprint policy-docs
Change-Id: I43683e53d1d277f3ed6cc5a274b5b940fcfc55cb
This removes log translation markers from nova.api.metadata, now that
these are no longer being used.
Change-Id: Ie36fce60822cbff9abe19c7a72be5280330fc370
The 'discoverable' policy is not documented as it will be removed in a
future change.
blueprint policy-docs
Change-Id: I0cf3bc151601e4d679682615a35be69f5320be39
The 'discoverable' policy is not documented as it will be removed in a
future change.
blueprint policy-docs
Change-Id: Ibb46e196ef7e67bdac95e390b24e68e1c6a6ceae
The 'discoverable' policy is not documented as it will be removed in a
future change.
blueprint policy-docs
Change-Id: I58f11206de94670b2fef85b05c398c7a7b8c640a
The os-volume_attachments APIs have their own policy settings defined,
yet were also checking the policy settings defined for the os-volumes
APIs. This should never have been the case, but especially not now
that the os-volumes APIs are deprecated and don't even work anymore
with newer microversions. This change removes the os-volumes policy
checks for os-volume_attachment API requests. The code will continue
to make os-volumes policy checks for os-volumes APIs, and
os-volume_attachment policy checks for os-volume_attachment APIs.
Removed the _items method, which was only being called from one place,
to resolve comments that policy checks should always happen immediately
upon entering the API methods.
Change-Id: I35aaedf5c4c49cb568fa06c2974f9a35aa2ffcc5
Closes-Bug: #1635358
UpgradeImpact
We need operators to understand what the policy rules mean without
looking at the code. To fix this we improve the description set in the
oslo.policy RuleDefault.
This patch introduces a helper method create_rule_default to ensure we
create consistent descriptions for all the policy rules. This helper
method would be changed to use DocumentedRuleDefault once new version
of oslo.policy is released.
Also, this patch adds description to policies in
nova/policies/server_tags.py
blueprint policy-docs
Change-Id: Ibf403bb5c05f3cef93f5a7cbb9eab95381a733a8
This patch adds a new method for deleting all inventories for a
resource provider: DELETE /resource-providers/{uuid}/inventories
Return codes:
204 NoContent on success
404 NotFound if the resource provider does not exist
405 MethodNotAllowed if a microversion is specified that is before
this change (1.5)
409 Conflict if inventory in use or if some other request concurrently
updates this resource provider
Change-Id: I1ecb12c888f873e8330367c8411d5a2ef0458495
Implements: bp delete-inventories-placement-api
As is comparison will fail when Placement API version 1.10 is
released, e.g. in the case: float('1.10') < float('1.4').
Use the helper provided by pkg_resources instead. The returned
values can be compared and sorted and have a string representation.
http://setuptools.readthedocs.io/en/latest/pkg_resources.html#parsing-utilities
Change-Id: Iaaca8f458671bd518b4c10c776f78b9c1ed803dd
The current descriptions for hostId, host, and hypervisor_hostname are
vague, so this adds more detail to make them more understandable.
Closes-Bug: #1673593
Change-Id: Id3ea9bbfe59a47b24e3584cf16b5a556007e58ea
Previously if detach was called with destroy_bdm=True the BDM would
always be destroyed first before any detach call was made to cinder.
This could result in the destruction of a BDM while the volume remained
marked as attached in Cinder.
This has now changed so the BDM is only destroyed after a successful
detach call has been made to cinder. In the event of a failure during
this detach call to Cinder an operator can now make another attempt to
detach the volume via Nova as the BDM is no longer destroyed.
The associated volume.detach notification is also now only sent after a
successful detach call to Cinder and before the BDM is destroyed.
Change-Id: I2581ff9f9c0e7cfc14a25acf45eb1860df69eacf
Those are remnants from the oslo-incubator times. Also, oslo.messaging
deprecated [1] transport aliases since 5.2.0+ that is the minimal
version supported for stable/newton. The patch that bumped the minimal
version for Nova landed 3 months+ ago, so we can proceed ripping
those aliases from the code base.
[1] I314cefa5fb1803fa7e21e3e34300e5ced31bba89
Change-Id: Id8c0bc6733e930803b8e9fcf42a9a1f81dcbb356
Closes-Bug: #1424728
The wrap_exception decorator optionally emited a notification.
Based on the code comments the original intention was not to include the
context to that notification due to security reasons. However the
implementation did included the context to the payload of the legacy
notification.
Recently we saw circural reference errors during the payload serialization
of this notification. Based on the logs the only complex data structure
that could cause circural reference is the context. So this patch
removes the context from the legacy exception notification.
The versioned exception notification is not affected as it does not
contain the args of the decorated function.
Closes-Bug: #1673375
Change-Id: I1d217620e52d45595a3e0e49ed57b4ab33cd1688