Statistics
| Branch: | Tag: | Revision:

root / docs / commands.rst @ a2ef112e

History | View | Annotate | Download (13 kB)

1 2151584b Stavros Sachtouris
List of commands
2 961e6040 Stavros Sachtouris
================
3 961e6040 Stavros Sachtouris
4 961e6040 Stavros Sachtouris
The commands described bellow are grouped by service. The examples showcase a sample set of group commands. The kamaki interactive shell (check `Usage section <usage.html#interactive-shell>`_ for details) is chosen as the execution environment.
5 2151584b Stavros Sachtouris
6 2151584b Stavros Sachtouris
7 2151584b Stavros Sachtouris
astakos (Identity Manager)
8 961e6040 Stavros Sachtouris
--------------------------
9 2151584b Stavros Sachtouris
10 2151584b Stavros Sachtouris
.. code-block:: text
11 2151584b Stavros Sachtouris
12 2151584b Stavros Sachtouris
    authenticate:  Authenticate a user
13 2151584b Stavros Sachtouris
14 961e6040 Stavros Sachtouris
Showcase: get user information
15 961e6040 Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16 961e6040 Stavros Sachtouris
17 961e6040 Stavros Sachtouris
In the following, the token has been set in a previous step (see `setup section <setup.html>`_ or the `quick setup guide <usage.html#quick-setup>`_)
18 2151584b Stavros Sachtouris
19 2151584b Stavros Sachtouris
.. code-block:: console
20 2151584b Stavros Sachtouris
    :emphasize-lines: 1,4
21 2151584b Stavros Sachtouris
22 2151584b Stavros Sachtouris
    * Enter astakos context *
23 2151584b Stavros Sachtouris
    [kamaki]:astakos
24 2151584b Stavros Sachtouris
25 2151584b Stavros Sachtouris
    * Authenticate user *
26 2151584b Stavros Sachtouris
    [astakos]:authenticate
27 2151584b Stavros Sachtouris
    auth_token        :  s0m3t0k3nth@t1sr3m0v3d==
28 2151584b Stavros Sachtouris
    auth_token_created:  2012-11-13T14:12:40.917034
29 2151584b Stavros Sachtouris
    auth_token_expires:  2012-12-13T14:12:40.917035
30 2151584b Stavros Sachtouris
    groups            : 
31 2151584b Stavros Sachtouris
                      default
32 2151584b Stavros Sachtouris
    has_credits       :  False
33 2151584b Stavros Sachtouris
    has_signed_terms  :  True
34 2151584b Stavros Sachtouris
    uniq              :  myaccount@grnet.gr
35 2151584b Stavros Sachtouris
    username          :  4215th3b357num9323v32
36 2151584b Stavros Sachtouris
37 2151584b Stavros Sachtouris
flavor (Compute/Cyclades)
38 961e6040 Stavros Sachtouris
-------------------------
39 2151584b Stavros Sachtouris
40 2151584b Stavros Sachtouris
.. code-block:: text
41 2151584b Stavros Sachtouris
42 2151584b Stavros Sachtouris
    info:  Get flavor details
43 2151584b Stavros Sachtouris
    list:  List flavors
44 2151584b Stavros Sachtouris
45 2151584b Stavros Sachtouris
Showcase: show details for flavor with id 43
46 961e6040 Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 2151584b Stavros Sachtouris
48 2151584b Stavros Sachtouris
.. code-block:: console
49 2151584b Stavros Sachtouris
    :emphasize-lines: 1,4
50 2151584b Stavros Sachtouris
51 2151584b Stavros Sachtouris
    * Enter flavor context *
52 2151584b Stavros Sachtouris
    [kamaki]: flavor
53 2151584b Stavros Sachtouris
54 2151584b Stavros Sachtouris
    * Get details about flavor with id 43 *
55 2151584b Stavros Sachtouris
    [flavor]: info 43
56 2151584b Stavros Sachtouris
    SNF:disk_template:  drbd
57 2151584b Stavros Sachtouris
    cpu              :  4
58 2151584b Stavros Sachtouris
    disk             :  10
59 2151584b Stavros Sachtouris
    id               :  43
60 2151584b Stavros Sachtouris
    name             :  C4R2048D10
61 2151584b Stavros Sachtouris
    ram              :  2048
62 2151584b Stavros Sachtouris
63 2151584b Stavros Sachtouris
image (Compute/Cyclades + Glance)
64 961e6040 Stavros Sachtouris
---------------------------------
65 2151584b Stavros Sachtouris
66 2151584b Stavros Sachtouris
.. code-block:: text
67 2151584b Stavros Sachtouris
68 2151584b Stavros Sachtouris
    addmember  :  Add a member to an image
69 2151584b Stavros Sachtouris
    addproperty:  Add an image property
70 2151584b Stavros Sachtouris
    delete     :  Delete image
71 2151584b Stavros Sachtouris
    delmember  :  Remove a member from an image
72 2151584b Stavros Sachtouris
    delproperty:  Delete an image property
73 2151584b Stavros Sachtouris
    info       :  Get image details
74 2151584b Stavros Sachtouris
    list       :  List images
75 2151584b Stavros Sachtouris
    members    :  Get image members
76 2151584b Stavros Sachtouris
    meta       :  Get image metadata
77 2151584b Stavros Sachtouris
    properties :  Get image properties
78 2151584b Stavros Sachtouris
    public     :  List public images
79 2151584b Stavros Sachtouris
    register   :  (Re)Register an image
80 2151584b Stavros Sachtouris
    setmembers :  Set the members of an image
81 2151584b Stavros Sachtouris
    setproperty:  Update an image property
82 2151584b Stavros Sachtouris
    shared     :  List shared images
83 2151584b Stavros Sachtouris
84 2151584b Stavros Sachtouris
Showcase: Pick an image and list the properties
85 961e6040 Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
86 2151584b Stavros Sachtouris
87 2151584b Stavros Sachtouris
.. code-block:: console
88 2151584b Stavros Sachtouris
    :emphasize-lines: 1,4,18
89 2151584b Stavros Sachtouris
90 2151584b Stavros Sachtouris
    * Enter image context *
91 2151584b Stavros Sachtouris
    [kamaki]:image
92 2151584b Stavros Sachtouris
93 2151584b Stavros Sachtouris
    * list all available images *
94 2151584b Stavros Sachtouris
    [image]:list
95 2151584b Stavros Sachtouris
    1395fdfb-51b4-419f-bb02-f7d632860611 (Ubuntu Desktop LTS)
96 2151584b Stavros Sachtouris
    1580deb4-edb3-4496-a27f-7a246c4c0528 (Ubuntu Desktop)
97 2151584b Stavros Sachtouris
    18a82962-43eb-4b32-8e28-8f8880af89d7 (Kubuntu LTS)
98 2151584b Stavros Sachtouris
    6aa6eafd-dccb-422d-a904-67fe2bdde87e (Debian Desktop)
99 2151584b Stavros Sachtouris
    6b5681e4-7502-46ae-b1e9-9fd837932095 (maelstrom)
100 2151584b Stavros Sachtouris
    78262ee7-949e-4d70-af3a-85360c3de57a (Windows Server 2012)
101 2151584b Stavros Sachtouris
    86bc2414-0fb3-4898-a637-240292243302 (Fedora)
102 2151584b Stavros Sachtouris
    926ab1c5-2d85-49d4-aebe-0fce712789b9 (Windows Server 2008)
103 2151584b Stavros Sachtouris
    b2dffe52-64a4-48c3-8a4c-8214cc3165cf (Debian Base)
104 2151584b Stavros Sachtouris
    baf2321c-57a0-4a69-825d-49f49cea163a (CentOS)
105 2151584b Stavros Sachtouris
    c1d27b46-d875-4f5c-b7f1-f39b5af62905 (Kubuntu)
106 2151584b Stavros Sachtouris
107 2151584b Stavros Sachtouris
    * Get properties of image with id b2dffe52-64a4-48c3-8a4c-8214cc3165cf *
108 2151584b Stavros Sachtouris
    [image]:properties b2dffe52-64a4-48c3-8a4c-8214cc3165cf
109 2151584b Stavros Sachtouris
    description   :  Debian 6.0.6 (Squeeze) Base System
110 2151584b Stavros Sachtouris
    gui           :  No GUI
111 2151584b Stavros Sachtouris
    kernel        :  2.6.32
112 2151584b Stavros Sachtouris
    os            :  debian
113 2151584b Stavros Sachtouris
    osfamily      :  linux
114 2151584b Stavros Sachtouris
    root_partition:  1
115 2151584b Stavros Sachtouris
    sortorder     :  1
116 2151584b Stavros Sachtouris
    users         :  root
