.. _zhmc_cpc: zhmc_cpc - Manages a CPC. +++++++++++++++++++++++++ .. contents:: :local: :depth: 2 Synopsis -------- * Gathers facts about the CPC including its child resources. * Updates the properties of 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 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 CPC.
|
|||||||||||||||||
properties |
no | No property changes. |
Only for
state=set : New values for the properties of the CPC. Properties omitted in this dictionary will remain unchanged. This parameter will be ignored for state=facts .The parameter is a dictionary. The key of each dictionary item is the property name as specified in the data model for CPC resources, with underscores instead of hyphens. The value of each dictionary item is the property value (in YAML syntax). Integer properties may also be provided as decimal strings.
The possible properties in this dictionary are the properties defined as writeable in the data model for CPC resources.
|
||||||||||||||||
state |
yes |
|
The desired state for the attachment:
*
set : Ensures that the CPC has the specified properties.*
facts : Does not change anything on the CPC and returns the CPC properties including its child resources. |
name | description | returned | type | sample |
---|---|---|---|---|
cpc |
For
state=set|facts , a dictionary with the properties of the CPC. The properties contain these additional artificial properties for listing its child resources: - 'partitions': The defined partitions of the CPC, as a dict of key: partition name, value: dict of a subset of the partition properties (name, status, object_uri). - 'adapters': The adapters of the CPC, as a dict of key: adapter name, value: dict of a subset of the adapter properties (name, status, object_uri). |
success | dict | {
"name": "CPCA",
"description": "CPC A",
"status": "active",
"acceptable_status": [ "active" ],
...
"partitions": [
{
"name": "part-1",
...
},
...
],
"adapters": [
{
"name": "adapter-1",
...
},
...
],
}
|