Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename field HarwareAddr to PhysicalInterface #425

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading