Skip to content

Commit

Permalink
Disabling upgrade feature (experimental) (hitachienergy#1174)
Browse files Browse the repository at this point in the history
  • Loading branch information
przemyslavic authored Apr 20, 2020
1 parent 2117621 commit 4ebb96c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions core/src/epicli/cli/epicli.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ def main():
subparsers = parser.add_subparsers()
init_parser(subparsers)
apply_parser(subparsers)
upgrade_parser(subparsers)

'''
validate_parser(subparsers)
backup_parser(subparsers)
recovery_parser(subparsers)
upgrade_parser(subparsers)
'''

# check if there were any variables and display full help
Expand Down Expand Up @@ -103,12 +103,6 @@ def apply_parser(subparsers):

sub_parser.set_defaults(func=run_apply)

def upgrade_parser(subparsers):
sub_parser = subparsers.add_parser('upgrade', description='[Experimental]: Upgrades existing Epiphany Platform to latest version.')
sub_parser.add_argument('-b', '--build', dest='build_directory', type=str, required=True,
help='Absolute path to directory with build artifacts.')
sub_parser.set_defaults(func=run_upgrade)

'''
def validate_parser(subparsers):
sub_parser = subparsers.add_parser('verify', description='Validates the configuration from file by executing a dry '
Expand All @@ -130,6 +124,12 @@ def recovery_parser(subparsers):
sub_parser.add_argument('-b', '--build', dest='build_directory', type=str, required=True,
help='Absolute path to directory with build artifacts.')
sub_parser.set_defaults(func=run_recovery)
def upgrade_parser(subparsers):
sub_parser = subparsers.add_parser('upgrade', description='[Experimental]: Upgrades existing Epiphany Platform to latest version.')
sub_parser.add_argument('-b', '--build', dest='build_directory', type=str, required=True,
help='Absolute path to directory with build artifacts.')
sub_parser.set_defaults(func=run_upgrade)
'''

def run_apply(args):
Expand All @@ -145,13 +145,6 @@ def run_init(args):
return initializer.run()


def run_upgrade(args):
if not query_yes_no('This is an experimental feature and could change at any time. Do you want to continue?'):
return 0
Config().output_dir = args.build_directory
with PatchEngine() as engine:
return engine.run_upgrade()

'''
def run_validate(args):
adjust_paths(args)
Expand All @@ -172,6 +165,13 @@ def run_recovery(args):
Config().output_dir = args.build_directory
with PatchEngine() as engine:
return engine.run_recovery()
def run_upgrade(args):
if not query_yes_no('This is an experimental feature and could change at any time. Do you want to continue?'):
return 0
Config().output_dir = args.build_directory
with PatchEngine() as engine:
return engine.run_upgrade()
'''

def adjust_paths(args):
Expand Down

0 comments on commit 4ebb96c

Please sign in to comment.