117 2151584b Stavros Sachtouris
118 2151584b Stavros Sachtouris
server (Compute/Cyclades)
119 961e6040 Stavros Sachtouris
-------------------------
120 2151584b Stavros Sachtouris
121 2151584b Stavros Sachtouris
.. code-block:: text
122 2151584b Stavros Sachtouris
123 2151584b Stavros Sachtouris
    addmeta :  Add server metadata
124 2151584b Stavros Sachtouris
    addr    :  List a server's nic address
125 2151584b Stavros Sachtouris
    console :  Get a VNC console
126 2151584b Stavros Sachtouris
    create  :  Create a server
127 2151584b Stavros Sachtouris
    delete  :  Delete a server
128 2151584b Stavros Sachtouris
    delmeta :  Delete server metadata
129 2151584b Stavros Sachtouris
    firewall:  Set the server's firewall profile
130 2151584b Stavros Sachtouris
    info    :  Get server details
131 2151584b Stavros Sachtouris
    list    :  List servers
132 2151584b Stavros Sachtouris
    meta    :  Get a server's metadata
133 2151584b Stavros Sachtouris
    reboot  :  Reboot a server
134 2151584b Stavros Sachtouris
    rename  :  Update a server's name
135 2151584b Stavros Sachtouris
    setmeta :  Update server's metadata
136 2151584b Stavros Sachtouris
    shutdown:  Shutdown a server
137 2151584b Stavros Sachtouris
    start   :  Start a server
138 2151584b Stavros Sachtouris
    stats   :  Get server statistics
139 2151584b Stavros Sachtouris
    wait    :  Wait for server to finish
140 2151584b Stavros Sachtouris
141 961e6040 Stavros Sachtouris
Showcase: Create a server
142 961e6040 Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^
143 2151584b Stavros Sachtouris
144 2151584b Stavros Sachtouris
.. code-block:: console
145 2151584b Stavros Sachtouris
    :emphasize-lines: 1,4,21,35,44,62
146 2151584b Stavros Sachtouris
147 2151584b Stavros Sachtouris
    * Enter server context *
148 2151584b Stavros Sachtouris
    [kamaki]:server
149 2151584b Stavros Sachtouris
150 2151584b Stavros Sachtouris
    * See server-create help *
151 2151584b Stavros Sachtouris
    [server]:create -h
152 2151584b Stavros Sachtouris
    usage: create <name> <flavor id> <image id>
153 2151584b Stavros Sachtouris
            [--personality PERSONALITY] [-h] [--config CONFIG]
154 2151584b Stavros Sachtouris
155 2151584b Stavros Sachtouris
    Create a server
156 2151584b Stavros Sachtouris
157 2151584b Stavros Sachtouris
    optional arguments:
158 2151584b Stavros Sachtouris
      -v, --verbose         More info at response
159 2151584b Stavros Sachtouris
      --personality PERSONALITY
160 2151584b Stavros Sachtouris
                            add a personality file
161 2151584b Stavros Sachtouris
      -d, --debug           Include debug output
162 2151584b Stavros Sachtouris
      -h, --help            Show help message
163 2151584b Stavros Sachtouris
      -i, --include         Include protocol headers in the output
164 2151584b Stavros Sachtouris
      --config CONFIG       Path to configuration file
165 2151584b Stavros Sachtouris
      -s, --silent          Do not output anything
166 2151584b Stavros Sachtouris
167 2151584b Stavros Sachtouris
    * List all available images *
168 2151584b Stavros Sachtouris
    [server]:/image list
169 2151584b Stavros Sachtouris
    1395fdfb-51b4-419f-bb02-f7d632860611 (Ubuntu Desktop LTS)
170 2151584b Stavros Sachtouris
    1580deb4-edb3-4496-a27f-7a246c4c0528 (Ubuntu Desktop)
171 2151584b Stavros Sachtouris
    18a82962-43eb-4b32-8e28-8f8880af89d7 (Kubuntu LTS)
172 2151584b Stavros Sachtouris
    6aa6eafd-dccb-422d-a904-67fe2bdde87e (Debian Desktop)
173 2151584b Stavros Sachtouris
    6b5681e4-7502-46ae-b1e9-9fd837932095 (maelstrom)
174 2151584b Stavros Sachtouris
    78262ee7-949e-4d70-af3a-85360c3de57a (Windows Server 2012)
