1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

Change defaults result strings in ifquery check output

Ticket: CM-3810
Reviewed By:
Testing Done: tested ifquery check

defaults from /etc/network/ifupdown2/ifupdown2.conf
ifquery_check_success_str=(OK)
ifquery_check_error_str=(FAIL)
ifquery_check_unknown_str=
This commit is contained in:
Roopa Prabhu
2014-11-15 23:34:02 -08:00
parent a5bbc8ed41
commit fac4138bfe
3 changed files with 13 additions and 11 deletions

View File

@@ -449,7 +449,7 @@ class iface():
def dump_pretty(self, with_status=False,
successstr='success', errorstr='error',
use_realname=False):
unknownstr='unknown', use_realname=False):
indent = '\t'
outbuf = ''
if use_realname:
@@ -488,13 +488,13 @@ class iface():
if with_status:
s = self.get_config_attr_status(cname, idx)
if s == -1:
outbuf += (indent + '%s %s\n'
%(cname, cv))
outbuf += (indent + '%s %s %s\n'
%(cname, cv, unknownstr))
elif s == 1:
outbuf += (indent + '%s %s %s\n'
outbuf += (indent + '%s %s %s\n'
%(cname, cv, errorstr))
elif s == 0:
outbuf += (indent + '%s %s %s\n'
outbuf += (indent + '%s %s %s\n'
%(cname, cv, successstr))
else:
outbuf += indent + '%s %s\n' %(cname, cv)