diff --git a/nova/policies/extended_server_attributes.py b/nova/policies/extended_server_attributes.py index 65c45ba2de4a..40abacb99a8e 100644 --- a/nova/policies/extended_server_attributes.py +++ b/nova/policies/extended_server_attributes.py @@ -38,6 +38,10 @@ This rule will control the visibility for a set of servers attributes: - ``OS-EXT-SRV-ATTR:ramdisk_id`` (since microversion 2.3) - ``OS-EXT-SRV-ATTR:root_device_name`` (since microversion 2.3) - ``OS-EXT-SRV-ATTR:user_data`` (since microversion 2.3) + +Microvision 2.75 added the above attributes in the ``PUT /servers/{server_id}`` +and ``POST /servers/{server_id}/action (rebuild)`` API responses which are +also controlled by this policy rule, like the ``GET /servers*`` APIs. """, [ { @@ -47,6 +51,14 @@ This rule will control the visibility for a set of servers attributes: { 'method': 'GET', 'path': '/servers/detail' + }, + { + 'method': 'PUT', + 'path': '/servers/{server_id}' + }, + { + 'method': 'POST', + 'path': '/servers/{server_id}/action (rebuild)' } ] ), diff --git a/nova/policies/servers.py b/nova/policies/servers.py index e08a4e70bc90..47cf30be527c 100644 --- a/nova/policies/servers.py +++ b/nova/policies/servers.py @@ -92,7 +92,14 @@ rules = [ policy.DocumentedRuleDefault( SERVERS % 'show:host_status', base.RULE_ADMIN_API, - "Show a server with additional host status information", + """ +Show a server with additional host status information. + +Microvision 2.75 added the ``host_status`` attribute in the +``PUT /servers/{server_id}`` and ``POST /servers/{server_id}/action (rebuild)`` +API responses which are also controlled by this policy rule, like the +``GET /servers*`` APIs. +""", [ { 'method': 'GET', @@ -101,6 +108,14 @@ rules = [ { 'method': 'GET', 'path': '/servers/detail' + }, + { + 'method': 'PUT', + 'path': '/servers/{server_id}' + }, + { + 'method': 'POST', + 'path': '/servers/{server_id}/action (rebuild)' } ]), policy.DocumentedRuleDefault(