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

CreateMetalGatewayExecute fails with "data failed to match schemas in oneOf(FindMetalGatewayById200Response)" #83

Open
fmontorsi-equinix opened this issue Dec 6, 2024 · 1 comment

Comments

@fmontorsi-equinix
Copy link

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...

@ctreatma
Copy link
Contributor

This is a known bug, but the previous issue for it was closed for some reason. That issue has an example of how to work around the bug: #64 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants