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

fix(deps): update module github.com/equinix/equinix-sdk-go to v0.39.1 #460

Merged
merged 2 commits into from
May 13, 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 docs/metal_gateway_create-bgp-dynamic-neighbors.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ metal gateway create-bgp-dynamic-neighbors [flags]
### Options

```
--asn int32 ASN for the BGP Dynamic Neighbor IP range.
--asn int ASN for the BGP Dynamic Neighbor IP range.
--bgp-neighbor-range string BGP Dynamic Neighbor IP Range from gateway.
-h, --help help for create-bgp-dynamic-neighbors
-i, --id string Metal Gateway ID for which the BGP Dynamic Neighbor to be created.
Expand Down
2 changes: 1 addition & 1 deletion docs/metal_vrf_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ metal vrf create [-p <project_id] [-d <description>] [-m <metro>] [-n <name>] [-
-d, --description string Description of the Virtual Routing and Forwarding.
-h, --help help for create
-r, --ipranges strings A list of CIDR network addresses. Like [10.0.0.0/16, 2001:d78::/56]. IPv4 blocks must be between /8 and /29 in size. IPv6 blocks must be between /56 and /64.
-a, --local-asn int32 Local ASN for the VRF
-a, --local-asn int Local ASN for the VRF
-m, --metro string The UUID (or metro code) for the Metro in which to create this Virtual Routing and Forwarding
-n, --name string Name of the Virtual Routing and Forwarding
-p, --project-id string The project's UUID. This flag is required, unless specified in the config created by metal init or set as METAL_PROJECT_ID environment variable.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/equinix/metal-cli
go 1.19

require (
github.com/equinix/equinix-sdk-go v0.35.0
github.com/equinix/equinix-sdk-go v0.39.1
github.com/olekukonko/tablewriter v0.0.5
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.8.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ github.com/equinix/equinix-sdk-go v0.32.0 h1:zUn0Em5FJe6f6bntftrDBpO9L+XhbpFMPuQ
github.com/equinix/equinix-sdk-go v0.32.0/go.mod h1:qnpdRzVftHFNaJFk1VSIrAOTLrIoeDrxzUr3l8ARyvQ=
github.com/equinix/equinix-sdk-go v0.35.0 h1:p/uwA8QPBAuNnKGc3mQkwjw+6++qUadLNnKFQ8jw+wg=
github.com/equinix/equinix-sdk-go v0.35.0/go.mod h1:hEb3XLaedz7xhl/dpPIS6eOIiXNPeqNiVoyDrT6paIg=
github.com/equinix/equinix-sdk-go v0.39.1 h1:UyiNYqlK+Hn1W8DTjM3bp25Zzq8ITQHodhLhU6MZHqQ=
github.com/equinix/equinix-sdk-go v0.39.1/go.mod h1:hEb3XLaedz7xhl/dpPIS6eOIiXNPeqNiVoyDrT6paIg=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
Expand Down
4 changes: 2 additions & 2 deletions internal/gateway/createbgpneighbours.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (

func (c *Client) CreateBgpNeighbors() *cobra.Command {
var gatewayId, bgpNeighborRange string
var asn int32
var asn int64

// createGwBgpCmd represents the creation of gateway bgp dynamic neighbor command
createGwBgpCmd := &cobra.Command{
Expand Down Expand Up @@ -79,7 +79,7 @@ func (c *Client) CreateBgpNeighbors() *cobra.Command {

createGwBgpCmd.Flags().StringVarP(&gatewayId, "id", "i", "", "Metal Gateway ID for which the BGP Dynamic Neighbor to be created.")
createGwBgpCmd.Flags().StringVar(&bgpNeighborRange, "bgp-neighbor-range", "", "BGP Dynamic Neighbor IP Range from gateway.")
createGwBgpCmd.Flags().Int32Var(&asn, "asn", 0, "ASN for the BGP Dynamic Neighbor IP range.")
createGwBgpCmd.Flags().Int64Var(&asn, "asn", 0, "ASN for the BGP Dynamic Neighbor IP range.")

_ = createGwBgpCmd.MarkFlagRequired("id")
return createGwBgpCmd
Expand Down
2 changes: 1 addition & 1 deletion internal/interconnections/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ func (c *Client) Create() *cobra.Command {
in := metal.NewVlanFabricVcCreateInput(
metro, name, redundancy, metal.VlanFabricVcCreateInputServiceTokenType(svcTokenType),
metal.VlanFabricVcCreateInputType(connType),
vlans,
)
in.Vlans = vlans
// default speed
in.SetSpeed(strconv.Itoa(int(speed)))

Expand Down
2 changes: 1 addition & 1 deletion internal/projects/bgpenable.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (c *Client) BGPEnable() *cobra.Command {
func enableBGP(c *Client, config *BgpConfig) error {
req := metal.BgpConfigRequestInput{
UseCase: &config.UseCase,
Asn: int32(config.ASN),
Asn: int64(config.ASN),
DeploymentType: metal.BgpConfigRequestInputDeploymentType(config.DeploymentType),
Md5: &config.MD5,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/virtualcircuit/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (c *Client) Create() *cobra.Command {
if err != nil {
return fmt.Errorf("%w", err)
}
vrfInput := metal.NewVrfVirtualCircuitCreateInput(int32(nnVlan), int32(peerAsn), projectID, subnet, vrf)
vrfInput := metal.NewVrfVirtualCircuitCreateInput(int32(nnVlan), int64(peerAsn), projectID, subnet, vrf)
setParams(vrfInput, name, description, tags)
createInput = createVrfVirtualCircuit(vrfInput, projectID, customerIP, metalIP, md5, speed)
} else {
Expand Down
2 changes: 1 addition & 1 deletion internal/virtualcircuit/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func updateVrfVirtualCircuit(vrfUpdateInput *metal.VrfVirtualCircuitUpdateInput,
vrfUpdateInput.SetCustomerIp(customerIP)

if peerAsn > 0 {
vrfUpdateInput.SetPeerAsn(int32(peerAsn))
vrfUpdateInput.SetPeerAsn(int64(peerAsn))
}

return metal.VirtualCircuitUpdateInput{VrfVirtualCircuitUpdateInput: vrfUpdateInput}
Expand Down
4 changes: 2 additions & 2 deletions internal/vrf/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func (c *Client) Create() *cobra.Command {
name string
description string
ipRanges []string
localASN int32
localASN int64
tags []string
)

Expand Down Expand Up @@ -63,7 +63,7 @@ func (c *Client) Create() *cobra.Command {
createVRFCmd.Flags().StringVarP(&description, "description", "d", "", "Description of the Virtual Routing and Forwarding.")

createVRFCmd.Flags().StringVarP(&metro, "metro", "m", "", "The UUID (or metro code) for the Metro in which to create this Virtual Routing and Forwarding")
createVRFCmd.Flags().Int32VarP(&localASN, "local-asn", "a", 0, "Local ASN for the VRF")
createVRFCmd.Flags().Int64VarP(&localASN, "local-asn", "a", 0, "Local ASN for the VRF")
createVRFCmd.Flags().StringSliceVarP(&ipRanges, "ipranges", "r", []string{}, "A list of CIDR network addresses. Like [10.0.0.0/16, 2001:d78::/56]. IPv4 blocks must be between /8 and /29 in size. IPv6 blocks must be between /56 and /64.")

// making them all required here
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/gateways/bgp-dynamic-neighbour/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestBgpDynamicNeighbors_Create(t *testing.T) {

project := helper.CreateTestProject(t, projectName)
vlan := helper.CreateTestVLAN(t, project.GetId(), "da")
vrf := helper.CreateTestVrfs(t, project.GetId(), "test-vrf-"+randomStr, vlan.GetVxlan())
vrf := helper.CreateTestVrfs(t, project.GetId(), "test-vrf-"+randomStr, 65100)
vrfIpRes := helper.CreateTestVrfIpRequest(t, project.GetId(), vrf.GetId())
gway := helper.CreateTestVrfGateway(t, project.GetId(), vrfIpRes.VrfIpReservation.GetId(), vlan.GetId())

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/gateways/bgp-dynamic-neighbour/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestBgpDynamicNeighbors_Delete(t *testing.T) {

project := helper.CreateTestProject(t, projectName)
vlan := helper.CreateTestVLAN(t, project.GetId(), "da")
vrf := helper.CreateTestVrfs(t, project.GetId(), "test-vrf-"+randomStr, vlan.GetVxlan())
vrf := helper.CreateTestVrfs(t, project.GetId(), "test-vrf-"+randomStr, 65100)
vrfIpRes := helper.CreateTestVrfIpRequest(t, project.GetId(), vrf.GetId())
gway := helper.CreateTestVrfGateway(t, project.GetId(), vrfIpRes.VrfIpReservation.GetId(), vlan.GetId())
bgpDynamicNeighbor := helper.CreateTestBgpDynamicNeighbor(t, gway.GetId(), gway.IpReservation.GetAddress(), 65000)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/gateways/bgp-dynamic-neighbour/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestBgpDynamicNeighbors_Get(t *testing.T) {

project := helper.CreateTestProject(t, projectName)
vlan := helper.CreateTestVLAN(t, project.GetId(), "da")
vrf := helper.CreateTestVrfs(t, project.GetId(), "test-vrf-"+randomStr, vlan.GetVxlan())
vrf := helper.CreateTestVrfs(t, project.GetId(), "test-vrf-"+randomStr, 65100)
vrfIpRes := helper.CreateTestVrfIpRequest(t, project.GetId(), vrf.GetId())
gway := helper.CreateTestVrfGateway(t, project.GetId(), vrfIpRes.VrfIpReservation.GetId(), vlan.GetId())
bgpDynamicNeighbor := helper.CreateTestBgpDynamicNeighbor(t, gway.GetId(), gway.IpReservation.GetAddress(), 65000)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/gateways/bgp-dynamic-neighbour/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestBgpDynamicNeighbors_List(t *testing.T) {

project := helper.CreateTestProject(t, projectName)
vlan := helper.CreateTestVLAN(t, project.GetId(), "da")
vrf := helper.CreateTestVrfs(t, project.GetId(), "test-vrf-"+randomStr, vlan.GetVxlan())
vrf := helper.CreateTestVrfs(t, project.GetId(), "test-vrf-"+randomStr, 65100)
vrfIpRes := helper.CreateTestVrfIpRequest(t, project.GetId(), vrf.GetId())
gway := helper.CreateTestVrfGateway(t, project.GetId(), vrfIpRes.VrfIpReservation.GetId(), vlan.GetId())
bgpDynamicNeighbor := helper.CreateTestBgpDynamicNeighbor(t, gway.GetId(), gway.IpReservation.GetAddress(), 65000)
Expand Down
8 changes: 4 additions & 4 deletions test/helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ func CleanTestOrganization(t *testing.T, orgId string) {
func CreateTestBgpEnableTest(projId string) error {
TestApiClient := TestClient()

bgpConfigRequestInput := *metalv1.NewBgpConfigRequestInput(int32(65000), metalv1.BgpConfigRequestInputDeploymentType("local"))
bgpConfigRequestInput := *metalv1.NewBgpConfigRequestInput(65000, metalv1.BgpConfigRequestInputDeploymentType("local"))

_, err := TestApiClient.BGPApi.RequestBgpConfig(context.Background(), projId).BgpConfigRequestInput(bgpConfigRequestInput).Execute()
if err != nil {
Expand Down Expand Up @@ -654,14 +654,14 @@ func waitForInterconnectionDeleted(apiClient *metalv1.APIClient, connId string,
}

//nolint:staticcheck
func CreateTestVrfs(t *testing.T, projectId, name string, vlan int32) *metalv1.Vrf {
func CreateTestVrfs(t *testing.T, projectId, name string, asn int64) *metalv1.Vrf {
t.Helper()
TestApiClient := TestClient()

var IpRanges []string

vrfCreateInput := *metalv1.NewVrfCreateInput("da", name)
vrfCreateInput.SetLocalAsn(vlan)
vrfCreateInput.SetLocalAsn(asn)
IpRanges = append(IpRanges, "10.10.1.0/24")
vrfCreateInput.SetIpRanges(IpRanges)

Expand Down Expand Up @@ -791,7 +791,7 @@ func CleanTestVrfGateway(t *testing.T, gatewayId string) {
}
}

func CreateTestBgpDynamicNeighbor(t *testing.T, gatewayId, iprange string, asn int32) *metalv1.BgpDynamicNeighbor {
func CreateTestBgpDynamicNeighbor(t *testing.T, gatewayId, iprange string, asn int64) *metalv1.BgpDynamicNeighbor {
TestApiClient := TestClient()
t.Helper()

Expand Down
Loading