Repository navigation
[v2] allow port ranges in floating ip portforwarding - #3776
Merged
Merged
Conversation
kayrus
approved these changes
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport: #3756
Fixes #3750
Added acceptance tests ranges:
=== RUN TestLayer3PortForwardingsCreateDelete
networking.go:35: Attempting to create network: TESTACC-OSTY0pea
networking.go:42: Successfully created network.
networking.go:305: Attempting to create subnet: TESTACC-3C9Bc0xM
networking.go:312: Successfully created subnet.
layer3.go:155: Attempting to create external router: TESTACC-6aVUKGog
layer3.go:178: Created router: TESTACC-6aVUKGog
networking.go:85: Attempting to create port: TESTACC-ysyRcBdk
networking.go:109: Successfully created port: TESTACC-ysyRcBdk
layer3.go:221: Attempting to add port b510e931-d475-45fd-a34a-4585b82bd1dd to router a257972a-fda3-484c-91eb-6060bd78006f
layer3.go:236: Successfully added port b510e931-d475-45fd-a34a-4585b82bd1dd to router a257972a-fda3-484c-91eb-6060bd78006f
layer3.go:24: Attempting to create floating IP on port:
layer3.go:38: Created floating IP.
tools.go:89: {
"id": "04f3adc1-7c84-4c41-8abc-9998c9040dfe",
"description": "Test floating IP",
"floating_network_id": "97a60fd4-aa21-436f-ba06-97b00865c6b0",
"floating_ip_address": "149.255.36.136",
"port_id": "",
"fixed_ip_address": "",
"tenant_id": "ba25a7a11cda4a3f8f88681a9fed7934",
"project_id": "ba25a7a11cda4a3f8f88681a9fed7934",
"status": "DOWN",
"router_id": "",
"tags": [],
"revision_number": 0
}
layer3.go:74: Attempting to create Port forwarding for floating IP with ID: 04f3adc1-7c84-4c41-8abc-9998c9040dfe
layer3.go:93: Created Port Forwarding.
tools.go:89: {
"id": "59000e6a-7642-47d5-8b1f-1532520b8eab",
"description": "Test description",
"internal_port_id": "b510e931-d475-45fd-a34a-4585b82bd1dd",
"external_port": 2230,
"external_port_range": "2230:2230",
"protocol": "tcp",
"internal_port": 25,
"internal_port_range": "25:25",
"internal_ip_address": "192.168.54.184"
}
layer3.go:103: Attempting to create Port Range forwarding for floating IP with ID: 04f3adc1-7c84-4c41-8abc-9998c9040dfe
layer3.go:122: Created Port Range Forwarding.
tools.go:89: {
"id": "3172eb85-a518-465b-93f9-c2e23cf1a111",
"description": "Test description range",
"internal_port_id": "b510e931-d475-45fd-a34a-4585b82bd1dd",
"external_port": 0,
"external_port_range": "1200:1299",
"protocol": "tcp",
"internal_port": 0,
"internal_port_range": "1200:1299",
"internal_ip_address": "192.168.54.184"
}
layer3.go:132: Attempting to delete the port forwarding with ID 3172eb85-a518-465b-93f9-c2e23cf1a111 for floating IP with ID 04f3adc1-7c84-4c41-8abc-9998c9040dfe
layer3.go:138: Successfully deleted the port forwarding with ID 3172eb85-a518-465b-93f9-c2e23cf1a111 for floating IP with ID 04f3adc1-7c84-4c41-8abc-9998c9040dfe
layer3.go:132: Attempting to delete the port forwarding with ID 59000e6a-7642-47d5-8b1f-1532520b8eab for floating IP with ID 04f3adc1-7c84-4c41-8abc-9998c9040dfe
layer3.go:138: Successfully deleted the port forwarding with ID 59000e6a-7642-47d5-8b1f-1532520b8eab for floating IP with ID 04f3adc1-7c84-4c41-8abc-9998c9040dfe
layer3.go:305: Attempting to delete floating IP: 04f3adc1-7c84-4c41-8abc-9998c9040dfe
layer3.go:312: Deleted floating IP: 04f3adc1-7c84-4c41-8abc-9998c9040dfe
layer3.go:283: Attempting to detach port b510e931-d475-45fd-a34a-4585b82bd1dd from router a257972a-fda3-484c-91eb-6060bd78006f
layer3.go:298: Successfully detached port b510e931-d475-45fd-a34a-4585b82bd1dd from router a257972a-fda3-484c-91eb-6060bd78006f
layer3.go:265: Attempting to delete router: a257972a-fda3-484c-91eb-6060bd78006f
layer3.go:276: Deleted router: a257972a-fda3-484c-91eb-6060bd78006f
networking.go:553: Attempting to delete subnet: 53265daf-13bd-4bed-ac97-480d865bfefb
networking.go:560: Deleted subnet: 53265daf-13bd-4bed-ac97-480d865bfefb
networking.go:525: Attempting to delete network: 724286e5-306a-448e-9d9a-d1b7289b91c6
networking.go:532: Deleted network: 724286e5-306a-448e-9d9a-d1b7289b91c6
--- PASS: TestLayer3PortForwardingsCreateDelete (17.72s)
PASS
ok github.com/gophercloud/gophercloud/v2/internal/acceptance/openstack/networking/v2/extensions/layer3 17.722s