dellemc.powermax.storagegroup (3.0.0) — module

Manage storage groups on PowerMax or VMAX Storage System

| "added in version" 1.0.0 of dellemc.powermax"

Authors: Vasudevu Lakhinana (@unknown) <ansible.team@dell.com>, Prashant Rakheja (@prashant-dell) <ansible.team@dell.com>, Ambuj Dubey (@AmbujDube) <ansible.team@dell.com>, Pavan Mudunuri (@Pavan-Mudunuri) <ansible.team@dell.com>, Trisha Datta (@Trisha-Datta) <ansible.team@dell.com>

Install collection

Install with ansible-galaxy collection install dellemc.powermax:==3.0.0


Add to requirements.yml

  collections:
    - name: dellemc.powermax
      version: 3.0.0

Description

Managing storage groups on a PowerMax storage system includes the following.

Listing the volumes of a storage group.

Creating a new storage group.

Deleting an existing storage group.

Adding existing volumes to an existing storage group.

Removing existing volumes from an existing storage group.

Creating new volumes in an existing storage group.

Modifying existing storage group attributes.

Adding child storage groups inside an existing storage group (parent).

Moving volumes between storage groups.

Removing a child storage group from an existing parent storage group.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get storage group details including volumes
  dellemc.powermax.storagegroup:
    unispherehost: "{{unispherehost}}"
    universion: "{{universion}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    serial_no: "{{serial_no}}"
    sg_name: "ansible_sg"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create empty storage group
  dellemc.powermax.storagegroup:
    unispherehost: "{{unispherehost}}"
    universion: "{{universion}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    serial_no: "{{serial_no}}"
    sg_name: "foo"
    service_level: "Diamond"
    srp: "SRP_1"
    compression: true
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete the storage group
  dellemc.powermax.storagegroup:
    unispherehost: "{{unispherehost}}"
    universion: "{{universion}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    serial_no: "{{serial_no}}"
    sg_name: "foo"
    state: "absent"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Adding existing volumes to existing SG
  dellemc.powermax.storagegroup:
    unispherehost: "{{unispherehost}}"
    universion: "{{universion}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    serial_no: "{{serial_no}}"
    sg_name: "foo"
    state: "present"
    volumes:
      - vol_id: "00028"
      - vol_id: "00018"
      - vol_id: "00025"
    vol_state: "present-in-group"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create new volumes for existing SG
  dellemc.powermax.storagegroup:
    unispherehost: "{{unispherehost}}"
    universion: "{{universion}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    serial_no: "{{serial_no}}"
    sg_name: "foo"
    state: "present"
    volumes:
      - vol_name: "foo"
        size: 1
        cap_unit: "GB"
      - vol_name: "bar"
        size: 1
        cap_unit: "GB"
    vol_state: "present-in-group"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove volumes from existing SG
  dellemc.powermax.storagegroup:
    unispherehost: "{{unispherehost}}"
    universion: "{{universion}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    serial_no: "{{serial_no}}"
    sg_name: "foo"
    state: "present"
    volumes:
      - vol_id: "00028"
      - vol_id: "00018"
      - vol_name: "ansible-vol"
    vol_state: "absent-in-group"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Move volumes to target SG
  dellemc.powermax.storagegroup:
    unispherehost: "{{unispherehost}}"
    universion: "{{universion}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    serial_no: "{{serial_no}}"
    sg_name: "foo"
    target_sg_name: "foo_sg"
    force: true
    state: "present"
    volumes:
      - vol_id: "00028"
      - vol_id: "00018"
      - vol_name: "ansible-vol"
    vol_state: "absent-in-group"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Adding child SG to parent SG
  dellemc.powermax.storagegroup:
    unispherehost: "{{unispherehost}}"
    universion: "{{universion}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    serial_no: "{{serial_no}}"
    sg_name: "parent_sg"
    state: "present"
    child_storage_groups:
      - "pie"
      - "bar"
    child_sg_state: "present-in-group"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Removing child SG from parent SG
  dellemc.powermax.storagegroup:
    unispherehost: "{{unispherehost}}"
    universion: "{{universion}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    serial_no: "{{serial_no}}"
    sg_name: "parent_sg"
    state: "present"
    child_storage_groups:
      - "pie"
      - "bar"
    child_sg_state: "absent-in-group"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Rename storage group
  dellemc.powermax.storagegroup:
    unispherehost: "{{unispherehost}}"
    universion: "{{universion}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    serial_no: "{{serial_no}}"
    sg_name: "ansible_sg"
    new_sg_name: "ansible_sg_renamed"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a storage group with snapshot policies
  dellemc.powermax.storagegroup:
    unispherehost: "{{unispherehost}}"
    universion: "{{universion}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    serial_no: "{{serial_no}}"
    sg_name: "ansible_test_sg"
    service_level: "Diamond"
    srp: "SRP_1"
    compression: true
    snapshot_policies:
      - "10min_policy"
      - "30min_policy"
    snapshot_policy_state: "present-in-group"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add snapshot policy to a storage group
  dellemc.powermax.storagegroup:
    unispherehost: "{{unispherehost}}"
    universion: "{{universion}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    serial_no: "{{serial_no}}"
    sg_name: "ansible_test_sg"
    snapshot_policies:
      - "15min_policy"
    snapshot_policy_state: "present-in-group"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove snapshot policy from a storage group
  dellemc.powermax.storagegroup:
    unispherehost: "{{unispherehost}}"
    universion: "{{universion}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    serial_no: "{{serial_no}}"
    sg_name: "ansible_test_sg"
    snapshot_policies:
      - "15min_policy"
    snapshot_policy_state: "absent-in-group"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set host I/O limits on an existing storage group
  dellemc.powermax.storagegroup:
    unispherehost: "{{unispherehost}}"
    universion: "{{universion}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    serial_no: "{{serial_no}}"
    sg_name: "Test"
    host_io_limit:
      dynamic_distribution: "Always"
      host_io_limit_iops: 100
      host_io_limit_mbps: 100
    state: "present"

Inputs

    
srp:
    description:
    - The name of the storage resource pool.
    - This parameter is ignored if service_level is not specified.
    - Default is to use whichever is the default SRP on the array.
    type: str

user:
    description:
    - The username of the Unisphere host.
    required: true
    type: str

force:
    description:
    - This flag is to be set to True while moving volumes to target SG if volume is in
      a masking view.
    type: bool

state:
    choices:
    - absent
    - present
    description:
    - Define whether the storage group should exist or not.
    required: true
    type: str

sg_name:
    description:
    - The name of the storage group.
    required: true
    type: str

timeout:
    default: 120
    description:
    - Time after which the connection will get terminated.
    - It is to be mentioned in seconds.
    type: int

volumes:
    description:
    - This is a list of volumes.
    - Each volume has four attributes; vol_name, size, cap_unit, vol_id.
    - Volume ID must be provided for existing volumes.
    - The size must be provided to add new volumes to SG.
    - The cap_unit is optional.
    - Default value of cap_unit is GB, choices are MB, GB, TB.
    elements: dict
    type: list

password:
    description:
    - The password of the Unisphere host.
    required: true
    type: str

serial_no:
    description:
    - The serial number of the PowerMax/VMAX array. It is a required parameter for all
      array-specific operations except for getting a list of arrays in the Gatherfacts
      module.
    required: true
    type: str

vol_state:
    choices:
    - present-in-group
    - absent-in-group
    description:
    - Describes the state of volumes inside the SG.
    type: str

universion:
    choices:
    - 91
    - 92
    - 100
    - 101
    description:
    - Unisphere version, currently '91', '92', '100' and '101' versions are supported.
    required: false
    type: int

verifycert:
    description:
    - Specifies system whether to validate SSL certificate or not, Values can be True
      or False or a custom file path for SSL certificate with .pem extension or .cer with
      base 64 encoding.
    required: true
    type: str

compression:
    description:
    - Compression on storage group.
    - Compression parameter is ignored if service_level is not specified.
    - Default is true.
    type: bool

new_sg_name:
    description:
    - The new name of the storage group.
    type: str

host_io_limit:
    description:
    - Host I/O limit of the storage group.
    suboptions:
      dynamic_distribution:
        choices:
        - Always
        - Never
        - OnFailure
        default: Never
        description:
        - The dynamic distribution of host I/O limit for the storage group.
        type: str
      host_io_limit_iops:
        description:
        - The I/Os per second host I/O limit for the storage group.
        type: int
      host_io_limit_mbps:
        description:
        - The MBs per second host I/O limit for the storage group.
        type: int
    type: dict

service_level:
    description:
    - The name of SLO.
    type: str

unispherehost:
    description:
    - IP or FQDN of the Unisphere host
    required: true
    type: str

child_sg_state:
    choices:
    - present-in-group
    - absent-in-group
    description:
    - Describes the state of CSG inside parent SG.
    type: str

target_sg_name:
    description:
    - The destination SG name to move the volumes to.
    type: str

snapshot_policies:
    description:
    - List of snapshot policies.
    elements: str
    type: list

child_storage_groups:
    description:
    - This is a list of child storage groups.
    elements: str
    type: list

snapshot_policy_state:
    choices:
    - present-in-group
    - absent-in-group
    description:
    - Describes the state of snapshot policy for an SG.
    type: str

Outputs

add_child_sg:
  description: Sets to True when a child SG is added.
  returned: When value exists.
  sample: 'true'
  type: bool
add_new_vols_to_sg:
  description: Sets to True when new volumes are added to the SG.
  returned: When value exists.
  sample: 'true'
  type: bool
add_snapshot_policy_to_sg:
  description: Sets to True when snapshot policy is added to SG.
  returned: When value exists.
  sample: 'true'
  type: bool
add_vols_to_sg:
  description: Sets to True when existing volumes are added to the SG.
  returned: When value exists.
  sample: 'false'
  type: bool
