Revision cedde35d docs/developers/clients-api.rst
b/docs/developers/clients-api.rst | ||
---|---|---|
38 | 38 |
should be used only when implementing applications for strict OS Compute or |
39 | 39 |
OS Storage services. |
40 | 40 |
|
41 |
Using endpoints to initialize services
|
|
42 |
--------------------------------------
|
|
41 |
Using endpoints to get the base_url
|
|
42 |
----------------------------------- |
|
43 | 43 |
|
44 |
The OpenStack identity service, which is implemented my the Synnefo/Astakos |
|
45 |
server, can be used to get the base_url values needed for initializing any |
|
46 |
kamaki client. Kamaki simplifies this proccess with the astakos client. |
|
44 |
In OpenStack, each service (e.g. `compute`, `object-store`, etc.) has a number |
|
45 |
of `endpoints`. These `endpoints` are actually URIs that are needed as prefixes |
|
46 |
for the API calls the kamaki client generates. In this context, we need just |
|
47 |
one of these these `endpoints`, the `publicURL`, which is also referred to as |
|
48 |
`base_url` in kamaki client libraries. |
|
49 |
|
|
50 |
In general, this is the suggested way of getting the base_url:: |
|
51 |
|
|
52 |
1. From the deployment UI get the AUTHENTICATION_URL and TOKEN |
|
53 |
(Example 1.2) |
|
54 |
2. Use them to instantiate an AstakosClient |
|
55 |
(Example 1.2) |
|
56 |
3. Use AstakosClient instance to get the endpoints of the service of interest |
|
57 |
(Example 1.3) |
|
58 |
4. The 'publicURL' endpoint is the base_url we are looking for |
|
59 |
(Example 1.3) |
|
60 |
|
|
61 |
The AstakosClient is a client for the Synnefo/Astakos server. Synnefo/Astakos |
|
62 |
is an advanced identity server based on OpenStack identity specifications. |
|
63 |
Therefore, it can be used to get the `base_url` values needed for initializing |
|
64 |
kamaki clients. Kamaki simplifies this process with the astakos client library. |
|
65 |
|
|
66 |
Let's review the process with examples. |
|
47 | 67 |
|
48 | 68 |
First, an astakos client must be initialized (Example 1.2). An |
49 | 69 |
AUTHENTICATION_URL and a TOKEN can be acquired from the synnefo deployment UI. |
... | ... | |
58 | 78 |
|
59 | 79 |
|
60 | 80 |
Next, the astakos client can be used to retrieve the base_url values for the |
61 |
servcers of interest. In this case (Example 1.3) they are *cyclades*
|
|
81 |
servers of interest. In this case (Example 1.3) they are *cyclades* |
|
62 | 82 |
and *pithos*. A number of endpoints is assigned to each service, but kamaki |
63 | 83 |
clients only need the one labeled as ``publicURL``. |
64 | 84 |
|
Also available in: Unified diff