Statistics
| Branch: | Tag: | Revision:

root / docs / commands.rst @ 76769d2f

History | View | Annotate | Download (15.7 kB)

1 2151584b Stavros Sachtouris
List of commands
2 961e6040 Stavros Sachtouris
================
3 961e6040 Stavros Sachtouris
4 c4f606c0 Stavros Sachtouris
Kamaki commands follow this scheme::
5 c4f606c0 Stavros Sachtouris
6 c4f606c0 Stavros Sachtouris
    [kamaki] <object> <action> [identifiers] [non-positional arguments]
7 c4f606c0 Stavros Sachtouris
8 c4f606c0 Stavros Sachtouris
In this context, objects are not services, but virtual objects like a server, a
9 c4f606c0 Stavros Sachtouris
file or an image. The action concerns objects of the specified type. Some
10 c4f606c0 Stavros Sachtouris
actions (e.g. "delete" or "info") need to operate on an existing object. The
11 c4f606c0 Stavros Sachtouris
identifiers strictly identify this object and they can have the form of an id 
12 c4f606c0 Stavros Sachtouris
(e.g., `server delete <SERVER_ID>`) or a foreign key (e.g., 
13 c4f606c0 Stavros Sachtouris
`port create <NETWORK_ID> <DEVICE_ID>`)
14 c4f606c0 Stavros Sachtouris
15 c4f606c0 Stavros Sachtouris
The examples bellow showcase some commands. The kamaki-shell (check
16 fa382f9e Stavros Sachtouris
`Usage section <usage.html#interactive-shell>`_ for details) is chosen as the
17 fa382f9e Stavros Sachtouris
execution environment.
18 2151584b Stavros Sachtouris
19 2151584b Stavros Sachtouris
20 c4f606c0 Stavros Sachtouris
user (Identity/Astakos)
21 0ea31480 Stavros Sachtouris
-----------------------
22 2151584b Stavros Sachtouris
23 2151584b Stavros Sachtouris
.. code-block:: text
24 2151584b Stavros Sachtouris
25 c4f606c0 Stavros Sachtouris
    info          Get info for (current) session user
26 c4f606c0 Stavros Sachtouris
    uuid2name     Get user name(s) from uuid(s)
27 c4f606c0 Stavros Sachtouris
    authenticate  Authenticate a user and get all authentication information
28 c4f606c0 Stavros Sachtouris
    list          List (cached) session users
29 c4f606c0 Stavros Sachtouris
    add           Authenticate user by token and add to kamaki session (cache)
30 c4f606c0 Stavros Sachtouris
    name2uuid     Get user uuid(s) from name(s)
31 c4f606c0 Stavros Sachtouris
    select        Select user from the (cached) list as current session user
32 c4f606c0 Stavros Sachtouris
    delete        Delete user (token) from the (cached) list of session users
33 2151584b Stavros Sachtouris
34 961e6040 Stavros Sachtouris
Showcase: get user information
35 961e6040 Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36 961e6040 Stavros Sachtouris
37 c4f606c0 Stavros Sachtouris
In the following, cloud URL and TOKEN were set in a previous step (see
38 fa382f9e Stavros Sachtouris
`setup section <setup.html>`_ or the
39 fa382f9e Stavros Sachtouris
`quick setup guide <usage.html#quick-setup>`_)
40 2151584b Stavros Sachtouris
41 2151584b Stavros Sachtouris
.. code-block:: console
42 2151584b Stavros Sachtouris
    :emphasize-lines: 1,4
43 2151584b Stavros Sachtouris
44 0ea31480 Stavros Sachtouris
    * Enter user context *
45 0ea31480 Stavros Sachtouris
    [kamaki]: user
46 2151584b Stavros Sachtouris
47 2151584b Stavros Sachtouris
    * Authenticate user *
48 c4f606c0 Stavros Sachtouris
    [user]: info
49 fa382f9e Stavros Sachtouris
    ...
50 c4f606c0 Stavros Sachtouris
    name:  My Real Name
51 c4f606c0 Stavros Sachtouris
    id:  ab1cde23-45fg-6h7i-8j9k-10l1m11no2pq
52 c4f606c0 Stavros Sachtouris
53 c4f606c0 Stavros Sachtouris
    [user]: exit
54 c4f606c0 Stavros Sachtouris
    [kamaki]:
55 c4f606c0 Stavros Sachtouris
56 c4f606c0 Stavros Sachtouris
project (Astakos)
57 c4f606c0 Stavros Sachtouris
-----------------
58 c4f606c0 Stavros Sachtouris
59 c4f606c0 Stavros Sachtouris
.. code-block:: text
60 c4f606c0 Stavros Sachtouris
61 c4f606c0 Stavros Sachtouris
    info          Get details for a project
62 c4f606c0 Stavros Sachtouris
    unsuspend     Resume a suspended project (special privileges needed)
63 c4f606c0 Stavros Sachtouris
    suspend       Suspend a project (special privileges needed)
64 c4f606c0 Stavros Sachtouris
    list          List all projects
65 c4f606c0 Stavros Sachtouris
    create        Apply for a new project
66 c4f606c0 Stavros Sachtouris
    modify        Modify a project
67 c4f606c0 Stavros Sachtouris
    terminate     Terminate a project (special privileges needed)
68 c4f606c0 Stavros Sachtouris
    application   Application management commands
69 c4f606c0 Stavros Sachtouris
    membership    Project membership management commands
70 c4f606c0 Stavros Sachtouris
    reinstate     Reinstate a terminated project (special privileges needed)
71 c4f606c0 Stavros Sachtouris
72 c4f606c0 Stavros Sachtouris
quota (Account/Astakos)
73 c4f606c0 Stavros Sachtouris
-----------------------
74 c4f606c0 Stavros Sachtouris
75 c4f606c0 Stavros Sachtouris
.. code-block:: text
76 fa382f9e Stavros Sachtouris
77 c4f606c0 Stavros Sachtouris
    list          Get user quotas
78 c4f606c0 Stavros Sachtouris
    info          Get quota for a service (cyclades, pithos, astakos)
79 c4f606c0 Stavros Sachtouris
80 c4f606c0 Stavros Sachtouris
resource (Astakos)
81 c4f606c0 Stavros Sachtouris
------------------
82 c4f606c0 Stavros Sachtouris
83 c4f606c0 Stavros Sachtouris
.. code-block:: text
84 c4f606c0 Stavros Sachtouris
85 c4f606c0 Stavros Sachtouris
    list          List user resources
86 e9e547ed Stavros Sachtouris
87 2151584b Stavros Sachtouris
flavor (Compute/Cyclades)
88 961e6040 Stavros Sachtouris
-------------------------
89 2151584b Stavros Sachtouris
90 2151584b Stavros Sachtouris
.. code-block:: text
91 2151584b Stavros Sachtouris
92 2151584b Stavros Sachtouris
    info:  Get flavor details
93 2151584b Stavros Sachtouris
    list:  List flavors
94 2151584b Stavros Sachtouris
95 2151584b Stavros Sachtouris
Showcase: show details for flavor with id 43
96 961e6040 Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97 2151584b Stavros Sachtouris
98 2151584b Stavros Sachtouris
.. code-block:: console
99 2151584b Stavros Sachtouris
    :emphasize-lines: 1,4
100 2151584b Stavros Sachtouris
101 2151584b Stavros Sachtouris
    * Enter flavor context *
102 2151584b Stavros Sachtouris
    [kamaki]: flavor
103 2151584b Stavros Sachtouris
104 2151584b Stavros Sachtouris
    * Get details about flavor with id 43 *
105 2151584b Stavros Sachtouris
    [flavor]: info 43
106 2151584b Stavros Sachtouris
    SNF:disk_template:  drbd
107 c4f606c0 Stavros Sachtouris
    cpu:  4
108 fa382f9e Stavros Sachtouris
    disk:  10
109 c4f606c0 Stavros Sachtouris
    id:  43
110 fa382f9e Stavros Sachtouris
    name:  C4R2048D10
111 c4f606c0 Stavros Sachtouris
    ram:  2048
112 2151584b Stavros Sachtouris
113 c4f606c0 Stavros Sachtouris
image (Image/Plankton)
114 c4f606c0 Stavros Sachtouris
----------------------
115 2151584b Stavros Sachtouris
116 2151584b Stavros Sachtouris
.. code-block:: text
117 2151584b Stavros Sachtouris
118 c4f606c0 Stavros Sachtouris
    info          Get image metadata
119 c4f606c0 Stavros Sachtouris
    list          List images accessible by user
120 c4f606c0 Stavros Sachtouris
    register      (Re)Register an image file to an Image service
121 c4f606c0 Stavros Sachtouris
    modify        Add / update metadata and properties for an image
122 c4f606c0 Stavros Sachtouris
    unregister    Unregister an image (does not delete the image file)
123 2151584b Stavros Sachtouris
124 2151584b Stavros Sachtouris
Showcase: Pick an image and list the properties
125 961e6040 Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126 2151584b Stavros Sachtouris
127 2151584b Stavros Sachtouris
.. code-block:: console
128 2151584b Stavros Sachtouris
    :emphasize-lines: 1,4,18
129 2151584b Stavros Sachtouris
130 2151584b Stavros Sachtouris
    * Enter image context *
131 0ea31480 Stavros Sachtouris
    [kamaki]: image
132 2151584b Stavros Sachtouris
133 2151584b Stavros Sachtouris
    * list all available images *
134 0ea31480 Stavros Sachtouris
    [image]: list
135 fa382f9e Stavros Sachtouris
    926ab1c5-2d85-49d4-aebe-0fce712789b9 Windows Server 2008
136 573be34f Stavros Sachtouris
     container_format:  bare
137 c4f606c0 Stavros Sachtouris
     disk_format:  diskdump
138 c4f606c0 Stavros Sachtouris
     id:  926ab1c5-2d85-49d4-aebe-0fce712789b9
139 c4f606c0 Stavros Sachtouris
     size:  11917066240
140 c4f606c0 Stavros Sachtouris
     status:  available
141 fa382f9e Stavros Sachtouris
    78262ee7-949e-4d70-af3a-85360c3de57a Windows Server 2012
142 573be34f Stavros Sachtouris
     container_format:  bare
143 c4f606c0 Stavros Sachtouris
     disk_format:  diskdump
144 c4f606c0 Stavros Sachtouris
     id:  78262ee7-949e-4d70-af3a-85360c3de57a
145 c4f606c0 Stavros Sachtouris
     size:  11697913856
146 c4f606c0 Stavros Sachtouris
     status:  available
147 fa382f9e Stavros Sachtouris
    5ed5a29b-292c-4fe0-b32c-2e2b65628635 ubuntu
148 573be34f Stavros Sachtouris
     container_format:  bare
149 c4f606c0 Stavros Sachtouris
     disk_format:  diskdump
150 c4f606c0 Stavros Sachtouris
     id:  5ed5a29b-292c-4fe0-b32c-2e2b65628635
151 c4f606c0 Stavros Sachtouris
     size:  2578100224
152 c4f606c0 Stavros Sachtouris
     status:  available
153 fa382f9e Stavros Sachtouris
    1f8454f0-8e3e-4b6c-ab8e-5236b728dffe Debian_Wheezy_Base
154 573be34f Stavros Sachtouris
     container_format:  bare
155 c4f606c0 Stavros Sachtouris
     disk_format:  diskdump
156 c4f606c0 Stavros Sachtouris
     id:  1f8454f0-8e3e-4b6c-ab8e-5236b728dffe
157 c4f606c0 Stavros Sachtouris
     size:  795107328
158 c4f606c0 Stavros Sachtouris
     status:  available
159 c4f606c0 Stavros Sachtouris
160 c4f606c0 Stavros Sachtouris
    * Get details for image with id 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe *
161 c4f606c0 Stavros Sachtouris
    [image]: info 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe
162 c4f606c0 Stavros Sachtouris
     name: Debian_Wheezy_Base
163 c4f606c0 Stavros Sachtouris
     container_format:  bare
164 c4f606c0 Stavros Sachtouris
     disk_format:  diskdump
165 c4f606c0 Stavros Sachtouris
     id:  1f8454f0-8e3e-4b6c-ab8e-5236b728dffe
166 c4f606c0 Stavros Sachtouris
     size:  795107328
167 c4f606c0 Stavros Sachtouris
     status:  available
168 c4f606c0 Stavros Sachtouris
     owner:  s0m3-u53r-1d (user@example.com)
169 c4f606c0 Stavros Sachtouris
        DESCRIPTION:  Debian Wheezy Base (Stable)
170 c4f606c0 Stavros Sachtouris
        GUI:  No GUI
171 c4f606c0 Stavros Sachtouris
        KERNEL:  2.6.32
172 c4f606c0 Stavros Sachtouris
        OS:  debian
173 c4f606c0 Stavros Sachtouris
        OSFAMILY:  linux
174 c4f606c0 Stavros Sachtouris
        ROOT_PARTITION:  1
175 c4f606c0 Stavros Sachtouris
        SORTORDER:  1
176 c4f606c0 Stavros Sachtouris
        USERS:  root
177 c4f606c0 Stavros Sachtouris
178 c4f606c0 Stavros Sachtouris
imagecompute (Compute/Cyclades)
179 c4f606c0 Stavros Sachtouris
-------------------------------
180 c4f606c0 Stavros Sachtouris
181 c4f606c0 Stavros Sachtouris
.. code-block:: text
182 c4f606c0 Stavros Sachtouris
183 c4f606c0 Stavros Sachtouris
    info      Get detailed information on an image
184 c4f606c0 Stavros Sachtouris
    list      List images
185 c4f606c0 Stavros Sachtouris
    modify    Modify image properties (metadata)
186 c4f606c0 Stavros Sachtouris
    delete    Delete an image (WARNING: image file is also removed)
187 2151584b Stavros Sachtouris
188 2151584b Stavros Sachtouris
server (Compute/Cyclades)
189 961e6040 Stavros Sachtouris
-------------------------
190 2151584b Stavros Sachtouris
191 2151584b Stavros Sachtouris
.. code-block:: text
192 2151584b Stavros Sachtouris
193 c4f606c0 Stavros Sachtouris
    info      Detailed information on a Virtual Machine
194 c4f606c0 Stavros Sachtouris
    modify    Modify attributes of a virtual server
195 c4f606c0 Stavros Sachtouris
    create    Create a server (aka Virtual Machine)
196 c4f606c0 Stavros Sachtouris
    list      List virtual servers accessible by user
197 c4f606c0 Stavros Sachtouris
    reboot    Reboot a virtual server
198 c4f606c0 Stavros Sachtouris
    start     Start an existing virtual server
199 c4f606c0 Stavros Sachtouris
    shutdown  Shutdown an active virtual server
200 c4f606c0 Stavros Sachtouris
    delete    Delete a virtual server
201 c4f606c0 Stavros Sachtouris
    wait      Wait for server to finish [BUILD, STOPPED, REBOOT, ACTIVE]
202 2151584b Stavros Sachtouris
203 961e6040 Stavros Sachtouris
Showcase: Create a server
204 961e6040 Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^
205 2151584b Stavros Sachtouris
206 2151584b Stavros Sachtouris
.. code-block:: console
207 2151584b Stavros Sachtouris
    :emphasize-lines: 1,4,21,35,44,62
208 2151584b Stavros Sachtouris
209 0ea31480 Stavros Sachtouris
    [kamaki]: server
210 2151584b Stavros Sachtouris
211 0ea31480 Stavros Sachtouris
    [server]: create -h
212 c4f606c0 Stavros Sachtouris
    usage: create --name NAME --flavor-id FLAVOR_ID --image-id IMAGE_ID
213 fa382f9e Stavros Sachtouris
            [--personality PERSONALITY] [-h] [--config CONFIG] [--cloud CLOUD]
214 2151584b Stavros Sachtouris
215 2151584b Stavros Sachtouris
    Create a server
216 2151584b Stavros Sachtouris
217 2151584b Stavros Sachtouris
    optional arguments:
218 2151584b Stavros Sachtouris
      -v, --verbose         More info at response
219 2151584b Stavros Sachtouris
      --personality PERSONALITY
220 2151584b Stavros Sachtouris
                            add a personality file
221 2151584b Stavros Sachtouris
      -d, --debug           Include debug output
222 2151584b Stavros Sachtouris
      -h, --help            Show help message
223 2151584b Stavros Sachtouris
      -i, --include         Include protocol headers in the output
224 2151584b Stavros Sachtouris
      --config CONFIG       Path to configuration file
225 2151584b Stavros Sachtouris
      -s, --silent          Do not output anything
226 fa382f9e Stavros Sachtouris
      --cloud CLOUD         Chose a cloud to connect to
227 2151584b Stavros Sachtouris
228 2151584b Stavros Sachtouris
    * List all available images *
229 0ea31480 Stavros Sachtouris
    [server]: /image compute list
230 e3a1d743 Stavros Sachtouris
    1395fdfb-51b4-419f-bb02-f7d632860611 Ubuntu Desktop LTS
231 e3a1d743 Stavros Sachtouris
    1580deb4-edb3-4496-a27f-7a246c4c0528 Ubuntu Desktop
232 e3a1d743 Stavros Sachtouris
    18a82962-43eb-4b32-8e28-8f8880af89d7 Kubuntu LTS
233 e3a1d743 Stavros Sachtouris
    6aa6eafd-dccb-422d-a904-67fe2bdde87e Debian Desktop
234 e3a1d743 Stavros Sachtouris
    6b5681e4-7502-46ae-b1e9-9fd837932095 maelstrom
235 e3a1d743 Stavros Sachtouris
    78262ee7-949e-4d70-af3a-85360c3de57a Windows Server 2012
236 e3a1d743 Stavros Sachtouris
    86bc2414-0fb3-4898-a637-240292243302 Fedora
237 e3a1d743 Stavros Sachtouris
    926ab1c5-2d85-49d4-aebe-0fce712789b9 Windows Server 2008
238 e3a1d743 Stavros Sachtouris
    b2dffe52-64a4-48c3-8a4c-8214cc3165cf Debian Base
239 e3a1d743 Stavros Sachtouris
    baf2321c-57a0-4a69-825d-49f49cea163a CentOS
240 e3a1d743 Stavros Sachtouris
    c1d27b46-d875-4f5c-b7f1-f39b5af62905 Kubuntu
241 2151584b Stavros Sachtouris
242 2151584b Stavros Sachtouris
    * See details of flavor with id 1 *
243 0ea31480 Stavros Sachtouris
    [server]: /flavor info 1
244 2151584b Stavros Sachtouris
    SNF:disk_template:  drbd
245 2151584b Stavros Sachtouris
    cpu              :  1
246 2151584b Stavros Sachtouris
    disk             :  20
247 2151584b Stavros Sachtouris
    id               :  1
248 2151584b Stavros Sachtouris
    name             :  C1R1024D20
249 2151584b Stavros Sachtouris
    ram              :  1024
250 2151584b Stavros Sachtouris
251 2151584b Stavros Sachtouris
    * Create a debian server named 'My Small Debian Server'
252 c4f606c0 Stavros Sachtouris
    [server]: create --name='My Small Debian Server' --flavor-id=1 --image-id=b2dffe52-64a4-48c3-8a4c-8214cc3165cf
253 2151584b Stavros Sachtouris
    adminPass:  L8gu2wbZ94
254 2151584b Stavros Sachtouris
    created  :  2012-11-23T16:56:04.190813+00:00
255 2151584b Stavros Sachtouris
    flavorRef:  1
256 2151584b Stavros Sachtouris
    hostId   :  
257 2151584b Stavros Sachtouris
    id       :  11687
258 2151584b Stavros Sachtouris
    imageRef :  b2dffe52-64a4-48c3-8a4c-8214cc3165cf
259 2151584b Stavros Sachtouris
    metadata : 
260 fa382f9e Stavros Sachtouris
               os   :  debian
261 fa382f9e Stavros Sachtouris
               users:  root
262 2151584b Stavros Sachtouris
    name     :  My Small Debian Server
263 2151584b Stavros Sachtouris
    progress :  0
264 2151584b Stavros Sachtouris
    status   :  BUILD
265 2151584b Stavros Sachtouris
    suspended:  False
266 2151584b Stavros Sachtouris
    updated  :  2012-11-23T16:56:04.761962+00:00
267 2151584b Stavros Sachtouris
268 2151584b Stavros Sachtouris
    * wait for server to build (optional) *
269 0ea31480 Stavros Sachtouris
    [server]: wait 11687
270 e3a1d743 Stavros Sachtouris
    Server 11687 still in BUILD mode |||||||||||||||||    | 80%
271 2151584b Stavros Sachtouris
    Server 11687 is now in ACTIVE mode
272 2151584b Stavros Sachtouris
273 c4f606c0 Stavros Sachtouris
.. Note:: In kamaki shell, / is used to access commands from top-level
274 2151584b Stavros Sachtouris
275 c4f606c0 Stavros Sachtouris
ip (Network/Cyclades)
276 6489c38b Stavros Sachtouris
---------------------
277 6489c38b Stavros Sachtouris
278 6489c38b Stavros Sachtouris
.. code-block:: text
279 6489c38b Stavros Sachtouris
280 c4f606c0 Stavros Sachtouris
    info      Get details on a floating IP
281 c4f606c0 Stavros Sachtouris
    create    Reserve an IP on a network
282 c4f606c0 Stavros Sachtouris
    list      List reserved floating IPs
283 c4f606c0 Stavros Sachtouris
    delete    Unreserve an IP (also delete the port, if attached)
284 c4f606c0 Stavros Sachtouris
285 c4f606c0 Stavros Sachtouris
port (Network/Cyclades)
286 c4f606c0 Stavros Sachtouris
-----------------------
287 c4f606c0 Stavros Sachtouris
288 c4f606c0 Stavros Sachtouris
.. code-block:: text
289 c4f606c0 Stavros Sachtouris
290 c4f606c0 Stavros Sachtouris
    info      Get details about a port
291 c4f606c0 Stavros Sachtouris
    list      List all ports
292 c4f606c0 Stavros Sachtouris
    create    Create a new port (== connect server to network)
293 c4f606c0 Stavros Sachtouris
    modify    Modify the attributes of a port
294 c4f606c0 Stavros Sachtouris
    delete    Delete a port (== disconnect server from network)
295 c4f606c0 Stavros Sachtouris
    wait      Wait for port to finish [ACTIVE, DOWN, BUILD, ERROR]
296 6489c38b Stavros Sachtouris
297 6489c38b Stavros Sachtouris
Showcase: Reserve and attach IP to server
298 c4f606c0 Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
299 6489c38b Stavros Sachtouris
300 6489c38b Stavros Sachtouris
.. code-block:: text
301 6489c38b Stavros Sachtouris
302 c4f606c0 Stavros Sachtouris
    * Enter port context *
303 c4f606c0 Stavros Sachtouris
    [kamaki]: port
304 6489c38b Stavros Sachtouris
305 c4f606c0 Stavros Sachtouris
    * Reserve an IP and see servers and networks*
306 c4f606c0 Stavros Sachtouris
    [port]: /ip create
307 6489c38b Stavros Sachtouris
    123.456.78.9
308 c4f606c0 Stavros Sachtouris
    [port]: /server list
309 6489c38b Stavros Sachtouris
    42   My Windows Server
310 6489c38b Stavros Sachtouris
    43   My Linux Server
311 c4f606c0 Stavros Sachtouris
    [port]: /network list
312 c4f606c0 Stavros Sachtouris
    101  My Network 1
313 c4f606c0 Stavros Sachtouris
    102  My Network 2
314 6489c38b Stavros Sachtouris
315 6489c38b Stavros Sachtouris
    * Attach IP to server
316 c4f606c0 Stavros Sachtouris
    [port]: port create --device-id=43 --network-id=101 --ip-address=123.456.78.9 --wait
317 c4f606c0 Stavros Sachtouris
    Creating new port 7 between server 43 and network 101
318 c4f606c0 Stavros Sachtouris
    Port 7 still in BUILD mode |||||||||||||||||    | 80%
319 c4f606c0 Stavros Sachtouris
    Port 7 is now in ACTIVE mode
320 6489c38b Stavros Sachtouris
321 6489c38b Stavros Sachtouris
.. Note:: In kamaki shell, / is used to access top-level command groups while
322 6489c38b Stavros Sachtouris
    working in command group contexts