175 2151584b Stavros Sachtouris
    86bc2414-0fb3-4898-a637-240292243302 (Fedora)
176 2151584b Stavros Sachtouris
    926ab1c5-2d85-49d4-aebe-0fce712789b9 (Windows Server 2008)
177 2151584b Stavros Sachtouris
    b2dffe52-64a4-48c3-8a4c-8214cc3165cf (Debian Base)
178 2151584b Stavros Sachtouris
    baf2321c-57a0-4a69-825d-49f49cea163a (CentOS)
179 2151584b Stavros Sachtouris
    c1d27b46-d875-4f5c-b7f1-f39b5af62905 (Kubuntu)
180 2151584b Stavros Sachtouris
181 2151584b Stavros Sachtouris
    * See details of flavor with id 1 *
182 2151584b Stavros Sachtouris
    [server]:/flavor info 1
183 2151584b Stavros Sachtouris
    SNF:disk_template:  drbd
184 2151584b Stavros Sachtouris
    cpu              :  1
185 2151584b Stavros Sachtouris
    disk             :  20
186 2151584b Stavros Sachtouris
    id               :  1
187 2151584b Stavros Sachtouris
    name             :  C1R1024D20
188 2151584b Stavros Sachtouris
    ram              :  1024
189 2151584b Stavros Sachtouris
190 2151584b Stavros Sachtouris
    * Create a debian server named 'My Small Debian Server'
191 2151584b Stavros Sachtouris
    [server]:create 'My Small Debian Server' 1 b2dffe52-64a4-48c3-8a4c-8214cc3165cf
192 2151584b Stavros Sachtouris
    adminPass:  L8gu2wbZ94
193 2151584b Stavros Sachtouris
    created  :  2012-11-23T16:56:04.190813+00:00
194 2151584b Stavros Sachtouris
    flavorRef:  1
195 2151584b Stavros Sachtouris
    hostId   :  
196 2151584b Stavros Sachtouris
    id       :  11687
197 2151584b Stavros Sachtouris
    imageRef :  b2dffe52-64a4-48c3-8a4c-8214cc3165cf
198 2151584b Stavros Sachtouris
    metadata : 
199 2151584b Stavros Sachtouris
             values: 
200 2151584b Stavros Sachtouris
                   os   :  debian
201 2151584b Stavros Sachtouris
                   users:  root
202 2151584b Stavros Sachtouris
    name     :  My Small Debian Server
203 2151584b Stavros Sachtouris
    progress :  0
204 2151584b Stavros Sachtouris
    status   :  BUILD
205 2151584b Stavros Sachtouris
    suspended:  False
206 2151584b Stavros Sachtouris
    updated  :  2012-11-23T16:56:04.761962+00:00
207 2151584b Stavros Sachtouris
208 2151584b Stavros Sachtouris
    * wait for server to build (optional) *
209 2151584b Stavros Sachtouris
    [server]:wait 11687
210 2151584b Stavros Sachtouris
    Server 11687 still in BUILD mode |||||||||||||||||    | 80% - 3s
211 2151584b Stavros Sachtouris
    Server 11687 is now in ACTIVE mode
212 2151584b Stavros Sachtouris
213 2151584b Stavros Sachtouris
.. Note:: In kamaki shell, / is used to access top-level command groups while working in command group contexts
214 2151584b Stavros Sachtouris
215 2151584b Stavros Sachtouris
network (Compute/Cyclades)
216 961e6040 Stavros Sachtouris
--------------------------
217 2151584b Stavros Sachtouris
218 2151584b Stavros Sachtouris
.. code-block:: text
219 2151584b Stavros Sachtouris
220 2151584b Stavros Sachtouris
    connect   :  Connect a server to a network
221 2151584b Stavros Sachtouris
    create    :  Create a network
222 2151584b Stavros Sachtouris
    delete    :  Delete a network
223 2151584b Stavros Sachtouris
    disconnect:  Disconnect a nic of a server to a network
224 2151584b Stavros Sachtouris
    info      :  Get network details
225 2151584b Stavros Sachtouris
    list      :  List networks
226 2151584b Stavros Sachtouris
    rename    :  Update network name
227 2151584b Stavros Sachtouris
228 2151584b Stavros Sachtouris
Showcase: Connect a network to a VM
229 961e6040 Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
230 2151584b Stavros Sachtouris
231 2151584b Stavros Sachtouris
.. code-block:: console
232 2151584b Stavros Sachtouris
    :emphasize-lines: 1,4,9,24,27,44
