-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No argument for action change in zpa.policies.update_rule #134
Comments
Hi @EddyIskandar thanks for raising this. I took a look and tried to replicate the issue but I don't seem to have any problems changing an access rule action. Just to give you some context, I made a design decision to have a single method that covered updating access, timeout and client forwarding rules. I made the decision because if I had a separate method for each then they would essentially be a duplicate with some minor modifications for each rule type (access, timeout, client forwarding). As a consequence, I admit in hindsight I have been a bit lazy documenting the
In testing, I created an access rule and used the following code to update the action: zpa.policies.update_rule("access", "<Rule ID>", action="DENY") This worked without issue despite not being listed as a possible kwarg. Can you please confirm that the functionality works and that the issue is around documentation? Or have I missed the point entirely here and you can you please provide more info? Thanks! |
Hi Mitch,
Can confirm that the function works as you said. It was confusing as it was not described in the documentation. Thanks for your support and fast reply.
Sincerely,
Eddy
…________________________________
From: Mitch Kelly ***@***.***>
Sent: 15 August 2022 12:44
To: mitchos/pyZscaler ***@***.***>
Cc: EDDY ISKANDAR BIN MOHD MAHATRI ***@***.***>; Mention ***@***.***>
Subject: Re: [mitchos/pyZscaler] No argument for action change in zpa.policies.update_rule (Issue #134)
CAUTION: This email originated from outside of SIT. Do not click links or open attachments unless you recognise the sender and know the content is safe.
Hi @EddyIskandar<https://github.com/EddyIskandar> thanks for raising this.
I took a look and tried to replicate the issue but I don't seem to have any problems changing an access rule action.
Just to give you some context, I made a design decision to have a single method that covered updating access, timeout and client forwarding rules. I made the decision because if I had a separate method for each then they would essentially be a duplicate with some minor modifications for each rule type (access, timeout, client forwarding).
As a consequence, I admit in hindsight I have been a bit lazy documenting the zpa.policies.update_rule() method. In practicality, kwargs can contain any of the updateable params from either:
* zpa.policies.add_access_rule(),
* zpa.policies.add_timeout_rule()
* zpa.policies.add_client_forwarding_rule()
In testing, I created an access rule and used the following code to update the action:
zpa.policies.update_rule("access", "<Rule ID>", action="DENY")
This worked without issue despite not being listed as a possible kwarg.
Can you please confirm that the functionality works and that the issue is around documentation? Or have I missed the point entirely here and you can you please provide more info? Thanks!
—
Reply to this email directly, view it on GitHub<#134 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ANNEARC7KGG54DF2UW75E5TVZHDMLANCNFSM56RASRUQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
________________________________
Notice: This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Singapore Institute of Technology, Co. Reg. No. 200917667D.
|
Great to hear we got you there in the end @EddyIskandar! I'm going to keep this issue open until I've updated the documentation in the next release. Please don't hesitate if you bump into any other issues, much appreciated. |
In zpa.policies.update_rule, there is not argument to change the action of the rule. For example, for access rule, the action is only allow or deny, if user creates a rule that he/she wants to change the action at a later time, there is no argument for this in the function.
The text was updated successfully, but these errors were encountered: