Skip to content

Commit 4073cd1

Browse files
authored
Undo volume replication-enabled safeguards (#220)
I was unclear as to how we wanted to approach this first, but the consensus was to have the service broker use its existing blocks to prevent stratos from using GRS functionality. As a result, I am removing these redundant checks.
1 parent 10b8b7a commit 4073cd1

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

clients/instance/ibm-pi-volume.go

-16
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ func (f *IBMPIVolumeClient) GetAll() (*models.Volumes, error) {
4444
params := p_cloud_volumes.NewPcloudCloudinstancesVolumesGetallParams().
4545
WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut).
4646
WithCloudInstanceID(f.cloudInstanceID)
47-
// Check for satellite differences in this endpoint
48-
if f.session.IsOnPrem() && (params.Auxiliary != nil && params.ReplicationEnabled != nil) {
49-
return nil, fmt.Errorf("auxiliary and replication enabled parameters are not supported in satellite location, check documentation")
50-
}
5147
resp, err := f.session.Power.PCloudVolumes.PcloudCloudinstancesVolumesGetall(params, f.session.AuthInfo(f.cloudInstanceID))
5248
if err != nil {
5349
return nil, fmt.Errorf("failed to Get all Volumes for Cloud Instance %s: %w", f.cloudInstanceID, err)
@@ -75,10 +71,6 @@ func (f *IBMPIVolumeClient) GetAllAffinityVolumes(affinity string) (*models.Volu
7571

7672
// Create a VolumeV2
7773
func (f *IBMPIVolumeClient) CreateVolumeV2(body *models.MultiVolumesCreate) (*models.Volumes, error) {
78-
// Check for satellite differences in this endpoint
79-
if f.session.IsOnPrem() && body.ReplicationEnabled != nil {
80-
return nil, fmt.Errorf("replication enabled parameter is not supported in satellite location, check documentation")
81-
}
8274
params := p_cloud_volumes.NewPcloudV2VolumesPostParams().
8375
WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut).
8476
WithCloudInstanceID(f.cloudInstanceID).WithBody(body)
@@ -94,10 +86,6 @@ func (f *IBMPIVolumeClient) CreateVolumeV2(body *models.MultiVolumesCreate) (*mo
9486

9587
// Create a Volume
9688
func (f *IBMPIVolumeClient) CreateVolume(body *models.CreateDataVolume) (*models.Volume, error) {
97-
// Check for satellite differences in this endpoint
98-
if f.session.IsOnPrem() && body.ReplicationEnabled != nil {
99-
return nil, fmt.Errorf("replication enabled parameter is not supported in satellite location, check documentation")
100-
}
10189
params := p_cloud_volumes.NewPcloudCloudinstancesVolumesPostParams().
10290
WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut).
10391
WithCloudInstanceID(f.cloudInstanceID).WithBody(body)
@@ -227,10 +215,6 @@ func (f *IBMPIVolumeClient) UpdateVolumeAttach(id, volumeID string, body *models
227215

228216
// Performs action on volume
229217
func (f *IBMPIVolumeClient) VolumeAction(id string, body *models.VolumeAction) error {
230-
// Check for satellite differences in this endpoint
231-
if f.session.IsOnPrem() && body.ReplicationEnabled != nil {
232-
return fmt.Errorf("replication enabled parameter is not supported in satellite location, check documentation")
233-
}
234218
params := p_cloud_volumes.NewPcloudCloudinstancesVolumesActionPostParams().
235219
WithContext(f.ctx).WithTimeout(helpers.PIUpdateTimeOut).
236220
WithCloudInstanceID(f.cloudInstanceID).WithVolumeID(id).WithBody(body)

0 commit comments

Comments
 (0)