Update test API Ref
- Added more content to test the display of method labels, url strings, http status code and parameter tables. - Added 'OpenStack API Documentation' title in titlerow. This removes the duplicate title for the API references. Change-Id: Ifdbac89efc91ab023510c466cf0cf97b21a69fbe
This commit is contained in:
parent
fe3bc79f2e
commit
90fd29b079
160
api-ref/source/image.inc
Normal file
160
api-ref/source/image.inc
Normal file
@ -0,0 +1,160 @@
|
||||
.. -*- rst -*-
|
||||
|
||||
=======
|
||||
Image
|
||||
=======
|
||||
|
||||
**Introductory Concepts**
|
||||
|
||||
When you create a server, you can specify a password through the
|
||||
optional adminPass attribute. The password must meet the complexity
|
||||
requirements set by your OpenStack Compute provider. The server might
|
||||
enter an ``ERROR`` state if the complexity requirements are not met. In
|
||||
this case, a client might issue a change password action to reset the
|
||||
server password.
|
||||
|
||||
List the Images
|
||||
===============
|
||||
|
||||
.. rest_method:: GET /v3/images/{role_id}/role/{another_id}/role/{some_id}<br>/b/a/x/{image_id.x}
|
||||
|
||||
Short explanation about this GET method.
|
||||
|
||||
HTTP Status codes
|
||||
-----------------
|
||||
|
||||
.. rest_status_code:: success status.yaml
|
||||
|
||||
- 200
|
||||
- 201
|
||||
|
||||
.. rest_status_code:: error status.yaml
|
||||
|
||||
- 400
|
||||
- 500
|
||||
|
||||
Response
|
||||
--------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- host: host
|
||||
- name: name
|
||||
|
||||
Create an Image
|
||||
===============
|
||||
|
||||
.. rest_method:: POST /images
|
||||
|
||||
Explantory text about this POST method.
|
||||
|
||||
List of information:
|
||||
|
||||
- Item 1
|
||||
- Item 2
|
||||
- Item 3
|
||||
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- name: name
|
||||
|
||||
Response
|
||||
--------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- server: server.obj
|
||||
- name: name
|
||||
|
||||
**Example List Servers:**
|
||||
|
||||
.. literalinclude:: update-server-resp.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Change or Update the Images
|
||||
===========================
|
||||
|
||||
.. rest_method:: PATCH /servers
|
||||
|
||||
Explantory text about this PATCH method.
|
||||
|
||||
List of information:
|
||||
|
||||
- Item 1
|
||||
- Item 2
|
||||
- Item 3
|
||||
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- name: name
|
||||
|
||||
Response
|
||||
--------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- server: server.obj
|
||||
- name: name
|
||||
|
||||
**Example List Servers:**
|
||||
|
||||
.. literalinclude:: update-server-resp.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Change or Update the Images
|
||||
===========================
|
||||
|
||||
.. rest_method:: PUT /images
|
||||
|
||||
Explantory text about this PUT method.
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- name: name
|
||||
|
||||
Response
|
||||
--------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- server: server.obj
|
||||
- name: name
|
||||
|
||||
**Example List Servers:**
|
||||
|
||||
.. literalinclude:: update-server-resp.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Delete an Image
|
||||
===============
|
||||
|
||||
.. rest_method:: DELETE /image/{id}
|
||||
|
||||
Explain what the DELETE method does here.
|
||||
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- id: id
|
||||
|
||||
Response
|
||||
--------
|
||||
|
||||
No content in body of response.
|
@ -1,9 +1,6 @@
|
||||
:tocdepth: 2
|
||||
|
||||
==================
|
||||
Test Service API
|
||||
==================
|
||||
|
||||
.. rest_expand_all::
|
||||
|
||||
.. include:: service.inc
|
||||
.. include:: image.inc
|
||||
|
@ -1,13 +1,10 @@
|
||||
.. -*- rst -*-
|
||||
|
||||
This is a Test Service API Reference.
|
||||
=========
|
||||
Service
|
||||
=========
|
||||
|
||||
List the Servers
|
||||
================
|
||||
|
||||
Testing API for Service 1.
|
||||
|
||||
**Passwords**
|
||||
**Introductory Concepts**
|
||||
|
||||
When you create a server, you can specify a password through the
|
||||
optional adminPass attribute. The password must meet the complexity
|
||||
@ -21,35 +18,6 @@ password that it returns in the response object. This password meets the
|
||||
security requirements set by the compute provider. For security reasons,
|
||||
subsequent GET calls do not require this password.
|
||||
|
||||
**Server metadata**
|
||||
|
||||
You can specify custom server metadata at server launch time. The
|
||||
maximum size for each metadata key-value pair is 255 bytes. The compute
|
||||
provider determines the maximum number of key-value pairs for each
|
||||
server. You can query this value through the ``maxServerMeta`` absolute
|
||||
limit.
|
||||
|
||||
**Server networks**
|
||||
|
||||
You can specify one or more networks to which the server connects at
|
||||
launch time. Users can also specify a specific port on the network or
|
||||
the fixed IP address to assign to the server interface.
|
||||
|
||||
**Note**
|
||||
|
||||
You can use both IPv4 and IPv6 addresses as access addresses and you
|
||||
can assign both addresses simultaneously. You can update access
|
||||
addresses after you create a server.
|
||||
|
||||
**Server personality**
|
||||
|
||||
To customize the personality of a server instance, you can inject data
|
||||
into its file system. For example, you might insert ssh keys, set
|
||||
configuration files, or store data that you want to retrieve from inside
|
||||
the instance. This customization method provides minimal launch-time
|
||||
personalization. If you require significant customization, create a
|
||||
custom image.
|
||||
|
||||
Follow these guidelines when you inject files:
|
||||
|
||||
- The maximum size of the file path data is 255 bytes.
|
||||
@ -79,21 +47,27 @@ files. For example, on Linux, all files have root as the owner and the
|
||||
root group as the group owner, and allow only user and group read access
|
||||
(``chmod 440``).
|
||||
|
||||
**Server access addresses**
|
||||
|
||||
In a hybrid environment, the underlying implementation might not control
|
||||
the IP address of a server. Instead, the access IP address might be part
|
||||
of the dedicated hardware; for example, a router/NAT device. In this
|
||||
case, you cannot use the addresses that the implementation provides to
|
||||
access the server from outside the local LAN. Instead, the API might
|
||||
assign a separate access address at creation time to provide access to
|
||||
the server. This address might not be directly bound to a network
|
||||
interface on the server and might not necessarily appear when you query
|
||||
the server addresses. However, clients should use an access address to
|
||||
access the server directly.
|
||||
List the Servers
|
||||
================
|
||||
|
||||
.. rest_method:: GET /v3/servers/{role_id}/role/{another_id}/role/{some_id}
|
||||
|
||||
Short explanation about this GET method.
|
||||
|
||||
HTTP Status codes
|
||||
-----------------
|
||||
|
||||
.. rest_status_code:: success status.yaml
|
||||
|
||||
- 200
|
||||
- 201
|
||||
|
||||
.. rest_status_code:: error status.yaml
|
||||
|
||||
- 400
|
||||
- 500
|
||||
|
||||
Response
|
||||
--------
|
||||
|
||||
@ -106,10 +80,11 @@ Response
|
||||
Copy the Server
|
||||
===============
|
||||
|
||||
Testing display of copy API.
|
||||
|
||||
.. rest_method:: COPY /v3/servers/{role_id}
|
||||
|
||||
Short explanation about this COPY method.
|
||||
|
||||
|
||||
Response
|
||||
--------
|
||||
|
||||
@ -124,6 +99,15 @@ Change or Update the Servers
|
||||
|
||||
.. rest_method:: PUT /servers
|
||||
|
||||
Explantory text about this PUT method.
|
||||
|
||||
List of information:
|
||||
|
||||
- Item 1
|
||||
- Item 2
|
||||
- Item 3
|
||||
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
@ -148,10 +132,11 @@ Response
|
||||
Delete a Server
|
||||
===============
|
||||
|
||||
Delete some server content.
|
||||
|
||||
.. rest_method:: DELETE /servers/{id}
|
||||
|
||||
Explain what the DELETE method does here.
|
||||
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
|
17
api-ref/source/status.yaml
Normal file
17
api-ref/source/status.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
200:
|
||||
default: |
|
||||
Request was successful.
|
||||
201:
|
||||
default: |
|
||||
Resource was created and is ready to use.
|
||||
400:
|
||||
default: |
|
||||
Some content in the request was invalid
|
||||
another_400_error: |
|
||||
Sample message for 400 error response.
|
||||
401:
|
||||
default: |
|
||||
User must authenticate before making a request
|
||||
500:
|
||||
default: |
|
||||
Something went wrong inside the service.
|
@ -5,7 +5,7 @@
|
||||
<div class="btn-group docs-sidebar-releases">
|
||||
<button onclick="location.href='/'" class="btn docs-sidebar-home" data-toggle="tooltip" data-placement="top" title="Docs Home"><i class="fa fa-arrow-circle-o-left"></i></button>
|
||||
|
||||
{%- if theme_sidebar_dropdown == 'api_ref'%}
|
||||
{%- if theme_sidebar_dropdown == 'api_ref' %}
|
||||
{% include 'sidebartoc_menu_apiref.html' %}
|
||||
{%- else %}
|
||||
{% include 'sidebartoc_menu.html' %}
|
||||
|
@ -1,6 +1,10 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
{%- if theme_sidebar_dropdown == 'os_docs' %}
|
||||
<h2>{{ title }}</h2>
|
||||
{% else %}
|
||||
<h2>OpenStack API Documentation</h2>
|
||||
{%- endif %}
|
||||
</div>
|
||||
<div class="docs-actions">
|
||||
{% if prev %}
|
||||
|
Loading…
Reference in New Issue
Block a user