Skip to content

PCP-6119: feat: add AUTO link mode and LinkSubnetWithMode for MAAS link_subnet#43

Merged
AmitSahastra merged 5 commits intomainfrom
feat/link-subnet-mode
Apr 7, 2026
Merged

PCP-6119: feat: add AUTO link mode and LinkSubnetWithMode for MAAS link_subnet#43
AmitSahastra merged 5 commits intomainfrom
feat/link-subnet-mode

Conversation

@AmitSahastra
Copy link
Copy Markdown
Contributor

No description provided.

@AmitSahastra AmitSahastra changed the title feat: add AUTO link mode and LinkSubnetWithMode for MAAS link_subnet [WIP] feat: add AUTO link mode and LinkSubnetWithMode for MAAS link_subnet Feb 26, 2026
Comment thread maasclient/networkinterface.go Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds AUTO link mode support for MAAS network interface subnet linking and introduces a new Subnets client for listing subnets. The changes enable more flexible network interface configuration, particularly for managed subnets where MAAS can assign static IPs at deploy time without requiring DHCP on the wire.

Changes:

  • Added ModeAuto constant and new methods LinkSubnetWithMode, LinkSubnetWithForce, and Update for network interfaces
  • Added Subnets client with List() method to retrieve subnet information from MAAS
  • Added CIDR() method to Subnet interface to expose subnet CIDR information

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
maasclient/subnets.go New file implementing Subnets client for listing MAAS subnets
maasclient/subnet.go Added CIDR field and getter method to Subnet interface
maasclient/networkinterface.go Added LinkSubnetWithMode, LinkSubnetWithForce, and Update methods; modified LinkSubnet to delegate to LinkSubnetWithMode
maasclient/constants.go Added ModeAuto constant and updated mode documentation
maasclient/clientset.go Added Subnets() method to ClientSetInterface
maasclient/client.go Integrated Subnets controller into authenticatedClientSet

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread maasclient/networkinterface.go Outdated
Comment thread maasclient/subnets.go Outdated
Comment thread maasclient/networkinterface.go
Comment thread maasclient/networkinterface.go
Comment thread maasclient/constants.go
Comment thread maasclient/networkinterface.go Outdated
Comment thread maasclient/networkinterface.go Outdated
Comment thread maasclient/networkinterface.go
Comment thread maasclient/networkinterface.go Outdated
Comment thread maasclient/networkinterface.go
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread maasclient/networkinterface.go Outdated
Comment thread maasclient/networkinterface.go
Comment thread maasclient/subnets.go
Comment thread maasclient/clientset.go
Comment thread maasclient/subnet.go
Comment thread maasclient/networkinterface.go Outdated
Comment thread maasclient/networkinterface.go Outdated
Comment thread maasclient/networkinterface.go Outdated
@Kun483 Kun483 changed the title [WIP] feat: add AUTO link mode and LinkSubnetWithMode for MAAS link_subnet [WIP] PCP-6119: feat: add AUTO link mode and LinkSubnetWithMode for MAAS link_subnet Apr 7, 2026
LinkSubnetWithMode (no force) and LinkSubnetWithForce (force=true)
@AmitSahastra
Copy link
Copy Markdown
Contributor Author

@Kun483 new changes LGTM!

@AmitSahastra AmitSahastra changed the title [WIP] PCP-6119: feat: add AUTO link mode and LinkSubnetWithMode for MAAS link_subnet PCP-6119: feat: add AUTO link mode and LinkSubnetWithMode for MAAS link_subnet Apr 7, 2026
@AmitSahastra AmitSahastra merged commit 7adf788 into main Apr 7, 2026
4 checks passed
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.

4 participants