dellemc.powermax.dellemc_powermax_storagegroup (1.6.1) — module

Manage storage groups on PowerMax/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>

preview | supported by community

Install collection

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


Add to requirements.yml

  collections:
    - name: dellemc.powermax
      version: 1.6.1

Description

Managing storage groups on a PowerMax storage system includes 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), and 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 volume(s) 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 volume(s) 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: 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"

Inputs

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

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

volumes:
    description:
    - This is a list of volumes.
    - Each volume has four attributes-
    - vol_name
    - size
    - cap_unit
    - vol_id.
    - Either the volume ID must be provided for existing volumes, or the name and size
      must be provided to add new volumes to SG. The unit is optional.
    - vol_name - Represents the name of the volume
    - size - Represents the volume size
    - cap_unit - The unit in which size is represented. Default unit is GB. Choices are
      MB, GB, TB.
    - vol_id - This is the volume ID
    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
    description:
    - Unisphere version, currently '91' and '92' versions are supported.
    required: false
    type: int

verifycert:
    choices:
    - true
    - false
    description:
    - Boolean variable to specify whether to validate SSL certificate or not.
    - True - indicates that the SSL certificate should be verified.
    - False - indicates that the SSL certificate should not be verified.
    required: true
    type: bool

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

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

snapshot_policies:
    description:
    - List of snapshot policy(s).
    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.
  type: bool
add_new_vols_to_sg:
  description: Sets to true when new volumes are added to the SG.
  returned: When value exists.
  type: bool
add_snapshot_policy_to_sg:
  description: Sets to true when snapshot policy(s) is added to SG.
  returned: When value exists.
  type: bool
add_vols_to_sg:
  description: Sets to true when existing volumes are added to the SG.
  returned: When value exists.
  type: bool
added_vols_details:
  description: Volume IDs of the volumes added.
  returned: When value exists.
  type: list
changed:
  description: Whether or not the resource has changed.
  returned: always
  type: bool
create_sg:
  description: Sets to true when a new SG is created.
  returned: When value exists.
  type: bool
delete_sg:
  description: Sets to true when an SG is deleted.
  returned: When value exists.
  type: bool
modify_sg:
  description: Sets to true when an SG is modified.
  returned: When value exists.
  type: bool
remove_child_sg:
  description: Sets to true when a child SG is removed.
  returned: When value exists.
  type: bool
remove_snapshot_policy_to_sg:
  description: Sets to false when snapshot policy(s) is removed from SG.
  returned: When value exists.
  type: bool
remove_vols_from_sg:
  description: Sets to true when volumes are removed.
  returned: When value exists.
  type: bool
removed_vols_details:
  description: Volume IDs of the volumes removed.
  returned: When value exists.
  type: list
rename_sg:
  description: Sets to true when an SG is renamed.
  returned: When value exists.
  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 snapshot policy associated..
  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
    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 (SLO) 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 storage group exists.
  type: complex
storage_group_volumes:
  description: Volume IDs of storage group volumes.
  returned: When value exists.
  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 exists.
  type: complex