Revision ef3488a7
b/kamaki/cli/commands/cyclades.py | ||
---|---|---|
1032 | 1032 |
|
1033 | 1033 |
@errors.generic.all |
1034 | 1034 |
@errors.cyclades.connection |
1035 |
@errors.cyclades.network_id |
|
1036 | 1035 |
@errors.cyclades.network_in_use |
1036 |
@errors.cyclades.network_id |
|
1037 | 1037 |
def _run(self, network_id): |
1038 | 1038 |
status = 'DELETED' |
1039 | 1039 |
if self['wait']: |
b/kamaki/cli/commands/errors.py | ||
---|---|---|
233 | 233 |
try: |
234 | 234 |
return foo(self, *args, **kwargs) |
235 | 235 |
except ClientError as ce: |
236 |
if network_id and ce.status == 400:
|
|
236 |
if network_id and ce.status in (400, ):
|
|
237 | 237 |
msg = 'Network with id %s does not exist' % network_id, |
238 | 238 |
raiseCLIError(ce, msg, details=this.about_network_id) |
239 |
elif network_id or ce.status == 421:
|
|
239 |
elif network_id or ce.status in (421, ):
|
|
240 | 240 |
msg = 'Network with id %s is in use' % network_id, |
241 | 241 |
raiseCLIError(ce, msg, details=[ |
242 | 242 |
'Disconnect all nics/servers of this network first', |
Also available in: Unified diff