Skip to content

[v2] allow port ranges in floating ip portforwarding - #3776

Merged
kayrus merged 1 commit into
v2from
bp-v2-63e76ea
May 28, 2026
Merged

kayrus merged 1 commit into
v2from
bp-v2-63e76ea

Conversation

@gophercloud-backport-bot

Copy link
Copy Markdown

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

@github-actions github-actions Bot added edit:networking This PR updates networking code v2 This PR targets v2 semver:minor Backwards-compatible change labels May 28, 2026
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 63.798% (-0.04%) from 63.838% — bp-v2-63e76ea into v2

@kayrus
kayrus merged commit 41fe5d7 into v2 May 28, 2026
19 checks passed
@kayrus
kayrus deleted the bp-v2-63e76ea branch May 28, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

edit:networking This PR updates networking code semver:minor Backwards-compatible change v2 This PR targets v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants