From 0e33a836963a224249a6d83add0df2051b17a57e Mon Sep 17 00:00:00 2001 From: Axel Ismirlian Date: Wed, 25 Sep 2024 11:45:42 -0500 Subject: [PATCH] Allow spp-plement-group commands on stratos --- .../instance/ibm-pi-spp-placement-groups.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/clients/instance/ibm-pi-spp-placement-groups.go b/clients/instance/ibm-pi-spp-placement-groups.go index a628bca6..8060dcac 100644 --- a/clients/instance/ibm-pi-spp-placement-groups.go +++ b/clients/instance/ibm-pi-spp-placement-groups.go @@ -26,9 +26,6 @@ func NewIBMPISPPPlacementGroupClient(ctx context.Context, sess *ibmpisession.IBM // Get a PI SPP Placement Group func (f *IBMPISPPPlacementGroupClient) Get(id string) (*models.SPPPlacementGroup, error) { - if f.session.IsOnPrem() { - return nil, fmt.Errorf("operation not supported in satellite location, check documentation") - } params := p_cloud_s_p_p_placement_groups.NewPcloudSppplacementgroupsGetParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithSppPlacementGroupID(id) @@ -44,9 +41,6 @@ func (f *IBMPISPPPlacementGroupClient) Get(id string) (*models.SPPPlacementGroup // Get All SPP Placement Groups func (f *IBMPISPPPlacementGroupClient) GetAll() (*models.SPPPlacementGroups, error) { - if f.session.IsOnPrem() { - return nil, fmt.Errorf("operation not supported in satellite location, check documentation") - } params := p_cloud_s_p_p_placement_groups.NewPcloudSppplacementgroupsGetallParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID) @@ -62,9 +56,6 @@ func (f *IBMPISPPPlacementGroupClient) GetAll() (*models.SPPPlacementGroups, err // Create a SPP Placement Group func (f *IBMPISPPPlacementGroupClient) Create(body *models.SPPPlacementGroupCreate) (*models.SPPPlacementGroup, error) { - if f.session.IsOnPrem() { - return nil, fmt.Errorf("operation not supported in satellite location, check documentation") - } params := p_cloud_s_p_p_placement_groups.NewPcloudSppplacementgroupsPostParams(). WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithBody(body) @@ -80,9 +71,6 @@ func (f *IBMPISPPPlacementGroupClient) Create(body *models.SPPPlacementGroupCrea // Delete a SPP Placement Group func (f *IBMPISPPPlacementGroupClient) Delete(id string) error { - if f.session.IsOnPrem() { - return fmt.Errorf("operation not supported in satellite location, check documentation") - } params := p_cloud_s_p_p_placement_groups.NewPcloudSppplacementgroupsDeleteParams(). WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithSppPlacementGroupID(id) @@ -95,9 +83,6 @@ func (f *IBMPISPPPlacementGroupClient) Delete(id string) error { // Add an Instance to a SPP Placement Group func (f *IBMPISPPPlacementGroupClient) AddMember(id string, sppID string) (*models.SPPPlacementGroup, error) { - if f.session.IsOnPrem() { - return nil, fmt.Errorf("operation not supported in satellite location, check documentation") - } params := p_cloud_s_p_p_placement_groups.NewPcloudSppplacementgroupsMembersPostParams(). WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithSppPlacementGroupID(id). @@ -114,9 +99,6 @@ func (f *IBMPISPPPlacementGroupClient) AddMember(id string, sppID string) (*mode // Remove an Instance to a SPP Placement Group func (f *IBMPISPPPlacementGroupClient) DeleteMember(id string, sppID string) (*models.SPPPlacementGroup, error) { - if f.session.IsOnPrem() { - return nil, fmt.Errorf("operation not supported in satellite location, check documentation") - } params := p_cloud_s_p_p_placement_groups.NewPcloudSppplacementgroupsMembersDeleteParams(). WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithSppPlacementGroupID(id).