diff options
| author | Thomas Wiest <twiest@users.noreply.github.com> | 2015-05-01 17:25:59 -0400 | 
|---|---|---|
| committer | Thomas Wiest <twiest@users.noreply.github.com> | 2015-05-01 17:25:59 -0400 | 
| commit | 39a44ef1b7e64f73a65249bd930fcc6534788053 (patch) | |
| tree | c904c8bcd6dec38dc1c3684dcb0cf442ecb71f11 /bin | |
| parent | b6b53398a023ffef8b5c6e90fb6228f3bee69470 (diff) | |
| parent | e12c6a4ce54959dd073741a8c77ab4f55c739baa (diff) | |
| download | openshift-39a44ef1b7e64f73a65249bd930fcc6534788053.tar.gz openshift-39a44ef1b7e64f73a65249bd930fcc6534788053.tar.bz2 openshift-39a44ef1b7e64f73a65249bd930fcc6534788053.tar.xz openshift-39a44ef1b7e64f73a65249bd930fcc6534788053.zip | |
Merge pull request #201 from twiest/pr
Added --user option to ohi to pre-pend the username in the hostlist output.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/ohi | 10 | 
1 files changed, 9 insertions, 1 deletions
| @@ -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() | 
