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

@ -868,6 +868,13 @@ confirmResize:
in: body in: body
required: true required: true
type: string 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: cores:
description: | description: |
The number of allowed instance cores for each tenant. The number of allowed instance cores for each tenant.
@ -1378,7 +1385,8 @@ key_pairs_1:
type: integer type: integer
length: length:
description: | 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 in: body
required: false required: false
type: string type: string

@ -1,8 +1,4 @@
.. -*- rst -*- .. -*- rst -*-
.. needs:method_verification
.. needs:parameter_verification
.. needs:example_verification
.. needs:body_verification
Show Console Output (Os-Getconsoleoutput Action) Show Console Output (Os-Getconsoleoutput Action)
================================================ ================================================
@ -11,12 +7,14 @@ Show Console Output (Os-Getconsoleoutput Action)
Shows console output for a server instance. 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 Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400), Error response codes: unauthorized(401), forbidden(403),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404) notFound(404), conflict(409), methodNotImplemented(501)
Request Request
------- -------
@ -24,11 +22,13 @@ Request
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- tenant_id: tenant_id - tenant_id: tenant_id
- server_id: server_id - server_id: server_id_path
- os-getConsoleOutput: os-getConsoleOutput - os-getConsoleOutput: os-getConsoleOutput
- length: length - 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 .. literalinclude:: ../../doc/api_samples/os-console-output/console-output-post-req.json
:language: javascript :language: javascript
@ -36,8 +36,11 @@ Request
Response Response
-------- --------
.. rest_parameters:: parameters.yaml
- output: console_output
**Example Get console output: JSON response** **Example Get console output: JSON response**
.. literalinclude:: ../../doc/api_samples/os-console-output/console-output-post-resp.json .. literalinclude:: ../../doc/api_samples/os-console-output/console-output-post-resp.json
:language: javascript :language: javascript