Fix return code on firewall-rules-install failure
Returns a proper return code if firewall-rules-install command fails. Story: 2002852 Task: 22801 Change-Id: I3075748f084f0a11bc7408019bec98078b329b00 Signed-off-by: Jack Ding <jack.ding@windriver.com>
This commit is contained in:
parent
420d523e44
commit
7c21fd9235
|
@ -46,7 +46,7 @@ def do_firewall_rules_install(cc, args):
|
||||||
response = cc.firewallrules.import_firewall_rules(fw_file)
|
response = cc.firewallrules.import_firewall_rules(fw_file)
|
||||||
error = response.get('error')
|
error = response.get('error')
|
||||||
if error:
|
if error:
|
||||||
print "Firewall rules install failed: %s" % error
|
raise exc.CommandError("%s" % error)
|
||||||
else:
|
else:
|
||||||
_print_firewallrules_show(response.get('firewallrules'))
|
_print_firewallrules_show(response.get('firewallrules'))
|
||||||
except exc.HTTPNotFound:
|
except exc.HTTPNotFound:
|
||||||
|
|
Loading…
Reference in New Issue