Skip to content

Commit f9d2c84

Browse files
authored
Update return documentation - part2 (#193)
Update return documentation It needs to be compatible with antsibull.
1 parent 330dab2 commit f9d2c84

File tree

4 files changed

+129
-35
lines changed

4 files changed

+129
-35
lines changed

plugins/modules/version_update.py

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,39 @@
4646
- Version applied.
4747
returned: success
4848
type: dict
49-
sample:
50-
- uuid: 9.2.11.210763
51-
description: 9.2.11 General Availability
52-
change_log: ...Please allow between 20-40 minutes per node for the update to complete...
53-
build_id: 210763
54-
major_version: 9
55-
minor_version: 2
56-
revision: 11
57-
timestamp: 0
49+
contains:
50+
uuid:
51+
description: Unique identifier in format majorVersion.minorVersion.revision.buildID
52+
type: str
53+
sample: 9.2.11.210763
54+
description:
55+
description: Human-readable name for the update
56+
type: str
57+
sample: 9.2.11 General Availability
58+
change_log:
59+
description: Description of all changes that are in this update, in HTML format
60+
type: str
61+
sample: ...Please allow between 20-40 minutes per node for the update to complete...
62+
build_id:
63+
description: ID of the build which corresponds to this update
64+
type: int
65+
sample: 210763
66+
major_version:
67+
description: Major version number
68+
type: int
69+
sample: 9
70+
minor_version:
71+
description: Minor version number
72+
type: int
73+
sample: 2
74+
revision:
75+
description: Revision number
76+
type: int
77+
sample: 11
78+
timestamp:
79+
description: Unix timestamp when the update was released
80+
type: int
81+
sample: 0
5882
"""
5983

6084
from ansible.module_utils.basic import AnsibleModule

plugins/modules/version_update_status_info.py

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,39 @@
3737
- None/null is returned if no update was ever applied.
3838
returned: success
3939
type: dict
40-
sample:
41-
- from_build: 207183
42-
percent: 100
43-
prepare_status: ""
44-
update_status: COMPLETE
45-
update_status_details: Update Complete. Press 'Reload' to reconnect
46-
usernotes: ""
47-
to_build: 209840
48-
to_version: 9.1.18.209840
40+
contains:
41+
from_build:
42+
description: Old build version
43+
type: str
44+
sample: 207183
45+
percent:
46+
description: Update progress in percentage
47+
type: str
48+
sample: 100
49+
prepare_status:
50+
description: Status of preparation necessary for update to start
51+
type: str
52+
sample: ""
53+
update_status:
54+
description: Update status
55+
type: str
56+
sample: COMPLETE
57+
update_status_details:
58+
description: Update status details
59+
type: str
60+
sample: Update Complete. Press 'Reload' to reconnect
61+
usernotes:
62+
description: Update status usernotes
63+
type: str
64+
sample: Update Complete. Press 'Reload' to reconnect
65+
to_build:
66+
description: New build version
67+
type: str
68+
sample: 209840
69+
to_version:
70+
description: New hypercore version
71+
type: str
72+
sample: 9.1.18.209840
4973
"""
5074

5175
from typing import Optional

plugins/modules/virtual_disk.py

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,27 @@
6363
- Virtual disk record.
6464
returned: success
6565
type: dict
66-
sample:
67-
name: foobar.qcow2
68-
uuid: 57ec1fba-506a-45b9-8950-ffc3dc102c6b
69-
block_size: 1048576
70-
size: 104857600
71-
replication_factor: 2
66+
contains:
67+
block_size:
68+
description: Size of individual blocks (the smallest unit of measurement for VSDs) on the drive, in bytes
69+
type: int
70+
sample: 1048576
71+
name:
72+
description: Name identifier
73+
type: str
74+
sample: demo-virtual-disk.qcow2
75+
replication_factor:
76+
description: How many copies of each block are stored on physical drives
77+
type: int
78+
sample: 2
79+
size:
80+
description: Total capacity, in bytes
81+
type: int
82+
sample: 1073741824
83+
uuid:
84+
description: Unique identifier
85+
type: str
86+
sample: 7983b298-c37a-4c99-8dfe-b2952e81b092
7287
"""
7388

7489
from ansible.module_utils.basic import AnsibleModule

plugins/modules/vm_snapshot_info.py

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,48 @@
7777
- A list of VM Snapshot records.
7878
returned: success
7979
type: list
80-
sample:
81-
- automated_trigger_timestamp: 0
82-
block_count_diff_from_serial_number: 2
83-
label: snap-2
84-
local_retain_until_timestamp: 0
85-
remote_retain_until_timestamp: 0
86-
replication: true
87-
snapshot_uuid: 28d6ff95-2c31-4a1a-b3d9-47535164d6de
88-
timestamp: 1679397326
89-
type: USER
90-
vm:
80+
elements: dict
81+
contains:
82+
automated_trigger_timestamp:
83+
description: Unix timestamp used when determining which automated snapshots to retain
84+
type: int
85+
sample: 0
86+
block_count_diff_from_serial_number:
87+
description: Snapshot serial number of the previous snapshot used to calculate VirDomainSnapshot.blockCountDiff
88+
type: int
89+
sample: 2
90+
label:
91+
description: User-readable label describing the snapshot
92+
type: str
93+
sample: snap-2
94+
local_retain_until_timestamp:
95+
description: Unix timestamp indicating when automated snapshots will be automatically removed
96+
type: int
97+
sample: 0
98+
remote_retain_until_timestamp:
99+
description: Unix timestamp indicating when remote automated snapshots will be removed
100+
type: int
101+
sample: 0
102+
replication:
103+
description: Will replicate snapshot to a remote system or not in case if replication is configured
104+
type: bool
105+
sample: true
106+
snapshot_uuid:
107+
description: Snapshot's unique identifier
108+
type: str
109+
sample: 28d6ff95-2c31-4a1a-b3d9-47535164d6de
110+
timestamp:
111+
description: Unix timestamp of when snapshot was created
112+
type: int
113+
sample: 1679397326
114+
type:
115+
description: Snapshot type
116+
type: str
117+
sample: USER
118+
vm:
119+
description: source VM
120+
type: dict
121+
sample:
91122
name: snapshot-test-vm-1
92123
snapshot_serial_number: 3
93124
uuid: 5e50977c-14ce-450c-8a1a-bf5c0afbcf43

0 commit comments

Comments
 (0)