From 20e4ad0eefbc30fcdad680b5b9da43ec764693a5 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 1 Apr 2016 16:58:30 -0400 Subject: [PATCH] corrected required docs as only boolean is allowed these complex values were not displayed and would always show the fields as requried --- cloud/amazon/ec2_vpc.py | 4 ++-- cloud/amazon/elasticache.py | 2 +- cloud/openstack/os_router.py | 3 ++- cloud/openstack/os_subnet.py | 7 ++++--- cloud/openstack/os_user.py | 3 ++- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/cloud/amazon/ec2_vpc.py b/cloud/amazon/ec2_vpc.py index fab5bc89ea4..68d2389b8f2 100644 --- a/cloud/amazon/ec2_vpc.py +++ b/cloud/amazon/ec2_vpc.py @@ -24,8 +24,8 @@ version_added: "1.4" options: cidr_block: description: - - "The cidr block representing the VPC, e.g. 10.0.0.0/16" - required: false, unless state=present + - "The cidr block representing the VPC, e.g. 10.0.0.0/16", required when I(state) is 'present'. + required: false instance_tenancy: description: - "The supported tenancy options for instances launched into the VPC." diff --git a/cloud/amazon/elasticache.py b/cloud/amazon/elasticache.py index 7b7f9ec4a1f..61d4458f39a 100644 --- a/cloud/amazon/elasticache.py +++ b/cloud/amazon/elasticache.py @@ -68,7 +68,7 @@ options: cache_subnet_group: description: - The subnet group name to associate with. Only use if inside a vpc. Required if inside a vpc - required: conditional + required: false default: None version_added: "2.0" security_group_ids: diff --git a/cloud/openstack/os_router.py b/cloud/openstack/os_router.py index f0df8b144cc..e3de749d68b 100644 --- a/cloud/openstack/os_router.py +++ b/cloud/openstack/os_router.py @@ -54,8 +54,9 @@ options: network: description: - Unique name or ID of the external gateway network. + - required I(interfaces) or I(enable_snat) are provided, type: string - required: true when I(interfaces) or I(enable_snat) are provided, + required: false false otherwise. default: None external_fixed_ips: diff --git a/cloud/openstack/os_subnet.py b/cloud/openstack/os_subnet.py index 19354ccf3f6..4d06425d2c9 100644 --- a/cloud/openstack/os_subnet.py +++ b/cloud/openstack/os_subnet.py @@ -42,7 +42,8 @@ options: network_name: description: - Name of the network to which the subnet should be attached - required: true when state is 'present' + - requried when I(state) is 'present' + required: false name: description: - The name of the subnet that should be created. Although Neutron @@ -52,8 +53,8 @@ options: cidr: description: - The CIDR representation of the subnet that should be assigned to - the subnet. - required: true when state is 'present' + the subnet. Required when I(state) is 'present' + required: false default: None ip_version: description: diff --git a/cloud/openstack/os_user.py b/cloud/openstack/os_user.py index af6bd0c5bca..d40372990c5 100644 --- a/cloud/openstack/os_user.py +++ b/cloud/openstack/os_user.py @@ -41,7 +41,8 @@ options: password: description: - Password for the user - required: true when I(state) is present + - Required when I(state) is present + required: false default: None email: description: