def resolve_command(self, ctx, args): cmd_name = args[0] cmd = AliasedGroup.get_command(self, ctx, cmd_name) if not cmd: cmd_name = DEFAULT_COMMAND cmd = AliasedGroup.get_command(self, ctx, cmd_name) new_args = args else: new_args = args[1:] return cmd_name, cmd, new_args
'public_ip': 'Public IP', 'resource_id': 'Resource ID', 'instance_id': 'Instance ID', 'version': 'Ver.' } COMPLETE_STATES = [ 'CREATE_COMPLETE', 'ROLLBACK_COMPLETE', 'UPDATE_COMPLETE', 'UPDATE_ROLLBACK_COMPLETE' ] requests.packages.urllib3.disable_warnings() # Disable the security warnings main = AliasedGroup(context_settings=dict(help_option_names=['-h', '--help'])) def main_with_metrics(): """ Runs main() and reports success and failure metrics """ try: main() except Exception: report_metric("bus.lizzy-client.failed", 1) raise except SystemExit as sys_exit: if sys_exit.code == 0: report_metric("bus.lizzy-client.success", 1) else: