Revision f00db940 kamaki/cli/commands/cyclades.py
b/kamaki/cli/commands/cyclades.py | ||
---|---|---|
197 | 197 |
(not ns) or img['name'].lower().endswith(ns.lower())) and ( |
198 | 198 |
(not nl) or nl.lower() in img['name'].lower())] |
199 | 199 |
|
200 |
def _add_user_name(self, servers): |
|
201 |
uuids = self._uuids2usernames( |
|
202 |
list(set([srv['user_id'] for srv in servers]))) |
|
203 |
for srv in servers: |
|
204 |
srv['user_id'] += ' (%s)' % uuids[srv['user_id']] |
|
205 |
return servers |
|
206 |
|
|
200 | 207 |
def _filtered_by_image(self, servers): |
201 | 208 |
iid = self['image_id'] |
202 | 209 |
new_servers = [] |
... | ... | |
246 | 253 |
if withmeta: |
247 | 254 |
servers = self._filtered_by_metadata(servers) |
248 | 255 |
|
249 |
if not (self['detail'] or self['json_output']): |
|
256 |
if self['detail'] and not self['json_output']: |
|
257 |
servers = self._add_user_name(servers) |
|
258 |
elif not (self['detail'] or self['json_output']): |
|
250 | 259 |
remove_from_items(servers, 'links') |
251 |
#if self['detail'] and not self['json_output']: |
|
252 |
# servers = self._add_owner_name(servers) |
|
253 | 260 |
if detail and not self['detail']: |
254 | 261 |
for srv in servers: |
255 | 262 |
for key in set(srv).difference(self.PERMANENTS): |
Also available in: Unified diff