summaryrefslogtreecommitdiffstats
path: root/client/doc/source/apiv2.rst
blob: 0695b2af20055071ac9e658f96065c5ebfd10874 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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