Skip to content

Conversation

gkopels
Copy link
Contributor

@gkopels gkopels commented Apr 15, 2025

Add a ethernet interface with IP addresses to the nmstate policy

@gkopels gkopels force-pushed the add-nodenetworkconfigpolicy-ethernet-interface branch from fbadee5 to 9b0103c Compare April 15, 2025 18:50
klaskosk
klaskosk previously approved these changes Apr 15, 2025
Copy link
Collaborator

@klaskosk klaskosk left a comment

Choose a reason for hiding this comment

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

/lgtm

@@ -399,6 +399,64 @@ func (builder *PolicyBuilder) WithVlanInterfaceIP(baseInterface, ipv4Addresses,
return builder.withInterface(newInterface)
}

// WithEthernetInterface adds type ethernet interface and IPs configuration to the NodeNetworkConfigurationPolicy.
func (builder *PolicyBuilder) WithEthernetInterface(interfaceName, ipv4Addresses, ipv6Addresses string) *PolicyBuilder {
Copy link
Contributor

Choose a reason for hiding this comment

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

Cosmetic
Since we accept only one IPv4 Address & one IPv6 Address, may be just change the vars to ipv4Address & ipv6Address

@gkopels gkopels force-pushed the add-nodenetworkconfigpolicy-ethernet-interface branch from 9b0103c to 1d3e83d Compare April 17, 2025 09:01
@klaskosk klaskosk merged commit 590ab97 into rh-ecosystem-edge:main Apr 18, 2025
5 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