Statistics
| Branch: | Tag: | Revision:

root / docs / commands.rst @ ab154b94

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