Statistics
| Branch: | Tag: | Revision:

root / docs / commands.rst @ 16d7b9ff

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