Skip to content

Commit

Permalink
Add deployment-type safeguard for stratos (#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
ismirlia authored Sep 26, 2024
1 parent 88ab274 commit 6b85bd5
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.DeploymentTarget != nil {
return nil, fmt.Errorf("deployment target parameter is not supported in satellite location, check documentation")
if f.session.IsOnPrem() && (body.DeploymentTarget != nil || body.DeploymentType != "") {
return nil, fmt.Errorf("deployment target and deployment type parameters are 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 6b85bd5

Please sign in to comment.