def main(): command_opt = cfg.SubCommandOpt('command', title='Command', help=_('Available commands'), handler=add_command_parsers) CONF.register_cli_opt(command_opt) # this is hack to work with previous usage of ironic-dbsync # pls change it to ironic-dbsync upgrade valid_commands = set([ 'upgrade', 'revision', 'version', 'stamp', 'create_schema', 'online_data_migrations', ]) if not set(sys.argv) & valid_commands: sys.argv.append('upgrade') service.prepare_service(sys.argv) CONF.command.func()
parser = subparsers.add_parser( 'version', help=_("Print the current version information and exit.")) parser.set_defaults(func=command_object.version) parser = subparsers.add_parser('create_schema', help=_("Create the database schema.")) parser.set_defaults(func=command_object.create_schema) command_opt = cfg.SubCommandOpt('command', title='Command', help=_('Available commands'), handler=add_command_parsers) CONF.register_cli_opt(command_opt) def main(): # this is hack to work with previous usage of ironic-dbsync # pls change it to ironic-dbsync upgrade valid_commands = set([ 'upgrade', 'revision', 'version', 'stamp', 'create_schema', ]) if not set(sys.argv) & valid_commands: sys.argv.append('upgrade')
'version', help=_("Print the current version information and exit.")) parser.set_defaults(func=command_object.version) parser = subparsers.add_parser( 'create_schema', help=_("Create the database schema.")) parser.set_defaults(func=command_object.create_schema) command_opt = cfg.SubCommandOpt('command', title='Command', help=_('Available commands'), handler=add_command_parsers) CONF.register_cli_opt(command_opt) def main(): # this is hack to work with previous usage of ironic-dbsync # pls change it to ironic-dbsync upgrade valid_commands = set([ 'upgrade', 'revision', 'version', 'stamp', 'create_schema', ]) if not set(sys.argv) & valid_commands: sys.argv.append('upgrade') service.prepare_service(sys.argv) CONF.command.func()