From cc29b16536662c76d6a35dc28bf47d8c1b950922 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Feb 2023 09:22:26 +0100 Subject: [PATCH] Add attributes to clc, hwc, and lxd modules (#5952) Add attributes to clc, hwc, and lxd modules. --- plugins/modules/clc_aa_policy.py | 7 ++++++ plugins/modules/clc_alert_policy.py | 7 ++++++ plugins/modules/clc_blueprint_package.py | 7 ++++++ plugins/modules/clc_firewall_policy.py | 7 ++++++ plugins/modules/clc_group.py | 7 ++++++ plugins/modules/clc_loadbalancer.py | 7 ++++++ plugins/modules/clc_modify_server.py | 7 ++++++ plugins/modules/clc_publicip.py | 7 ++++++ plugins/modules/clc_server.py | 7 ++++++ plugins/modules/clc_server_snapshot.py | 7 ++++++ plugins/modules/hwc_ecs_instance.py | 8 ++++++- plugins/modules/hwc_evs_disk.py | 8 ++++++- plugins/modules/hwc_network_vpc.py | 8 ++++++- plugins/modules/hwc_smn_topic.py | 8 ++++++- plugins/modules/hwc_vpc_eip.py | 8 ++++++- plugins/modules/hwc_vpc_peering_connect.py | 8 ++++++- plugins/modules/hwc_vpc_port.py | 8 ++++++- plugins/modules/hwc_vpc_private_ip.py | 14 ++++++++---- plugins/modules/hwc_vpc_route.py | 14 ++++++++---- plugins/modules/hwc_vpc_security_group.py | 22 ++++++++++++------- .../modules/hwc_vpc_security_group_rule.py | 22 ++++++++++++------- plugins/modules/hwc_vpc_subnet.py | 8 ++++++- plugins/modules/lxd_container.py | 12 +++++----- plugins/modules/lxd_profile.py | 7 ++++++ plugins/modules/lxd_project.py | 7 ++++++ 25 files changed, 194 insertions(+), 38 deletions(-) diff --git a/plugins/modules/clc_aa_policy.py b/plugins/modules/clc_aa_policy.py index d1fba2429a..05135bd957 100644 --- a/plugins/modules/clc_aa_policy.py +++ b/plugins/modules/clc_aa_policy.py @@ -14,6 +14,13 @@ module: clc_aa_policy short_description: Create or Delete Anti Affinity Policies at CenturyLink Cloud description: - An Ansible module to Create or Delete Anti Affinity Policies at CenturyLink Cloud. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/clc_alert_policy.py b/plugins/modules/clc_alert_policy.py index 1d733013d2..b77c83e3b7 100644 --- a/plugins/modules/clc_alert_policy.py +++ b/plugins/modules/clc_alert_policy.py @@ -15,6 +15,13 @@ module: clc_alert_policy short_description: Create or Delete Alert Policies at CenturyLink Cloud description: - An Ansible module to Create or Delete Alert Policies at CenturyLink Cloud. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: alias: description: diff --git a/plugins/modules/clc_blueprint_package.py b/plugins/modules/clc_blueprint_package.py index cb23df852b..672e06780f 100644 --- a/plugins/modules/clc_blueprint_package.py +++ b/plugins/modules/clc_blueprint_package.py @@ -14,6 +14,13 @@ module: clc_blueprint_package short_description: Deploys a blue print package on a set of servers in CenturyLink Cloud description: - An Ansible module to deploy blue print package on a set of servers in CenturyLink Cloud. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: server_ids: description: diff --git a/plugins/modules/clc_firewall_policy.py b/plugins/modules/clc_firewall_policy.py index cc77238db9..c832571d33 100644 --- a/plugins/modules/clc_firewall_policy.py +++ b/plugins/modules/clc_firewall_policy.py @@ -14,6 +14,13 @@ module: clc_firewall_policy short_description: Create/delete/update firewall policies description: - Create or delete or update firewall policies on Centurylink Cloud +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: location: description: diff --git a/plugins/modules/clc_group.py b/plugins/modules/clc_group.py index 21e6d93d28..88aef2d63d 100644 --- a/plugins/modules/clc_group.py +++ b/plugins/modules/clc_group.py @@ -15,6 +15,13 @@ module: clc_group short_description: Create/delete Server Groups at Centurylink Cloud description: - Create or delete Server Groups at Centurylink Centurylink Cloud +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/clc_loadbalancer.py b/plugins/modules/clc_loadbalancer.py index ab6d866fb6..675cc1100e 100644 --- a/plugins/modules/clc_loadbalancer.py +++ b/plugins/modules/clc_loadbalancer.py @@ -15,6 +15,13 @@ module: clc_loadbalancer short_description: Create, Delete shared loadbalancers in CenturyLink Cloud description: - An Ansible module to Create, Delete shared loadbalancers in CenturyLink Cloud. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/clc_modify_server.py b/plugins/modules/clc_modify_server.py index 786cdf2ae4..b375d9d47a 100644 --- a/plugins/modules/clc_modify_server.py +++ b/plugins/modules/clc_modify_server.py @@ -14,6 +14,13 @@ module: clc_modify_server short_description: Modify servers in CenturyLink Cloud description: - An Ansible module to modify servers in CenturyLink Cloud. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: server_ids: description: diff --git a/plugins/modules/clc_publicip.py b/plugins/modules/clc_publicip.py index 5111b3cf19..c1bffcea04 100644 --- a/plugins/modules/clc_publicip.py +++ b/plugins/modules/clc_publicip.py @@ -14,6 +14,13 @@ module: clc_publicip short_description: Add and Delete public ips on servers in CenturyLink Cloud description: - An Ansible module to add or delete public ip addresses on an existing server or servers in CenturyLink Cloud. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: protocol: description: diff --git a/plugins/modules/clc_server.py b/plugins/modules/clc_server.py index d8e4f16217..d2d019ff0d 100644 --- a/plugins/modules/clc_server.py +++ b/plugins/modules/clc_server.py @@ -14,6 +14,13 @@ module: clc_server short_description: Create, Delete, Start and Stop servers in CenturyLink Cloud description: - An Ansible module to Create, Delete, Start and Stop servers in CenturyLink Cloud. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: additional_disks: description: diff --git a/plugins/modules/clc_server_snapshot.py b/plugins/modules/clc_server_snapshot.py index 096abfe29b..82b2a99568 100644 --- a/plugins/modules/clc_server_snapshot.py +++ b/plugins/modules/clc_server_snapshot.py @@ -14,6 +14,13 @@ module: clc_server_snapshot short_description: Create, Delete and Restore server snapshots in CenturyLink Cloud description: - An Ansible module to Create, Delete and Restore server snapshots in CenturyLink Cloud. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: server_ids: description: diff --git a/plugins/modules/hwc_ecs_instance.py b/plugins/modules/hwc_ecs_instance.py index 10d913f9b5..434db242f2 100644 --- a/plugins/modules/hwc_ecs_instance.py +++ b/plugins/modules/hwc_ecs_instance.py @@ -22,6 +22,11 @@ version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -225,7 +230,8 @@ options: type: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_evs_disk.py b/plugins/modules/hwc_evs_disk.py index 7b5a99fb7f..7d445ddd21 100644 --- a/plugins/modules/hwc_evs_disk.py +++ b/plugins/modules/hwc_evs_disk.py @@ -22,6 +22,11 @@ version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -150,7 +155,8 @@ options: type: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_network_vpc.py b/plugins/modules/hwc_network_vpc.py index 78f5925e0c..357fd55204 100644 --- a/plugins/modules/hwc_network_vpc.py +++ b/plugins/modules/hwc_network_vpc.py @@ -22,6 +22,11 @@ author: Huawei Inc. (@huaweicloud) requirements: - requests >= 2.18.4 - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -61,7 +66,8 @@ options: type: str required: true extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_smn_topic.py b/plugins/modules/hwc_smn_topic.py index 3752e1f18f..88207d3f93 100644 --- a/plugins/modules/hwc_smn_topic.py +++ b/plugins/modules/hwc_smn_topic.py @@ -22,6 +22,11 @@ author: Huawei Inc. (@huaweicloud) requirements: - requests >= 2.18.4 - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -45,7 +50,8 @@ options: type: str required: true extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_vpc_eip.py b/plugins/modules/hwc_vpc_eip.py index e14fb0e502..9fc0361b30 100644 --- a/plugins/modules/hwc_vpc_eip.py +++ b/plugins/modules/hwc_vpc_eip.py @@ -22,6 +22,11 @@ version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -121,7 +126,8 @@ options: type: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_vpc_peering_connect.py b/plugins/modules/hwc_vpc_peering_connect.py index 01c52932ba..2d6832ce5d 100644 --- a/plugins/modules/hwc_vpc_peering_connect.py +++ b/plugins/modules/hwc_vpc_peering_connect.py @@ -23,6 +23,11 @@ version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -75,7 +80,8 @@ options: type: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_vpc_port.py b/plugins/modules/hwc_vpc_port.py index aac9636f88..2d830493d4 100644 --- a/plugins/modules/hwc_vpc_port.py +++ b/plugins/modules/hwc_vpc_port.py @@ -22,6 +22,11 @@ version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -105,7 +110,8 @@ options: elements: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_vpc_private_ip.py b/plugins/modules/hwc_vpc_private_ip.py index e05c14f74d..c57ddc6708 100644 --- a/plugins/modules/hwc_vpc_private_ip.py +++ b/plugins/modules/hwc_vpc_private_ip.py @@ -19,13 +19,18 @@ description: - vpc private ip management. short_description: Creates a resource of Vpc/PrivateIP in Huawei Cloud notes: - - If I(id) option is provided, it takes precedence over I(subnet_id), I(ip_address) for private ip selection. - - I(subnet_id), I(ip_address) are used for private ip selection. If more than one private ip with this options exists, execution is aborted. - - No parameter support updating. If one of option is changed, the module will create a new resource. + - If I(id) option is provided, it takes precedence over I(subnet_id), I(ip_address) for private ip selection. + - I(subnet_id), I(ip_address) are used for private ip selection. If more than one private ip with this options exists, execution is aborted. + - No parameter support updating. If one of option is changed, the module will create a new resource. version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -48,7 +53,8 @@ options: type: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_vpc_route.py b/plugins/modules/hwc_vpc_route.py index e08a9ebf38..1612cac50d 100644 --- a/plugins/modules/hwc_vpc_route.py +++ b/plugins/modules/hwc_vpc_route.py @@ -19,13 +19,18 @@ description: - vpc route management. short_description: Creates a resource of Vpc/Route in Huawei Cloud notes: - - If I(id) option is provided, it takes precedence over I(destination), I(vpc_id), I(type) and I(next_hop) for route selection. - - I(destination), I(vpc_id), I(type) and I(next_hop) are used for route selection. If more than one route with this options exists, execution is aborted. - - No parameter support updating. If one of option is changed, the module will create a new resource. + - If I(id) option is provided, it takes precedence over I(destination), I(vpc_id), I(type) and I(next_hop) for route selection. + - I(destination), I(vpc_id), I(type) and I(next_hop) are used for route selection. If more than one route with this options exists, execution is aborted. + - No parameter support updating. If one of option is changed, the module will create a new resource. version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -55,7 +60,8 @@ options: required: false default: 'peering' extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_vpc_security_group.py b/plugins/modules/hwc_vpc_security_group.py index 2338623890..c210b912d4 100644 --- a/plugins/modules/hwc_vpc_security_group.py +++ b/plugins/modules/hwc_vpc_security_group.py @@ -19,17 +19,22 @@ description: - vpc security group management. short_description: Creates a resource of Vpc/SecurityGroup in Huawei Cloud notes: - - If I(id) option is provided, it takes precedence over I(name), - I(enterprise_project_id) and I(vpc_id) for security group selection. - - I(name), I(enterprise_project_id) and I(vpc_id) are used for security - group selection. If more than one security group with this options exists, - execution is aborted. - - No parameter support updating. If one of option is changed, the module - will create a new resource. + - If I(id) option is provided, it takes precedence over I(name), + I(enterprise_project_id) and I(vpc_id) for security group selection. + - I(name), I(enterprise_project_id) and I(vpc_id) are used for security + group selection. If more than one security group with this options exists, + execution is aborted. + - No parameter support updating. If one of option is changed, the module + will create a new resource. version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -58,7 +63,8 @@ options: type: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_vpc_security_group_rule.py b/plugins/modules/hwc_vpc_security_group_rule.py index ca6e2e9de8..bfb5d6a615 100644 --- a/plugins/modules/hwc_vpc_security_group_rule.py +++ b/plugins/modules/hwc_vpc_security_group_rule.py @@ -19,17 +19,22 @@ description: - vpc security group management. short_description: Creates a resource of Vpc/SecurityGroupRule in Huawei Cloud notes: - - If I(id) option is provided, it takes precedence over - I(enterprise_project_id) for security group rule selection. - - I(security_group_id) is used for security group rule selection. If more - than one security group rule with this options exists, execution is - aborted. - - No parameter support updating. If one of option is changed, the module - will create a new resource. + - If I(id) option is provided, it takes precedence over + I(enterprise_project_id) for security group rule selection. + - I(security_group_id) is used for security group rule selection. If more + than one security group rule with this options exists, execution is + aborted. + - No parameter support updating. If one of option is changed, the module + will create a new resource. version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -100,7 +105,8 @@ options: type: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/hwc_vpc_subnet.py b/plugins/modules/hwc_vpc_subnet.py index 4b192a5682..7fb107f534 100644 --- a/plugins/modules/hwc_vpc_subnet.py +++ b/plugins/modules/hwc_vpc_subnet.py @@ -22,6 +22,11 @@ version_added: '0.2.0' author: Huawei Inc. (@huaweicloud) requirements: - keystoneauth1 >= 3.6.0 +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: @@ -94,7 +99,8 @@ options: elements: str required: false extends_documentation_fragment: -- community.general.hwc + - community.general.hwc + - community.general.attributes ''' diff --git a/plugins/modules/lxd_container.py b/plugins/modules/lxd_container.py index 00649a076f..f10fc4872f 100644 --- a/plugins/modules/lxd_container.py +++ b/plugins/modules/lxd_container.py @@ -19,12 +19,12 @@ author: "Hiroaki Nakamura (@hnakamur)" extends_documentation_fragment: - community.general.attributes attributes: - check_mode: - support: full - version_added: 6.4.0 - diff_mode: - support: full - version_added: 6.4.0 + check_mode: + support: full + version_added: 6.4.0 + diff_mode: + support: full + version_added: 6.4.0 options: name: description: diff --git a/plugins/modules/lxd_profile.py b/plugins/modules/lxd_profile.py index 1410d16e02..45f499b784 100644 --- a/plugins/modules/lxd_profile.py +++ b/plugins/modules/lxd_profile.py @@ -16,6 +16,13 @@ short_description: Manage LXD profiles description: - Management of LXD profiles author: "Hiroaki Nakamura (@hnakamur)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: diff --git a/plugins/modules/lxd_project.py b/plugins/modules/lxd_project.py index ad6019c2ec..983531fa08 100644 --- a/plugins/modules/lxd_project.py +++ b/plugins/modules/lxd_project.py @@ -15,6 +15,13 @@ version_added: 4.8.0 description: - Management of LXD projects. author: "Raymond Chang (@we10710aa)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: name: description: