root / docs / collection_of_examples / listing.rst @ b4ed3a7e
History | View | Annotate | Download (6.6 kB)
1 |
Listing |
---|---|
2 |
======= |
3 |
|
4 |
In this section we present the ways of kamaki for listing, an operation that is |
5 |
common to most command groups. |
6 |
|
7 |
The examples of this section run in a kamaki interactive shell. |
8 |
|
9 |
.. code-block:: console |
10 |
|
11 |
$ kamaki |
12 |
kamaki v0.9 - Interactive Shell |
13 |
. |
14 |
/exit terminate kamaki |
15 |
exit or ^D exit context |
16 |
? or help available commands |
17 |
?command help on command |
18 |
!<command> execute OS shell command |
19 |
. |
20 |
[kamaki]: |
21 |
|
22 |
Simple listing |
23 |
-------------- |
24 |
|
25 |
List configuration options, whether in the file or in memory |
26 |
|
27 |
.. code-block:: console |
28 |
|
29 |
[kamaki]: config list |
30 |
cloud.default.url = https://astakos.example.com/identity/v2.0/ |
31 |
cloud.default.token = my70k3n== |
32 |
global.default_cloud = default |
33 |
global.colors = on |
34 |
global.config_cli = config |
35 |
global.file_cli = pithos |
36 |
global.flavor_cli = cyclades |
37 |
global.history_cli = history |
38 |
global.history_file = /home/saxtouri/.kamaki.history |
39 |
global.image_cli = image |
40 |
global.log_file = /home/saxtouri/.kamaki.log |
41 |
global.log_token = one |
42 |
global.max_threads = 5 |
43 |
global.network_cli = cyclades |
44 |
global.server_cli = cyclades |
45 |
global.user_cli = astakos |
46 |
[kamaki]: |
47 |
|
48 |
List stored containers and then objects in container "pithos" |
49 |
|
50 |
.. code-block:: console |
51 |
|
52 |
[kamaki]: file list |
53 |
pithos (36MB, 4 objects) |
54 |
trash (0B, 0 objects) |
55 |
[kamaki]: file list pithos |
56 |
. 2KB info.txt |
57 |
. D video/ |
58 |
. 11MB video/tk1.mpg |
59 |
. 12MB video/tk2.mpg |
60 |
. 13MB video/tk3.mpg |
61 |
[kamaki]: |
62 |
|
63 |
List virtual machines (servers) |
64 |
|
65 |
.. code-block:: console |
66 |
|
67 |
[kamaki]: server list |
68 |
4201 example server 1 |
69 |
4202 example server 2 |
70 |
|
71 |
List networks |
72 |
|
73 |
.. code-block:: console |
74 |
|
75 |
[kamaki]: network list |
76 |
1 public_network |
77 |
42 my_private)network |
78 |
[kamaki]: |
79 |
|
80 |
List flavors |
81 |
|
82 |
.. code-block:: console |
83 |
|
84 |
[kamaki]: flavor list |
85 |
1 C1R1024D20drbd |
86 |
2 C1R1024D30drbd |
87 |
[kamaki]: |
88 |
|
89 |
List images from Image API and from Compute APIs |
90 |
|
91 |
.. code-block:: console |
92 |
|
93 |
[kamaki]: image list |
94 |
cde9858c-0656-4da1-8cbd-33481b29a8bd Debian Base |
95 |
.container_format: bare |
96 |
.disk_format: diskdump |
97 |
.size: 474066944 |
98 |
.status: available |
99 |
a5ca5997-c580-4d62-b012-05c5329f8e2d Debian Base |
100 |
.container_format: bare |
101 |
.disk_format: diskdump |
102 |
.size: 474066944 |
103 |
.status: available |
104 |
[kamaki]: image compute list |
105 |
a5ca5997-c580-4d62-b012-05c5329f8e2d Debian Base |
106 |
cde9858c-0656-4da1-8cbd-33481b29a8bd Debian Base |
107 |
[kamaki]: |
108 |
|
109 |
Detailed pithos listing |
110 |
----------------------- |
111 |
|
112 |
List pithos containers with details |
113 |
|
114 |
.. code-block:: console |
115 |
|
116 |
[kamaki]: file |
117 |
[file]: list -l |
118 |
pithos |
119 |
bytes: 0 (0B) |
120 |
count: 3 |
121 |
modified: 2013-06-17T12:35:11.613124+00:00 |
122 |
policy: |
123 |
. quota: 0 |
124 |
. versioning: auto |
125 |
trash |
126 |
bytes: 0 (0B) |
127 |
count: 0 |
128 |
modified: 2013-06-06T14:24:23.675891+00:00 |
129 |
policy: |
130 |
. quota: 0 |
131 |
. versioning: auto |
132 |
[file]: |
133 |
|
134 |
Create some more pithos container to experiment with |
135 |
|
136 |
.. code-block:: console |
137 |
|
138 |
[file]: create cont1 |
139 |
[file]: create cont2 |
140 |
[file]: create cont3 |
141 |
[file]: create cont4 |
142 |
[file]: list |
143 |
cont1 (0B, 0 objects) |
144 |
cont2 (0B, 0 objects) |
145 |
cont3 (0B, 0 objects) |
146 |
cont4 (0B, 0 objects) |
147 |
pithos (36B, 5 objects) |
148 |
trash (0B, 0 objects) |
149 |
[file]: |
150 |
|
151 |
List only 3, then list three by three |
152 |
|
153 |
.. code-block:: console |
154 |
|
155 |
[file]: list -n 3 |
156 |
cont1 (0B, 0 objects) |
157 |
cont2 (0B, 0 objects) |
158 |
cont3 (0B, 0 objects) |
159 |
[file]: list -n 3 --more |
160 |
cont1 (0B, 0 objects) |
161 |
cont2 (0B, 0 objects) |
162 |
cont3 (0B, 0 objects) |
163 |
(3 listed - 3 more - "enter" to continue) |
164 |
<enter is pressed> |
165 |
cont4 (0B, 0 objects) |
166 |
pithos (36B, 4 objects) |
167 |
trash (0B, 0 objects) |
168 |
[file]: |
169 |
|
170 |
List contents of container `pithos` |
171 |
|
172 |
.. code-block:: console |
173 |
|
174 |
[file]: list -l pithos |
175 |
info.txt |
176 |
by: s0m3-u53r-1d |
177 |
bytes: 2000 (2ΚB) |
178 |
hash: 427ae41e4649b934ca495991b7852b855e3b0c44298fc1c149afbf4c8996fb92 |
179 |
modified: 2013-06-17T13:09:44.529579+00:00 |
180 |
timestamp: 1371474584.5295789 |
181 |
type: plan-text/unicode |
182 |
uuid: 0493f1d9-9410-4f4b-a81f-fe42f9cefa70 |
183 |
version: 1085 |
184 |
. |
185 |
video |
186 |
by: s0m3-u53r-1d |
187 |
bytes: 0 |
188 |
hash: e3b0c44298fc1c149afbf44ca495991b7852b855c8996fb92427ae41e4649b93 |
189 |
modified: 2013-06-17T13:11:39.050090+00:00 |
190 |
timestamp: 1371474699.0500901 |
191 |
type: application/directory |
192 |
uuid: 80e719f5-9d68-4333-9846-9943972ef1fd |
193 |
version: 1086 |
194 |
. |
195 |
video/tk1.mpg |
196 |
by: s0m3-u53r-1d |
197 |
bytes: 11000000 (11ΜΒB) |
198 |
hash: fbf4c8996fb92427ae41e464e3b0c44298fc1c5991b7852b855149a9b934ca49 |
199 |
modified: 2013-06-17T13:09:15.866515+00:00 |
200 |
timestamp: 1371474555.8665149 |
201 |
type: video/mpeg |
202 |
uuid: b0b46b39-c59a-4adc-a386-6a169cb9f8a5 |
203 |
version: 1079 |
204 |
. |
205 |
video/tk2.mpg |
206 |
by: s0m3-u53r-1d |
207 |
bytes: 12000000 (12MB) |
208 |
hash: 44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b78e3b0c52b855 |
209 |
modified: 2013-06-17T13:09:23.898652+00:00 |
210 |
timestamp: 1371474563.8986521 |
211 |
type: video/mpeg |
212 |
uuid: 12a81309-db3c-4e30-ae9a-4ac2b8289def |
213 |
version: 1081 |
214 |
. |
215 |
video/tk3.mpg |
216 |
by: s0m3-u53r-1d |
217 |
bytes: 13000000 (13MB) |
218 |
hash: 1e4649b934ca495991b7852b855e3b0c44298fc1c149afbf4c8996fb92427ae4 |
219 |
modified: 2013-06-17T13:09:28.222536+00:00 |
220 |
timestamp: 1371474568.2225361 |
221 |
type: video/mpeg |
222 |
uuid: 4195e8c3-9b9a-4e97-8c20-fdfef34892fe |
223 |
version: 1083 |
224 |
[kamaki]: |
225 |
|
226 |
List only videos and exit "file" context |
227 |
|
228 |
.. code-block:: console |
229 |
|
230 |
[file]: list -l pithos:video/ |
231 |
video/tk1.mpg |
232 |
by: s0m3-u53r-1d |
233 |
bytes: 11000000 (11ΜΒB) |
234 |
hash: fbf4c8996fb92427ae41e464e3b0c44298fc1c5991b7852b855149a9b934ca49 |
235 |
modified: 2013-06-17T13:09:15.866515+00:00 |
236 |
timestamp: 1371474555.8665149 |
237 |
type: video/mpeg |
238 |
uuid: b0b46b39-c59a-4adc-a386-6a169cb9f8a5 |
239 |
version: 1079 |
240 |
. |
241 |
video/tk2.mpg |
242 |
by: s0m3-u53r-1d |
243 |
bytes: 12000000 (12MB) |
244 |
hash: 44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b78e3b0c52b855 |
245 |
modified: 2013-06-17T13:09:23.898652+00:00 |
246 |
timestamp: 1371474563.8986521 |
247 |
type: video/mpeg |
248 |
uuid: 12a81309-db3c-4e30-ae9a-4ac2b8289def |
249 |
version: 1081 |
250 |
. |
251 |
video/tk3.mpg |
252 |
by: s0m3-u53r-1d |
253 |
bytes: 13000000 (13MB) |
254 |
hash: 1e4649b934ca495991b7852b855e3b0c44298fc1c149afbf4c8996fb92427ae4 |
255 |
modified: 2013-06-17T13:09:28.222536+00:00 |
256 |
timestamp: 1371474568.2225361 |
257 |
type: video/mpeg |
258 |
uuid: 4195e8c3-9b9a-4e97-8c20-fdfef34892fe |
259 |
version: 1083 |
260 |
[kamaki]: |