diff --git a/api-quick-start/pom.xml b/api-quick-start/pom.xml deleted file mode 100644 index 0fda59330..000000000 --- a/api-quick-start/pom.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - org.openstack.docs - parent-pom - 1.0.0-SNAPSHOT - ../pom.xml - - 4.0.0 - openstack-api-quick-start - jar - OpenStack API Quick Start - - - local - 1 - - - - - - - src - - - locale - - - - - - com.rackspace.cloud.api - clouddocs-maven-plugin - - - - goal2 - - generate-webhelp - - generate-sources - - - 1 - os-apiquickstart - 1 - UA-17511903-1 - - false - 0 - 0 - 0 - 0 - - - <html xmlns="http://www.w3.org/1999/xhtml"> - <body> <div id="content"> <p>foo bar - baz</p> </div> </body> </html> - - - - - - - - - - true - src/docbkx - api-quick-start-onepager.xml - - reviewer - openstack - - - - - \ No newline at end of file diff --git a/api-quick-start/setup.cfg b/api-quick-start/setup.cfg new file mode 100644 index 000000000..247ca8500 --- /dev/null +++ b/api-quick-start/setup.cfg @@ -0,0 +1,23 @@ +[metadata] +name = OpenStack API Quick Start +summary = OpenStack API Quick Start +description-file = + README.rst +author = OpenStack Documentation +author-email = openstack-docs@lists.openstack.org +home-page = http://docs.openstack.org/ +classifier = + Intended Audience :: Developers + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + +[build_sphinx] +all_files = 1 +build-dir = build +source-dir = source + +[pbr] +warnerrors = True + +[wheel] +universal = 1 diff --git a/api-quick-start/setup.py b/api-quick-start/setup.py new file mode 100755 index 000000000..ed58d0f26 --- /dev/null +++ b/api-quick-start/setup.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python +import setuptools + +setuptools.setup( + setup_requires=['pbr'], + pbr=True) diff --git a/api-quick-start/source/api-quick-start.rst b/api-quick-start/source/api-quick-start.rst new file mode 100644 index 000000000..8b4a7ac59 --- /dev/null +++ b/api-quick-start/source/api-quick-start.rst @@ -0,0 +1,689 @@ +============== +OpenStack APIs +============== + +To authenticate access to OpenStack services, you must first issue an +authentication request to OpenStack Identity to acquire an +authentication token. To request an authentication token, you must +supply a payload of credentials in the authentication request. + +Credentials are usually a combination of your user name and password, +and optionally, the name or ID of the tenant in which your cloud runs. +Ask your cloud administrator for your user name, password, and tenant so +that you can generate authentication tokens. Alternatively, you can +supply a token rather than a user name and password. + +When you send API requests, you include the token in the +``X-Auth-Token`` header. If you access multiple OpenStack services, you +must get a token for each service. A token is valid for a limited time +before it expires. A token can also become invalid for other reasons. +For example, if the roles for a user change, existing tokens for that +user are invalid. + +Authentication and API request workflow +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. Request an authentication token from the Identity endpoint that your + cloud administrator gave you. Send a payload of credentials in the + request as shown in :ref:`authenticate`. If the request succeeds, the server + returns an authentication token. + +#. Send API requests and include the token in the ``X-Auth-Token`` + header. Continue to send API requests with that token until the service + completes the request or a 401 Unauthorized error occurs. + +#. If the 401 Unauthorized error occurs, request another token. + +The examples in this section use cURL commands. For information about +cURL, see http://curl.haxx.se/. For information about the OpenStack +APIs, see `OpenStack API +Reference `__. + + +.. _authenticate: + +Authenticate +~~~~~~~~~~~~ + +The payload of credentials to authenticate contains these parameters: + ++-----------------------+----------------+--------------------------------------+ +| Parameter | Type | Description | ++=======================+================+======================================+ +| username (required) | xsd:string | The user name. If you do not provide | +| | | a user name and password, you must | +| | | provide a token. | ++-----------------------+----------------+--------------------------------------+ +| password (required) | xsd:string | The password for the user. | ++-----------------------+----------------+--------------------------------------+ +| *tenantName* | xsd:string | The tenant name. Both the | +| (Optional) | | *tenantId* and *tenantName* | +| | | are optional, but should not be | +| | | specified together. If both | +| | | attributes are specified, the server | +| | | responds with a 400 Bad Request. | ++-----------------------+----------------+--------------------------------------+ +| *tenantId* | xsd:string | The tenant ID. Both the | +| (Optional) | | *tenantId* and *tenantName* | +| | | are optional, but should not be | +| | | specified together. If both | +| | | attributes are specified, the server | +| | | responds with a 400 Bad Request. If | +| | | you do not know the tenantId, you | +| | | can send a request with "" for the | +| | | tenantId and get the ID returned to | +| | | you in the response. | ++-----------------------+----------------+--------------------------------------+ +| token (Optional) | xsd:string | A token. If you do not provide a | +| | | token, you must provide a user name | +| | | and password. | ++-----------------------+----------------+--------------------------------------+ + + +For a typical OpenStack deployment that runs Identity, use the following cURL +command to request a token with your tenantName and ID: + +.. code:: + + $ curl -s -X POST http://8.21.28.222:5000/v2.0/tokens \ + -H "Content-Type: application/json" \ + -d '{"auth": {"tenantName": "'"$OS_TENANT_NAME"'", "passwordCredentials": + {"username": "'"$OS_USERNAME"'", "password": "'"$OS_PASSWORD"'"}}}' \ + | python -m json.tool + +If the request succeeds, you receive a 200 OK response followed by a +response body that contains a token in the form ``"id":"token"`` and an +expiration date and time in the form ``"expires":"datetime"``. + +.. note:: + If you do not know your tenant name or ID, you can send an + authentication request with an empty tenantName, as follows: + + .. code:: + + $ curl -s -X POST http://8.21.28.222:5000/v2.0/tokens \ + -H "Content-Type: application/json" \ + -d '{"auth": {"tenantName": "", "passwordCredentials": + {"username": "'"$OS_USERNAME"'", "password": "'"$OS_PASSWORD"'"}}}' \ + | python -m json.tool + +The following example shows a successful response: + +.. code:: + + { + "access": { + "metadata": { + "is_admin": 0, + "roles": [ + "9fe2ff9ee4384b1894a90878d3e92bab" + ] + }, + "serviceCatalog": [ + { + "endpoints": [ + { + "adminURL": "http://10.100.0.222:8774/v2/TENANT_ID", + "id": "0eb78b6d3f644438aea327d9c57b7b5a", + "internalURL": "http://10.100.0.222:8774/v2/TENANT_ID", + "publicURL": "http://8.21.28.222:8774/v2/TENANT_ID", + "region": "RegionOne" + } + ], + "endpoints_links": [], + "name": "nova", + "type": "compute" + }, + { + "endpoints": [ + { + "adminURL": "http://10.100.0.222:9696/", + "id": "3f4b6015a2f9481481ca03dace8acf32", + "internalURL": "http://10.100.0.222:9696/", + "publicURL": "http://8.21.28.222:9696/", + "region": "RegionOne" + } + ], + "endpoints_links": [], + "name": "neutron", + "type": "network" + }, + { + "endpoints": [ + { + "adminURL": "http://10.100.0.222:8776/v2/TENANT_ID", + "id": "16f6416588f64946bdcdf4a431a8f252", + "internalURL": "http://10.100.0.222:8776/v2/TENANT_ID", + "publicURL": "http://8.21.28.222:8776/v2/TENANT_ID", + "region": "RegionOne" + } + ], + "endpoints_links": [], + "name": "cinder_v2", + "type": "volumev2" + }, + { + "endpoints": [ + { + "adminURL": "http://10.100.0.222:8779/v1.0/TENANT_ID", + "id": "be48765ae31e425cb06036b1ebab694a", + "internalURL": "http://10.100.0.222:8779/v1.0/TENANT_ID", + "publicURL": "http://8.21.28.222:8779/v1.0/TENANT_ID", + "region": "RegionOne" + } + ], + "endpoints_links": [], + "name": "trove", + "type": "database" + }, + { + "endpoints": [ + { + "adminURL": "http://10.100.0.222:9292", + "id": "1adfcb5414304f3596fb81edb2dfb514", + "internalURL": "http://10.100.0.222:9292", + "publicURL": "http://8.21.28.222:9292", + "region": "RegionOne" + } + ], + "endpoints_links": [], + "name": "glance", + "type": "image" + }, + { + "endpoints": [ + { + "adminURL": "http://10.100.0.222:8777", + "id": "350f3b91d73f4b3ab8a061c94ac31fbb", + "internalURL": "http://10.100.0.222:8777", + "publicURL": "http://8.21.28.222:8777", + "region": "RegionOne" + } + ], + "endpoints_links": [], + "name": "ceilometer", + "type": "metering" + }, + { + "endpoints": [ + { + "adminURL": "http://10.100.0.222:8000/v1/", + "id": "2198b0d32a604e75a5cc1e13276a813d", + "internalURL": "http://10.100.0.222:8000/v1/", + "publicURL": "http://8.21.28.222:8000/v1/", + "region": "RegionOne" + } + ], + "endpoints_links": [], + "name": "heat-cfn", + "type": "cloudformation" + }, + { + "endpoints": [ + { + "adminURL": "http://10.100.0.222:8776/v1/TENANT_ID", + "id": "7c193c4683d849ca8e8db493722a4d8c", + "internalURL": "http://10.100.0.222:8776/v1/TENANT_ID", + "publicURL": "http://8.21.28.222:8776/v1/TENANT_ID", + "region": "RegionOne" + } + ], + "endpoints_links": [], + "name": "cinder", + "type": "volume" + }, + { + "endpoints": [ + { + "adminURL": "http://10.100.0.222:8773/services/Admin", + "id": "11fac8254be74d7d906110f0069e5748", + "internalURL": "http://10.100.0.222:8773/services/Cloud", + "publicURL": "http://8.21.28.222:8773/services/Cloud", + "region": "RegionOne" + } + ], + "endpoints_links": [], + "name": "nova_ec2", + "type": "ec2" + }, + { + "endpoints": [ + { + "adminURL": "http://10.100.0.222:8004/v1/TENANT_ID", + "id": "38fa4f9afce34d4ca0f5e0f90fd758dd", + "internalURL": "http://10.100.0.222:8004/v1/TENANT_ID", + "publicURL": "http://8.21.28.222:8004/v1/TENANT_ID", + "region": "RegionOne" + } + ], + "endpoints_links": [], + "name": "heat", + "type": "orchestration" + }, + { + "endpoints": [ + { + "adminURL": "http://10.100.0.222:35357/v2.0", + "id": "256cdf78ecb04051bf0f57ec11070222", + "internalURL": "http://10.100.0.222:5000/v2.0", + "publicURL": "http://8.21.28.222:5000/v2.0", + "region": "RegionOne" + } + ], + "endpoints_links": [], + "name": "keystone", + "type": "identity" + } + ], + "token": { + "audit_ids": [ + "gsjrNoqFSQeuLUo0QeJprQ" + ], + "expires": "2014-12-15T15:09:29Z", + "id": "TOKEN_ID", + "issued_at": "2014-12-15T14:09:29.794527", + "tenant": { + "description": "Auto created account", + "enabled": true, + "id": "TENANT_ID", + "name": "USERNAME" + } + }, + "user": { + "id": "USER_ID", + "name": "USERNAME", + "roles": [ + { + "name": "_member_" + } + ], + "roles_links": [], + "username": "USERNAME" + } + } + } + +Send API requests +~~~~~~~~~~~~~~~~~ + +This section shows how to make some basic Compute API calls. For a +complete list of Compute API v2.0 calls, see `Compute APIs and +Extensions `__. + +Use the Compute API to list flavors, as follows: + +.. code:: + + $ curl -s -H \ + "X-Auth-Token:token" \ + http://8.21.28.222:8774/v2/tenant_id/flavors \ + | python -m json.tool + +.. code:: + + { + "flavors": [ + { + "id": "1", + "links": [ + { + "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/flavors/1", + "rel": "self" + }, + { + "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/flavors/1", + "rel": "bookmark" + } + ], + "name": "m1.tiny" + }, + { + "id": "2", + "links": [ + { + "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/flavors/2", + "rel": "self" + }, + { + "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/flavors/2", + "rel": "bookmark" + } + ], + "name": "m1.small" + }, + { + "id": "3", + "links": [ + { + "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/flavors/3", + "rel": "self" + }, + { + "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/flavors/3", + "rel": "bookmark" + } + ], + "name": "m1.medium" + }, + { + "id": "4", + "links": [ + { + "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/flavors/4", + "rel": "self" + }, + { + "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/flavors/4", + "rel": "bookmark" + } + ], + "name": "m1.large" + }, + { + "id": "5", + "links": [ + { + "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/flavors/5", + "rel": "self" + }, + { + "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/flavors/5", + "rel": "bookmark" + } + ], + "name": "m1.xlarge" + } + ] + } + +Use the Compute API to list images, as follows: + +.. code:: + + $ curl -s -H \ + "X-Auth-Token:token" \ + http://8.21.28.222:8774/v2/tenant_id/images \ + | python -m json.tool + +.. code:: + + { + "images": [ + { + "id": "2dadcc7b-3690-4a1d-97ce-011c55426477", + "links": [ + { + "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/images/2dadcc7b-3690-4a1d-97ce-011c55426477", + "rel": "self" + }, + { + "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/images/2dadcc7b-3690-4a1d-97ce-011c55426477", + "rel": "bookmark" + }, + { + "href": "http://8.21.28.222:9292/f9828a18c6484624b571e85728780ba8/images/2dadcc7b-3690-4a1d-97ce-011c55426477", + "type": "application/vnd.openstack.image", + "rel": "alternate" + } + ], + "name": "Fedora 21 x86_64" + }, + { + "id": "cfba3478-8645-4bc8-97e8-707b9f41b14e", + "links": [ + { + "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/images/cfba3478-8645-4bc8-97e8-707b9f41b14e", + "rel": "self" + }, + { + "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/images/cfba3478-8645-4bc8-97e8-707b9f41b14e", + "rel": "bookmark" + }, + { + "href": "http://8.21.28.222:9292/f9828a18c6484624b571e85728780ba8/images/cfba3478-8645-4bc8-97e8-707b9f41b14e", + "type": "application/vnd.openstack.image", + "rel": "alternate" + } + ], + "name": "Ubuntu 14.04 amd64" + }, + { + "id": "2e4c08a9-0ecd-4541-8a45-838479a88552", + "links": [ + { + "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/images/2e4c08a9-0ecd-4541-8a45-838479a88552", + "rel": "self" + }, + { + "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/images/2e4c08a9-0ecd-4541-8a45-838479a88552", + "rel": "bookmark" + }, + { + "href": "http://8.21.28.222:9292/f9828a18c6484624b571e85728780ba8/images/2e4c08a9-0ecd-4541-8a45-838479a88552", + "type": "application/vnd.openstack.image", + "rel": "alternate" + } + ], + "name": "CentOS 7 x86_64" + }, + { + "id": "c8dd9096-60c1-4e23-a486-82955481df9f", + "links": [ + { + "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/images/c8dd9096-60c1-4e23-a486-82955481df9f", + "rel": "self" + }, + { + "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/images/c8dd9096-60c1-4e23-a486-82955481df9f", + "rel": "bookmark" + }, + { + "href": "http://8.21.28.222:9292/f9828a18c6484624b571e85728780ba8/images/c8dd9096-60c1-4e23-a486-82955481df9f", + "type": "application/vnd.openstack.image", + "rel": "alternate" + } + ], + "name": "CentOS 6.5 x86_64" + }, + { + "id": "f97b8d36-935e-4666-9c58-8a0afc6d3796", + "links": [ + { + "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/images/f97b8d36-935e-4666-9c58-8a0afc6d3796", + "rel": "self" + }, + { + "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/images/f97b8d36-935e-4666-9c58-8a0afc6d3796", + "rel": "bookmark" + }, + { + "href": "http://8.21.28.222:9292/f9828a18c6484624b571e85728780ba8/images/f97b8d36-935e-4666-9c58-8a0afc6d3796", + "type": "application/vnd.openstack.image", + "rel": "alternate" + } + ], + "name": "Fedora 20 x86_64" + } + ] + } + +Use the Compute API to list servers, as follows: + +.. code:: + + $ curl -s -H \ + "X-Auth-Token:token" \ + http://8.21.28.222:8774/v2/tenant_id/servers \ + | python -m json.tool + +.. code:: + + { + "servers": [ + { + "id": "41551256-abd6-402c-835b-e87e559b2249", + "links": [ + { + "href": "http://8.21.28.222:8774/v2/f8828a18c6484624b571e85728780ba8/servers/41551256-abd6-402c-835b-e87e559b2249", + "rel": "self" + }, + { + "href": "http://8.21.28.222:8774/f8828a18c6484624b571e85728780ba8/servers/41551256-abd6-402c-835b-e87e559b2249", + "rel": "bookmark" + } + ], + "name": "test-server" + } + ] + } + + +OpenStack command-line clients +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For scripting work and simple requests, you can use a command-line client like +the ``openstack-client`` client. This client enables you to use the Identity, +Compute, Block Storage, and Object Storage APIs through a command-line +interface. Also, each OpenStack project has a related client project that +includes Python API bindings and a CLI. + +For information about the command-line clients, see `OpenStack +Command-Line Interface Reference `__. + +Install the clients +------------------- + +Use ``pip`` to install the OpenStack clients on a Mac OS X or Linux +system. It is easy and ensures that you get the latest version of the +client from the `Python Package Index `__. +Also, ``pip`` lets you update or remove a package. + +You must install each project's client separately, but the +python-openstackclient covers multiple projects. + +Run this command to install or update a client package: + +.. code:: + + $ sudo pip install [--upgrade] python-PROJECTclient + +Where *PROJECT* is the project name. + +For example, to install the ``openstack`` client, run this command: + +.. code:: + + $ sudo pip install python-openstackclient + +To update the ``openstack`` client, run this command: + +.. code:: + + $ sudo pip install --upgrade python-openstackclient + +To remove the ``openstack`` client, run this command: + +.. code:: + + $ sudo pip uninstall python-openstackclient + +Before you can issue client commands, you must download and source the +``openrc`` file to set environment variables. + +For complete information about the OpenStack clients, including how to +source the ``openrc`` file, see `OpenStack End User +Guide `__, `OpenStack Admin +User Guide `__, and +`OpenStack Command-Line Interface +Reference `__. + +Launch an instance +------------------ + +To launch instances, you must choose a name, an image, and a flavor for +your instance. + +To list available images, call the Compute API through the ``openstack`` +client, as follows: + +.. code:: + + $ openstack image list + +.. code:: + + +--------------------------------------+------------------+ + | ID | Name | + +--------------------------------------+------------------+ + | a5604931-af06-4512-8046-d43aabf272d3 | fedora-20.x86_64 | + +--------------------------------------+------------------+ + +To list flavors, run this command: + +.. code:: + + $ openstack flavor list + +.. code:: + + +----+-----------+-----------+------+-----------+------+-------+-----------+ + | ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | Is_Public | + +----+-----------+-----------+------+-----------+------+-------+-----------+ + | 1 | m1.tiny | 512 | 0 | 0 | | 1 | True | + | 2 | m1.small | 2048 | 20 | 0 | | 1 | True | + | 3 | m1.medium | 4096 | 40 | 0 | | 2 | True | + | 4 | m1.large | 8192 | 80 | 0 | | 4 | True | + | 42 | m1.nano | 64 | 0 | 0 | | 1 | True | + | 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | True | + | 84 | m1.micro | 128 | 0 | 0 | | 1 | True | + +----+-----------+-----------+------+-----------+------+-------+-----------+ + +To launch an instance, note the IDs of your desired image and flavor. + +To launch an instance named ``my_instance``, run the ``openstack server +create`` command with the image and flavor IDs and the server name, as follows: + +.. code:: + + $ openstack server create --image 949c80c8-b4ac-4315-844e-69f9bef39ed1 --flavor 1 my_instance + +.. code:: + + +--------------------------------------+---------------------------------------------------------+ + | Field | Value | + +--------------------------------------+---------------------------------------------------------+ + | OS-DCF:diskConfig | MANUAL | + | OS-EXT-AZ:availability_zone | nova | + | OS-EXT-STS:power_state | 0 | + | OS-EXT-STS:task_state | scheduling | + | OS-EXT-STS:vm_state | building | + | OS-SRV-USG:launched_at | None | + | OS-SRV-USG:terminated_at | None | + | accessIPv4 | | + | accessIPv6 | | + | addresses | | + | adminPass | 3vgzpLzChoac | + | config_drive | | + | created | 2015-08-27T03:02:27Z | + | flavor | m1.tiny (1) | + | hostId | | + | id | 1553694c-d711-4954-9b20-84b8cb4598c6 | + | image | fedora-20.x86_64 (a5604931-af06-4512-8046-d43aabf272d3) | + | key_name | None | + | name | my_instance | + | os-extended-volumes:volumes_attached | [] | + | progress | 0 | + | project_id | 9f0e4aa4fd3d4b0ea3184c0fe7a32210 | + | properties | | + | security_groups | [{u'name': u'default'}] | + | status | BUILD | + | updated | 2015-08-27T03:02:28Z | + | user_id | b3ce0cfc170641e98ff5e42b1be9c85a | + +--------------------------------------+---------------------------------------------------------+ + +.. note:: + For information about the default ports that the OpenStack components + use, see `Firewalls and default ports`_ in the *OpenStack Configuration + Reference*. + +.. _Firewalls and default ports: http://docs.openstack.org/kilo/config-reference/content/firewalls-default-ports.html diff --git a/api-quick-start/source/conf.py b/api-quick-start/source/conf.py new file mode 100644 index 000000000..9c5c13a0a --- /dev/null +++ b/api-quick-start/source/conf.py @@ -0,0 +1,301 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import os + + +import openstackdocstheme + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +# templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'API-Quick-Start' +bug_tag = u'api-site' +copyright = u'2015, OpenStack contributors' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '0.1' +# The full version, including alpha/beta/rc tags. +release = '0.1' + +# A few variables have to be set for the log-a-bug feature. +# giturl: The location of conf.py on Git. Must be set manually. +# gitsha: The SHA checksum of the bug description. Extracted from git log. +# bug_tag: Tag for categorizing the bug. Must be set manually. +# pwd: source tree - this is needed only for openstackdocstheme <= 1.2.2 +# These variables are passed to the logabug code via html_context. +giturl = u'http://git.openstack.org/cgit/openstack/api-site/tree/api-quick-start/source' +git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '" +gitsha = os.popen(git_cmd).read().strip('\n') +# source tree +pwd = os.popen("pwd").read().strip('\n') +# html_context allows us to pass arbitrary values into the html template +html_context = {"pwd": pwd, "gitsha": gitsha, "bug_tag": bug_tag, + "giturl": giturl} + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# today = '' +# Else, today_fmt is used as the format for a strftime call. +# today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = [] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +# default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +# add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +# add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +# show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +# modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +# keep_warnings = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'openstackdocs' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +html_theme_path = [openstackdocstheme.get_html_theme_path()] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +# html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +# html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +# html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +# html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +# html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +# html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +# So that we can enable "log-a-bug" links from each output HTML page, this +# variable must be set to a format that includes year, month, day, hours and +# minutes. +html_last_updated_fmt = '%Y-%m-%d %H:%M' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +# html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +# html_additional_pages = {} + +# If false, no module index is generated. +# html_domain_indices = True + +# If false, no index is generated. +html_use_index = False + +# If true, the index is split into individual pages for each letter. +# html_split_index = False + +# If true, links to the reST sources are added to the pages. +# This one is needed for "Report a bug". +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'API-Quick-Start' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # 'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + ('index', 'FirstApp.tex', u'FirstApp Documentation', + u'OpenStack Doc Team', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# latex_use_parts = False + +# If true, show page references after internal links. +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# latex_appendices = [] + +# If false, no module index is generated. +# latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'api-quick-start', u'API Quick Start Documentation', + [u'OpenStack Doc Team'], 1) +] + +# If true, show URL addresses after external links. +# man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'api-quick-start', u'API Quick Start Documentation', + u'OpenStack Doc Team', 'APIQuickStart', 'Describes basic OpenStack API concepts.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +# texinfo_appendices = [] + +# If false, no module index is generated. +# texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +# texinfo_no_detailmenu = False + +# Set to True to enable printing of the TODO sections +todo_include_todos = False + +# -- Options for Internationalization output ------------------------------ +locale_dirs = ['locale/'] + +# -- Options for PDF output -------------------------------------------------- + +pdf_documents = [ + ('index', u'api-quick-start', u'API Quick Start Documentation', + u'OpenStack contributors') +] diff --git a/api-quick-start/source/index.rst b/api-quick-start/source/index.rst new file mode 100644 index 000000000..94dcd130c --- /dev/null +++ b/api-quick-start/source/index.rst @@ -0,0 +1,57 @@ +=================== +OpenStack API Guide +=================== + +Although you install each OpenStack service separately, the OpenStack +services work together to meet your cloud needs: Identity, Compute, +Images, Block Storage, Networking (neutron), Object Storage, Databases, and +Metering. With the `TryStack `__ OpenStack +installation, these services work together in the background of the +installation. + +After you authenticate through Identity, you can use the other OpenStack +APIs to create and manage resources in your OpenStack cloud. You can +launch instances from images and assign metadata to instances through +the Compute API or the **openstack** command-line client. + +To begin sending API requests, use one of the following methods: + +- **cURL** + + A command-line tool that lets you send HTTP requests and receive + responses. See `the section called “OpenStack + APIs” <#Compute_API_Quick_Start>`__. + +- **OpenStack command-line client** + + The OpenStack project provides a command-line client that enables + you to access APIs through easy-to-use commands. See `the section + called “OpenStack command-line clients” <#cli-intro>`__. + +- **REST clients** + + Both Mozilla and Google provide browser-based graphical interfaces + for REST. For Firefox, see + `RESTClient `__. + For Chrome, see + `rest-client `__. + +- **OpenStack Python Software Development Kit (SDK)** + + Use this SDK to write Python automation scripts that create and + manage resources in your OpenStack cloud. The SDK implements Python + bindings to the OpenStack API, which enables you to perform + automation tasks in Python by making calls on Python objects rather + than making REST calls directly. All OpenStack command-line tools are + implemented by using the Python SDK. See `OpenStack Python + SDK `__ in the + *OpenStack End User Guide*. + +Learn more +---------- + +.. toctree:: + + api-quick-start + + diff --git a/api-quick-start/locale/api-quick-start.pot b/api-quick-start/source/locale/api-quick-start.pot similarity index 100% rename from api-quick-start/locale/api-quick-start.pot rename to api-quick-start/source/locale/api-quick-start.pot diff --git a/api-quick-start/locale/ca.po b/api-quick-start/source/locale/ca.po similarity index 100% rename from api-quick-start/locale/ca.po rename to api-quick-start/source/locale/ca.po diff --git a/api-quick-start/locale/de.po b/api-quick-start/source/locale/de.po similarity index 100% rename from api-quick-start/locale/de.po rename to api-quick-start/source/locale/de.po diff --git a/api-quick-start/locale/en_GB.po b/api-quick-start/source/locale/en_GB.po similarity index 100% rename from api-quick-start/locale/en_GB.po rename to api-quick-start/source/locale/en_GB.po diff --git a/api-quick-start/locale/es.po b/api-quick-start/source/locale/es.po similarity index 100% rename from api-quick-start/locale/es.po rename to api-quick-start/source/locale/es.po diff --git a/api-quick-start/locale/fr.po b/api-quick-start/source/locale/fr.po similarity index 100% rename from api-quick-start/locale/fr.po rename to api-quick-start/source/locale/fr.po diff --git a/api-quick-start/locale/it.po b/api-quick-start/source/locale/it.po similarity index 100% rename from api-quick-start/locale/it.po rename to api-quick-start/source/locale/it.po diff --git a/api-quick-start/locale/ja.po b/api-quick-start/source/locale/ja.po similarity index 100% rename from api-quick-start/locale/ja.po rename to api-quick-start/source/locale/ja.po diff --git a/api-quick-start/locale/ko_KR.po b/api-quick-start/source/locale/ko_KR.po similarity index 100% rename from api-quick-start/locale/ko_KR.po rename to api-quick-start/source/locale/ko_KR.po diff --git a/api-quick-start/locale/pt_BR.po b/api-quick-start/source/locale/pt_BR.po similarity index 100% rename from api-quick-start/locale/pt_BR.po rename to api-quick-start/source/locale/pt_BR.po diff --git a/api-quick-start/locale/vi_VN.po b/api-quick-start/source/locale/vi_VN.po similarity index 100% rename from api-quick-start/locale/vi_VN.po rename to api-quick-start/source/locale/vi_VN.po diff --git a/api-quick-start/locale/zh_CN.po b/api-quick-start/source/locale/zh_CN.po similarity index 100% rename from api-quick-start/locale/zh_CN.po rename to api-quick-start/source/locale/zh_CN.po diff --git a/api-quick-start/src/docbkx/api-quick-start-intro.xml b/api-quick-start/src/docbkx/api-quick-start-intro.xml deleted file mode 100644 index 40489ee2c..000000000 --- a/api-quick-start/src/docbkx/api-quick-start-intro.xml +++ /dev/null @@ -1,172 +0,0 @@ - -
- OpenStack APIs - To authenticate access to OpenStack services, you must first - issue an authentication request to OpenStack Identity - to acquire an authentication token. To request an - authentication token, you must supply a payload of credentials - in the authentication request. - Credentials are usually a combination of your user name and - password, and optionally, the name or ID of the tenant in - which your cloud runs. Ask your cloud administrator for your - user name, password, and tenant so that you can generate - authentication tokens. Alternatively, you can supply a token - rather than a user name and password. - When you send API requests, you include the token in the - X-Auth-Token header. If you access - multiple OpenStack services, you must get a token for each - service. A token is valid for a limited time before it - expires. A token can also become invalid for other reasons. - For example, if the roles for a user change, existing tokens - for that user are invalid. - - Authentication and API request workflow - - Request an authentication token from the Identity - endpoint that your cloud administrator gave - you. Send a payload of credentials in the - request: - - - - - - - Parameter - Type - Description - - - - - username (required) - xsd:string - The user name. If you do not provide a - user name and password, you must provide a - token. - - - password (required) - xsd:string - The password for the user. - - - tenantName (Optional) - xsd:string - The tenant name. Both the - tenantId and - tenantName are - optional, but should not be specified - together. If both attributes are - specified, the server responds with a - 400 - Bad Request. - - - tenantId (Optional) - capi:UUID - The tenant ID. Both the - tenantId and - tenantName are optional, - but should not be specified together. If both - attributes are specified, the server responds with a - 400 - Bad Request. If you do not - know the tenantId, you can send a request with "" - for the tenantId and get the ID returned to you in - the response. - - - token (Optional) - capi:UUID - A token. If you do not provide a token, - you must provide a user name and - password. - - - - If the request succeeds, the server returns an - authentication token. - - - Send API requests and include the token in the - X-Auth-Token header. Continue - to send API requests with that token until the job - completes or a 401 - Unauthorized error - occurs. - - - If the 401 - Unauthorized error occurs, - request another token. - - - The examples in this section use cURL commands. For - information about cURL, see http://curl.haxx.se/. For information about the - OpenStack APIs, see OpenStack API Reference. - -
- Authenticate - For a typical OpenStack deployment that runs - Identity, use a cURL command like the following - command to request a token: - $ curl -s -X POST http://8.21.28.222:5000/v2.0/tokens \ - -H "Content-Type: application/json" \ - -d '{"auth": {"tenantName": "'"$OS_TENANT_NAME"'", "passwordCredentials": - {"username": "'"$OS_USERNAME"'", "password": "'"$OS_PASSWORD"'"}}}' \ - | python -m json.tool - If the request succeeds, you receive a 200 - OK response followed by a response body - that contains a token in the form - "id":"token" - and an expiration date and time in the form - "expires":"datetime". - The following example shows a successful - response: - - - If you do not know your tenant name or ID, you can - send an authentication request with an empty tenantName, - as follows: - $ curl -s -X POST http://8.21.28.222:5000/v2.0/tokens \ - -H "Content-Type: application/json" \ - -d '{"auth": {"tenantName": "", "passwordCredentials": - {"username": "'"$OS_USERNAME"'", "password": "'"$OS_PASSWORD"'"}}}' \ - | python -m json.tool - -
-
- Send API requests - This section shows how to make some basic - Compute API calls. For a complete list of - Compute API calls, see Compute APIs and Extensions. - Use the Compute API to list flavors, as follows: - $ curl -s -H \ - "X-Auth-Token:token" \ - http://8.21.28.222:8774/v2/tenant_id/flavors \ - | python -m json.tool - - Use the Compute API to list images, as follows: - $ curl -s -H \ - "X-Auth-Token:token" \ - http://8.21.28.222:8774/v2/tenant_id/images \ - | python -m json.tool - - Use the Compute API to list servers, as follows: - $ curl -s -H \ - "X-Auth-Token:token" \ - http://8.21.28.222:8774/v2/tenant_id/servers \ - | python -m json.tool - -
-
diff --git a/api-quick-start/src/docbkx/api-quick-start-onepager.xml b/api-quick-start/src/docbkx/api-quick-start-onepager.xml deleted file mode 100644 index 787c71004..000000000 --- a/api-quick-start/src/docbkx/api-quick-start-onepager.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - OpenStack API Quick Start - - Although you install each OpenStack service separately, the - OpenStack services work together to meet your cloud needs: - Identity, Compute, Image service, Block Storage, Networking - (neutron), Object Storage, Orchestration, and Telemetry. With - the TryStack OpenStack installation, these services - work together in the background of the installation. - After you authenticate through Identity, you can use the - other OpenStack APIs to create and manage resources in your - OpenStack cloud. You can launch instances from images and - assign metadata to instances through the Compute API or the - nova command-line client. - To begin sending API requests, use one of the following - methods: - - - cURL - A command-line tool that lets you send HTTP requests - and receive responses. See . - - - OpenStack command-line - clients - Each OpenStack project provides a command-line - client that enables you to access its API through - easy-to-use commands. See . - - - REST clients - Both Mozilla and Google provide browser-based - graphical interfaces for REST. For Firefox, see RESTClient. For Chrome, see rest-client. - - - OpenStack Python Software - Development Kit (SDK) - Use this SDK to write Python automation scripts that - create and manage resources in your OpenStack cloud. - The SDK implements Python bindings to the OpenStack - API, which enables you to perform automation tasks in - Python by making calls on Python objects rather than - making REST calls directly. All OpenStack command-line - tools are implemented by using the Python SDK. See - OpenStack Python SDK in the - OpenStack End User - Guide. - - - - - diff --git a/api-quick-start/src/docbkx/cli-uses.xml b/api-quick-start/src/docbkx/cli-uses.xml deleted file mode 100644 index ae315e645..000000000 --- a/api-quick-start/src/docbkx/cli-uses.xml +++ /dev/null @@ -1,174 +0,0 @@ - -
- OpenStack command-line clients - For scripting work, you can use a command-line client like - the python-novaclient - client. This client enables you to use the Compute API through - a command-line interface. - For information about the command-line clients, see OpenStack Command-Line Interface - Reference. -
- Install the clients - Use pip to install the OpenStack - clients on a Mac OS X or Linux system. It is easy and - ensures that you get the latest version of the client from - the Python - Package Index. Also, pip - lets you update or remove a package. - You must install each client separately. - Run this command to install or update a client - package: - $ sudo pip install [--upgrade] python-PROJECTclient - Where PROJECT is the project - name. - For example, to install the nova - client, run this command: - $ sudo pip install python-novaclient - To update the nova client, run this - command: - $ sudo pip install --upgrade python-novaclient - To remove the nova client, run this - command: - $ sudo pip uninstall python-novaclient - Before you can issue client commands, you must download - and source the openrc file to set - environment variables. - For complete information about the OpenStack clients, - including how to source the openrc - file, see OpenStack End User - Guide, OpenStack Admin User - Guide, and OpenStack Command-Line Interface - Reference. -
-
- Launch an instance - To launch instances, you must choose a name, an image, - and a flavor for your instance. - To list available images, call the Compute API through - the nova client, as follows: - $ nova image-list - +--------------------------------------+---------------------------------+--------+--------+ -| ID | Name | Status | Server | -+--------------------------------------+---------------------------------+--------+--------+ -| 949c80c8-b4ac-4315-844e-69f9bef39ed1 | cirros-0.3.1-x86_64-uec | ACTIVE | | -| 2d96f33d-ff66-4cac-b377-820cdf51204a | cirros-0.3.1-x86_64-uec-kernel | ACTIVE | | -| eda9e5cb-4c8c-4e88-b580-7fac80ad8e78 | cirros-0.3.1-x86_64-uec-ramdisk | ACTIVE | | -+--------------------------------------+---------------------------------+--------+--------+ - To list flavors, run this command: - $ nova flavor-list - +----+-----------+-----------+------+-----------+------+-------+-------------+-----------+ -| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | -+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+ -| 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 | True | -| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True | -| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True | -| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True | -| 42 | m1.nano | 64 | 0 | 0 | | 1 | 1.0 | True | -| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True | -| 84 | m1.micro | 128 | 0 | 0 | | 1 | 1.0 | True | -+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+ - To launch an instance, note the IDs of your desired - image and flavor. - To launch an instance named - my_instance, run the nova - boot command with the image and flavor IDs - and the server name, as follows: - $ nova boot --image 949c80c8-b4ac-4315-844e-69f9bef39ed1 --flavor 2 my_instance - +-------------------------------------+--------------------------------------+ -| Property | Value | -+-------------------------------------+--------------------------------------+ -| OS-DCF:diskConfig | MANUAL | -| OS-EXT-AZ:availability_zone | nova | -| OS-EXT-SRV-ATTR:host | None | -| OS-EXT-SRV-ATTR:hypervisor_hostname | None | -| OS-EXT-SRV-ATTR:instance_name | instance-00000001 | -| OS-EXT-STS:power_state | 0 | -| OS-EXT-STS:task_state | scheduling | -| OS-EXT-STS:vm_state | building | -| accessIPv4 | | -| accessIPv6 | | -| adminPass | XysUgJRnkB2y | -| config_drive | | -| created | 2013-11-07T17:34:16Z | -| flavor | m1.small | -| hostId | | -| id | 66129319-1f1d-420d-a226-bf9fc5ea0138 | -| image | cirros-0.3.1-x86_64-uec | -| key_name | None | -| metadata | {} | -| name | my_instance | -| progress | 0 | -| security_groups | [{u'name': u'default'}] | -| status | BUILD | -| tenant_id | 604bbe45ac7143a79e14f3158df67091 | -| updated | 2013-11-07T17:34:16Z | -| user_id | 3273a50d6cfb4a2ebc75e83cb86e1554 | -+-------------------------------------+--------------------------------------+ - Use the nova list command to view - your server: - $ nova list - +--------------------------------------+-------------+--------+------------+-------------+------------------+ -| ID | Name | Status | Task State | Power State | Networks | -+--------------------------------------+-------------+--------+------------+-------------+------------------+ -| 66129319-1f1d-420d-a226-bf9fc5ea0138 | my_instance | ACTIVE | None | Running | private=10.0.0.2 | -+--------------------------------------+-------------+--------+------------+-------------+------------------+ - To view details for a specified server, use the - nova show command. Include the ID - of the server: - $ nova show 66129319-1f1d-420d-a226-bf9fc5ea0138 - +-------------------------------------+----------------------------------------------------------------+ -| Property | Value | -+-------------------------------------+----------------------------------------------------------------+ -| OS-DCF:diskConfig | MANUAL | -| OS-EXT-AZ:availability_zone | nova | -| OS-EXT-SRV-ATTR:host | devstack-grizzly | -| OS-EXT-SRV-ATTR:hypervisor_hostname | devstack-grizzly | -| OS-EXT-SRV-ATTR:instance_name | instance-00000001 | -| OS-EXT-STS:power_state | 1 | -| OS-EXT-STS:task_state | None | -| OS-EXT-STS:vm_state | active | -| accessIPv4 | | -| accessIPv6 | | -| config_drive | | -| created | 2013-11-07T17:34:16Z | -| flavor | m1.small (2) | -| hostId | d57e6f9f7885c615794b4d5a87103509620b6a7f567f7e7bd57e97a2 | -| id | 66129319-1f1d-420d-a226-bf9fc5ea0138 | -| image | cirros-0.3.1-x86_64-uec (949c80c8-b4ac-4315-844e-69f9bef39ed1) | -| key_name | None | -| metadata | {} | -| name | my_instance | -| private network | 10.0.0.2 | -| progress | 0 | -| security_groups | [{u'name': u'default'}] | -| status | ACTIVE | -| tenant_id | 604bbe45ac7143a79e14f3158df67091 | -| updated | 2013-11-07T17:34:32Z | -| user_id | 3273a50d6cfb4a2ebc75e83cb86e1554 | -+-------------------------------------+----------------------------------------------------------------+ - - For information about the default ports that the - OpenStack components use, see - Appendix A. Firewalls and default - ports - in the OpenStack Configuration - Reference. - -
-
diff --git a/api-quick-start/src/docbkx/endpoints-list-resp.json b/api-quick-start/src/docbkx/endpoints-list-resp.json deleted file mode 100644 index da6262d0c..000000000 --- a/api-quick-start/src/docbkx/endpoints-list-resp.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "endpoints": [ - { - "adminurl": "http://166.78.21.23:3333", - "service_id": "95ce5af0aab747e497925a5be1d88b6b", - "region": "RegionOne", - "publicurl": "http://166.78.21.23:3333", - "id": "406cae0574614d829adcbdcf16b4949b", - "internalurl": "http://166.78.21.23:3333" - }, - { - "adminurl": "http://166.78.21.23:8773/services/Admin", - "service_id": "5f1f74decf1f4478a962bcc64fc085bf", - "region": "RegionOne", - "publicurl": "http://166.78.21.23:8773/services/Cloud", - "id": "14c4ae919d4045b78154744f8de08bc8", - "internalurl": "http://166.78.21.23:8773/services/Cloud" - }, - { - "adminurl": "http://166.78.21.23:8776/v1/$(tenant_id)s", - "service_id": "1d95b26ad4744e6bb0010f3755655986", - "region": "RegionOne", - "publicurl": "http://166.78.21.23:8776/v1/$(tenant_id)s", - "id": "c2c8807f17f544f2a4e813adce7997a4", - "internalurl": "http://166.78.21.23:8776/v1/$(tenant_id)s" - }, - { - "adminurl": "http://166.78.21.23:35357/v2.0", - "service_id": "f7c3f51731df49cf876c816b96dba615", - "region": "RegionOne", - "publicurl": "http://166.78.21.23:5000/v2.0", - "id": "f872f18d21ac4a57ae6337bf7c3b4ff0", - "internalurl": "http://166.78.21.23:5000/v2.0" - }, - { - "adminurl": "http://166.78.21.23:9292", - "service_id": "675b9a6b5d9140d794f0ca72414ed688", - "region": "RegionOne", - "publicurl": "http://166.78.21.23:9292", - "id": "9883108c61af480c8715448086ec59b0", - "internalurl": "http://166.78.21.23:9292" - }, - { - "internalurl": "http://166.78.21.23:8774/v2/$(tenant_id)s", - "adminurl": "http://166.78.21.23:8774/v2/$(tenant_id)s", - "service_id": "ea8d30c196904f569645bb5f6558b7dc", - "region": "RegionOne", - "id": "552b1ad2d28a42c6a80f908c6047fc06", - "publicurl": "http://166.78.21.23:8774/v2/$(tenant_id)s" - } - ] -} \ No newline at end of file diff --git a/api-quick-start/src/docbkx/flavors-post-resp.json b/api-quick-start/src/docbkx/flavors-post-resp.json deleted file mode 100644 index 4b6545ebd..000000000 --- a/api-quick-start/src/docbkx/flavors-post-resp.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "flavors": [ - { - "id": "1", - "links": [ - { - "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/flavors/1", - "rel": "self" - }, - { - "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/flavors/1", - "rel": "bookmark" - } - ], - "name": "m1.tiny" - }, - { - "id": "2", - "links": [ - { - "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/flavors/2", - "rel": "self" - }, - { - "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/flavors/2", - "rel": "bookmark" - } - ], - "name": "m1.small" - }, - { - "id": "3", - "links": [ - { - "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/flavors/3", - "rel": "self" - }, - { - "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/flavors/3", - "rel": "bookmark" - } - ], - "name": "m1.medium" - }, - { - "id": "4", - "links": [ - { - "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/flavors/4", - "rel": "self" - }, - { - "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/flavors/4", - "rel": "bookmark" - } - ], - "name": "m1.large" - }, - { - "id": "5", - "links": [ - { - "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/flavors/5", - "rel": "self" - }, - { - "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/flavors/5", - "rel": "bookmark" - } - ], - "name": "m1.xlarge" - } - ] -} diff --git a/api-quick-start/src/docbkx/get_credentials_resp.json b/api-quick-start/src/docbkx/get_credentials_resp.json deleted file mode 100644 index cefa5502c..000000000 --- a/api-quick-start/src/docbkx/get_credentials_resp.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "access": { - "metadata": { - "is_admin": 0, - "roles": [ - "9fe2ff9ee4384b1894a90878d3e92bab" - ] - }, - "serviceCatalog": [ - { - "endpoints": [ - { - "adminURL": "http://10.100.0.222:8774/v2/TENANT_ID", - "id": "0eb78b6d3f644438aea327d9c57b7b5a", - "internalURL": "http://10.100.0.222:8774/v2/TENANT_ID", - "publicURL": "http://8.21.28.222:8774/v2/TENANT_ID", - "region": "RegionOne" - } - ], - "endpoints_links": [], - "name": "nova", - "type": "compute" - }, - { - "endpoints": [ - { - "adminURL": "http://10.100.0.222:9696/", - "id": "3f4b6015a2f9481481ca03dace8acf32", - "internalURL": "http://10.100.0.222:9696/", - "publicURL": "http://8.21.28.222:9696/", - "region": "RegionOne" - } - ], - "endpoints_links": [], - "name": "neutron", - "type": "network" - }, - { - "endpoints": [ - { - "adminURL": "http://10.100.0.222:8776/v2/TENANT_ID", - "id": "16f6416588f64946bdcdf4a431a8f252", - "internalURL": "http://10.100.0.222:8776/v2/TENANT_ID", - "publicURL": "http://8.21.28.222:8776/v2/TENANT_ID", - "region": "RegionOne" - } - ], - "endpoints_links": [], - "name": "cinder_v2", - "type": "volumev2" - }, - { - "endpoints": [ - { - "adminURL": "http://10.100.0.222:8779/v1.0/TENANT_ID", - "id": "be48765ae31e425cb06036b1ebab694a", - "internalURL": "http://10.100.0.222:8779/v1.0/TENANT_ID", - "publicURL": "http://8.21.28.222:8779/v1.0/TENANT_ID", - "region": "RegionOne" - } - ], - "endpoints_links": [], - "name": "trove", - "type": "database" - }, - { - "endpoints": [ - { - "adminURL": "http://10.100.0.222:9292", - "id": "1adfcb5414304f3596fb81edb2dfb514", - "internalURL": "http://10.100.0.222:9292", - "publicURL": "http://8.21.28.222:9292", - "region": "RegionOne" - } - ], - "endpoints_links": [], - "name": "glance", - "type": "image" - }, - { - "endpoints": [ - { - "adminURL": "http://10.100.0.222:8777", - "id": "350f3b91d73f4b3ab8a061c94ac31fbb", - "internalURL": "http://10.100.0.222:8777", - "publicURL": "http://8.21.28.222:8777", - "region": "RegionOne" - } - ], - "endpoints_links": [], - "name": "ceilometer", - "type": "metering" - }, - { - "endpoints": [ - { - "adminURL": "http://10.100.0.222:8000/v1/", - "id": "2198b0d32a604e75a5cc1e13276a813d", - "internalURL": "http://10.100.0.222:8000/v1/", - "publicURL": "http://8.21.28.222:8000/v1/", - "region": "RegionOne" - } - ], - "endpoints_links": [], - "name": "heat-cfn", - "type": "cloudformation" - }, - { - "endpoints": [ - { - "adminURL": "http://10.100.0.222:8776/v1/TENANT_ID", - "id": "7c193c4683d849ca8e8db493722a4d8c", - "internalURL": "http://10.100.0.222:8776/v1/TENANT_ID", - "publicURL": "http://8.21.28.222:8776/v1/TENANT_ID", - "region": "RegionOne" - } - ], - "endpoints_links": [], - "name": "cinder", - "type": "volume" - }, - { - "endpoints": [ - { - "adminURL": "http://10.100.0.222:8773/services/Admin", - "id": "11fac8254be74d7d906110f0069e5748", - "internalURL": "http://10.100.0.222:8773/services/Cloud", - "publicURL": "http://8.21.28.222:8773/services/Cloud", - "region": "RegionOne" - } - ], - "endpoints_links": [], - "name": "nova_ec2", - "type": "ec2" - }, - { - "endpoints": [ - { - "adminURL": "http://10.100.0.222:8004/v1/TENANT_ID", - "id": "38fa4f9afce34d4ca0f5e0f90fd758dd", - "internalURL": "http://10.100.0.222:8004/v1/TENANT_ID", - "publicURL": "http://8.21.28.222:8004/v1/TENANT_ID", - "region": "RegionOne" - } - ], - "endpoints_links": [], - "name": "heat", - "type": "orchestration" - }, - { - "endpoints": [ - { - "adminURL": "http://10.100.0.222:35357/v2.0", - "id": "256cdf78ecb04051bf0f57ec11070222", - "internalURL": "http://10.100.0.222:5000/v2.0", - "publicURL": "http://8.21.28.222:5000/v2.0", - "region": "RegionOne" - } - ], - "endpoints_links": [], - "name": "keystone", - "type": "identity" - } - ], - "token": { - "audit_ids": [ - "gsjrNoqFSQeuLUo0QeJprQ" - ], - "expires": "2014-12-15T15:09:29Z", - "id": "TOKEN_ID", - "issued_at": "2014-12-15T14:09:29.794527", - "tenant": { - "description": "Auto created account", - "enabled": true, - "id": "TENANT_ID", - "name": "USERNAME" - } - }, - "user": { - "id": "USER_ID", - "name": "USERNAME", - "roles": [ - { - "name": "_member_" - } - ], - "roles_links": [], - "username": "USERNAME" - } - } -} diff --git a/api-quick-start/src/docbkx/images-post-resp.json b/api-quick-start/src/docbkx/images-post-resp.json deleted file mode 100644 index 2b8c375aa..000000000 --- a/api-quick-start/src/docbkx/images-post-resp.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "images": [ - { - "id": "2dadcc7b-3690-4a1d-97ce-011c55426477", - "links": [ - { - "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/images/2dadcc7b-3690-4a1d-97ce-011c55426477", - "rel": "self" - }, - { - "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/images/2dadcc7b-3690-4a1d-97ce-011c55426477", - "rel": "bookmark" - }, - { - "href": "http://8.21.28.222:9292/f9828a18c6484624b571e85728780ba8/images/2dadcc7b-3690-4a1d-97ce-011c55426477", - "type": "application/vnd.openstack.image", - "rel": "alternate" - } - ], - "name": "Fedora 21 x86_64" - }, - { - "id": "cfba3478-8645-4bc8-97e8-707b9f41b14e", - "links": [ - { - "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/images/cfba3478-8645-4bc8-97e8-707b9f41b14e", - "rel": "self" - }, - { - "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/images/cfba3478-8645-4bc8-97e8-707b9f41b14e", - "rel": "bookmark" - }, - { - "href": "http://8.21.28.222:9292/f9828a18c6484624b571e85728780ba8/images/cfba3478-8645-4bc8-97e8-707b9f41b14e", - "type": "application/vnd.openstack.image", - "rel": "alternate" - } - ], - "name": "Ubuntu 14.04 amd64" - }, - { - "id": "2e4c08a9-0ecd-4541-8a45-838479a88552", - "links": [ - { - "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/images/2e4c08a9-0ecd-4541-8a45-838479a88552", - "rel": "self" - }, - { - "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/images/2e4c08a9-0ecd-4541-8a45-838479a88552", - "rel": "bookmark" - }, - { - "href": "http://8.21.28.222:9292/f9828a18c6484624b571e85728780ba8/images/2e4c08a9-0ecd-4541-8a45-838479a88552", - "type": "application/vnd.openstack.image", - "rel": "alternate" - } - ], - "name": "CentOS 7 x86_64" - }, - { - "id": "c8dd9096-60c1-4e23-a486-82955481df9f", - "links": [ - { - "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/images/c8dd9096-60c1-4e23-a486-82955481df9f", - "rel": "self" - }, - { - "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/images/c8dd9096-60c1-4e23-a486-82955481df9f", - "rel": "bookmark" - }, - { - "href": "http://8.21.28.222:9292/f9828a18c6484624b571e85728780ba8/images/c8dd9096-60c1-4e23-a486-82955481df9f", - "type": "application/vnd.openstack.image", - "rel": "alternate" - } - ], - "name": "CentOS 6.5 x86_64" - }, - { - "id": "f97b8d36-935e-4666-9c58-8a0afc6d3796", - "links": [ - { - "href": "http://8.21.28.222:8774/v2/f9828a18c6484624b571e85728780ba8/images/f97b8d36-935e-4666-9c58-8a0afc6d3796", - "rel": "self" - }, - { - "href": "http://8.21.28.222:8774/f9828a18c6484624b571e85728780ba8/images/f97b8d36-935e-4666-9c58-8a0afc6d3796", - "rel": "bookmark" - }, - { - "href": "http://8.21.28.222:9292/f9828a18c6484624b571e85728780ba8/images/f97b8d36-935e-4666-9c58-8a0afc6d3796", - "type": "application/vnd.openstack.image", - "rel": "alternate" - } - ], - "name": "Fedora 20 x86_64" - } - ] -} diff --git a/api-quick-start/src/docbkx/servers-post-resp.json b/api-quick-start/src/docbkx/servers-post-resp.json deleted file mode 100644 index 58ab8697b..000000000 --- a/api-quick-start/src/docbkx/servers-post-resp.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "servers": [ - { - "id": "41551256-abd6-402c-835b-e87e559b2249", - "links": [ - { - "href": "http://8.21.28.222:8774/v2/f8828a18c6484624b571e85728780ba8/servers/41551256-abd6-402c-835b-e87e559b2249", - "rel": "self" - }, - { - "href": "http://8.21.28.222:8774/f8828a18c6484624b571e85728780ba8/servers/41551256-abd6-402c-835b-e87e559b2249", - "rel": "bookmark" - } - ], - "name": "test-server" - } - ] -} diff --git a/api-quick-start/src/docbkx/tenants_list_resp.json b/api-quick-start/src/docbkx/tenants_list_resp.json deleted file mode 100644 index 27a1113ff..000000000 --- a/api-quick-start/src/docbkx/tenants_list_resp.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "tenants_links": [], - "tenants": [ - { - "description": null, - "enabled": true, - "id": "3eddf34c2f814bd5bc50a382f8fba1c6", - "name": "demo" - }, - { - "description": null, - "enabled": true, - "id": "604bbe45ac7143a79e14f3158df67091", - "name": "admin" - }, - { - "description": null, - "enabled": true, - "id": "78323d3574e6421b98fe5894475c69fe", - "name": "service" - }, - { - "description": null, - "enabled": true, - "id": "da73856734d84ec29958b048d8708d82", - "name": "invisible_to_admin" - }, - { - "description": null, - "enabled": true, - "id": "ee30a93eaade41acbcf210780dd7a0ba", - "name": "alt_demo" - } - ] -} \ No newline at end of file diff --git a/doc-tools-check-languages.conf b/doc-tools-check-languages.conf index e9f017070..dfa1d892d 100644 --- a/doc-tools-check-languages.conf +++ b/doc-tools-check-languages.conf @@ -2,28 +2,10 @@ # directories to be set up declare -A DIRECTORIES=( - ["ca"]="api-quick-start" - ["de"]="api-quick-start" - ["es"]="api-quick-start" - ["fr"]="api-quick-start" - ["ja"]="api-quick-start" - ["ko_KR"]="api-quick-start" - ["pt_BR"]="api-quick-start" - ["vi_VN"]="api-quick-start" - ["zh_CN"]="api-quick-start" ) # books to be built declare -A BOOKS=( - ["ca"]="api-quick-start" - ["de"]="api-quick-start" - ["es"]="api-quick-start" - ["fr"]="api-quick-start" - ["ja"]="api-quick-start" - ["ko_KR"]="api-quick-start" - ["pt_BR"]="api-quick-start" - ["vi_VN"]="api-quick-start" - ["zh_CN"]="api-quick-start" ) # Where does the top-level pom live? @@ -38,6 +20,7 @@ DOC_DIR="./" declare -A SPECIAL_BOOKS SPECIAL_BOOKS=( ["firstapp"]="skip" + ["api-quick-start"]="RST" # These are translated in openstack-manuals ["common-rst"]="skip" ) diff --git a/pom.xml b/pom.xml index f5ce4b48a..abe61af79 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,6 @@ 1.0.0-SNAPSHOT pom - api-quick-start api-guide api-ref api-ref-guides diff --git a/tools/build-all-rst.sh b/tools/build-all-rst.sh index 4bc7e2c68..aa3b0eeb0 100755 --- a/tools/build-all-rst.sh +++ b/tools/build-all-rst.sh @@ -3,3 +3,4 @@ mkdir -p publish-docs tools/build-firstapp-rst.sh +tools/build-api-start.sh diff --git a/tools/build-api-start.sh b/tools/build-api-start.sh new file mode 100755 index 000000000..03eedc961 --- /dev/null +++ b/tools/build-api-start.sh @@ -0,0 +1,5 @@ +#!/bin/bash -e + +mkdir -p publish-docs + +tools/build-rst.sh api-quick-start --target api-quick-start diff --git a/tox.ini b/tox.ini index 8377eae8f..e42ea891a 100644 --- a/tox.ini +++ b/tox.ini @@ -24,6 +24,7 @@ commands = openstack-doc-test --check-links {posargs} commands = openstack-doc-test --check-niceness {posargs} doc8 firstapp + doc8 api-quick-start [testenv:checksyntax] commands = @@ -48,7 +49,7 @@ commands = # Prepare documents (without www) so that they can get published on # docs.openstack.org with just copying publish-docs/* over. commands = - openstack-doc-test --check-build --publish --only-book api-quick-start + {toxinidir}/tools/build-api-start.sh [testenv:publishdocs-api] # Prepare documents (without www) so that they can get published on @@ -58,7 +59,7 @@ commands = # We need to move api-ref-guides to the proper place: mv publish-docs/api-ref-guides publish-docs/api-ref/ # Build and copy RST Guides - {toxinidir}/tools/build-all-rst.sh + {toxinidir}/tools/build-firstapp-rst.sh # Delete firstapp draft documents rm -rf publish-docs/draft/ @@ -115,6 +116,10 @@ commands = sphinx-build -E -W -t libcloud firstapp/source firstapp/build/html [testenv:firstapp-shade] commands = sphinx-build -E -W -t shade firstapp/source firstapp/build-shade/html +[testenv:api-quick-start] +commands = + {toxinidir}/tools/build-api-start.sh + [doc8] # Settings for doc8: # Ignore target directories