Revision cedde35d

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

  
b/kamaki/clients/compute/rest_api.py
64 64
            host=None,
65 65
            success=200,
66 66
            **kwargs):
67
        """GET base_url/servers/['detail'|<server_id>]
67
        """GET base_url/servers/['detail' | <server_id>]
68 68

  
69 69
        :param server_id: (int or int str) ignored if detail
70 70

  
71 71
        :param detail: (boolean)
72 72

  
73
        --- Parameters ---
74

  
75 73
        :param changes-since: A time/date stamp for when the server last
76 74
            changed status
77 75

  
......
116 114

  
117 115
        :param json_data: a json-formated dict that will be send as data
118 116

  
119
        --- Parameters
120

  
121 117
        :param security_group: (str)
122 118

  
123 119
        :param user_data: Use to pass configuration information or scripts upon
b/kamaki/clients/cyclades/__init__.py
398 398
        :param address: (str) ip address to request
399 399

  
400 400
        :returns: (dict) {
401
                fixed_ip: ..., id: ..., instance_id: ..., ip: ..., pool: ...
402
            }
401
            fixed_ip: ..., id: ..., instance_id: ..., ip: ..., pool: ...}
403 402
        """
404 403
        json_data = dict()
405 404
        if pool:

Also available in: Unified diff