Skip to content

Commit

Permalink
Add deploymentTarget safeguard for Stratos (#378)
Browse files Browse the repository at this point in the history
* Add deploymentTarget safeguard

This option is only available off-prem where dedicated host commands are
supported.

* Remove IBMi safeguard for stratos

* Update instance create safeguard
  • Loading branch information
ismirlia authored Apr 15, 2024
1 parent 50af8de commit 7fb40d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clients/instance/ibm-pi-instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ func (f *IBMPIInstanceClient) GetAll() (*models.PVMInstances, error) {
// Create an Instance
func (f *IBMPIInstanceClient) Create(body *models.PVMInstanceCreate) (*models.PVMInstanceList, error) {
// Check for satellite differences in this endpoint
if f.session.IsOnPrem() && (body.SoftwareLicenses != nil || body.SharedProcessorPool != "") {
return nil, fmt.Errorf("software licenses and shared processor pool parameters are not supported in satellite location, check documentation")
if f.session.IsOnPrem() && body.DeploymentTarget != nil {
return nil, fmt.Errorf("deployment target parameter is not supported in satellite location, check documentation")
}
params := p_cloud_p_vm_instances.NewPcloudPvminstancesPostParams().
WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut).
Expand Down

0 comments on commit 7fb40d4

Please sign in to comment.