.. _zhmc_storage_group: zhmc_storage_group - Manages DPM storage groups (with "dpm-storage-management" feature) +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. contents:: :local: :depth: 2 Synopsis -------- * Gathers facts about a storage group associated with a CPC, including its storage volumes and virtual storage resources. * Creates, deletes and updates a storage group associated with a CPC. Requirements (on host that executes module) ------------------------------------------- * Network access to HMC * zhmcclient >=0.20.0 * ansible >=2.2.0.0 Options ------- .. raw:: html
parameter | required | default | choices | comments | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cpc_name |
yes |
The name of the CPC associated with the target storage group.
|
|||||||||||||||||
expand |
no |
|
Boolean that controls whether the returned storage group contains additional artificial properties that expand certain URI or name properties to the full set of resource properties (see description of return values of this module).
|
||||||||||||||||
faked_session |
no | Real HMC will be used. |
A
zhmcclient_mock.FakedSession object that has a mocked HMC set up. If provided, it will be used instead of connecting to a real HMC. This is used for testing purposes only. |
||||||||||||||||
hmc_auth |
yes |
The authentication credentials for the HMC.
| |||||||||||||||||
|
|||||||||||||||||||
hmc_host |
yes |
The hostname or IP address of the HMC.
|
|||||||||||||||||
log_file |
no |
File path of a log file to which the logic flow of this module as well as interactions with the HMC are logged. If null, logging will be propagated to the Python root logger.
|
|||||||||||||||||
name |
yes |
The name of the target storage group.
|
|||||||||||||||||
properties |
no | No properties. |
Dictionary with desired properties for the storage group. Used for
state=present ; ignored for state=absent|facts . Dictionary key is the property name with underscores instead of hyphens, and dictionary value is the property value in YAML syntax. Integer properties may also be provided as decimal strings.The possible input properties in this dictionary are the properties defined as writeable in the data model for Storage Group resources (where the property names contain underscores instead of hyphens), with the following exceptions:
*
name : Cannot be specified because the name has already been specified in the name module parameter.*
type : Cannot be changed once the storage group exists.Properties omitted in this dictionary will remain unchanged when the storage group already exists, and will get the default value defined in the data model for storage groups in the HMC API book when the storage group is being created.
|
||||||||||||||||
state |
yes |
|
The desired state for the target storage group:
*
absent : Ensures that the storage group does not exist. If the storage group is currently attached to any partitions, the module will fail.*
present : Ensures that the storage group exists and is associated with the specified CPC, and has the specified properties. The attachment state of the storage group to a partition is not changed.*
facts : Does not change anything on the storage group and returns the storage group properties. |
name | description | returned | type | sample |
---|---|---|---|---|
storage_group |
For
state=absent , an empty dictionary.For
state=present|facts , a dictionary with the resource properties of the target storage group, plus additional artificial properties as described in the following list items. The dictionary keys are the exact property names as described in the data model for the resource, i.e. they contain hyphens (-), not underscores (_). The dictionary values are the property values using the Python representations described in the documentation of the zhmcclient Python package. The additional artificial properties are:*
attached-partition-names : List of partition names to which the storage group is attached.*
cpc-name : Name of the CPC that is associated to this storage group.*
candidate-adapter-ports (only if expand was requested): List of candidate adapter ports of the storage group. Each port is represented as a dictionary of its properties; in addition each port has an artificial property parent-adapter which represents the adapter of the port. Each adapter is represented as a dictionary of its properties.*
storage-volumes (only if expand was requested): List of storage volumes of the storage group. Each storage volume is represented as a dictionary of its properties.*
virtual-storage-resources (only if expand was requested): List of virtual storage resources of the storage group. Each virtual storage resource is represented as a dictionary of its properties.*
attached-partitions (only if expand was requested): List of partitions to which the storage group is attached. Each partition is represented as a dictionary of its properties.*
cpc (only if expand was requested): The CPC that is associated to this storage group. The CPC is represented as a dictionary of its properties. |
success | dict | {
"name": "sg-1",
"description": "storage group #1",
...
}
|