diff --git a/cmd/network/network.go b/cmd/network/network.go index 3418e395..10af2a58 100644 --- a/cmd/network/network.go +++ b/cmd/network/network.go @@ -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") } diff --git a/cmd/network/network_show.go b/cmd/network/network_show.go index c5157183..5a80ee80 100644 --- a/cmd/network/network_show.go +++ b/cmd/network/network_show.go @@ -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{ @@ -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) diff --git a/cmd/network/vlan_connect.go b/cmd/network/vlan_connect.go index 2c3ce617..11a00d0a 100644 --- a/cmd/network/vlan_connect.go +++ b/cmd/network/vlan_connect.go @@ -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" @@ -19,7 +20,7 @@ var ( vlanID int vlanCIDRV4 string vlanGatewayIPv4 string - vlanHardwareAddr string + vlanPhysicalInterface string vlanAllocationStartV4 string vlanAllocationEndV4 string ) @@ -50,7 +51,7 @@ var networkConnectCmd = &cobra.Command{ vlanConnectConfig := &civogo.VLANConnectConfig{ VlanID: vlanID, - HardwareAddr: vlanHardwareAddr, + PhysicalInterface: vlanPhysicalInterface, CIDRv4: vlanCIDRV4, GatewayIPv4: vlanGatewayIPv4, AllocationPoolV4Start: vlanAllocationStartV4, diff --git a/go.mod b/go.mod index c1cd4911..24333a78 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 84b919d4..9c6b784a 100644 --- a/go.sum +++ b/go.sum @@ -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=