root / snf-astakos-app / astakos / im / templates / im / api_access_base.html @ 27e51b28
History | View | Annotate | Download (6.4 kB)
1 |
{% extends "im/account_base.html" %} |
---|---|
2 |
{% load filters %} |
3 |
|
4 |
{% block headjs %} |
5 |
{{ block.super }} |
6 |
<script>
|
7 |
var CHANGE_TOKEN_URL = '{% url update_token %}';
|
8 |
</script>
|
9 |
{% endblock %} |
10 |
|
11 |
{% block page.body %} |
12 |
<form>{% csrf_token %}</form> |
13 |
<div class="api-access-view"> |
14 |
<div>
|
15 |
{% block page.body.title %} |
16 |
<h2>API details</h2> |
17 |
{% endblock %} |
18 |
<p class="dotted"> |
19 |
To use {{ BRANDING_SERVICE_NAME }} via its REST API you will need the following Authentication URL |
20 |
and Token:<br /><br /> |
21 |
</p>
|
22 |
</div>
|
23 |
<div class="subsection dotted"> |
24 |
{% block page.body.token %} |
25 |
|
26 |
|
27 |
<div class="token-view"> |
28 |
<div class="detail small clearfix"> |
29 |
<span class="title">Authentication URL</span> |
30 |
<span id="dummy_token_url" class="dummy-input"> </span> |
31 |
<input value="{{ token_url }}" type="text" name="token_url" disabled |
32 |
</div |
33 |
<div ="detail "> |
34 |
<div class="facts clearfix"> |
35 |
<span class="title">Token</span> |
36 |
<span id="dummy_auth_token" class="dummy-input"> </span> |
37 |
<input value="{{ request.user.auth_token }}" type="text" name="auth_token" disabled |
38 |
<span ="expires"> |
39 |
<span class="date"> |
40 |
expires in {{ user.auth_token_expires|timeuntil }} |
41 |
({{ user.auth_token_expires|date }}) |
42 |
</span>
|
43 |
</span>
|
44 |
</div>
|
45 |
<div class="actions"> |
46 |
<div class="renew-token"> |
47 |
<span class="wrap"> |
48 |
<a href="#" class="do">renew token</a> |
49 |
<a href="#" class="confirm">confirm</a> |
50 |
<a href="#" class="close">x</a> |
51 |
</span>
|
52 |
<p class="sub"><span>Every time you renew it, make sure to |
53 |
update the clients you use with the new token.</span></p> |
54 |
</div>
|
55 |
</div>
|
56 |
|
57 |
|
58 |
<span class="extra-img" id="token-span"> </span> |
59 |
</div>
|
60 |
|
61 |
</div>
|
62 |
{% endblock %} |
63 |
</div>
|
64 |
|
65 |
<div class="subsection"> |
66 |
|
67 |
|
68 |
|
69 |
{% block page.body.description %} |
70 |
<div class="two-cols dotted clearfix"> |
71 |
<div class="rt"> |
72 |
{% block page.body.api_advanced %} |
73 |
<h2>API advanced usage</h2> |
74 |
<p>
|
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 |
78 |
<a href="http://www.synnefo.org/docs/kamaki/latest/index.html">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="http://www.synnefo.org/docs">Synnefo documentation</a>. |
85 |
</p>
|
86 |
{% endblock %} |
87 |
</div>
|
88 |
<div class="lt"> |
89 |
<h2>General</h2> |
90 |
<p>{{ BRANDING_SERVICE_NAME }} provides a complete REST API that allows you to access and
|
91 |
control your virtual resources programmatically. This means you can execute |
92 |
all the actions you do from the {{ BRANDING_SERVICE_NAME }} Web UI by using a command |
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="http://www.synnefo.org/docs" |
98 |
alt="Synnefo documentation">Synnefo documentation</a>. |
99 |
</p>
|
100 |
|
101 |
</div>
|
102 |
|
103 |
</div>
|
104 |
|
105 |
{% endblock %} |
106 |
</div>
|
107 |
|
108 |
<div class="two-cols dotted clearfix"> |
109 |
<div class="rt"> |
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 Token. As you can see, its the same shown in the |
120 |
previous section. </p>
|
121 |
</div>
|
122 |
<div class="lt"> |
123 |
{% block page.body.clients %} |
124 |
<h2>Kamaki</h2> |
125 |
<p><a href="{{ client_url }}" alt="kamaki">Kamaki</a> is the official |
126 |
{{ BRANDING_SERVICE_NAME }} command line client. You can use it to control your virtual |
127 |
resources from the command line or use it inside your scripts.</p>
|
128 |
<p>Kamaki allows you to execute all the operations you do from the Web UI. You can use kamaki to<br><br> |
129 |
- register images,<br>- spawn clusters of customized VMs,<br>- connect them to |
130 |
Private Virtual Networks,<br>- have them executing computations dynamically<br> <br>and |
131 |
many other neat things.</p>
|
132 |
<p> Kamaki is available for most Linux distributions,
|
133 |
Windows and Mac OS X. To use it you will need to set it up using your |
134 |
Token and the Authentication URL, found above. To |
135 |
learn more about kamaki and how to install, configure and use, take a look |
136 |
at its <a href="http://www.synnefo.org/docs/kamaki/latest/index.html">corresponding page</a>. |
137 |
</p>
|
138 |
<p class="download">You can download kamaki |
139 |
from the <a href="http://www.synnefo.org/docs/kamaki/latest/index.html">project homepage</a>.</p> |
140 |
<p>If you are using kamaki, you can download a pre-configured .kamakirc
|
141 |
file that contains your Authentication URL and Token. 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> |
147 |
</div>
|
148 |
{% endblock %} |
149 |
</div>
|
150 |
</div>
|
151 |
{% endblock %} |