.. _zhmc_crypto_attachment: zhmc_crypto_attachment - Manages the attachment of crypto adapters and domains to partitions. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. contents:: :local: :depth: 2 Synopsis -------- * Gathers facts about the attachment of crypto adapters and domains to a partition. * Attaches a range of crypto domains and a number of crypto adapters to a partition. * Detaches all crypto domains and all crypto adapters from a partition. 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 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
access_mode |
no | usage |
|
Only for
state=attach : The access mode in which the crypto domains specified in domain_range need to be attached. |
|||||||||||||||
adapter_count |
no | -1 |
Only for
state=attach : The number of crypto adapters the partition needs to have attached. The special value -1 means all adapters of the desired crypto type in the CPC. |
||||||||||||||||
cpc_name |
yes |
The name of the CPC that has the partition and the crypto adapters.
|
|||||||||||||||||
crypto_type |
no | ep11 |
|
Only for
state=attach : The crypto type of the crypto adapters that will be considered for attaching. |
|||||||||||||||
domain_range |
no | (0, -1) |
Only for
state=attach : The domain range the partition needs to have attached, as a tuple of integers (min, max) that specify the inclusive range of domain index numbers. Other domains attached to the partition remain unchanged. The special value -1 for the max item means the maximum supported domain index number. |
||||||||||||||||
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.
|
|||||||||||||||||
partition_name |
yes |
The name of the partition to which the crypto domains and crypto adapters are attached.
|
|||||||||||||||||
state |
yes |
|
The desired state for the attachment:
*
attached : Ensures that the specified number of crypto adapters of the specified crypto type, and the specified range of domain index numbers in the specified access mode are attached to the partition.*
detached : Ensures that no crypto adapter and no crypto domains are attached to the partition.*
facts : Does not change anything on the attachment and returns the crypto configuration of the partition. |
name | description | returned | type | sample |
---|---|---|---|---|
crypto_configuration |
For
state=detached|attached|facts , a dictionary with the crypto configuration of the partition after the changes applied by the module. Key is the partition name, and value is a dictionary with keys: - 'adapters': attached adapters, as a dict of key: adapter name, value: dict of adapter properties; - 'domain_config': attached domains, as a dict of key: domain index, value: access mode ('control' or 'usage'); - 'usage_domains': domains attached in usage mode, as a list of domain index numbers; - 'control_domains': domains attached in control mode, as a list of domain index numbers. |
success | dict | {
"part-1": {
"adapters": {
"adapter 1": {
"type": "crypto",
...
}
},
"domain_config": {
"0": "usage",
"1": "control",
"2": "control"
}
"usage_domains": [0],
"control_domains": [1, 2]
}
}
|
changes |
For
state=detached|attached|facts , a dictionary with the changes performed. |
success | dict | {
"added-adapters": ["adapter 1", "adapter 2"],
"added-domains": ["0", "1"]
}
|