summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/ohi10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/ohi b/bin/ohi
index af1fb8068..bb52166df 100755
--- a/bin/ohi
+++ b/bin/ohi
@@ -64,7 +64,11 @@ class Ohi(object):
raise ArgumentError("Invalid combination of arguments")
for host in sorted(hosts, key=utils.normalize_dnsname):
- print host
+ if self.args.user:
+ print "%s@%s" % (self.args.user, host)
+ else:
+ print host
+
return 0
def parse_config_file(self):
@@ -97,6 +101,10 @@ class Ohi(object):
parser.add_argument('-t', '--host-type', action="store",
help="Which host type to use")
+ parser.add_argument('-l', '--user', action='store', default=None,
+ help='username')
+
+
self.args = parser.parse_args()