def execute(self): print("Models list: \n") for model in Routers.list(): print(model+"\n") print("For more models open an issue on: \n ") print("https://github.com/CristianOliveira/croutera") return True
def command(args): """ Retrive command by args """ if args.version: return VersionCommand() if args.list_models: return ModelListCommand() manufacturer = extractor.extract_manufacturer(args.model) model = extractor.extract_model(args.model) router = Routers.get(manufacturer, model) chain = ChainCommand() chain.add(AuthorizeCommand(router, args.username, args.password)) if args.wifi_pass: chain.add(ShowWifiPassCommand(router)) return chain if args.restart: chain.add(RestartCommand(router)) return chain