Skip to content

Commit

Permalink
Rename field HardwareAddr to PhysicalInterface
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Anarase <[email protected]>
  • Loading branch information
vishalanarase committed May 23, 2024
1 parent 8f4eb6f commit bd3bbb7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fake_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ func (c *FakeClient) CreateNetwork(config NetworkConfig) (*NetworkResult, error)
// Handle VLAN configuration if present
if config.VLanConfig != nil {
newNetwork.VlanID = config.VLanConfig.VlanID
newNetwork.HardwareAddr = config.VLanConfig.HardwareAddr
newNetwork.PhysicalInterface = config.VLanConfig.PhysicalInterface
newNetwork.GatewayIPv4 = config.VLanConfig.GatewayIPv4
newNetwork.AllocationPoolV4Start = config.VLanConfig.AllocationPoolV4Start
newNetwork.AllocationPoolV4Start = config.VLanConfig.AllocationPoolV4End
Expand Down
6 changes: 3 additions & 3 deletions network.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Network struct {
NameserversV4 []string `json:"nameservers_v4,omitempty"`
NameserversV6 []string `json:"nameservers_v6,omitempty"`
VlanID int `json:"vlan_id" validate:"required" schema:"vlan_id"`
HardwareAddr string `json:"hardware_addr,omitempty" schema:"hardware_addr"`
PhysicalInterface string `json:"physical_interface,omitempty" schema:"physical_interface"`
GatewayIPv4 string `json:"gateway_ipv4" validate:"required" schema:"gateway_ipv4"`
AllocationPoolV4Start string `json:"allocation_pool_v4_start" validate:"required" schema:"allocation_pool_v4_start"`
AllocationPoolV4End string `json:"allocation_pool_v4_end" validate:"required" schema:"allocation_pool_v4_end"`
Expand Down Expand Up @@ -62,8 +62,8 @@ type VLANConnectConfig struct {
// VLanID is the ID of the VLAN to connect to
VlanID int `json:"vlan_id" validate:"required" schema:"vlan_id"`

// HardwareAddr is the base interface(default: eth0) at which we want to setup VLAN.
HardwareAddr string `json:"hardware_addr,omitempty" schema:"hardware_addr"`
// PhysicalInterface is the base interface(default: eth0) at which we want to setup VLAN.
PhysicalInterface string `json:"physical_interface,omitempty" schema:"physical_interface"`

// CIDRv4 is the CIDR of the VLAN to connect to
CIDRv4 string `json:"cidr_v4" validate:"required" schema:"cidr_v4"`
Expand Down
2 changes: 1 addition & 1 deletion network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func TestCreateNetworkWithVLAN(t *testing.T) {

vlanConnectConfig := VLANConnectConfig{
VlanID: 1,
HardwareAddr: "ETH0",
PhysicalInterface: "ETH0",
CIDRv4: "10.0.0.0/24",
GatewayIPv4: "10.0.0.4",
AllocationPoolV4Start: "10.0.0.0",
Expand Down

0 comments on commit bd3bbb7

Please sign in to comment.