.. _zhmc_hba: zhmc_hba - Manages HBAs in existing partitions (without "dpm-storage-management" feature) +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. contents:: :local: :depth: 2 Synopsis -------- * Creates, updates, and deletes HBAs in existing partitions of a CPC. * The targeted CPC must be in the Dynamic Partition Manager (DPM) operational mode. Requirements (on host that executes module) ------------------------------------------- * Network access to HMC * zhmcclient >=0.14.0 * ansible >=2.2.0.0 Options ------- .. raw:: html
parameter | required | default | choices | comments | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cpc_name |
yes |
The name of the CPC with the partition containing the HBA.
|
|||||||||||||||||
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 HBA that is managed. If the HBA needs to be created, this value becomes its name.
|
|||||||||||||||||
partition_name |
yes |
The name of the partition containing the HBA.
|
|||||||||||||||||
properties |
no | No input properties |
Dictionary with input properties for the HBA, for
state=present . Key is the property name with underscores instead of hyphens, and value is the property value in YAML syntax. Integer properties may also be provided as decimal strings. Will be ignored for state=absent .The possible input properties in this dictionary are the properties defined as writeable in the data model for HBA 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.*
adapter_port_uri : Cannot be specified because this information is specified using the artificial properties adapter_name and adapter_port .*
adapter_name : The name of the adapter that has the port backing the target HBA. Cannot be changed after the HBA exists.*
adapter_port : The port index of the adapter port backing the target HBA. Cannot be changed after the HBA exists.Properties omitted in this dictionary will remain unchanged when the HBA already exists, and will get the default value defined in the data model for HBAs when the HBA is being created.
|
||||||||||||||||
state |
yes |
|
The desired state for the target HBA:
absent : Ensures that the HBA does not exist in the specified partition.present : Ensures that the HBA exists in the specified partition and has the specified properties. |
name | description | returned | type | sample |
---|---|---|---|---|
hba |
For
state=absent , an empty dictionary.For
state=present , a dictionary with the resource properties of the HBA (after changes, if any). 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. |
success | dict | {
"name": "hba-1",
"description": "HBA #1",
"adapter-port-uri": "/api/adapters/.../ports/...",
...
}
|