summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul C. Buetow <paul@buetow.org>2014-04-12 13:27:27 +0200
committerPaul C. Buetow <paul@buetow.org>2014-04-12 13:27:27 +0200
commitab50035fbf7462de7439501d6dc1bf22de3008c6 (patch)
tree8b14aa654ad160dd2f399dd208e9df8d8c2281e2
parent745c78f5d18c2f70ef40abf21c817e22c7756927 (diff)
use newline separated output for results
-rwxr-xr-xsrc/fapi.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fapi.py b/src/fapi.py
index 19cb3eb..881cf96 100755
--- a/src/fapi.py
+++ b/src/fapi.py
@@ -86,12 +86,12 @@ class Fapi(object):
if a.subarg == 'status':
self.info('Getting node monitor status of \'%s\'' % nodename)
nodename = a.subarg2
- print f.LocalLB.NodeAddressV2.get_monitor_status([nodename])
+ print "\n".join(f.LocalLB.NodeAddressV2.get_monitor_status([nodename]))
return True
else:
self.info('Getting node list')
- print f.LocalLB.NodeAddressV2.get_list()
+ print "\n".join(f.LocalLB.NodeAddressV2.get_list())
return True
elif a.arg == 'create':
@@ -121,18 +121,18 @@ class Fapi(object):
if a.subarg == 'status':
self.info('Getting pool status of \'%s\'' % poolname)
poolname = a.subarg2
- print f.LocalLB.Pool.get_object_status([poolname])
+ print "\n".join(f.LocalLB.Pool.get_object_status([poolname]))
return True
elif a.subarg == 'members':
self.info('Get pool members of \'%s\'' % poolname)
poolname = a.subarg2
- print f.LocalLB.Pool.get_member_v2([poolname])
+ print "\n".join(f.LocalLB.Pool.get_member_v2([poolname]))
return True
else:
self.info('Get pool list')
- print f.LocalLB.Pool.get_list()
+ print "\n".join(f.LocalLB.Pool.get_list())
return True
elif a.arg == 'create':
@@ -205,7 +205,7 @@ if __name__ == '__main__':
parser.add_argument('arg', help='The argument for the action')
parser.add_argument('subarg', nargs='?', help='A sub argument')
parser.add_argument('subarg2', nargs='?', help='Another sub argument')
- parser.add_argument('subarg3', nargs='?', help='Another sub argument')
+ #parser.add_argument('subarg3', nargs='?', help='Another sub argument')
args = parser.parse_args()