Skip to content

Commit 8a68c21

Browse files
AV-108989 Added default value fixes for 18.2.x (#148)
* AV-108989 Added default value fixes for 18.2.x Signed-off-by: Yograj Shisode <[email protected]> * Added changes to fix default value issue in vs and vsvip resource Signed-off-by: Yograj Shisode <[email protected]> * Removed debuggers Signed-off-by: Yograj Shisode <[email protected]>
1 parent 0940348 commit 8a68c21

File tree

104 files changed

+9648
-7409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+9648
-7409
lines changed

Diff for: avi/data_source_avi_controllerproperties_test.go

+163
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
// Copyright 2019 VMware, Inc.
2+
// SPDX-License-Identifier: Mozilla Public License 2.0
3+
4+
package avi
5+
6+
import (
7+
"testing"
8+
9+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
10+
)
11+
12+
func TestAVIDataSourceControllerPropertiesBasic(t *testing.T) {
13+
resource.Test(t, resource.TestCase{
14+
PreCheck: func() { testAccPreCheck(t) },
15+
Providers: testAccProviders,
16+
Steps: []resource.TestStep{
17+
{
18+
Config: testAccAVIDSControllerPropertiesConfig,
19+
Check: resource.ComposeTestCheckFunc(
20+
resource.TestCheckResourceAttr(
21+
"avi_controllerproperties.testControllerProperties", "uuid", "global"),
22+
resource.TestCheckResourceAttr(
23+
"avi_controllerproperties.testControllerProperties", "vs_se_ping_fail", "60"),
24+
resource.TestCheckResourceAttr(
25+
"avi_controllerproperties.testControllerProperties", "warmstart_se_reconnect_wait_time", "300"),
26+
resource.TestCheckResourceAttr(
27+
"avi_controllerproperties.testControllerProperties", "persistence_key_rotate_period", "60"),
28+
resource.TestCheckResourceAttr(
29+
"avi_controllerproperties.testControllerProperties", "unresponsive_se_reboot", "300"),
30+
resource.TestCheckResourceAttr(
31+
"avi_controllerproperties.testControllerProperties", "attach_ip_retry_interval", "360"),
32+
resource.TestCheckResourceAttr(
33+
"avi_controllerproperties.testControllerProperties", "vs_se_vnic_fail", "300"),
34+
resource.TestCheckResourceAttr(
35+
"avi_controllerproperties.testControllerProperties", "attach_ip_retry_limit", "4"),
36+
resource.TestCheckResourceAttr(
37+
"avi_controllerproperties.testControllerProperties", "se_vnic_cooldown", "120"),
38+
resource.TestCheckResourceAttr(
39+
"avi_controllerproperties.testControllerProperties", "vnic_op_fail_time", "180"),
40+
resource.TestCheckResourceAttr(
41+
"avi_controllerproperties.testControllerProperties", "vs_key_rotate_period", "60"),
42+
resource.TestCheckResourceAttr(
43+
"avi_controllerproperties.testControllerProperties", "enable_memory_balancer", "true"),
44+
resource.TestCheckResourceAttr(
45+
"avi_controllerproperties.testControllerProperties", "max_dead_se_in_grp", "1"),
46+
resource.TestCheckResourceAttr(
47+
"avi_controllerproperties.testControllerProperties", "seupgrade_fabric_pool_size", "20"),
48+
resource.TestCheckResourceAttr(
49+
"avi_controllerproperties.testControllerProperties", "max_pcap_per_tenant", "4"),
50+
resource.TestCheckResourceAttr(
51+
"avi_controllerproperties.testControllerProperties", "seupgrade_segroup_min_dead_timeout", "360"),
52+
resource.TestCheckResourceAttr(
53+
"avi_controllerproperties.testControllerProperties", "upgrade_lease_time", "360"),
54+
resource.TestCheckResourceAttr(
55+
"avi_controllerproperties.testControllerProperties", "se_create_timeout", "900"),
56+
resource.TestCheckResourceAttr(
57+
"avi_controllerproperties.testControllerProperties", "query_host_fail", "180"),
58+
resource.TestCheckResourceAttr(
59+
"avi_controllerproperties.testControllerProperties", "bm_use_ansible", "true"),
60+
resource.TestCheckResourceAttr(
61+
"avi_controllerproperties.testControllerProperties", "se_offline_del", "172000"),
62+
resource.TestCheckResourceAttr(
63+
"avi_controllerproperties.testControllerProperties", "vs_se_bootup_fail", "480"),
64+
resource.TestCheckResourceAttr(
65+
"avi_controllerproperties.testControllerProperties", "upgrade_dns_ttl", "5"),
66+
resource.TestCheckResourceAttr(
67+
"avi_controllerproperties.testControllerProperties", "fatal_error_lease_time", "120"),
68+
resource.TestCheckResourceAttr(
69+
"avi_controllerproperties.testControllerProperties", "secure_channel_controller_token_timeout", "60"),
70+
resource.TestCheckResourceAttr(
71+
"avi_controllerproperties.testControllerProperties", "allow_ip_forwarding", "false"),
72+
resource.TestCheckResourceAttr(
73+
"avi_controllerproperties.testControllerProperties", "vs_se_attach_ip_fail", "3600"),
74+
resource.TestCheckResourceAttr(
75+
"avi_controllerproperties.testControllerProperties", "max_seq_vnic_failures", "3"),
76+
resource.TestCheckResourceAttr(
77+
"avi_controllerproperties.testControllerProperties", "allow_unauthenticated_nodes", "false"),
78+
resource.TestCheckResourceAttr(
79+
"avi_controllerproperties.testControllerProperties", "allow_unauthenticated_apis", "false"),
80+
resource.TestCheckResourceAttr(
81+
"avi_controllerproperties.testControllerProperties", "vs_awaiting_se_timeout", "60"),
82+
resource.TestCheckResourceAttr(
83+
"avi_controllerproperties.testControllerProperties", "cluster_ip_gratuitous_arp_period", "60"),
84+
resource.TestCheckResourceAttr(
85+
"avi_controllerproperties.testControllerProperties", "dns_refresh_period", "60"),
86+
resource.TestCheckResourceAttr(
87+
"avi_controllerproperties.testControllerProperties", "max_seq_attach_ip_failures", "3"),
88+
resource.TestCheckResourceAttr(
89+
"avi_controllerproperties.testControllerProperties", "secure_channel_cleanup_timeout", "60"),
90+
resource.TestCheckResourceAttr(
91+
"avi_controllerproperties.testControllerProperties", "vs_se_vnic_ip_fail", "120"),
92+
resource.TestCheckResourceAttr(
93+
"avi_controllerproperties.testControllerProperties", "secure_channel_se_token_timeout", "60"),
94+
resource.TestCheckResourceAttr(
95+
"avi_controllerproperties.testControllerProperties", "vs_se_create_fail", "1500"),
96+
resource.TestCheckResourceAttr(
97+
"avi_controllerproperties.testControllerProperties", "api_idle_timeout", "15"),
98+
resource.TestCheckResourceAttr(
99+
"avi_controllerproperties.testControllerProperties", "crashed_se_reboot", "900"),
100+
resource.TestCheckResourceAttr(
101+
"avi_controllerproperties.testControllerProperties", "appviewx_compat_mode", "false"),
102+
resource.TestCheckResourceAttr(
103+
"avi_controllerproperties.testControllerProperties", "se_failover_attempt_interval", "300"),
104+
resource.TestCheckResourceAttr(
105+
"avi_controllerproperties.testControllerProperties", "dead_se_detection_timer", "360"),
106+
),
107+
},
108+
},
109+
})
110+
111+
}
112+
113+
const testAccAVIDSControllerPropertiesConfig = `
114+
resource "avi_controllerproperties" "testControllerProperties" {
115+
vs_se_ping_fail = "60"
116+
warmstart_se_reconnect_wait_time = "300"
117+
persistence_key_rotate_period = "60"
118+
unresponsive_se_reboot = "300"
119+
attach_ip_retry_interval = "360"
120+
vs_se_vnic_fail = "300"
121+
attach_ip_retry_limit = "4"
122+
se_vnic_cooldown = "120"
123+
vnic_op_fail_time = "180"
124+
vs_key_rotate_period = "60"
125+
enable_memory_balancer = true
126+
max_dead_se_in_grp = "1"
127+
seupgrade_fabric_pool_size = "20"
128+
max_pcap_per_tenant = "4"
129+
seupgrade_segroup_min_dead_timeout = "360"
130+
upgrade_lease_time = "360"
131+
se_create_timeout = "900"
132+
query_host_fail = "180"
133+
bm_use_ansible = true
134+
se_offline_del = "172000"
135+
vs_se_bootup_fail = "480"
136+
upgrade_dns_ttl = "5"
137+
fatal_error_lease_time = "120"
138+
secure_channel_controller_token_timeout = "60"
139+
allow_ip_forwarding = false
140+
vs_se_attach_ip_fail = "3600"
141+
max_seq_vnic_failures = "3"
142+
allow_unauthenticated_nodes = false
143+
allow_unauthenticated_apis = false
144+
vs_awaiting_se_timeout = "60"
145+
cluster_ip_gratuitous_arp_period = "60"
146+
dns_refresh_period = "60"
147+
max_seq_attach_ip_failures = "3"
148+
secure_channel_cleanup_timeout = "60"
149+
ssl_certificate_expiry_warning_days = ["30","7","1"]
150+
vs_se_vnic_ip_fail = "120"
151+
secure_channel_se_token_timeout = "60"
152+
vs_se_create_fail = "1500"
153+
api_idle_timeout = "15"
154+
crashed_se_reboot = "900"
155+
appviewx_compat_mode = false
156+
se_failover_attempt_interval = "300"
157+
dead_se_detection_timer = "360"
158+
}
159+
160+
data "avi_controllerproperties" "testControllerProperties" {
161+
uuid = "${avi_controllerproperties.testControllerProperties.uuid}"
162+
}
163+
`

Diff for: avi/data_source_avi_seproperties_test.go

-190
This file was deleted.

Diff for: avi/datasource_avi_actiongroupconfig.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func dataSourceAviActionGroupConfig() *schema.Resource {
1414
Computed: true,
1515
},
1616
"autoscale_trigger_notification": {
17-
Type: schema.TypeBool,
17+
Type: schema.TypeString,
1818
Computed: true,
1919
},
2020
"description": {
@@ -26,7 +26,7 @@ func dataSourceAviActionGroupConfig() *schema.Resource {
2626
Computed: true,
2727
},
2828
"external_only": {
29-
Type: schema.TypeBool,
29+
Type: schema.TypeString,
3030
Computed: true,
3131
},
3232
"level": {

0 commit comments

Comments
 (0)