added_vols_details:
  description: Volume IDs of the volumes added.
  returned: When value exists.
  sample:
  - 0081A
  type: list
changed:
  description: Whether or not the resource has changed.
  returned: always
  sample: 'false'
  type: bool
create_sg:
  description: Sets to True when a new SG is created.
  returned: When value exists.
  sample: 'true'
  type: bool
delete_sg:
  description: Sets to True when an SG is deleted.
  returned: When value exists.
  sample: 'true'
  type: bool
modify_sg:
  description: Sets to True when an SG is modified.
  returned: When value exists.
  sample: 'true'
  type: bool
remove_child_sg:
  description: Sets to True when a child SG is removed.
  returned: When value exists.
  sample: 'true'
  type: bool
remove_snapshot_policy_to_sg:
  description: Sets to false when snapshot policy is removed from SG.
  returned: When value exists.
  sample: 'true'
  type: bool
remove_vols_from_sg:
  description: Sets to True when volumes are removed.
  returned: When value exists.
  sample: 'true'
  type: bool
removed_vols_details:
  description: Volume IDs of the volumes removed.
  returned: When value exists.
  sample:
  - 0081A
  type: list
rename_sg:
  description: Sets to True when an SG is renamed.
  returned: When value exists.
  sample: 'true'
  type: bool
snapshot_policy_compliance_details:
  contains:
    compliance:
      description: Compliance status.
      type: str
    sl_compliance:
      contains:
        compliance:
          description: Compliance status.
          type: str
        sl_name:
          description: Name of the snapshot policy.
          type: str
      description: Compliance details.
      type: complex
    sl_count:
      description: Number of snapshot policies associated with storage group.
      type: int
    storage_group_name:
      description: Name of the storage group.
      type: str
  description: The compliance status of this storage group.
  returned: When a snapshot policy is associated.
  sample:
    compliance: NONE
    sl_compliance:
    - calculation_time: 2022-10-25T12:05
      compliance: NONE
      sl_name: ansible_SP4
    sl_count: 1
    storage_group_name: sample_sg_name
  type: complex
storage_group_details:
  contains:
    base_slo_name:
      description: Base Service Level Objective (SLO) of a storage group.
      type: str
    cap_gb:
      description: Storage group capacity in GB.
      type: int
    compression:
      description: Compression flag.
      type: bool
    device_emulation:
      description: Device emulation type.
      type: str
    hostIOLimit:
      contains:
        dynamic_distribution:
          description: The dynamic distribution of host I/O limit for the storage
            group.
          type: str
        iops:
          description: The I/Os per second host I/O limit for the storage group.
          type: int
        mbps:
          description: The MBs per second host I/O limit for the storage group.
          type: int
      description: Host I/O limit of the storage group.
      type: complex
    num_of_child_sgs:
      description: Number of child storage groups.
      type: int
    num_of_masking_views:
      description: Number of masking views associated with the storage group.
      type: int
    num_of_parent_sgs:
      description: Number of parent storage groups.
      type: int
    num_of_snapshots:
      description: Number of snapshots for the storage group.
      type: int
    num_of_vols:
      description: Number of volumes in the storage group.
      type: int
    service_level:
      description: Type of service level.
      type: str
    slo:
      description: Service Level Objective type.
      type: str
    slo_compliance:
      description: Type of SLO compliance.
      type: str
    srp:
      description: Storage Resource Pool.
      type: str
    storageGroupId:
      description: ID for the storage group.
      type: str
    type:
      description: Type of storage group.
      type: str
    unprotected:
      description: Flag for storage group protection.
      type: bool
    vp_saved_percent:
      description: Percentage saved for virtual pools.
      type: int
  description: Details of the storage group.
  returned: When a storage group exists.
  sample:
    cap_gb: 6.01
    compression: false
    compression_ratio_to_one: 0.0
    device_emulation: FBA
    num_of_child_sgs: 0
    num_of_masking_views: 0
    num_of_parent_sgs: 0
    num_of_snapshots: 0
    num_of_vols: 6
    slo: NONE
    slo_compliance: NONE
    srp: SRP_1
    storageGroupId: sample_sg_name
    type: Standalone
    unprotected: true
    unreducible_data_gb: 0.0
    vp_saved_percent: 100.0
  type: complex
storage_group_volumes:
  description: Volume IDs of storage group volumes.
  returned: When value exists.
  sample:
  - '00773'
  - 0081A
  type: list
storage_group_volumes_details:
  contains:
    effective_wwn:
      description: Effective WWN of the volume.
      type: str
    type:
      description: Type of the volume.
      type: str
    volumeId:
      description: Unique ID of the volume.
      type: str
    volume_identifier:
      description: Name associated with the volume.
      type: str
    wwn:
      description: WWN of the volume.
      type: str
  description: Details of the storage group volumes.
  returned: When storage group volumes exist.
  sample:
  - effective_wwn: '60000970000197902573533030373733'
    type: TDEV
    volumeId: '00773'
    volume_identifier: sample_sg_name
    wwn: '60000970000197902573533030373733'
  type: complex