Skip to content

Add the ability to remove ingress/egress policies from fwaas_v2 groups#2623

Merged
mandre merged 1 commit intogophercloud:masterfrom
Koodt:fwaas_v2_add_policies_removing_from_groups
May 25, 2023
Merged

Add the ability to remove ingress/egress policies from fwaas_v2 groups#2623
mandre merged 1 commit intogophercloud:masterfrom
Koodt:fwaas_v2_add_policies_removing_from_groups

Conversation

@Koodt
Copy link
Copy Markdown
Contributor

@Koodt Koodt commented May 19, 2023

Add RemoveIngressPolicy, RemoveEgressPolicy functions.
Add acceptance tests.
Add unit tests.

Fixes #2622

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting your first PR! Be sure that we will be looking at it but keep in mind
this sometimes takes a while.
Please let the maintainers know if your PR has not got enough attention after a few days.
If any doubt, please consult our PR tutorial.

@coveralls
Copy link
Copy Markdown

coveralls commented May 19, 2023

Coverage Status

Coverage: 79.105% (-0.006%) from 79.111% when pulling bfbaf66 on Koodt:fwaas_v2_add_policies_removing_from_groups into c8549f4 on gophercloud:master.

IngressFirewallPolicyID *string `json:"ingress_firewall_policy_id"`
}

func RemoveIngressPolicy(c *gophercloud.ServiceClient, id string) (r UpdateResult) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if these two functions are actually required to remove policies from firewall groups.

Have you tried setting the IngressFirewallPolicyID field to the empty string?
https://go.dev/play/p/iSM7DNmzUej

Copy link
Copy Markdown
Contributor Author

@Koodt Koodt May 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Firewall policy ID must be nil or UUID
Empty string leads to exception at the Openstack side.

Reason: '[]' is not a valid UUID."
Reason: '' is not a valid UUID."
Reason: 'false' is not a valid UUID."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, thanks for checking.

Add RemoveIngressPolicy, RemoveEgressPolicy functions.
Add acceptance tests.
Add unit tests.
@mandre mandre added this to the v1.4.0 milestone May 25, 2023
@mandre mandre merged commit 5e9b773 into gophercloud:master May 25, 2023
@Koodt Koodt deleted the fwaas_v2_add_policies_removing_from_groups branch May 25, 2023 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the ability to remove ingress/egress policies from fwaas_v2 groups

3 participants