Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / templates / im / api_access_base.html @ 27e51b28

History | View | Annotate | Download (6.4 kB)

1 7763f5c6 Kostas Papadimitriou
{% extends "im/account_base.html" %}
2 7763f5c6 Kostas Papadimitriou
{% load filters %}
3 7763f5c6 Kostas Papadimitriou
4 14c76abe Kostas Papadimitriou
{% block headjs %}
5 14c76abe Kostas Papadimitriou
        {{ block.super }}         
6 14c76abe Kostas Papadimitriou
    <script>
7 b940f71d Olga Brani
      var CHANGE_TOKEN_URL = '{% url update_token %}';
8 14c76abe Kostas Papadimitriou
    </script>        
9 14c76abe Kostas Papadimitriou
{% endblock %}        
10 14c76abe Kostas Papadimitriou
11 7763f5c6 Kostas Papadimitriou
{% block page.body %}
12 14c76abe Kostas Papadimitriou
<form>{% csrf_token %}</form>
13 7763f5c6 Kostas Papadimitriou
<div class="api-access-view">
14 9c6bd23f Olga Brani
    <div>
15 7763f5c6 Kostas Papadimitriou
    {% block page.body.title %}
16 9c6bd23f Olga Brani
        <h2>API details</h2>
17 7763f5c6 Kostas Papadimitriou
    {% endblock %}
18 9c6bd23f Olga Brani
        <p class="dotted">
19 9c6bd23f Olga Brani
    To use {{ BRANDING_SERVICE_NAME }} via its REST API you will need the following Authentication URL
20 5836ccb9 Olga Brani
    and Token:<br /><br />
21 9c6bd23f Olga Brani
        </p>
22 7763f5c6 Kostas Papadimitriou
    </div>
23 dc868498 Olga Brani
    <div class="subsection dotted">
24 7763f5c6 Kostas Papadimitriou
    {% block page.body.token %}
25 9c6bd23f Olga Brani
        
26 9c6bd23f Olga Brani
        
27 dc868498 Olga Brani
        <div class="token-view">
28 948dd719 Olga Brani
            <div class="detail small clearfix"> 
29 c9556cfc Vangelis Koukis
                <span class="title">Authentication URL</span>
30 948dd719 Olga Brani
                <span id="dummy_token_url" class="dummy-input">&nbsp;</span>
31 948dd719 Olga Brani
                <input value="{{ token_url }}" type="text" name="token_url" disabled 
32 dc868498 Olga Brani
            </div
33 dc868498 Olga Brani
            <div ="detail ">
34 15f056df Olga Brani
                <div class="facts clearfix">
35 5836ccb9 Olga Brani
                    <span class="title">Token</span>
36 948dd719 Olga Brani
                    <span id="dummy_auth_token" class="dummy-input">&nbsp;</span>
37 948dd719 Olga Brani
                    <input value="{{ request.user.auth_token }}" type="text" name="auth_token" disabled
38 dc868498 Olga Brani
                    <span ="expires">
39 dc868498 Olga Brani
                        <span class="date">
40 31240d2c Olga Brani
                            expires in {{ user.auth_token_expires|timeuntil }}
41 31240d2c Olga Brani
                            ({{ user.auth_token_expires|date }})
42 dc868498 Olga Brani
                        </span>
43 dc868498 Olga Brani
                    </span>
44 dc868498 Olga Brani
                </div>
45 dc868498 Olga Brani
                <div class="actions">
46 dc868498 Olga Brani
                    <div class="renew-token">
47 31b499f3 Olga Brani
                        <span class="wrap">
48 31b499f3 Olga Brani
                            <a href="#" class="do">renew token</a>
49 31b499f3 Olga Brani
                            <a href="#" class="confirm">confirm</a>
50 31b499f3 Olga Brani
                            <a href="#" class="close">x</a>
51 31b499f3 Olga Brani
                        </span>
52 9c6bd23f Olga Brani
                        <p class="sub"><span>Every time you renew it, make sure to
53 9c6bd23f Olga Brani
                update the clients you use with the new token.</span></p>
54 dc868498 Olga Brani
                    </div>
55 dc868498 Olga Brani
                </div>
56 dc868498 Olga Brani
                
57 dc868498 Olga Brani
                
58 dc868498 Olga Brani
                <span class="extra-img" id="token-span">&nbsp;</span>
59 dc868498 Olga Brani
            </div>
60 dc868498 Olga Brani
            
61 7763f5c6 Kostas Papadimitriou
        </div>
62 dc868498 Olga Brani
        {% endblock %}
63 7763f5c6 Kostas Papadimitriou
    </div>
64 7763f5c6 Kostas Papadimitriou
65 9c6bd23f Olga Brani
   <div class="subsection">
66 9c6bd23f Olga Brani
     
67 31240d2c Olga Brani
        
68 9c6bd23f Olga Brani
    
69 9c6bd23f Olga Brani
    {% block page.body.description %}
70 9c6bd23f Olga Brani
        <div class="two-cols dotted clearfix">
71 9c6bd23f Olga Brani
            <div class="rt">
72 31240d2c Olga Brani
                {% block page.body.api_advanced %}
73 5836ccb9 Olga Brani
                <h2>API advanced usage</h2>
74 9c6bd23f Olga Brani
                <p>
75 31240d2c Olga Brani
                Apart from using the kamaki command line client, you can also import the
76 31240d2c Olga Brani
                kamaki library inside your code and use it directly. More details on how
77 5836ccb9 Olga Brani
                to do that on the corresponding  
78 5836ccb9 Olga Brani
                <a href="http://www.synnefo.org/docs/kamaki/latest/index.html">kamaki </a>page.</p> 
79 31240d2c Olga Brani
                <p>You can also implement the REST API calls by yourself, without
