Example #1
0
 def take_action(self, parsed_args):
     args = vars(parsed_args)
     res = main.process_request(args)
     if res['Error']:
         self.logger.warning('error occured')
     else:
         self.logger.info('smth') # change
     columns = ('Result', 'Error')
     data = res.values()
     return(columns, data)
Example #2
0
 def take_action(self, parsed_args):
     args = vars(parsed_args)
     res = main.process_request(args)
     if res['Error']:
         self.logger.warning('error occured')
     else:
         self.logger.info('smth')  # change
     columns = ('Result', 'Error')
     data = res.values()
     return (columns, data)
Example #3
0
 def take_action(self, parsed_args):
     if parsed_args.show == 'os':
         usrConfig = {'action': 'sh_os'}
     if parsed_args.show == 'vm':
         usrConfig = {'action': 'sh_vm'}
     res = main.process_request(usrConfig)
     self.logger.info('smth')  # change
     columns = res['Result'].keys()
     data = res['Result'].values()
     return (columns, data)
Example #4
0
 def take_action(self, parsed_args):
     if parsed_args.show == 'os':
         usrConfig = {'action': 'sh_os'}
     if parsed_args.show == 'vm':
         usrConfig = {'action': 'sh_vm'}
     res = main.process_request(usrConfig) 
     self.logger.info('smth')    # change
     columns = res['Result'].keys()
     data = res['Result'].values()
     return (columns, data)