Skip to content

Commit

Permalink
fix deploy_local_war
Browse files Browse the repository at this point in the history
  • Loading branch information
definite committed Apr 30, 2018
1 parent 4c8a703 commit b8305cb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ZanataWar.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ def deploy_local_war(war=None):
"""Deploy a build local WAR to zanata server.
This assumes login as root"""
if not war:
if not args.local_path:
raise AssertionError("args.local_path is missing")
war = ZanataWar(local_path=args.local_path)
if not args.war_file:
raise AssertionError("args.war_file is missing")
war = ZanataWar(local_path=args.war_file)

ssh_host = SshHost(args.host, args.identity_file)
ssh_host.run_check_call("systemctl stop eap7-standalone", True)
Expand Down Expand Up @@ -205,7 +205,10 @@ def parse():
'deploy-local-war',
help="""deploy the existing local WAR to server
(assuming you are able to sudo)""",
parents=[war_parent_parser, ssh_parent_parser])
parents=[ssh_parent_parser])
deploy_local_war_parser.add_argument(
'war_file', type=str,
help='Local WAR file to be upload')
deploy_local_war_parser.set_defaults(func=deploy_local_war)

deploy_parser = subparsers.add_parser(
Expand Down

0 comments on commit b8305cb

Please sign in to comment.