Skip to content

Commit 28b488b

Browse files
poddmmp940m
authored andcommitted
updating storage pool test case
1 parent 63d9693 commit 28b488b

File tree

1 file changed

+56
-6
lines changed

1 file changed

+56
-6
lines changed

cloudstack/resource_cloudstack_storage_pool_test.go

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,75 @@ import (
4444
// }
4545

4646
const testAccCloudStackStoragePoolConfig_basic = `
47+
resource "cloudstack_zone" "test" {
48+
name = "acctest"
49+
dns1 = "8.8.8.8"
50+
dns2 = "8.8.8.8"
51+
internal_dns1 = "8.8.4.4"
52+
internal_dns2 = "8.8.4.4"
53+
network_type = "Advanced"
54+
domain = "cloudstack.apache.org"
55+
}
56+
resource "cloudstack_pod" "test" {
57+
allocation_state = "Disabled"
58+
gateway = "172.29.0.1"
59+
name = "accpod"
60+
netmask = "255.255.240.0"
61+
start_ip = "172.29.0.2"
62+
zone_id = cloudstack_zone.test.id
63+
}
64+
resource "cloudstack_cluster" "test" {
65+
cluster_name = "acccluster"
66+
cluster_type = "CloudManaged"
67+
hypervisor = "KVM"
68+
pod_id = cloudstack_pod.test.id
69+
zone_id = cloudstack_zone.test.id
70+
}
71+
4772
resource "cloudstack_storage_pool" "test" {
4873
name = "accprimarystorage"
4974
url = "nfs://10.147.28.6/export/home/sandbox/primary11"
50-
zone_id = "0ed38eb3-f279-4951-ac20-fef39ebab20c"
51-
cluster_id = "9daeeb36-d8b7-497a-9b53-bbebba88c817"
52-
pod_id = "2ff52b73-139e-4c40-a0a3-5b7d87d8e3c4"
75+
zone_id = cloudstack_zone.test.id
76+
cluster_id = cloudstack_cluster.test.id
77+
pod_id = cloudstack_pod.test.id
5378
scope = "CLUSTER"
5479
hypervisor = "Simulator"
5580
tags = "XYZ,123"
5681
}
5782
`
5883

5984
const testAccCloudStackStoragePoolConfig_update = `
85+
resource "cloudstack_zone" "test" {
86+
name = "acctest"
87+
dns1 = "8.8.8.8"
88+
dns2 = "8.8.8.8"
89+
internal_dns1 = "8.8.4.4"
90+
internal_dns2 = "8.8.4.4"
91+
network_type = "Advanced"
92+
domain = "cloudstack.apache.org"
93+
}
94+
resource "cloudstack_pod" "test" {
95+
allocation_state = "Disabled"
96+
gateway = "172.29.0.1"
97+
name = "accpod"
98+
netmask = "255.255.240.0"
99+
start_ip = "172.29.0.2"
100+
zone_id = cloudstack_zone.test.id
101+
}
102+
resource "cloudstack_cluster" "test" {
103+
cluster_name = "acccluster"
104+
cluster_type = "CloudManaged"
105+
hypervisor = "KVM"
106+
pod_id = cloudstack_pod.test.id
107+
zone_id = cloudstack_zone.test.id
108+
}
109+
60110
resource "cloudstack_storage_pool" "test" {
61111
name = "accprimarystorage1"
62112
url = "nfs://10.147.28.6/export/home/sandbox/primary11"
63-
zone_id = "0ed38eb3-f279-4951-ac20-fef39ebab20c"
64-
cluster_id = "9daeeb36-d8b7-497a-9b53-bbebba88c817"
65-
pod_id = "2ff52b73-139e-4c40-a0a3-5b7d87d8e3c4"
113+
zone_id = cloudstack_zone.test.id
114+
cluster_id = cloudstack_cluster.test.id
115+
pod_id = cloudstack_pod.test.id
66116
scope = "CLUSTER"
67117
hypervisor = "Simulator"
68118
state = "Maintenance"

0 commit comments

Comments
 (0)