323 6489c38b Stavros Sachtouris
324 76769d2f Stavros Sachtouris
network (Network/Cyclades)
325 961e6040 Stavros Sachtouris
--------------------------
326 2151584b Stavros Sachtouris
327 2151584b Stavros Sachtouris
.. code-block:: text
328 2151584b Stavros Sachtouris
329 c4f606c0 Stavros Sachtouris
    info        Get details about a network
330 c4f606c0 Stavros Sachtouris
    disconnect  Disconnect a network from a device
331 c4f606c0 Stavros Sachtouris
    modify      Modify network attributes
332 c4f606c0 Stavros Sachtouris
    create      Create a new network
333 c4f606c0 Stavros Sachtouris
    list        List networks
334 c4f606c0 Stavros Sachtouris
    connect     Connect a network with a device (server or router)
335 c4f606c0 Stavros Sachtouris
    delete      Delete a network
336 2151584b Stavros Sachtouris
337 2151584b Stavros Sachtouris
Showcase: Connect a network to a VM
338 961e6040 Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
339 2151584b Stavros Sachtouris
340 2151584b Stavros Sachtouris
.. code-block:: console
341 2151584b Stavros Sachtouris
    :emphasize-lines: 1,4,9,24,27,44
342 2151584b Stavros Sachtouris
343 2151584b Stavros Sachtouris
    * Enter network context *
344 0ea31480 Stavros Sachtouris
    [kamaki]: network
345 2151584b Stavros Sachtouris
346 2151584b Stavros Sachtouris
    * List user-owned VMs *
347 0ea31480 Stavros Sachtouris
    [network]: /server list
348 2151584b Stavros Sachtouris
    11687 (My Small Debian Server)
349 2151584b Stavros Sachtouris
    11688 (An Ubuntu server)
350 2151584b Stavros Sachtouris
351 2151584b Stavros Sachtouris
    * Try network-connect (to get help) *
352 0ea31480 Stavros Sachtouris
    [network]: connect 
353 2151584b Stavros Sachtouris
    Syntax error
354 c4f606c0 Stavros Sachtouris
    usage: connect <network id> <device id> [-s] [-h] [-i] [--config CONFIG]
355 2151584b Stavros Sachtouris
356 2151584b Stavros Sachtouris
    Connect a server to a network
357 2151584b Stavros Sachtouris
358 2151584b Stavros Sachtouris
    Syntax: connect  <server id> <network id>
359 2151584b Stavros Sachtouris
      --config    :  Path to configuration file
360 2151584b Stavros Sachtouris
      -d,--debug  :  Include debug output
361 2151584b Stavros Sachtouris
      -h,--help   :  Show help message
362 2151584b Stavros Sachtouris
      -i,--include:  Include protocol headers in the output
363 2151584b Stavros Sachtouris
      -s,--silent :  Do not output anything
364 2151584b Stavros Sachtouris
      -v,--verbose:  More info at response
365 2151584b Stavros Sachtouris
366 2151584b Stavros Sachtouris
    * Connect VM with id 11687 to network with id 1409
367 c4f606c0 Stavros Sachtouris
    [network]: connect 11687 1409 --wait
368 c4f606c0 Stavros Sachtouris
    Creating port between network 1409 and server 11687
369 c4f606c0 Stavros Sachtouris
    New port: 8
370 2151584b Stavros Sachtouris
371 2151584b Stavros Sachtouris
    * Get details on network with id 1409
372 0ea31480 Stavros Sachtouris
    [network]: info 1409
373 c4f606c0 Stavros Sachtouris
      attachments:
374 c4f606c0 Stavros Sachtouris
                8
375 fa382f9e Stavros Sachtouris
      cidr    :  192.168.1.0/24
376 fa382f9e Stavros Sachtouris
      cidr6   :  None
377 fa382f9e Stavros Sachtouris
      created :  2012-11-23T17:17:20.560098+00:00
378 fa382f9e Stavros Sachtouris
      dhcp    :  True
379 fa382f9e Stavros Sachtouris
      gateway :  None
380 fa382f9e Stavros Sachtouris
      gateway6:  None
381 fa382f9e Stavros Sachtouris
      id      :  1409
382 fa382f9e Stavros Sachtouris
      name    :  my network
383 fa382f9e Stavros Sachtouris
      public  :  False
384 fa382f9e Stavros Sachtouris
      status  :  ACTIVE
385 fa382f9e Stavros Sachtouris
      type    :  MAC_FILTERED
386 fa382f9e Stavros Sachtouris
      updated :  2012-11-23T17:18:25.095225+00:00
387 2151584b Stavros Sachtouris
388 2151584b Stavros Sachtouris
    * Get connectivity details on VM with id 11687 *
389 c4f606c0 Stavros Sachtouris
    [network]: /server info 11687 --nics 
390 c4f606c0 Stavros Sachtouris
    nic-11687-1
