You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Madhan Neethiraj <ma...@apache.org> on 2023/02/12 22:02:46 UTC

Review Request 74305: RANGER-4080: Python client updated with addition of 2 security-zone APIs

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74305/
-----------------------------------------------------------

Review request for ranger, Abhishek  Kumar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.


Bugs: RANGER-4080
    https://issues.apache.org/jira/browse/RANGER-4080


Repository: ranger


Description
-------

- added methods get_security_zone_headers() and get_security_zone_service_headers(zone_id)
- removed method update_security_zone(zone_name, zone), as REST endpoint doesn't exist at the server side


Diffs
-----

  intg/src/main/python/README.md 46de769fc 
  intg/src/main/python/apache_ranger/client/ranger_client.py 260095b2f 
  intg/src/main/python/apache_ranger/model/ranger_security_zone.py 3056b7ed5 
  intg/src/main/python/apache_ranger/model/ranger_service.py a3d273c20 
  intg/src/main/python/apache_ranger/utils.py b3c568f1f 
  intg/src/main/python/setup.py 5222d7153 


Diff: https://reviews.apache.org/r/74305/diff/1/


Testing
-------

- verified the new methods return correct values with a sample client


Thanks,

Madhan Neethiraj


Re: Review Request 74305: RANGER-4080: Python client updated with addition of 2 security-zone APIs

Posted by Abhishek Kumar <ab...@gmail.com>.

> On Feb. 17, 2023, 11:17 p.m., Abhishek  Kumar wrote:
> > intg/src/main/python/apache_ranger/client/ranger_client.py
> > Line 197 (original)
> > <https://reviews.apache.org/r/74305/diff/1/?file=2274634#file2274634line197>
> >
> >     Is this getting deprecated ?

I think this removal would be required in java client as well.


- Abhishek


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74305/#review225192
-----------------------------------------------------------


On Feb. 12, 2023, 10:02 p.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74305/
> -----------------------------------------------------------
> 
> (Updated Feb. 12, 2023, 10:02 p.m.)
> 
> 
> Review request for ranger, Abhishek  Kumar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4080
>     https://issues.apache.org/jira/browse/RANGER-4080
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> - added methods get_security_zone_headers() and get_security_zone_service_headers(zone_id)
> - removed method update_security_zone(zone_name, zone), as REST endpoint doesn't exist at the server side
> 
> 
> Diffs
> -----
> 
>   intg/src/main/python/README.md 46de769fc 
>   intg/src/main/python/apache_ranger/client/ranger_client.py 260095b2f 
>   intg/src/main/python/apache_ranger/model/ranger_security_zone.py 3056b7ed5 
>   intg/src/main/python/apache_ranger/model/ranger_service.py a3d273c20 
>   intg/src/main/python/apache_ranger/utils.py b3c568f1f 
>   intg/src/main/python/setup.py 5222d7153 
> 
> 
> Diff: https://reviews.apache.org/r/74305/diff/1/
> 
> 
> Testing
> -------
> 
> - verified the new methods return correct values with a sample client
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>


Re: Review Request 74305: RANGER-4080: Python client updated with addition of 2 security-zone APIs

Posted by Madhan Neethiraj <ma...@apache.org>.

> On Feb. 17, 2023, 11:17 p.m., Abhishek  Kumar wrote:
> > intg/src/main/python/apache_ranger/client/ranger_client.py
> > Line 197 (original)
> > <https://reviews.apache.org/r/74305/diff/1/?file=2274634#file2274634line197>
> >
> >     Is this getting deprecated ?
> 
> Abhishek  Kumar wrote:
>     I think this removal would be required in java client as well.

Yes. Let's track Java client updates with a separate patch.


- Madhan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74305/#review225192
-----------------------------------------------------------


On Feb. 12, 2023, 10:02 p.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74305/
> -----------------------------------------------------------
> 
> (Updated Feb. 12, 2023, 10:02 p.m.)
> 
> 
> Review request for ranger, Abhishek  Kumar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4080
>     https://issues.apache.org/jira/browse/RANGER-4080
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> - added methods get_security_zone_headers() and get_security_zone_service_headers(zone_id)
> - removed method update_security_zone(zone_name, zone), as REST endpoint doesn't exist at the server side
> 
> 
> Diffs
> -----
> 
>   intg/src/main/python/README.md 46de769fc 
>   intg/src/main/python/apache_ranger/client/ranger_client.py 260095b2f 
>   intg/src/main/python/apache_ranger/model/ranger_security_zone.py 3056b7ed5 
>   intg/src/main/python/apache_ranger/model/ranger_service.py a3d273c20 
>   intg/src/main/python/apache_ranger/utils.py b3c568f1f 
>   intg/src/main/python/setup.py 5222d7153 
> 
> 
> Diff: https://reviews.apache.org/r/74305/diff/1/
> 
> 
> Testing
> -------
> 
> - verified the new methods return correct values with a sample client
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>


Re: Review Request 74305: RANGER-4080: Python client updated with addition of 2 security-zone APIs

Posted by Abhishek Kumar <ab...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74305/#review225192
-----------------------------------------------------------




intg/src/main/python/apache_ranger/client/ranger_client.py
Line 197 (original)
<https://reviews.apache.org/r/74305/#comment313942>

    Is this getting deprecated ?


- Abhishek  Kumar


On Feb. 12, 2023, 10:02 p.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74305/
> -----------------------------------------------------------
> 
> (Updated Feb. 12, 2023, 10:02 p.m.)
> 
> 
> Review request for ranger, Abhishek  Kumar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4080
>     https://issues.apache.org/jira/browse/RANGER-4080
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> - added methods get_security_zone_headers() and get_security_zone_service_headers(zone_id)
> - removed method update_security_zone(zone_name, zone), as REST endpoint doesn't exist at the server side
> 
> 
> Diffs
> -----
> 
>   intg/src/main/python/README.md 46de769fc 
>   intg/src/main/python/apache_ranger/client/ranger_client.py 260095b2f 
>   intg/src/main/python/apache_ranger/model/ranger_security_zone.py 3056b7ed5 
>   intg/src/main/python/apache_ranger/model/ranger_service.py a3d273c20 
>   intg/src/main/python/apache_ranger/utils.py b3c568f1f 
>   intg/src/main/python/setup.py 5222d7153 
> 
> 
> Diff: https://reviews.apache.org/r/74305/diff/1/
> 
> 
> Testing
> -------
> 
> - verified the new methods return correct values with a sample client
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>


Re: Review Request 74305: RANGER-4080: Python client updated with addition of 2 security-zone APIs

Posted by Abhishek Kumar <ab...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74305/#review225205
-----------------------------------------------------------


Ship it!




Ship It!

- Abhishek  Kumar


On Feb. 18, 2023, 9:01 a.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74305/
> -----------------------------------------------------------
> 
> (Updated Feb. 18, 2023, 9:01 a.m.)
> 
> 
> Review request for ranger, Abhishek  Kumar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4080
>     https://issues.apache.org/jira/browse/RANGER-4080
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> - added methods get_security_zone_headers() and get_security_zone_service_headers(zone_id)
> - removed method update_security_zone(zone_name, zone), as REST endpoint doesn't exist at the server side
> 
> 
> Diffs
> -----
> 
>   intg/src/main/python/README.md 46de769fc 
>   intg/src/main/python/apache_ranger/client/ranger_client.py 260095b2f 
>   intg/src/main/python/apache_ranger/model/ranger_security_zone.py 3056b7ed5 
>   intg/src/main/python/apache_ranger/model/ranger_service.py a3d273c20 
>   intg/src/main/python/apache_ranger/utils.py b3c568f1f 
>   intg/src/main/python/setup.py 5222d7153 
> 
> 
> Diff: https://reviews.apache.org/r/74305/diff/2/
> 
> 
> Testing
> -------
> 
> - verified the new methods return correct values with a sample client
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>


Re: Review Request 74305: RANGER-4080: Python client updated with addition of 2 security-zone APIs

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74305/
-----------------------------------------------------------

(Updated Feb. 18, 2023, 9:01 a.m.)


Review request for ranger, Abhishek  Kumar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.


Changes
-------

addressed review comments


Bugs: RANGER-4080
    https://issues.apache.org/jira/browse/RANGER-4080


Repository: ranger


Description
-------

