From 4ffa3ead1e9aa1345e84cd9849df543997b2676a Mon Sep 17 00:00:00 2001 From: Pierre Prinetti Date: Mon, 29 Jul 2024 09:56:05 +0200 Subject: [PATCH 1/2] Fix security group rule "any protocol" Before this patch, Gophercloud attempted to create a security group rule that would be applied regardless of the protocol by passing the literal `"any"` as the rule protocol. Despite being correct according to [the documentation][1], Neutron rejects the value `"any"` with an HTTP status code of `400 Bad Request`. This change replaces the value of `ProtocolAny` to be the empty string `""`, which has the effect of creating a rule that applies to any protocol. cf: [Neutron bug 2074056][2] [1]: https://docs.openstack.org/api-ref/network/v2/#create-security-group-rule [2]: https://bugs.launchpad.net/neutron/+bug/2074056 --- openstack/networking/v2/extensions/security/rules/requests.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstack/networking/v2/extensions/security/rules/requests.go b/openstack/networking/v2/extensions/security/rules/requests.go index 364f7f5c98..480b1510ca 100644 --- a/openstack/networking/v2/extensions/security/rules/requests.go +++ b/openstack/networking/v2/extensions/security/rules/requests.go @@ -75,7 +75,7 @@ const ( ProtocolUDP RuleProtocol = "udp" ProtocolUDPLite RuleProtocol = "udplite" ProtocolVRRP RuleProtocol = "vrrp" - ProtocolAny RuleProtocol = "any" + ProtocolAny RuleProtocol = "" ) // CreateOptsBuilder allows extensions to add additional parameters to the From 815c7c865234569fc771729e04e016280da86c47 Mon Sep 17 00:00:00 2001 From: Pierre Prinetti Date: Wed, 18 Sep 2024 13:52:21 +0200 Subject: [PATCH 2/2] Prepare v1.14.1 --- CHANGELOG.md | 4 ++++ provider_client.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc38bf5871..b19b5e7753 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.14.1 (2024-09-18) + +* [GH-3162](https://github.com/gophercloud/gophercloud/pull/3162) Fix security group rule "any protocol" + ## v1.14.0 (2024-07-24) * [GH-3095](https://github.com/gophercloud/gophercloud/pull/3095) [neutron]: introduce Description argument for the portforwarding diff --git a/provider_client.go b/provider_client.go index 6e57f48843..7e25882c87 100644 --- a/provider_client.go +++ b/provider_client.go @@ -14,7 +14,7 @@ import ( // DefaultUserAgent is the default User-Agent string set in the request header. const ( - DefaultUserAgent = "gophercloud/v1.14.0" + DefaultUserAgent = "gophercloud/v1.14.1" DefaultMaxBackoffRetries = 60 )