def __call__(self, args, extra_args=None): repo = RepomanClient(config.host, config.port, config.proxy) if args.group: kwargs = {'group':args.group} else: kwargs = {} try: users = repo.list_users(**kwargs) display.display_user_list(users, long=args.long) except RepomanError, e: print e.message sys.exit(1)
def __call__(self, args): try: users = [] full_output = False if args.user: users.append(self.get_repoman_client(args).describe_user(args.user)) full_output = True else: users_urls = self.get_repoman_client(args).list_users(group = args.group) # Fetch metadata for each user. # TODO: Create a server method that will return the metadata # of all users and use that instead. (Andre) for user_url in users_urls: users.append(self.get_repoman_client(args).describe_user(user_url.rsplit('/',1)[-1])) display.display_user_list(users, short_output=args.short, full_output=full_output) except RepomanError, e: raise SubcommandFailure(self, 'Error listing user(s).', e)
def __call__(self, args, extra_args=None): log = logging.getLogger('ListUsers') log.debug("args: '%s' extra_args: '%s'" % (args, extra_args)) repo = RepomanClient(config.host, config.port, config.proxy) if args.group: kwargs = {'group':args.group} else: kwargs = {} log.debug("kwargs: '%s'" % kwargs) try: users = repo.list_users(**kwargs) display.display_user_list(users, long=args.long) except RepomanError, e: print e.message sys.exit(1)
def __call__(self, args, extra_args=None): log = logging.getLogger('ListUsers') log.debug("args: '%s' extra_args: '%s'" % (args, extra_args)) repo = RepomanClient(config.host, config.port, config.proxy) if args.group: kwargs = {'group': args.group} else: kwargs = {} log.debug("kwargs: '%s'" % kwargs) try: users = repo.list_users(**kwargs) display.display_user_list(users, long=args.long) except RepomanError, e: print e.message sys.exit(1)