- added methods get_security_zone_headers() and get_security_zone_service_headers(zone_id)
- removed method update_security_zone(zone_name, zone), as REST endpoint doesn't exist at the server side


Diffs (updated)
-----

  intg/src/main/python/README.md 46de769fc 
  intg/src/main/python/apache_ranger/client/ranger_client.py 260095b2f 
  intg/src/main/python/apache_ranger/model/ranger_security_zone.py 3056b7ed5 
  intg/src/main/python/apache_ranger/model/ranger_service.py a3d273c20 
  intg/src/main/python/apache_ranger/utils.py b3c568f1f 
  intg/src/main/python/setup.py 5222d7153 


Diff: https://reviews.apache.org/r/74305/diff/2/

Changes: https://reviews.apache.org/r/74305/diff/1-2/


Testing
-------

- verified the new methods return correct values with a sample client


Thanks,

Madhan Neethiraj


Re: Review Request 74305: RANGER-4080: Python client updated with addition of 2 security-zone APIs

Posted by Abhishek Kumar <ab...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74305/#review225191
-----------------------------------------------------------




intg/src/main/python/apache_ranger/utils.py
Lines 69 (patched)
<https://reviews.apache.org/r/74305/#comment313941>

    Can also be written as:
    
    def type_coerce_list_dict(obj, objType):
        if isinstance(obj, list):
            return [type_coerce_dict(entry, objType) for entry in obj]
        return None


- Abhishek  Kumar


On Feb. 12, 2023, 10:02 p.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74305/
> -----------------------------------------------------------
> 
> (Updated Feb. 12, 2023, 10:02 p.m.)
> 
> 
> Review request for ranger, Abhishek  Kumar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4080
>     https://issues.apache.org/jira/browse/RANGER-4080
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> - added methods get_security_zone_headers() and get_security_zone_service_headers(zone_id)
> - removed method update_security_zone(zone_name, zone), as REST endpoint doesn't exist at the server side
> 
> 
> Diffs
> -----
> 
>   intg/src/main/python/README.md 46de769fc 
>   intg/src/main/python/apache_ranger/client/ranger_client.py 260095b2f 
>   intg/src/main/python/apache_ranger/model/ranger_security_zone.py 3056b7ed5 
>   intg/src/main/python/apache_ranger/model/ranger_service.py a3d273c20 
>   intg/src/main/python/apache_ranger/utils.py b3c568f1f 
>   intg/src/main/python/setup.py 5222d7153 
> 
> 
> Diff: https://reviews.apache.org/r/74305/diff/1/
> 
> 
> Testing
> -------
> 
> - verified the new methods return correct values with a sample client
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>


Re: Review Request 74305: RANGER-4080: Python client updated with addition of 2 security-zone APIs

Posted by Abhishek Kumar <ab...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74305/#review225190
-----------------------------------------------------------




intg/src/main/python/apache_ranger/utils.py
Lines 71 (patched)
<https://reviews.apache.org/r/74305/#comment313940>

    Please take a look at below:
    
    ret = [type_coerce_dict(entry, objType) for entry in obj]


- Abhishek  Kumar


On Feb. 12, 2023, 10:02 p.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74305/
> -----------------------------------------------------------
> 
> (Updated Feb. 12, 2023, 10:02 p.m.)
> 
> 
> Review request for ranger, Abhishek  Kumar, Ankita Sinha, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4080
>     https://issues.apache.org/jira/browse/RANGER-4080
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> - added methods get_security_zone_headers() and get_security_zone_service_headers(zone_id)
> - removed method update_security_zone(zone_name, zone), as REST endpoint doesn't exist at the server side
> 
> 
> Diffs
> -----
> 
>   intg/src/main/python/README.md 46de769fc 
>   intg/src/main/python/apache_ranger/client/ranger_client.py 260095b2f 
>   intg/src/main/python/apache_ranger/model/ranger_security_zone.py 3056b7ed5 
>   intg/src/main/python/apache_ranger/model/ranger_service.py a3d273c20 
>   intg/src/main/python/apache_ranger/utils.py b3c568f1f 
>   intg/src/main/python/setup.py 5222d7153 
> 
> 
> Diff: https://reviews.apache.org/r/74305/diff/1/
> 
> 
> Testing
> -------
> 
> - verified the new methods return correct values with a sample client
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>