Merge "Fix policy doc for host_status and extended servers attribute"

This commit is contained in:
Zuul
2019-10-26 05:35:08 +00:00
committed by Gerrit Code Review
2 changed files with 28 additions and 1 deletions

View File

@@ -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:ramdisk_id`` (since microversion 2.3)
- ``OS-EXT-SRV-ATTR:root_device_name`` (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) - ``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', 'method': 'GET',
'path': '/servers/detail' 'path': '/servers/detail'
},
{
'method': 'PUT',
'path': '/servers/{server_id}'
},
{
'method': 'POST',
'path': '/servers/{server_id}/action (rebuild)'
} }
] ]
), ),

View File

@@ -92,7 +92,14 @@ rules = [
policy.DocumentedRuleDefault( policy.DocumentedRuleDefault(
SERVERS % 'show:host_status', SERVERS % 'show:host_status',
base.RULE_ADMIN_API, 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', 'method': 'GET',
@@ -101,6 +108,14 @@ rules = [
{ {
'method': 'GET', 'method': 'GET',
'path': '/servers/detail' 'path': '/servers/detail'
},
{
'method': 'PUT',
'path': '/servers/{server_id}'
},
{
'method': 'POST',
'path': '/servers/{server_id}/action (rebuild)'
} }
]), ]),
policy.DocumentedRuleDefault( policy.DocumentedRuleDefault(