.. _zhmc_storage_volume: zhmc_storage_volume - Manages DPM storage volumes in existing storage groups (with "dpm-storage-management" feature) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. contents:: :local: :depth: 2 Synopsis -------- * Gathers facts about a storage volume in a storage group associated with a CPC. * Creates, deletes and updates a storage volume in 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 storage group containing the target storage volume.
|
|||||||||||||||||
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 volume.
|
|||||||||||||||||
properties |
no | No properties. |
Dictionary with desired properties for the storage volume. 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 Volume 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.Properties omitted in this dictionary will remain unchanged when the storage volume already exists, and will get the default value defined in the data model for storage volumes in the HMC API book when the storage volume is being created.
|
||||||||||||||||
state |
yes |
|
The desired state for the target storage volume:
*
absent : Ensures that the storage volume does not exist in the specified storage group.*
present : Ensures that the storage volume exists in the specified storage group, and has the specified properties.*
facts : Does not change anything on the storage volume and returns the storage volume properties. |
||||||||||||||||
storage_group_name |
yes |
The name of the storage group containing the target storage volume.
|
name | description | returned | type | sample |
---|---|---|---|---|
storage_volume |
For
state=absent , an empty dictionary.For
state=present|facts , a dictionary with the resource properties of the storage volume, indicating the state after changes from this module (if any) have been applied. 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:*
type : Type of the storage volume ('fc' or 'fcp'), as defined in its storage group. |
success | dict | {
"name": "sv-1",
"description": "storage volume #1",
...
}
|