233 2151584b Stavros Sachtouris
234 2151584b Stavros Sachtouris
    * Enter network context *
235 2151584b Stavros Sachtouris
    [kamaki]:network
236 2151584b Stavros Sachtouris
237 2151584b Stavros Sachtouris
    * List user-owned VMs *
238 2151584b Stavros Sachtouris
    [network]:/server list
239 2151584b Stavros Sachtouris
    11687 (My Small Debian Server)
240 2151584b Stavros Sachtouris
    11688 (An Ubuntu server)
241 2151584b Stavros Sachtouris
242 2151584b Stavros Sachtouris
    * Try network-connect (to get help) *
243 2151584b Stavros Sachtouris
    [network]:connect 
244 2151584b Stavros Sachtouris
    Syntax error
245 2151584b Stavros Sachtouris
    usage: connect <server id> <network id> [-s] [-h] [-i] [--config CONFIG]
246 2151584b Stavros Sachtouris
247 2151584b Stavros Sachtouris
    Connect a server to a network
248 2151584b Stavros Sachtouris
249 2151584b Stavros Sachtouris
    Syntax: connect  <server id> <network id>
250 2151584b Stavros Sachtouris
      --config    :  Path to configuration file
251 2151584b Stavros Sachtouris
      -d,--debug  :  Include debug output
252 2151584b Stavros Sachtouris
      -h,--help   :  Show help message
253 2151584b Stavros Sachtouris
      -i,--include:  Include protocol headers in the output
254 2151584b Stavros Sachtouris
      -s,--silent :  Do not output anything
255 2151584b Stavros Sachtouris
      -v,--verbose:  More info at response
256 2151584b Stavros Sachtouris
257 2151584b Stavros Sachtouris
    * Connect VM with id 11687 to network with id 1409
258 2151584b Stavros Sachtouris
    [network]: connect 11687 1409
259 2151584b Stavros Sachtouris
260 2151584b Stavros Sachtouris
    * Get details on network with id 1409
261 2151584b Stavros Sachtouris
    [network]:info 1409
262 2151584b Stavros Sachtouris
      attachments: 
263 2151584b Stavros Sachtouris
                 nic-11687-1
264 2151584b Stavros Sachtouris
      cidr       :  192.168.1.0/24
265 2151584b Stavros Sachtouris
      cidr6      :  None
266 2151584b Stavros Sachtouris
      created    :  2012-11-23T17:17:20.560098+00:00
267 2151584b Stavros Sachtouris
      dhcp       :  True
268 2151584b Stavros Sachtouris
      gateway    :  None
269 2151584b Stavros Sachtouris
      gateway6   :  None
270 2151584b Stavros Sachtouris
      id         :  1409
271 2151584b Stavros Sachtouris
      name       :  my network
272 2151584b Stavros Sachtouris
      public     :  False
273 2151584b Stavros Sachtouris
      status     :  ACTIVE
274 2151584b Stavros Sachtouris
      type       :  PRIVATE_MAC_FILTERED
275 2151584b Stavros Sachtouris
      updated    :  2012-11-23T17:18:25.095225+00:00
276 2151584b Stavros Sachtouris
277 2151584b Stavros Sachtouris
    * Get connectivity details on VM with id 11687 *
278 2151584b Stavros Sachtouris
    [network]:/server addr 11687
279 2151584b Stavros Sachtouris
    id:  nic-11687-1
280 2151584b Stavros Sachtouris
        ipv4       :  192.168.1.1
281 2151584b Stavros Sachtouris
        ipv6       :  None
282 2151584b Stavros Sachtouris
        mac_address:  aa:0f:c2:0b:0e:85
283 2151584b Stavros Sachtouris
        network_id :  1409
284 2151584b Stavros Sachtouris
        firewallProfile:  DISABLED
285 2151584b Stavros Sachtouris
    id:  nic-11687-0
286 2151584b Stavros Sachtouris
        ipv4           :  83.212.106.111
287 2151584b Stavros Sachtouris
        ipv6           :  2001:648:2ffc:1116:a80c:f2ff:fe12:a9e
288 2151584b Stavros Sachtouris
        mac_address    :  aa:0c:f2:12:0a:9e
289 2151584b Stavros Sachtouris
        network_id     :  1369
