Interface StorageProviderVolumeGroupsFacet


public interface StorageProviderVolumeGroupsFacet
Facet interface for storage providers that support volume grouping for consistent snapshot and replication operations.

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 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:

      1. Validate the volume group name (max 22 chars for Remote Copy)
      2. Create the volume group/set on the storage array
      3. Set the externalId on the volumeGroup from the array response
      4. Optionally add initial volumes if volumeGroup.volumes is populated
      Parameters:
      storageServer - the storage server to create the group on
      volumeGroup - 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 server
      volumeGroup - the volume group with updated properties
      opts - 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:

      1. Verify no active replication relationships exist
      2. Optionally remove volumes from the group first (based on opts)
      3. Delete the volume group/set from the array
      Parameters:
      storageServer - the storage server
      volumeGroup - the volume group to delete
      opts - 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:

      1. Validate all volumes exist and are not in another group
      2. Add the volumes to the volume set/group on the array
      3. Return updated volume count and storage metrics
      Parameters:
      storageServer - the storage server
      volumeGroup - the volume group to add volumes to
      volumes - the volumes to add
      opts - 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:

      1. Validate all volumes are currently in this group
      2. Remove the volumes from the volume set/group on the array
      3. Return updated volume count and storage metrics
      Parameters:
      storageServer - the storage server
      volumeGroup - the volume group to remove volumes from
      volumes - the volumes to remove
      opts - 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 server
      volumeGroup - the volume group to check
      Returns:
      ServiceResponse with canDelete=true/false and reason message
    • validateVolumeGroupName

      default ServiceResponse<Boolean> validateVolumeGroupName(String name)
      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 server
      volumeGroup - the target volume group
      volume - 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 server
      volumeGroup - the volume group to refresh
      Returns:
      ServiceResponse with refreshed volume group data