Skip to content

Commit

Permalink
Merge pull request #425 from civo/physical-interface
Browse files Browse the repository at this point in the history
Rename field HarwareAddr to PhysicalInterface
  • Loading branch information
vishalanarase authored May 28, 2024
2 parents 26fa483 + b334618 commit 9993915
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cmd/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func init() {
networkConnectCmd.Flags().IntVar(&vlanID, "vlan-id", 0, "VLAN ID to connect")
networkConnectCmd.Flags().StringVar(&vlanCIDRV4, "cidr-v4", "", "CIDR v4 of the VLAN")
networkConnectCmd.Flags().StringVar(&vlanGatewayIPv4, "gateway-ipv4", "", "Gateway IPv4 address for the VLAN")
networkConnectCmd.Flags().StringVar(&vlanHardwareAddr, "hardware-addr", "", "Hardware address for the VLAN connection")
networkConnectCmd.Flags().StringVar(&vlanPhysicalInterface, "physical-interface", "eth0", "Physical interface for the VLAN connection")
networkConnectCmd.Flags().StringVar(&vlanAllocationStartV4, "allocation-pool-v4-start", "", "Start of the IPv4 allocation pool for the VLAN")
networkConnectCmd.Flags().StringVar(&vlanAllocationEndV4, "allocation-pool-v4-end", "", "End of the IPv4 allocation pool for the VLAN")
}
5 changes: 3 additions & 2 deletions cmd/network/network_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package network

import (
"fmt"
"os"

"github.com/civo/cli/config"
"github.com/civo/cli/utility"
"github.com/spf13/cobra"
"os"
)

var networkShowCmd = &cobra.Command{
Expand Down Expand Up @@ -42,7 +43,7 @@ var networkShowCmd = &cobra.Command{
if network.VlanID != 0 {
fmt.Println("\nVLAN Details:")
fmt.Printf("VLAN ID: %d\n", network.VlanID)
fmt.Printf("Hardware Address: %s\n", network.HardwareAddr)
fmt.Printf("Hardware Address: %s\n", network.PhysicalInterface)
fmt.Printf("Gateway IPv4: %s\n", network.GatewayIPv4)
fmt.Printf("Allocation Pool IPv4 Start: %s\n", network.AllocationPoolV4Start)
fmt.Printf("Allocation Pool IPv4 End: %s\n", network.AllocationPoolV4End)
Expand Down
7 changes: 4 additions & 3 deletions cmd/network/vlan_connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package network

import (
"fmt"
"github.com/civo/civogo"
"os"

"github.com/civo/civogo"

"github.com/civo/cli/common"
"github.com/civo/cli/config"
"github.com/civo/cli/utility"
Expand All @@ -19,7 +20,7 @@ var (
vlanID int
vlanCIDRV4 string
vlanGatewayIPv4 string
vlanHardwareAddr string
vlanPhysicalInterface string
vlanAllocationStartV4 string
vlanAllocationEndV4 string
)
Expand Down Expand Up @@ -50,7 +51,7 @@ var networkConnectCmd = &cobra.Command{

vlanConnectConfig := &civogo.VLANConnectConfig{
VlanID: vlanID,
HardwareAddr: vlanHardwareAddr,
PhysicalInterface: vlanPhysicalInterface,
CIDRv4: vlanCIDRV4,
GatewayIPv4: vlanGatewayIPv4,
AllocationPoolV4Start: vlanAllocationStartV4,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect
github.com/briandowns/spinner v1.11.1
github.com/c4milo/unpackit v0.0.0-20170704181138-4ed373e9ef1c // indirect
github.com/civo/civogo v0.3.69
github.com/civo/civogo v0.3.70
github.com/dsnet/compress v0.0.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/google/go-github v17.0.0+incompatible // indirect
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ github.com/briandowns/spinner v1.11.1/go.mod h1:QOuQk7x+EaDASo80FEXwlwiA+j/PPIcX
github.com/c4milo/unpackit v0.0.0-20170704181138-4ed373e9ef1c h1:aprLqMn7gSPT+vdDSl+/E6NLEuArwD/J7IWd8bJt5lQ=
github.com/c4milo/unpackit v0.0.0-20170704181138-4ed373e9ef1c/go.mod h1:Ie6SubJv/NTO9Q0UBH0QCl3Ve50lu9hjbi5YJUw03TE=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/civo/civogo v0.3.67 h1:R6MepF20Od7KQdcEKpr3GD8zKy1Jly0SuBDubZkEU2s=
github.com/civo/civogo v0.3.67/go.mod h1:S/iYmGvQOraxdRtcXeq/2mVX01/ia2qfpQUp2SsTLKA=
github.com/civo/civogo v0.3.69 h1:Not+F3Z1mxtXjMvDhUD5Nwi/1ql3uBT0ioRfhKXYhOA=
github.com/civo/civogo v0.3.69/go.mod h1:7UCYX+qeeJbrG55E1huv+0ySxcHTqq/26FcHLVelQJM=
github.com/civo/civogo v0.3.70 h1:QPuFm5EmpkScbdFo5/6grcG2xcvd/lgdolOtENT04Ac=
github.com/civo/civogo v0.3.70/go.mod h1:7UCYX+qeeJbrG55E1huv+0ySxcHTqq/26FcHLVelQJM=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
Expand Down

0 comments on commit 9993915

Please sign in to comment.