Tufin / pytos

A Python SDK for Tufin Orchestration Suite
https://www.tufin.com
Apache License 2.0
55 stars 21 forks source link

Not able to use a predefined service with Access_Request_Generator #33

Open jbrauer197 opened 4 years ago

jbrauer197 commented 4 years ago

I haven t been able to submit a SC ticket with a predefined service like ESP using the Access_Request_Generator class to create ARs, neither with the "naked" class instantiation method nor with the from_list_of_tuples method.

Reading thru the source code it appears that using predefined services is not supported (apparently _detect_service_type does not support it unless I am wrong) though it s working via Postman using

ESP

So please amend the Access_Request_Generator class to support predefined services as well. Thank you.

I am adding one observation: Apparently the _detect_service_type code tries to check against predefined services coming via get_iana_services() from /etc/services however it seems to me that /etc/protocol is not read in get_iana_services(). And ESP is in /etc/protocols.