Example #1
0
 def take_action(self, parsed_args):
     client = self.app.client_manager.ssh
     common.set_all_common_headers(client, parsed_args)
     data = client.usercert.create(client.session.get_user_id(),
                                   client.session.get_project_id(),
                                   parsed_args.pub_key)
     return (_names + ['Certificate'],
             utils.get_item_properties(data, _columns + ['cert']))
Example #2
0
 def take_action(self, parsed_args):
     client = self.app.client_manager.ssh
     common.set_all_common_headers(client, parsed_args)
     data = client.usercert.revoke(parsed_args.auth_id, parsed_args.serial)
     return _names, utils.get_item_properties(data, _columns)
Example #3
0
 def _get_data(self, parsed_args):
     client = self.app.client_manager.ssh
     common.set_all_common_headers(client, parsed_args)
     return client.usercert.get(parsed_args.serial)
Example #4
0
 def take_action(self, parsed_args):
     client = self.app.client_manager.ssh
     common.set_all_common_headers(client, parsed_args)
     data = get_all(client.usercert.list)
     return _names, (utils.get_item_properties(s, _columns) for s in data)
Example #5
0
 def _get_data(self, parsed_args):
     client = self.app.client_manager.ssh
     common.set_all_common_headers(client, parsed_args)
     return client.ca.get(parsed_args.auth_id)
Example #6
0
 def _get_data(self, parsed_args):
     client = self.app.client_manager.ssh
     common.set_all_common_headers(client, parsed_args)
     return client.hostcert.get(parsed_args.host_id,
                                parsed_args.fingerprint)