Skip to content

Commit

Permalink
address type mismatches due to upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
ctreatma committed May 8, 2024
1 parent 605c29f commit b806982
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion internal/interconnections/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"strconv"

metal "github.com/equinix/equinix-sdk-go/services/metalv1"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -46,7 +47,7 @@ func (c *Client) Create() *cobra.Command {
)
in.Vlans = vlans
// default speed
in.SetSpeed(speed)
in.SetSpeed(strconv.Itoa(int(speed)))

createOrganizationInterconnectionRequest.
VlanFabricVcCreateInput = in
Expand Down
4 changes: 2 additions & 2 deletions internal/virtualcircuit/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func createVrfVirtualCircuit(vrfInput *metal.VrfVirtualCircuitCreateInput, proje
vrfInput.SetMetalIp(metalIP)
vrfInput.SetMd5(md5)
if speed > 0 {
vrfInput.SetSpeed(int32(speed))
vrfInput.SetSpeed(strconv.Itoa(speed))
}

return metal.VirtualCircuitCreateInput{VrfVirtualCircuitCreateInput: vrfInput}
Expand All @@ -60,7 +60,7 @@ func createVlanVirtualCircuit(vlanInput *metal.VlanVirtualCircuitCreateInput, vn
vlanInput.SetNniVlan(int32(nnVlan))
}
if speed > 0 {
vlanInput.SetSpeed(int64(speed))
vlanInput.SetSpeed(strconv.Itoa(speed))
}
vlanInput.SetVnid(vnid)

Expand Down
2 changes: 1 addition & 1 deletion test/helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ func CreateTestVirtualCircuit(t *testing.T, projectId, connId, portId, vlanId, n

vlanVCCreateInput := metalv1.NewVlanVirtualCircuitCreateInput(projectId)
vlanVCCreateInput.SetVnid(vlanId)
vlanVCCreateInput.SetSpeed(100)
vlanVCCreateInput.SetSpeed("100")
vlanVCCreateInput.SetNniVlan(1110)
vlanVCCreateInput.SetName(name)

Expand Down

0 comments on commit b806982

Please sign in to comment.