diff --git a/api-ref/source/image.inc b/api-ref/source/image.inc new file mode 100644 index 00000000..90cc8617 --- /dev/null +++ b/api-ref/source/image.inc @@ -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}
/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. diff --git a/api-ref/source/index.rst b/api-ref/source/index.rst index 859cfc31..164ef754 100644 --- a/api-ref/source/index.rst +++ b/api-ref/source/index.rst @@ -1,9 +1,6 @@ :tocdepth: 2 -================== - Test Service API -================== - .. rest_expand_all:: .. include:: service.inc +.. include:: image.inc diff --git a/api-ref/source/service.inc b/api-ref/source/service.inc index 2e06806c..d6174b14 100644 --- a/api-ref/source/service.inc +++ b/api-ref/source/service.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 ------- diff --git a/api-ref/source/status.yaml b/api-ref/source/status.yaml new file mode 100644 index 00000000..a372af41 --- /dev/null +++ b/api-ref/source/status.yaml @@ -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. diff --git a/openstackdocstheme/theme/openstackdocs/sidebartoc.html b/openstackdocstheme/theme/openstackdocs/sidebartoc.html index 15db11d0..c88e3175 100644 --- a/openstackdocstheme/theme/openstackdocs/sidebartoc.html +++ b/openstackdocstheme/theme/openstackdocs/sidebartoc.html @@ -5,7 +5,7 @@
-{%- if theme_sidebar_dropdown == 'api_ref'%} +{%- if theme_sidebar_dropdown == 'api_ref' %} {% include 'sidebartoc_menu_apiref.html' %} {%- else %} {% include 'sidebartoc_menu.html' %} diff --git a/openstackdocstheme/theme/openstackdocs/titlerow.html b/openstackdocstheme/theme/openstackdocs/titlerow.html index 87b7712a..3ed85847 100644 --- a/openstackdocstheme/theme/openstackdocs/titlerow.html +++ b/openstackdocstheme/theme/openstackdocs/titlerow.html @@ -1,6 +1,10 @@
-

{{ title }}

+ {%- if theme_sidebar_dropdown == 'os_docs' %} +

{{ title }}

+ {% else %} +

OpenStack API Documentation

+ {%- endif %}
{% if prev %}