I noticed creating programmatically a Metal Gateway always fail:
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"strings"
"github.com/equinix/equinix-sdk-go/services/metalv1"
)
...
// create a metal gateway
mgwReqInput := metalv1.NewMetalGatewayCreateInput( .... some VLAN ID already deployed in the metro... )
mgwReqInput.SetIpReservationId( ... some reservation ID... )
mgwReqAPI := client.MetalGatewaysApi.CreateMetalGateway(ctx, projectID)
mgqReq := mgwReqAPI.CreateMetalGatewayRequest(metalv1.CreateMetalGatewayRequest{MetalGatewayCreateInput: mgwReqInput})
_, mgwResp, mgwErr := client.MetalGatewaysApi.CreateMetalGatewayExecute(mgqReq)
defer mgwResp.Body.Close()
if mgwErr != nil {
/* this error is always non-nil: and contains "data failed to match schemas in oneOf(FindMetalGatewayById200Response)" */
}
...
Is this a known bug?
The DeleteMetalGatewayExecute API fails in the same way...