summaryrefslogtreecommitdiffstats
path: root/client/doc/source/apiv2.rst
diff options
context:
space:
mode:
Diffstat (limited to 'client/doc/source/apiv2.rst')
-rw-r--r--client/doc/source/apiv2.rst27
1 files changed, 27 insertions, 0 deletions
diff --git a/client/doc/source/apiv2.rst b/client/doc/source/apiv2.rst
new file mode 100644
index 0000000..0695b2a
--- /dev/null
+++ b/client/doc/source/apiv2.rst
@@ -0,0 +1,27 @@
+Python API v1
+=============
+
+To create a client::
+
+ from keystoneclient.auth.identity import v2 as identity
+ from keystoneclient import session
+ from escalatorclient import Client
+
+ auth = identity.Password(auth_url=AUTH_URL,
+ username=USERNAME,
+ password=PASSWORD,
+ tenant_name=PROJECT_ID)
+
+ sess = session.Session(auth=auth)
+ token = auth.get_token(sess)
+
+ escalator = Client('1', endpoint=OS_IMAGE_ENDPOINT, token=token)
+
+
+List
+----
+List nodes you can access::
+
+ for node in escalator.nodes.list():
+ print node
+