391 2151584b Stavros Sachtouris
        ipv4       :  192.168.1.1
392 2151584b Stavros Sachtouris
        ipv6       :  None
393 2151584b Stavros Sachtouris
        mac_address:  aa:0f:c2:0b:0e:85
394 2151584b Stavros Sachtouris
        network_id :  1409
395 2151584b Stavros Sachtouris
        firewallProfile:  DISABLED
396 c4f606c0 Stavros Sachtouris
    nic-11687-0
397 2151584b Stavros Sachtouris
        ipv4           :  83.212.106.111
398 2151584b Stavros Sachtouris
        ipv6           :  2001:648:2ffc:1116:a80c:f2ff:fe12:a9e
399 2151584b Stavros Sachtouris
        mac_address    :  aa:0c:f2:12:0a:9e
400 2151584b Stavros Sachtouris
        network_id     :  1369
401 2151584b Stavros Sachtouris
402 2151584b Stavros Sachtouris
.. Note:: In kamaki shell, / is used to access top-level command groups while working in command group contexts
403 2151584b Stavros Sachtouris
404 c4f606c0 Stavros Sachtouris
container (Storage/Pithos+)
405 c4f606c0 Stavros Sachtouris
---------------------------
406 c4f606c0 Stavros Sachtouris
407 76769d2f Stavros Sachtouris
.. code-block:: text
408 76769d2f Stavros Sachtouris
409 c4f606c0 Stavros Sachtouris
    info      Get information about a container
410 c4f606c0 Stavros Sachtouris
    modify    Modify the properties of a container
411 c4f606c0 Stavros Sachtouris
    create    Create a new container
412 c4f606c0 Stavros Sachtouris
    list      List all containers, or their contents
413 c4f606c0 Stavros Sachtouris
    empty     Empty a container
414 c4f606c0 Stavros Sachtouris
    delete    Delete a container
415 c4f606c0 Stavros Sachtouris
416 c4f606c0 Stavros Sachtouris
group (Storage/Pithos+)
417 c4f606c0 Stavros Sachtouris
-----------------------
418 c4f606c0 Stavros Sachtouris
419 76769d2f Stavros Sachtouris
.. code-block:: text
420 76769d2f Stavros Sachtouris
421 c4f606c0 Stavros Sachtouris
    create    Create a group of users
422 c4f606c0 Stavros Sachtouris
    list      List all groups and group members
423 c4f606c0 Stavros Sachtouris
    delete    Delete a user group
424 c4f606c0 Stavros Sachtouris
425 c4f606c0 Stavros Sachtouris
sharer (Storage/Pithos+)
426 c4f606c0 Stavros Sachtouris
------------------------
427 c4f606c0 Stavros Sachtouris
428 76769d2f Stavros Sachtouris
.. code-block:: text
429 76769d2f Stavros Sachtouris
430 c4f606c0 Stavros Sachtouris
    info      Details on a Pithos+ sharer account (default: current account)
431 c4f606c0 Stavros Sachtouris
    list      List accounts who share file objects with current user
432 c4f606c0 Stavros Sachtouris
433 0ea31480 Stavros Sachtouris
file (Storage/Pithos+)
434 0ea31480 Stavros Sachtouris
----------------------
435 2151584b Stavros Sachtouris
436 2151584b Stavros Sachtouris
.. code-block:: text
437 2151584b Stavros Sachtouris
438 c4f606c0 Stavros Sachtouris
    info      Get information/details about a file
439 c4f606c0 Stavros Sachtouris
    truncate  Truncate remote file up to size
440 c4f606c0 Stavros Sachtouris
    mkdir     Create a directory
441 c4f606c0 Stavros Sachtouris
    create    Create an empty file
442 c4f606c0 Stavros Sachtouris
    move      Move objects, even between different accounts or containers
443 c4f606c0 Stavros Sachtouris
    list      List all objects in a container or a directory object
444 c4f606c0 Stavros Sachtouris
    upload    Upload a file
445 c4f606c0 Stavros Sachtouris
    cat       Fetch remote file contents
446 c4f606c0 Stavros Sachtouris
    modify    Modify the attributes of a file or directory object
447 c4f606c0 Stavros Sachtouris
    append    Append local file to (existing) remote object
448 c4f606c0 Stavros Sachtouris
    download  Download a remove file or directory object to local file system
449 c4f606c0 Stavros Sachtouris
    copy      Copy objects, even between different accounts or containers
450 c4f606c0 Stavros Sachtouris
    overwrite Overwrite part of a remote file
451 c4f606c0 Stavros Sachtouris
    delete    Delete a file or directory object
452 2151584b Stavros Sachtouris
453 961e6040 Stavros Sachtouris
Showcase: Upload and download a file
454 961e6040 Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
455 2151584b Stavros Sachtouris
456 2151584b Stavros Sachtouris
.. code-block:: console
457 2151584b Stavros Sachtouris
    :emphasize-lines: 1,7,11,16,21,29,33,37,41,44,51,55,60,64
458 2151584b Stavros Sachtouris
459 2151584b Stavros Sachtouris
    * Create a random binarry file at current OS path *
460 0ea31480 Stavros Sachtouris
    [kamaki]: !dd bs=4M if=/dev/zero of=rndm_local.file count=5
461 2151584b Stavros Sachtouris
    5+0 records in
462 2151584b Stavros Sachtouris
    5+0 records out
463 2151584b Stavros Sachtouris
    20971520 bytes (21 MB) copied, 0.016162 s, 1.3 GB/s
464 2151584b Stavros Sachtouris
465 0ea31480 Stavros Sachtouris
    * Enter file context *
466 0ea31480 Stavros Sachtouris
    [kamaki]: file
467 2151584b Stavros Sachtouris
468 2151584b Stavros Sachtouris
469 2151584b Stavros Sachtouris
    * Check local file *
470 0ea31480 Stavros Sachtouris
    [file]: !ls -lh rndm_local.file
471 2151584b Stavros Sachtouris
    -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:36 rndm_local.file
472 2151584b Stavros Sachtouris
473 2151584b Stavros Sachtouris
474 2151584b Stavros Sachtouris
    * Create two containers *
475 c4f606c0 Stavros Sachtouris
    [file]: /container create mycont1
476 c4f606c0 Stavros Sachtouris
    [file]: /container create mycont2
477 2151584b Stavros Sachtouris
478 2151584b Stavros Sachtouris
479 2151584b Stavros Sachtouris
    * List accessible containers *    
480 c4f606c0 Stavros Sachtouris
    [file]: /container list
481 2151584b Stavros Sachtouris
    1. mycont1 (0B, 0 objects)
482 2151584b Stavros Sachtouris
    2. mycont2 (0B, 0 objects)
483 2151584b Stavros Sachtouris
    3. pithos (0B, 0 objects)
484 2151584b Stavros Sachtouris
    4. trash (0B, 0 objects)
485 2151584b Stavros Sachtouris
486 2151584b Stavros Sachtouris
487 2151584b Stavros Sachtouris
    * Upload local file to 1st container *
488 c4f606c0 Stavros Sachtouris
    [file]: upload /mycont1/rndm_local.file
489 2151584b Stavros Sachtouris
490 2151584b Stavros Sachtouris
491 2151584b Stavros Sachtouris
    * Check if file has been uploaded *
492 c4f606c0 Stavros Sachtouris
    [file]: list /mycont1
493 2151584b Stavros Sachtouris
    1.    20M rndm_local.file
494 2151584b Stavros Sachtouris
495 2151584b Stavros Sachtouris
    * Create directory mydir on second container *
496 c4f606c0 Stavros Sachtouris
    [file]: mkdir /mycont2/mydir
497 2151584b Stavros Sachtouris
498 2151584b Stavros Sachtouris
    * Move file from 1st to 2nd container (and in the directory) *
499 c4f606c0 Stavros Sachtouris
    [file]: move /mycont1/rndm_local.file /mycont2/mydir/rndm_local.file
500 2151584b Stavros Sachtouris
501 2151584b Stavros Sachtouris
    * Check contents of both containers *
502 c4f606c0 Stavros Sachtouris
    [file]: list /mycont1
503 c4f606c0 Stavros Sachtouris
    [file]: list /mycont2
504 2151584b Stavros Sachtouris
    1.      D mydir/
505 2151584b Stavros Sachtouris
    2.    20M mydir/rndm_local.file
506 2151584b Stavros Sachtouris
507 2151584b Stavros Sachtouris
    * Copy file from 2nd to 1st container, with a new name *
508 c4f606c0 Stavros Sachtouris
    [file]: copy /mycont2/mydir/rndm_local.file /mycont1/rndm_remote.file
509 2151584b Stavros Sachtouris
510 2151584b Stavros Sachtouris
    * Check pasted file *
511 c4f606c0 Stavros Sachtouris
    [file]: list /mycont1
512 2151584b Stavros Sachtouris
    1.    20M rndm_remote.file
513 2151584b Stavros Sachtouris
514 2151584b Stavros Sachtouris
    * Download pasted file to local file system *
515 c4f606c0 Stavros Sachtouris
    [file]: download /mycont1/rndm_remote.file
516 c4f606c0 Stavros Sachtouris
    Downloading: |||||||||||||||||   | 72%
517 2151584b Stavros Sachtouris
518 2151584b Stavros Sachtouris
    * Check if file is downloaded and if it is the same to original *
519 0ea31480 Stavros Sachtouris
    [file]: !ls -lh *.file
520 2151584b Stavros Sachtouris
    -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:36 rndm_local.file
521 2151584b Stavros Sachtouris
    -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:42 rndm_remote.file
522 0ea31480 Stavros Sachtouris
    [file]: !diff rndm_local.file rndm_remote.file
523 2151584b Stavros Sachtouris
524 16d7b9ff Stavros Sachtouris
.. Note:: In kamaki shell, ! is used to execute OS shell commands (e.g., bash)