-
Notifications
You must be signed in to change notification settings - Fork 43
pass layer & id to https_rule update call #213
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
Conversation
Hi @phkrl , Thanks for your PR.
Thanks, |
Hi @chkp-royl,
This statement contradicts the issue we encountered: we explicitly set name field for each rule but still got error claiming that uid is required. It was only after this patch when we could update our existing https rules.
Fixed in latest commit. |
This might happen if both rules had the same name so we can identify them only by uid.
|
We have unique rule names. They are keys of map in our module.
I believe, this block should set layer both if it was changed and if it wasn't. Is my assumption wrong?
Do you mean, i should pass only "new-name" field, without setting "name" at all, since "uid" is passed unconditionally? |
The check of HasChange is irrelevant now. We can set layer anyway just like you did with the uid.
yes |
Fixed both |
Added one more commit to fix destroy issue. Otherwise the error states that ignore-errors is unrecognized parameter. |
Looks better now.
Alright. |
Applied both. |
Thanks for the effort. Merged. |
Currently, https rule update does not pass rule id & rule layer to api call, thus resulting in errors, since these fields are mandatory. This patch fixes issue, explicitly adding uid and layer fields to the structure passed to api.