mneethiraj commented on code in PR #1211:
URL: https://github.com/apache/ranger/pull/1211#discussion_r3954864840
##########
intg/src/main/python/apache_ranger/client/ranger_pdp_client.py:
##########
@@ -71,14 +71,27 @@ def get_resource_permissions(self, resource_perm_request):
return type_coerce(resp, RangerResourcePermissions)
+ def filter_resources(self, filter_resources_request):
+ """
+ Call POST /authz/v1/filterResources
+ :param filter_resources_request: dict-like OR
RangerFilterResourcesRequest
+ :return: RangerFilterResourcesResult
+ """
+ req = type_coerce(filter_resources_request,
RangerFilterResourcesRequest)
+ resp = self.client_http.call_api(RangerPDPClient.FILTER_RESOURCES,
request_data=req)
+
+ return type_coerce(resp, RangerFilterResourcesResult)
+
# URIs
URI_BASE = "authz/v1"
URI_AUTHORIZE = URI_BASE + "/authorize"
URI_AUTHORIZE_MULTI = URI_BASE + "/authorizeMulti"
URI_RESOURCE_PERMISSIONS = URI_BASE + "/permissions"
+ URI_RESOURCE_PERMISSIONS = URI_BASE + "/filterResources"
Review Comment:
Good catch! Thanks @rameeshm. I fixed this issue and added unit tests to
cover this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]