Skip to content

Commit

Permalink
Allow spp-plement-group commands on stratos (IBM-Cloud#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
ismirlia authored and michaelkad committed Nov 22, 2024
1 parent e55c704 commit e98efc6
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions clients/instance/ibm-pi-spp-placement-groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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).
Expand All @@ -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).
Expand Down

0 comments on commit e98efc6

Please sign in to comment.