From 4a5b6671ca99b3f2e4e31611c3e43ee02a1d7ae7 Mon Sep 17 00:00:00 2001 From: michaelkad <45772690+michaelkad@users.noreply.github.com> Date: Thu, 14 Dec 2023 10:50:51 -0600 Subject: [PATCH] Update Create VPN (#248) --- clients/instance/ibm-pi-vpn.go | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/clients/instance/ibm-pi-vpn.go b/clients/instance/ibm-pi-vpn.go index a8862428..9348533a 100644 --- a/clients/instance/ibm-pi-vpn.go +++ b/clients/instance/ibm-pi-vpn.go @@ -44,20 +44,7 @@ func (f *IBMPIVpnConnectionClient) Get(id string) (*models.VPNConnection, error) // Create a VPN Connection func (f *IBMPIVpnConnectionClient) Create(body *models.VPNConnectionCreate) (*models.VPNConnectionCreateResponse, error) { - if f.session.IsOnPrem() { - return nil, fmt.Errorf("operation not supported in satellite location, check documentation") - } - params := p_cloud_v_p_n_connections.NewPcloudVpnconnectionsPostParams(). - WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). - WithCloudInstanceID(f.cloudInstanceID).WithBody(body) - postaccepted, err := f.session.Power.PCloudvpnConnections.PcloudVpnconnectionsPost(params, f.session.AuthInfo(f.cloudInstanceID)) - if err != nil { - return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreateVPNConnectionOperationFailed, f.cloudInstanceID, err)) - } - if postaccepted != nil && postaccepted.Payload != nil { - return postaccepted.Payload, nil - } - return nil, fmt.Errorf("failed to Create VPN Connection") + return nil, fmt.Errorf("Create VPN Connection is no longer supported") } // Update a VPN Connection