def handle_action(self, cxt, resource, action, *args, **kwargs):
try:
resource = self._adapt_resource(resource)
client = self._get_client(cxt)
collection = '%ss' % resource
resource_manager = getattr(client, collection)
resource_manager.convert_into_with_meta = _convert_into_with_meta
# NOTE(zhiyuan) yes, this is a dirty hack. but the original
# implementation hides response object which is needed
return getattr(resource_manager, action)(*args, **kwargs)
except r_exceptions.ConnectTimeout:
self.endpoint_url = None
raise exceptions.EndpointNotAvailable('nova',
client.client.management_url)
评论列表
文章目录