Revision 31240d2c snf-astakos-app/astakos/im/templates/im/api_access_base.html

b/snf-astakos-app/astakos/im/templates/im/api_access_base.html
37 37
                    <input value="{{ request.user.auth_token }}" type="text" name="auth_token" disabled/>
38 38
                    <span class="expires">
39 39
                        <span class="date">
40
                            expires in {{ request.user.auth_token_expires|timeuntil }}
41
                            ({{ request.user.auth_token_expires|date }})
40
                            expires in {{ user.auth_token_expires|timeuntil }}
41
                            ({{ user.auth_token_expires|date }})
42 42
                        </span>
43 43
                    </span>
44 44
                </div>
......
64 64

  
65 65
   <div class="subsection">
66 66
     
67
        <h2>GENERAL</h2>
67
        
68 68
    
69 69
    {% block page.body.description %}
70 70
        <div class="two-cols dotted clearfix">
71 71
            <div class="rt">
72
                {% block page.body.api_advanced %}
73
                <h2>API Advanced Usage</h2>
72 74
                <p>
73
                If
74
                you want to learn more about the specification of the REST API itself,
75
                please take a look at the <a href="https://www.synnefo.org/docs" 
76
                alt="Synnefo documentation">Synnefo documentation</a>. 
75
                Apart from using the kamaki command line client, you can also import the
76
                kamaki library inside your code and use it directly. More details on how
77
                to do that on the corresponding kamaki 
78
                <a href="{{ client_url }}">kamaki </a>page.</p> 
79
                <p>You can also implement the REST API calls by yourself, without
80
                using the official kamaki library if you feel confident with your
81
                programming skills. To do so, you first need to get a good grasp of the
82
                API itself; for more information take a look at the corresponding page
83
                inside the 
84
                <a href="https://synnefo.org/docs/">Synnefo documentation</a>.
77 85
                </p>
86
                {% endblock %}
78 87
            </div>
79 88
            <div class="lt">
89
                <h2>GENERAL</h2>
80 90
                <p>{{ BRANDING_SERVICE_NAME }} provides a complete REST API that allows you to access and
81 91
    control your virtual resources programmatically. This means you can execute
82 92
    all the actions you do from the {{ BRANDING_SERVICE_NAME }} Web UI by using a command
83 93
    line client or importing the corresponding library inside your own code.</p>
94
    <p>
95
                If
96
                you want to learn more about the specification of the REST API itself,
97
                please take a look at the <a href="https://www.synnefo.org/docs" 
98
                alt="Synnefo documentation">Synnefo documentation</a>. 
99
                </p>
100
               
84 101
            </div>
85 102

  
86 103
        </div>
......
90 107
    
91 108
    <div class="two-cols dotted clearfix">
92 109
        <div class="rt">
93
            {% block page.body.api_advanced %}
94
            <h2>API Advanced Usage</h2>
95
            <p>
96
            Apart from using the kamaki command line client, you can also import the
97
            kamaki library inside your code and use it directly. More details on how
98
            to do that on the corresponding kamaki 
99
            <a href="{{ client_url }}">kamaki </a>page.</p> 
100
            <p>You can also implement the REST API calls by yourself, without
101
            using the official kamaki library if you feel confident with your
102
            programming skills. To do so, you first need to get a good grasp of the
103
            API itself; for more information take a look at the corresponding page
104
            inside the 
105
            <a href="https://synnefo.org/docs/">Synnefo documentation</a>.
106
            </p>
107
            {% endblock %}
110
           <h2>Other clients</h2>
111
           <p>If you are using a client different from kamaki that supports the OpenStack
112
APIs and needs a username/password combination to operate, please use
113
the following:</p>
114

  
115
<p>username:  <span class="user-data">{{ user.uuid }}</span>
116
password:  <span class="user-data">{{ user.auth_token }}</span></p>
117

  
118
<p>The username is your  {{ BRANDING_SERVICE_NAME }} user ID (UUID) and the password
119
is your authentication token. As you can see, its the same shown in the
120
previous section. </p>
108 121
        </div>
109 122
        <div class="lt">
110 123
            {% block page.body.clients %}
......
124 137
            </p>
125 138
             <p class="download">You can download kamaki 
126 139
    from the <a href="{{ client_url }}">project homepage</a></p>
127
    
140
             <p>If you are using kamaki, you can download a pre-configured .kamakirc
141
file that contains your Authentication token and URL. Store this file
142
under your home directory (~/.kamakirc) and kamaki will be able to
143
access  {{ BRANDING_SERVICE_NAME }} automatically without the need of extra
144
manual configuration.</p>
145

  
146
<a href="{% url api_access_config %}" class="submit">Download your .kamakirc</a> 
128 147
        </div>
129 148
        {% endblock %}
130 149
    </div>

Also available in: Unified diff