Skip to content

Latest commit

 

History

History
266 lines (156 loc) · 6.84 KB

hostgroup.rst

File metadata and controls

266 lines (156 loc) · 6.84 KB

hostgroup -- Manage host group on PowerStore Storage System

Managing host group on PowerStore storage system includes create host group with a set of hosts, add/remove hosts from host group, rename host group, and delete host group.

Deletion of a host group results in deletion of the containing hosts as well. Remove hosts from the host group first to retain them.

The below requirements are needed on the host that executes this module.

  • A Dell PowerStore storage system version 3.0.0.0 or later.
  • PyPowerStore 3.3.0.
hostgroup_name (optional, str, None)

The host group name. This value must contain 128 or fewer printable Unicode characters.

Creation of an empty host group is not allowed.

Required when creating a host group.

Use either hostgroup_id or hostgroup_name for modify and delete tasks.

hostgroup_id (optional, str, None)

The 36-character long host group id, automatically generated when a host group is created.

Use either hostgroup_id or hostgroup_name for modify and delete tasks.

The hostgroup_id cannot be used while creating host group, as it is generated by the array after creation of host group.

hosts (optional, list, None)

List of hosts to be added or removed from the host group.

Subordinate hosts in a host group can only be of one type, either FC or iSCSI.

Required when creating a host group.

To represent host, both name or ID can be used interchangeably. The module will detect both.

state (True, str, None)

Define whether the host group should exist or not.

Value present - indicates that the host group should exist on the system.

Value absent - indicates that the host group should not exist on the system.

Deletion of a host group results in deletion of the containing hosts as well. Remove hosts from the host group first to retain them.

host_state (optional, str, None)

Define whether the hosts should be present or absent in host group.

Value present-in-group - indicates that the hosts should exist on the host group.

Value absent-in-group - indicates that the hosts should not exist on the host group.

Required when creating a host group with hosts or adding/removing hosts from existing host group.

new_name (optional, str, None)
The new name for host group renaming function. This value must contain 128 or fewer printable Unicode characters.
host_connectivity (optional, str, None)

Connectivity type for host group.

If any of metro connectivity options specified, a metro host group must exists in both cluster provide connectivity to a metro volume from both cluster.

array_ip (True, str, None)
IP or FQDN of the PowerStore management system.
validate_certs (optional, bool, True)

Boolean variable to specify whether to validate SSL certificate or not.

true - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.

false - indicates that the SSL certificate should not be verified.

user (True, str, None)
The username of the PowerStore host.
password (True, str, None)
The password of the PowerStore host.
timeout (optional, int, 120)

Time after which the connection will get terminated.

It is to be mentioned in seconds.

port (optional, int, None)

Port number for the PowerStore array.

If not passed, it will take 443 as default.

Note

  • The check_mode is not supported.
  • The host_connectivity is supported only PowerStore 3.0.0.0 and above.
  • The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform.
- name: Create host group with hosts
  dellemc.powerstore.hostgroup:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    hostgroup_name: "{{hostgroup_name}}"
    hosts:
      - host1
      - c17fc987-bf82-480c-af31-9307b89923c3
    state: 'present'
    host_state: 'present-in-group'

- name: Get host group details using ID
  dellemc.powerstore.hostgroup:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    hostgroup_id: "{{host group_id}}"
    state: 'present'

- name: Add hosts to host group
  dellemc.powerstore.hostgroup:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    hostgroup_name: "{{hostgroup_name}}"
    hosts:
      - host3
    host_state: 'present-in-group'
    state: 'present'

- name: Remove hosts from host group
  dellemc.powerstore.hostgroup:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    hostgroup_name: "{{hostgroup_name}}"
    hosts:
      - host3
    host_state: 'absent-in-group'
    state: 'present'

- name: Modify host group
  dellemc.powerstore.hostgroup:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    hostgroup_name: "{{hostgroup_name}}"
    host_connectivity: "Metro_Optimize_Both"
    new_name: "{{new_hostgroup_name}}"
    state: 'present'

- name: Delete host group
  dellemc.powerstore.hostgroup:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    hostgroup_name: "{{hostgroup_name}}"
    state: 'absent'
changed (always, bool, false)
Whether or not the resource has changed.
hostgroup_details (When host group exists, complex, {'description': None, 'hosts': [{'id': '1ff90201-a576-482c-b7fe-0d4dc901da67', 'name': 'sample_host'}], 'id': '80fc96fa-227e-4796-84b8-c6452c5b8f64', 'host_connectivity': 'Local_Only', 'name': 'sample_host_group'})

Details of the host group.

id (, str, )
The system generated ID given to the host group.
name (, str, )
Name of the host group.
description (, str, )
Description about the host group.
hosts (, complex, )

The hosts details which are part of this host group.

id (, str, )
The ID of the host.
name (, str, )
The name of the host.
host_connectivity (, str, )
Connectivity type for host group. It was added in 3.0.0.0.

Authors