80 31240d2c Olga Brani
                using the official kamaki library if you feel confident with your
81 31240d2c Olga Brani
                programming skills. To do so, you first need to get a good grasp of the
82 31240d2c Olga Brani
                API itself; for more information take a look at the corresponding page
83 31240d2c Olga Brani
                inside the 
84 5836ccb9 Olga Brani
                <a href="http://www.synnefo.org/docs">Synnefo documentation</a>.
85 9c6bd23f Olga Brani
                </p>
86 31240d2c Olga Brani
                {% endblock %}
87 9c6bd23f Olga Brani
            </div>
88 9c6bd23f Olga Brani
            <div class="lt">
89 5836ccb9 Olga Brani
                <h2>General</h2>
90 9c6bd23f Olga Brani
                <p>{{ BRANDING_SERVICE_NAME }} provides a complete REST API that allows you to access and
91 9c6bd23f Olga Brani
    control your virtual resources programmatically. This means you can execute
92 9c6bd23f Olga Brani
    all the actions you do from the {{ BRANDING_SERVICE_NAME }} Web UI by using a command
93 9c6bd23f Olga Brani
    line client or importing the corresponding library inside your own code.</p>
94 31240d2c Olga Brani
    <p>
95 31240d2c Olga Brani
                If
96 31240d2c Olga Brani
                you want to learn more about the specification of the REST API itself,
97 5836ccb9 Olga Brani
                please take a look at the <a href="http://www.synnefo.org/docs" 
98 31240d2c Olga Brani
                alt="Synnefo documentation">Synnefo documentation</a>. 
99 31240d2c Olga Brani
                </p>
100 31240d2c Olga Brani
               
101 9c6bd23f Olga Brani
            </div>
102 9c6bd23f Olga Brani
103 9c6bd23f Olga Brani
        </div>
104 9c6bd23f Olga Brani
    
105 9c6bd23f Olga Brani
    {% endblock %}
106 9c6bd23f Olga Brani
    </div>
107 dc868498 Olga Brani
    
108 dc868498 Olga Brani
    <div class="two-cols dotted clearfix">
109 dc868498 Olga Brani
        <div class="rt">
110 31240d2c Olga Brani
           <h2>Other clients</h2>
111 31240d2c Olga Brani
           <p>If you are using a client different from kamaki that supports the OpenStack
112 31240d2c Olga Brani
APIs and needs a username/password combination to operate, please use
113 31240d2c Olga Brani
the following:</p>
114 31240d2c Olga Brani
115 31240d2c Olga Brani
<p>username:  <span class="user-data">{{ user.uuid }}</span>
116 31240d2c Olga Brani
password:  <span class="user-data">{{ user.auth_token }}</span></p>
117 31240d2c Olga Brani
118 31240d2c Olga Brani
<p>The username is your  {{ BRANDING_SERVICE_NAME }} user ID (UUID) and the password
119 5836ccb9 Olga Brani
is your Token. As you can see, its the same shown in the
120 31240d2c Olga Brani
previous section. </p>
121 dc868498 Olga Brani
        </div>
122 dc868498 Olga Brani
        <div class="lt">
123 dc868498 Olga Brani
            {% block page.body.clients %}
124 dc868498 Olga Brani
            <h2>Kamaki</h2>
125 dc868498 Olga Brani
            <p><a href="{{ client_url }}" alt="kamaki">Kamaki</a> is the official
126 469c4392 Kostas Papadimitriou
    {{ BRANDING_SERVICE_NAME }} command line client. You can use it to control your virtual
127 dc868498 Olga Brani
    resources from the command line or use it inside your scripts.</p>
128 dc868498 Olga Brani
            <p>Kamaki allows you to execute all the operations you do from the Web UI. You can use kamaki to<br><br>
129 dc868498 Olga Brani
            - register images,<br>- spawn clusters of customized VMs,<br>- connect them to
130 31b499f3 Olga Brani
    Private Virtual Networks,<br>- have them executing computations dynamically<br> <br>and
131 dc868498 Olga Brani
    many other neat things.</p>
132 dc868498 Olga Brani
            <p> Kamaki is available for most Linux distributions,
133 469c4392 Kostas Papadimitriou
    Windows and Mac OS X. To use it you will need to set it up using your
134 5836ccb9 Olga Brani
    Token and the Authentication URL, found above. To
135 469c4392 Kostas Papadimitriou
    learn more about kamaki and how to install, configure and use, take a look
136 5836ccb9 Olga Brani
    at its <a href="http://www.synnefo.org/docs/kamaki/latest/index.html">corresponding page</a>.
137 dc868498 Olga Brani
            </p>
138 dc868498 Olga Brani
             <p class="download">You can download kamaki 
139 5836ccb9 Olga Brani
    from the <a href="http://www.synnefo.org/docs/kamaki/latest/index.html">project homepage</a>.</p>
140 31240d2c Olga Brani
             <p>If you are using kamaki, you can download a pre-configured .kamakirc
141 5836ccb9 Olga Brani
file that contains your Authentication URL and Token. Store this file
142 31240d2c Olga Brani
under your home directory (~/.kamakirc) and kamaki will be able to
143 31240d2c Olga Brani
access  {{ BRANDING_SERVICE_NAME }} automatically without the need of extra
144 31240d2c Olga Brani
manual configuration.</p>
145 31240d2c Olga Brani
146 31240d2c Olga Brani
<a href="{% url api_access_config %}" class="submit">Download your .kamakirc</a> 
147 dc868498 Olga Brani
        </div>
148 dc868498 Olga Brani
        {% endblock %}
149 469c4392 Kostas Papadimitriou
    </div>
150 7763f5c6 Kostas Papadimitriou
</div>
151 7763f5c6 Kostas Papadimitriou
{% endblock %}