From f8a24283cc336ac271bbf986e29dcec5cd5c10e1 Mon Sep 17 00:00:00 2001 From: ismirlia <90468712+ismirlia@users.noreply.github.com> Date: Wed, 13 Mar 2024 10:13:59 -0500 Subject: [PATCH] Revert "Enable shared-processor-pool functionality on stratos" (#354) This reverts commit d32d15616555c890d73c99bbfcb564d1ef2b0ad9. --- clients/instance/ibm-pi-shared-processor-pool.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/clients/instance/ibm-pi-shared-processor-pool.go b/clients/instance/ibm-pi-shared-processor-pool.go index cbe4c674..1722f9ac 100644 --- a/clients/instance/ibm-pi-shared-processor-pool.go +++ b/clients/instance/ibm-pi-shared-processor-pool.go @@ -26,6 +26,9 @@ func NewIBMPISharedProcessorPoolClient(ctx context.Context, sess *ibmpisession.I // Get a PI Shared Processor Pool func (f *IBMPISharedProcessorPoolClient) Get(id string) (*models.SharedProcessorPoolDetail, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_shared_processor_pools.NewPcloudSharedprocessorpoolsGetParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithSharedProcessorPoolID(id) @@ -41,6 +44,9 @@ func (f *IBMPISharedProcessorPoolClient) Get(id string) (*models.SharedProcessor // Get All Shared Processor Pools func (f *IBMPISharedProcessorPoolClient) GetAll() (*models.SharedProcessorPools, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_shared_processor_pools.NewPcloudSharedprocessorpoolsGetallParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID) @@ -56,6 +62,9 @@ func (f *IBMPISharedProcessorPoolClient) GetAll() (*models.SharedProcessorPools, // Create a Shared Processor Pool func (f *IBMPISharedProcessorPoolClient) Create(body *models.SharedProcessorPoolCreate) (*models.SharedProcessorPool, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_shared_processor_pools.NewPcloudSharedprocessorpoolsPostParams(). WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithBody(body) @@ -71,6 +80,9 @@ func (f *IBMPISharedProcessorPoolClient) Create(body *models.SharedProcessorPool // Delete a Shared Processor Pool func (f *IBMPISharedProcessorPoolClient) Delete(id string) error { + if f.session.IsOnPrem() { + return fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_shared_processor_pools.NewPcloudSharedprocessorpoolsDeleteParams(). WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithSharedProcessorPoolID(id) @@ -83,6 +95,9 @@ func (f *IBMPISharedProcessorPoolClient) Delete(id string) error { // Update a PI Shared Processor Pool func (f *IBMPISharedProcessorPoolClient) Update(id string, body *models.SharedProcessorPoolUpdate) (*models.SharedProcessorPool, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_shared_processor_pools.NewPcloudSharedprocessorpoolsPutParams(). WithContext(f.ctx).WithTimeout(helpers.PIUpdateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithBody(body).WithSharedProcessorPoolID(id)