Skip to content

feat(networking): ports, floating IPs, and networking lookup data sources - #10

Merged
PF9-pushkar merged 1 commit into
mainfrom
feat/networking-extras
Jul 12, 2026
Merged

feat(networking): ports, floating IPs, and networking lookup data sources#10
PF9-pushkar merged 1 commit into
mainfrom
feat/networking-extras

Conversation

@PF9-pushkar

Copy link
Copy Markdown
Collaborator

Adds the first batch of Phase 1 networking follow-ups (part of #2).

Resources

  • pcd_networking_port — Neutron port: network_id, name, admin_state_up, mac_address, device_id/device_owner, requested fixed_ip blocks, security_group_ids, allowed_address_pairs, and tags. Computed status + all_fixed_ips.
  • pcd_networking_floatingip — allocate from an external network by pool name (resolved to floating_network_id), optional port_id/fixed_ip association, tags. Associate/disassociate handled on update.

Data sources

  • pcd_networking_port, pcd_networking_router, pcd_networking_floatingip — single-result lookups by ID or filters.
  • pcd_networking_subnet_ids, pcd_networking_port_ids — return matching IDs, sorted ascending, with a stable synthetic id.

Design note

fixed_ip and allowed_address_pairs are treated as user-desired configuration and are not refreshed from Neutron on read: the server fills in assigned addresses and the port MAC on each pair, which would otherwise produce a perpetual plan diff under the plugin framework. The computed all_fixed_ips reports the addresses Neutron actually assigned.

Tests & checks

  • TestAccNetworkingPort_basic — create/update/import.
  • TestAccNetworkingExtraDataSources_basic — port / router / subnet_ids / port_ids.
  • TestAccNetworkingFloatingIP_basic — skips unless PCD_ACC_EXTERNAL_NETWORK names an external network.
  • go build/vet/gofmt/golangci-lint (0 issues) and tfplugindocs generate all clean.

Live-validation status

Code-complete and static-checks-green. Not yet run against the CE lab — the lab credentials weren't available in this working session (no lab-side blocker expected for ports/data sources). Floating IPs additionally require an external network in the lab. Tracked in DECISIONS.md.

… sources

Resources:
- pcd_networking_port — Neutron port with requested fixed IPs, security groups,
  allowed-address pairs, device binding, and tags. fixed_ip and
  allowed_address_pairs hold the user's requested config and are not refreshed
  from the server (Neutron fills in addresses/MACs that would otherwise churn the
  plan); the computed all_fixed_ips reports the addresses actually assigned.
- pcd_networking_floatingip — allocate a floating IP from an external network by
  its pool name (resolved to floating_network_id), optionally associate it with a
  port, and disassociate on update.

Data sources:
- pcd_networking_port, _router, _floatingip — single-result lookups by id/filters.
- pcd_networking_subnet_ids, _port_ids — list matching IDs, sorted, with a stable
  synthetic id.

Acceptance tests cover port CRUD + import and the four always-available data
sources; the floating IP test skips unless PCD_ACC_EXTERNAL_NETWORK names an
external network. build/vet/gofmt/golangci-lint and tfplugindocs all clean.
@PF9-pushkar
PF9-pushkar merged commit 68b035b into main Jul 12, 2026
4 checks passed
@PF9-pushkar
PF9-pushkar deleted the feat/networking-extras branch July 12, 2026 02:53
PF9-pushkar added a commit that referenced this pull request Jul 14, 2026
feat(networking): ports, floating IPs, and networking lookup data sources
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.

1 participant