Revision 2bd23362 kamaki/cli/commands/errors.py
b/kamaki/cli/commands/errors.py | ||
---|---|---|
239 | 239 |
elif network_id or ce.status == 421: |
240 | 240 |
msg = 'Network with id %s is in use' % network_id, |
241 | 241 |
raiseCLIError(ce, msg, details=[ |
242 |
'Disconnect all nics/VMs of this network first',
|
|
242 |
'Disconnect all nics/servers of this network first',
|
|
243 | 243 |
'* to get nics: /network info %s' % network_id, |
244 | 244 |
'. (under "attachments" section)', |
245 | 245 |
'* to disconnect: /network disconnect <nic id>']) |
... | ... | |
274 | 274 |
server_id = int(server_id) |
275 | 275 |
return foo(self, *args, **kwargs) |
276 | 276 |
except ValueError as ve: |
277 |
msg = 'Invalid server(VM) id %s' % server_id,
|
|
277 |
msg = 'Invalid virtual server id %s' % server_id,
|
|
278 | 278 |
details = ['id must be a positive integer'], |
279 | 279 |
raiseCLIError(ve, msg, details=details, importance=1) |
280 | 280 |
except ClientError as ce: |
... | ... | |
284 | 284 |
) or ( |
285 | 285 |
ce.status == 400 and 'not found' in err_msg |
286 | 286 |
): |
287 |
msg = 'server(VM) with id %s not found' % server_id,
|
|
287 |
msg = 'virtual server with id %s not found' % server_id,
|
|
288 | 288 |
raiseCLIError(ce, msg, details=[ |
289 |
'* to get existing VM ids: /server list',
|
|
290 |
'* to get VM details: /server info <VM id>'])
|
|
289 |
'* to get ids of all servers: /server list',
|
|
290 |
'* to get server details: /server info <server id>'])
|
|
291 | 291 |
raise |
292 | 292 |
return _raise |
293 | 293 |
|
... | ... | |
321 | 321 |
'network interface' in ('%s' % ce).lower() |
322 | 322 |
): |
323 | 323 |
server_id = kwargs.get('server_id', '<no server>') |
324 |
err_msg = 'No nic %s on server(VM) with id %s' % (
|
|
324 |
err_msg = 'No nic %s on virtual server with id %s' % (
|
|
325 | 325 |
nic_id, |
326 | 326 |
server_id) |
327 | 327 |
raiseCLIError(ce, err_msg, details=[ |
328 |
'* check server(VM) with id %s: /server info %s' % (
|
|
328 |
'* check v. server with id %s: /server info %s' % (
|
|
329 | 329 |
server_id, |
330 | 330 |
server_id), |
331 |
'* list nics for server(VM) with id %s:' % server_id,
|
|
331 |
'* list nics for v. server with id %s:' % server_id,
|
|
332 | 332 |
' /server addr %s' % server_id]) |
333 | 333 |
raise |
334 | 334 |
return _raise |
... | ... | |
357 | 357 |
if key and ce.status == 404 and ( |
358 | 358 |
'metadata' in ('%s' % ce).lower() |
359 | 359 |
): |
360 |
raiseCLIError(ce, 'No VM metadata with key %s' % key) |
|
360 |
raiseCLIError( |
|
361 |
ce, 'No v. server metadata with key %s' % key) |
|
361 | 362 |
raise |
362 | 363 |
return _raise |
363 | 364 |
|
Also available in: Unified diff