290 2151584b Stavros Sachtouris
291 2151584b Stavros Sachtouris
.. Note:: In kamaki shell, / is used to access top-level command groups while working in command group contexts
292 2151584b Stavros Sachtouris
293 2151584b Stavros Sachtouris
store (Storage/Pithos+)
294 961e6040 Stavros Sachtouris
-----------------------
295 2151584b Stavros Sachtouris
296 2151584b Stavros Sachtouris
.. code-block:: text
297 2151584b Stavros Sachtouris
298 2151584b Stavros Sachtouris
    append        :  Append local file to remote
299 2151584b Stavros Sachtouris
    cat           :  Print a file to console
300 2151584b Stavros Sachtouris
    copy          :  Copy an object
301 2151584b Stavros Sachtouris
    create        :  Create a container or a directory object
302 2151584b Stavros Sachtouris
    delete        :  Delete a container [or an object]
303 2151584b Stavros Sachtouris
    delgroup      :  Delete a user group on an account
304 2151584b Stavros Sachtouris
    delmeta       :  Delete an existing metadatum of account [, container [or object]]
305 2151584b Stavros Sachtouris
    delpermissions:  Delete all sharing permissions
306 2151584b Stavros Sachtouris
    download      :  Download a file
307 2151584b Stavros Sachtouris
    group         :  Get user groups details for account
308 2151584b Stavros Sachtouris
    hashmap       :  Get the hashmap of an object
309 2151584b Stavros Sachtouris
    info          :  Get information for account [, container [or object]]
310 2151584b Stavros Sachtouris
    list          :  List containers, object trees or objects in a directory
311 2151584b Stavros Sachtouris
    manifest      :  Create a remote file with uploaded parts by manifestation
312 2151584b Stavros Sachtouris
    meta          :  Get custom meta-content for account [, container [or object]]
313 2151584b Stavros Sachtouris
    mkdir         :  Create a directory
314 2151584b Stavros Sachtouris
    move          :  Copy an object
315 2151584b Stavros Sachtouris
    overwrite     :  Overwrite part (from start to end) of a remote file
316 2151584b Stavros Sachtouris
    permissions   :  Get object read/write permissions
317 2151584b Stavros Sachtouris
    publish       :  Publish an object
318 2151584b Stavros Sachtouris
    purge         :  Purge a container
319 2151584b Stavros Sachtouris
    quota         :  Get  quota for account [or container]
320 2151584b Stavros Sachtouris
    setgroup      :  Create/update a new user group on account
321 2151584b Stavros Sachtouris
    setmeta       :  Set a new metadatum for account [, container [or object]]
322 2151584b Stavros Sachtouris
    setpermissions:  Set sharing permissions
323 2151584b Stavros Sachtouris
    setquota      :  Set new quota (in KB) for account [or container]
324 2151584b Stavros Sachtouris
    setversioning :  Set new versioning (auto, none) for account [or container]
325 2151584b Stavros Sachtouris
    sharers       :  List the accounts that share objects with default account
326 2151584b Stavros Sachtouris
    truncate      :  Truncate remote file up to a size
327 2151584b Stavros Sachtouris
    unpublish     :  Unpublish an object
328 2151584b Stavros Sachtouris
    upload        :  Upload a file
329 2151584b Stavros Sachtouris
    versioning    :  Get  versioning for account [or container ]
330 2151584b Stavros Sachtouris
    versions      :  Get the version list of an object
331 2151584b Stavros Sachtouris
332 961e6040 Stavros Sachtouris
Showcase: Upload and download a file
333 961e6040 Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
334 2151584b Stavros Sachtouris
335 2151584b Stavros Sachtouris
.. code-block:: console
336 2151584b Stavros Sachtouris
    :emphasize-lines: 1,7,11,16,21,29,33,37,41,44,51,55,60,64
337 2151584b Stavros Sachtouris
338 2151584b Stavros Sachtouris
    * Create a random binarry file at current OS path *
339 2151584b Stavros Sachtouris
    [kamaki]:!dd bs=4M if=/dev/zero of=rndm_local.file count=5
340 2151584b Stavros Sachtouris
    5+0 records in
341 2151584b Stavros Sachtouris
    5+0 records out
342 2151584b Stavros Sachtouris
    20971520 bytes (21 MB) copied, 0.016162 s, 1.3 GB/s
343 2151584b Stavros Sachtouris
344 2151584b Stavros Sachtouris
    * Enter store context *
