Merge "api-ref: perform all 4 phases of verification for action console output"

This commit is contained in:
Jenkins 2016-05-11 06:55:09 +00:00 committed by Gerrit Code Review
commit a99d74155b
2 changed files with 22 additions and 11 deletions

View File

@ -868,6 +868,13 @@ confirmResize:
in: body
required: true
type: string
console_output:
in: body
required: true
type: string
description: |
The console output as a string. Control characters will be escaped
to create a valid json string.
cores:
description: |
The number of allowed instance cores for each tenant.
@ -1378,7 +1385,8 @@ key_pairs_1:
type: integer
length:
description: |
The number of lines to fetch from the end of console log. ``-1`` indicates unlimited.
The number of lines to fetch from the end of console log. All
lines will be returned if this is not specified.
in: body
required: false
type: string

View File

@ -1,8 +1,4 @@
.. -*- rst -*-
.. needs:method_verification
.. needs:parameter_verification
.. needs:example_verification
.. needs:body_verification
Show Console Output (Os-Getconsoleoutput Action)
================================================
@ -11,12 +7,14 @@ Show Console Output (Os-Getconsoleoutput Action)
Shows console output for a server instance.
Specify the ``os-getConsoleOutput`` action in the request body.
This returns the text of the console since boot in a REST
response. The console content may be large, you can limit it with the
optional ``length`` parameter.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Error response codes: unauthorized(401), forbidden(403),
notFound(404), conflict(409), methodNotImplemented(501)
Request
-------
@ -24,11 +22,13 @@ Request
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- server_id: server_id_path
- os-getConsoleOutput: os-getConsoleOutput
- length: length
**Example Get console output: JSON request**
**Example Get console output**
This requests the last 50 lines of the server in question.
.. literalinclude:: ../../doc/api_samples/os-console-output/console-output-post-req.json
:language: javascript
@ -36,8 +36,11 @@ Request
Response
--------
.. rest_parameters:: parameters.yaml
- output: console_output
**Example Get console output: JSON response**
.. literalinclude:: ../../doc/api_samples/os-console-output/console-output-post-resp.json
:language: javascript