Interface StorageProviderVolumeGroupsFacet
This facet is used in combination with StorageProvider to define a
StorageServerType that supports grouping volumes
for crash-consistent or application-consistent snapshots.
When Morpheus orchestration needs to create, modify, or delete volume groups, or add/remove volumes from groups, it delegates to the appropriate methods on this facet. Plugin implementations should translate these operations to the underlying storage array API.
Example implementation for HPE Alletra:
public class AlletraStorageProvider implements StorageProvider, StorageProviderVolumeGroupsFacet {
@Override
public ServiceResponse<StorageVolumeGroup> createVolumeGroup(
StorageServer storageServer, StorageVolumeGroup volumeGroup, Map opts) {
// Call HPE Alletra REST API to create volume set
def client = getClient(storageServer)
def result = client.createVolumeSet(volumeGroup.getName(), ...)
volumeGroup.setExternalId(result.id)
return ServiceResponse.success(volumeGroup)
}
}
- Since:
- 1.5.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaddVolumesToVolumeGroup(StorageServer storageServer, StorageVolumeGroup volumeGroup, List<StorageVolume> volumes, Map<String, Object> opts) Add volumes to an existing volume group on the storage array.default ServiceResponse<Boolean>canAddVolumeToGroup(StorageServer storageServer, StorageVolumeGroup volumeGroup, StorageVolume volume) Check if a volume can be added to a volume group.default ServiceResponse<Boolean>canDeleteVolumeGroup(StorageServer storageServer, StorageVolumeGroup volumeGroup) Check if a volume group can be deleted.createVolumeGroup(StorageServer storageServer, StorageVolumeGroup volumeGroup, Map<String, Object> opts) Create a new volume group on the storage array.deleteVolumeGroup(StorageServer storageServer, StorageVolumeGroup volumeGroup, Map<String, Object> opts) Delete a volume group from the storage array.default ServiceResponse<StorageVolumeGroup>refreshVolumeGroup(StorageServer storageServer, StorageVolumeGroup volumeGroup) Refresh volume group data from the storage array.removeVolumesFromVolumeGroup(StorageServer storageServer, StorageVolumeGroup volumeGroup, List<StorageVolume> volumes, Map<String, Object> opts) Remove volumes from a volume group on the storage array.default ServiceResponse<StorageVolumeGroup>updateVolumeGroup(StorageServer storageServer, StorageVolumeGroup volumeGroup, Map<String, Object> opts) Update an existing volume group on the storage array.default ServiceResponse<Boolean>Validate a volume group name according to vendor-specific requirements.
-
Method Details
-
createVolumeGroup
ServiceResponse<StorageVolumeGroup> createVolumeGroup(StorageServer storageServer, StorageVolumeGroup volumeGroup, Map<String, Object> opts) Create a new volume group on the storage array.The plugin should:
- Validate the volume group name (max 22 chars for Remote Copy)
- Create the volume group/set on the storage array
- Set the externalId on the volumeGroup from the array response
- Optionally add initial volumes if volumeGroup.volumes is populated
- Parameters:
storageServer- the storage server to create the group onvolumeGroup- the volume group to create (name, description, etc.)opts- additional options (e.g., application-consistent settings)- Returns:
- ServiceResponse with the created volume group (externalId populated)
-
updateVolumeGroup
default ServiceResponse<StorageVolumeGroup> updateVolumeGroup(StorageServer storageServer, StorageVolumeGroup volumeGroup, Map<String, Object> opts) Update an existing volume group on the storage array.The plugin should update properties like description, applicationConsistent flag, etc. Note: Volume membership changes should use addVolumesToVolumeGroup/removeVolumesFromVolumeGroup.
- Parameters:
storageServer- the storage servervolumeGroup- the volume group with updated propertiesopts- additional options- Returns:
- ServiceResponse with the updated volume group
-
deleteVolumeGroup
ServiceResponse deleteVolumeGroup(StorageServer storageServer, StorageVolumeGroup volumeGroup, Map<String, Object> opts) Delete a volume group from the storage array.The plugin should:
- Verify no active replication relationships exist
- Optionally remove volumes from the group first (based on opts)
- Delete the volume group/set from the array
- Parameters:
storageServer- the storage servervolumeGroup- the volume group to deleteopts- additional options (e.g., "force" to delete even with volumes)- Returns:
- ServiceResponse indicating success/failure
-
addVolumesToVolumeGroup
ServiceResponse<StorageVolumeGroup> addVolumesToVolumeGroup(StorageServer storageServer, StorageVolumeGroup volumeGroup, List<StorageVolume> volumes, Map<String, Object> opts) Add volumes to an existing volume group on the storage array.The plugin should:
- Validate all volumes exist and are not in another group
- Add the volumes to the volume set/group on the array
- Return updated volume count and storage metrics
- Parameters:
storageServer- the storage servervolumeGroup- the volume group to add volumes tovolumes- the volumes to addopts- additional options- Returns:
- ServiceResponse with the updated volume group
-
removeVolumesFromVolumeGroup
ServiceResponse<StorageVolumeGroup> removeVolumesFromVolumeGroup(StorageServer storageServer, StorageVolumeGroup volumeGroup, List<StorageVolume> volumes, Map<String, Object> opts) Remove volumes from a volume group on the storage array.The plugin should:
- Validate all volumes are currently in this group
- Remove the volumes from the volume set/group on the array
- Return updated volume count and storage metrics
- Parameters:
storageServer- the storage servervolumeGroup- the volume group to remove volumes fromvolumes- the volumes to removeopts- additional options- Returns:
- ServiceResponse with the updated volume group
-
canDeleteVolumeGroup
default ServiceResponse<Boolean> canDeleteVolumeGroup(StorageServer storageServer, StorageVolumeGroup volumeGroup) Check if a volume group can be deleted.The plugin should check:
- No active replication relationships
- No pending snapshot operations
- Group is not in a protected state
- Parameters:
storageServer- the storage servervolumeGroup- the volume group to check- Returns:
- ServiceResponse with canDelete=true/false and reason message
-
validateVolumeGroupName
Validate a volume group name according to vendor-specific requirements.Default implementation only checks that the name is not null or empty. Storage providers should override this method to enforce vendor-specific name constraints (e.g., HPE Remote Copy requires max 22 characters).
Example override for HPE Alletra:
@Override public ServiceResponse<Boolean> validateVolumeGroupName(String name) { if (name == null || name.trim().isEmpty()) { return ServiceResponse.error("Volume group name cannot be empty"); } if (name.length() > 22) { return ServiceResponse.error("Volume group name exceeds 22 character limit for Remote Copy"); } return ServiceResponse.success(true); }- Parameters:
name- the proposed volume group name- Returns:
- ServiceResponse with valid=true/false and error message
-
canAddVolumeToGroup
default ServiceResponse<Boolean> canAddVolumeToGroup(StorageServer storageServer, StorageVolumeGroup volumeGroup, StorageVolume volume) Check if a volume can be added to a volume group.The plugin should verify:
- Volume is not already in another group
- Volume is on the same storage server
- Volume type is compatible with the group
- Parameters:
storageServer- the storage servervolumeGroup- the target volume groupvolume- the volume to check- Returns:
- ServiceResponse with canAdd=true/false and reason
-
refreshVolumeGroup
default ServiceResponse<StorageVolumeGroup> refreshVolumeGroup(StorageServer storageServer, StorageVolumeGroup volumeGroup) Refresh volume group data from the storage array.The plugin should query the array for current state and update:
- Volume membership
- Storage metrics (maxStorage, usedStorage)
- Status and any error conditions
- Parameters:
storageServer- the storage servervolumeGroup- the volume group to refresh- Returns:
- ServiceResponse with refreshed volume group data
-