345 2151584b Stavros Sachtouris
    [kamaki]:store
346 2151584b Stavros Sachtouris
347 2151584b Stavros Sachtouris
348 2151584b Stavros Sachtouris
    * Check local file *
349 2151584b Stavros Sachtouris
    [store]:!ls -lh rndm_local.file
350 2151584b Stavros Sachtouris
    -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:36 rndm_local.file
351 2151584b Stavros Sachtouris
352 2151584b Stavros Sachtouris
353 2151584b Stavros Sachtouris
    * Create two containers *
354 2151584b Stavros Sachtouris
    [store]:create mycont1
355 2151584b Stavros Sachtouris
    [store]:create mycont2
356 2151584b Stavros Sachtouris
357 2151584b Stavros Sachtouris
358 2151584b Stavros Sachtouris
    * List accessible containers *    
359 2151584b Stavros Sachtouris
    [store]:list
360 2151584b Stavros Sachtouris
    1. mycont1 (0B, 0 objects)
361 2151584b Stavros Sachtouris
    2. mycont2 (0B, 0 objects)
362 2151584b Stavros Sachtouris
    3. pithos (0B, 0 objects)
363 2151584b Stavros Sachtouris
    4. trash (0B, 0 objects)
364 2151584b Stavros Sachtouris
365 2151584b Stavros Sachtouris
366 2151584b Stavros Sachtouris
    * Upload local file to 1st container *
367 2151584b Stavros Sachtouris
    [store]:upload rndm_local.file mycont1
368 2151584b Stavros Sachtouris
369 2151584b Stavros Sachtouris
370 2151584b Stavros Sachtouris
    * Check if file has been uploaded *
371 2151584b Stavros Sachtouris
    [store]:list mycont1
372 2151584b Stavros Sachtouris
    1.    20M rndm_local.file
373 2151584b Stavros Sachtouris
374 2151584b Stavros Sachtouris
    * Create directory mydir on second container *
375 2151584b Stavros Sachtouris
    [store]:mkdir mycont2:mydir
376 2151584b Stavros Sachtouris
377 2151584b Stavros Sachtouris
378 2151584b Stavros Sachtouris
    * Move file from 1st to 2nd container (and in the directory) *
379 2151584b Stavros Sachtouris
    [store]:move mycont1:rndm_local.file mycont2:mydir/rndm_local.file
380 2151584b Stavros Sachtouris
381 2151584b Stavros Sachtouris
    * Check contents of both containers *
382 2151584b Stavros Sachtouris
    [store]:list mycont1
383 2151584b Stavros Sachtouris
    [store]:list mycont2
384 2151584b Stavros Sachtouris
    1.      D mydir/
385 2151584b Stavros Sachtouris
    2.    20M mydir/rndm_local.file
386 2151584b Stavros Sachtouris
387 2151584b Stavros Sachtouris
388 2151584b Stavros Sachtouris
    * Copy file from 2nd to 1st container, with a new name *
389 2151584b Stavros Sachtouris
    [store]:copy mycont2:mydir/rndm_local.file mycont1:rndm_remote.file
390 2151584b Stavros Sachtouris
391 2151584b Stavros Sachtouris
392 2151584b Stavros Sachtouris
    * Check pasted file *
393 2151584b Stavros Sachtouris
    [store]:list mycont1
394 2151584b Stavros Sachtouris
    1.    20M rndm_remote.file
395 2151584b Stavros Sachtouris
396 2151584b Stavros Sachtouris
397 2151584b Stavros Sachtouris
    * Download pasted file to local file system *
398 2151584b Stavros Sachtouris
    [store]:download mycont1:rndm_remote.file rndm_remote.file
399 2151584b Stavros Sachtouris
400 2151584b Stavros Sachtouris
401 2151584b Stavros Sachtouris
    * Check if file is downloaded and if it is the same to original *
402 2151584b Stavros Sachtouris
    [store]:!ls -lh *.file
403 2151584b Stavros Sachtouris
    -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:36 rndm_local.file
404 2151584b Stavros Sachtouris
    -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:42 rndm_remote.file
405 2151584b Stavros Sachtouris
    [store]:!diff rndm_local.file rndm_remote.file
406 2151584b Stavros Sachtouris
407 2151584b Stavros Sachtouris
.. Note:: In kamaki shell, ! is used to execute OS shell commands (bash in the above)