Skip to content

Commit

Permalink
Fix 'vconnector-cli' tool
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaeon committed Mar 29, 2014
1 parent f28da33 commit a5e028e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/vconnector-cli
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def init_db(db):
db = VConnectorDatabase(db)
db.init_db()

def add_update_agent(db, user, pwd, host, enabled):
def add_update_agent(db, user, pwd, host):
"""
Add/update a vSphere Agent in the database
Expand All @@ -56,15 +56,13 @@ def add_update_agent(db, user, pwd, host, enabled):
user (str): Username to use for this vSphere Agent
pwd (str): Password to use for this vSphere Agent
host (str): Hostname of the vSphere server
enabled (bool): If True mark this vSphere Agent as enabled
"""
db = VConnectorDatabase(db)
db.add_update_agent(
user=user,
pwd=pwd,
host=host,
enabled=enabled
)

def remove_agent(db, host):
Expand Down Expand Up @@ -123,11 +121,11 @@ def disable_agent(db, host):
def main():
usage="""
Usage: vconnector-cli [-D] [-o <logfile>] [-d <db>] init
vconnector-cli [-D] [-o <logfile>] [-d <db>] -H <host> -U <user> -P <pwd> (add|update)
vconnector-cli [-D] [-o <logfile>] [-d <db>] -H <host> remove
vconnector-cli [-D] [-o <logfile>] [-d <db>] get
vconnector-cli [-D] [-o <logfile>] [-d <db>] -H <host> enable
vconnector-cli [-D] [-o <logfile>] [-d <db>] -H <host> disable
vconnector-cli [-D] [-o <logfile>] [-d <db>] get
vconnector-cli [-D] [-o <logfile>] [-d <db>] -H <host> remove
vconnector-cli [-D] [-o <logfile>] [-d <db>] -H <host> -U <user> -P <pwd> (add|update)
vpoller-worker --help
vpoller-worker --version
Expand Down Expand Up @@ -171,7 +169,6 @@ Options:
user=args['--user'],
pwd=args['--pwd'],
host=args['--host'],
enabled=int(args['--enabled'])
)
elif args['remove']:
remove_agent(
Expand Down

0 comments on commit a5e028e

Please sign in to comment.