Statistics
| Branch: | Tag: | Revision:

root / docs / commands.rst @ ef04bdeb

History | View | Annotate | Download (14.3 kB)

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