Skip to content

Commit 1c47c38

Browse files
poddmmp940m
authored andcommitted
Adding schema descriptions
1 parent 2cc91b9 commit 1c47c38

9 files changed

+340
-249
lines changed

cloudstack/resource_cloudstack_cluster.go

Lines changed: 71 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -35,94 +35,113 @@ func resourceCloudStackCluster() *schema.Resource {
3535
},
3636
Schema: map[string]*schema.Schema{
3737
"allocation_state": {
38-
Type: schema.TypeString,
39-
Optional: true,
40-
Computed: true,
38+
Description: "Allocation state of this cluster for allocation of new resources",
39+
Type: schema.TypeString,
40+
Optional: true,
41+
Computed: true,
4142
},
4243
"cluster_name": {
43-
Type: schema.TypeString,
44-
Required: true,
44+
Description: "the cluster name",
45+
Type: schema.TypeString,
46+
Required: true,
4547
},
4648
"cluster_type": {
47-
Type: schema.TypeString,
48-
Required: true,
49+
Description: "ype of the cluster: CloudManaged, ExternalManaged",
50+
Type: schema.TypeString,
51+
Required: true,
4952
},
5053
"guest_vswitch_name": {
51-
Type: schema.TypeString,
52-
Optional: true,
53-
ForceNew: true,
54+
Description: "Name of virtual switch used for guest traffic in the cluster. This would override zone wide traffic label setting.",
55+
Type: schema.TypeString,
56+
Optional: true,
57+
ForceNew: true,
5458
},
5559
"guest_vswitch_type": {
56-
Type: schema.TypeString,
57-
Optional: true,
58-
ForceNew: true,
60+
Description: "Type of virtual switch used for guest traffic in the cluster. Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch)",
61+
Type: schema.TypeString,
62+
Optional: true,
63+
ForceNew: true,
5964
},
6065
"hypervisor": {
61-
Type: schema.TypeString,
62-
Required: true,
66+
Description: "hypervisor type of the cluster: XenServer,KVM,VMware,Hyperv,BareMetal,Simulator,Ovm3",
67+
Type: schema.TypeString,
68+
Required: true,
6369
},
6470
"ovm3_cluster": {
65-
Type: schema.TypeString,
66-
Optional: true,
67-
ForceNew: true,
71+
Description: "Ovm3 native OCFS2 clustering enabled for cluster",
72+
Type: schema.TypeString,
73+
Optional: true,
74+
ForceNew: true,
6875
},
6976
"ovm3_pool": {
70-
Type: schema.TypeString,
71-
Optional: true,
72-
ForceNew: true,
77+
Description: "Ovm3 native pooling enabled for cluster",
78+
Type: schema.TypeString,
79+
Optional: true,
80+
ForceNew: true,
7381
},
7482
"ovm3_vip": {
75-
Type: schema.TypeString,
76-
Optional: true,
77-
ForceNew: true,
83+
Description: "Ovm3 vip to use for pool (and cluster)",
84+
Type: schema.TypeString,
85+
Optional: true,
86+
ForceNew: true,
7887
},
7988
"password": {
80-
Type: schema.TypeString,
81-
Optional: true,
82-
ForceNew: true,
89+
Description: "the password for the host",
90+
Type: schema.TypeString,
91+
Optional: true,
92+
ForceNew: true,
8393
},
8494
"public_vswitch_name": {
85-
Type: schema.TypeString,
86-
Optional: true,
87-
ForceNew: true,
95+
Description: "Name of virtual switch used for public traffic in the cluster. This would override zone wide traffic label setting.",
96+
Type: schema.TypeString,
97+
Optional: true,
98+
ForceNew: true,
8899
},
89100
"public_vswitch_type": {
90-
Type: schema.TypeString,
91-
Optional: true,
92-
ForceNew: true,
101+
Description: "Type of virtual switch used for public traffic in the cluster. Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch)",
102+
Type: schema.TypeString,
103+
Optional: true,
104+
ForceNew: true,
93105
},
94106
"pod_id": {
95-
Type: schema.TypeString,
96-
Required: true,
107+
Description: "Type of virtual switch used for public traffic in the cluster. Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch)",
108+
Type: schema.TypeString,
109+
Required: true,
97110
},
98111
"url": {
99-
Type: schema.TypeString,
100-
Optional: true,
101-
ForceNew: true,
112+
Description: "the URL",
113+
Type: schema.TypeString,
114+
Optional: true,
115+
ForceNew: true,
102116
},
103117
"username": {
104-
Type: schema.TypeString,
105-
Optional: true,
106-
ForceNew: true,
118+
Description: "the username for the cluster",
119+
Type: schema.TypeString,
120+
Optional: true,
121+
ForceNew: true,
107122
},
108123
"vsm_ip_address": {
109-
Type: schema.TypeString,
110-
Optional: true,
111-
ForceNew: true,
124+
Description: "the ipaddress of the VSM associated with this cluster",
125+
Type: schema.TypeString,
126+
Optional: true,
127+
ForceNew: true,
112128
},
113129
"vsm_password": {
114-
Type: schema.TypeString,
115-
Optional: true,
116-
ForceNew: true,
130+
Description: "the password for the VSM associated with this cluster",
131+
Type: schema.TypeString,
132+
Optional: true,
133+
ForceNew: true,
117134
},
118135
"vsm_username": {
119-
Type: schema.TypeString,
120-
Optional: true,
121-
ForceNew: true,
136+
Description: "the username for the VSM associated with this cluster",
137+
Type: schema.TypeString,
138+
Optional: true,
139+
ForceNew: true,
122140
},
123141
"zone_id": {
124-
Type: schema.TypeString,
125-
Required: true,
142+
Description: "the Zone ID for the cluster",
143+
Type: schema.TypeString,
144+
Required: true,
126145
},
127146
},
128147
}

cloudstack/resource_cloudstack_network_service_provider_state.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,19 @@ func resourceCloudStackNetworkServiceProviderState() *schema.Resource {
3737
},
3838
Schema: map[string]*schema.Schema{
3939
"name": {
40-
Type: schema.TypeString,
41-
Required: true,
40+
Description: "the name for the physical network service provider",
41+
Type: schema.TypeString,
42+
Required: true,
4243
},
4344
"physical_network_id": {
44-
Type: schema.TypeString,
45-
Required: true,
45+
Description: "the Physical Network ID to add the provider to",
46+
Type: schema.TypeString,
47+
Required: true,
4648
},
4749
"enabled": {
48-
Type: schema.TypeBool,
49-
Required: true,
50+
Description: "state of the network provider",
51+
Type: schema.TypeBool,
52+
Required: true,
5053
},
5154
},
5255
}
@@ -67,8 +70,6 @@ func resourceCloudStackNetworkServiceProviderStateRead(d *schema.ResourceData, m
6770
d.Set("enabled", false)
6871
}
6972

70-
// d.Set("enabled", nsp.State)
71-
7273
return nil
7374
}
7475

cloudstack/resource_cloudstack_physical_network.go

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,41 +38,49 @@ func resourceCloudStackPhysicalNetwork() *schema.Resource {
3838
},
3939
Schema: map[string]*schema.Schema{
4040
"broadcast_domain_range": {
41-
Type: schema.TypeString,
42-
Optional: true,
43-
ForceNew: true,
41+
Description: "the broadcast domain range for the physical network[Pod or Zone]. In Acton release it can be Zone only in Advance zone, and Pod in Basic",
42+
Type: schema.TypeString,
43+
Optional: true,
44+
ForceNew: true,
4445
},
4546
"domain_id": {
46-
Type: schema.TypeString,
47-
Optional: true,
48-
ForceNew: true,
47+
Description: "domain ID of the account owning a physical network",
48+
Type: schema.TypeString,
49+
Optional: true,
50+
ForceNew: true,
4951
},
5052
"isolation_methods": {
51-
Type: schema.TypeString,
52-
Optional: true,
53-
ForceNew: true,
53+
Description: "the isolation method for the physical network[VLAN/L3/GRE]",
54+
Type: schema.TypeString,
55+
Optional: true,
56+
ForceNew: true,
5457
},
5558
"name": {
56-
Type: schema.TypeString,
57-
Required: true,
58-
ForceNew: true,
59+
Description: "the name of the physical network",
60+
Type: schema.TypeString,
61+
Required: true,
62+
ForceNew: true,
5963
},
6064
"network_speed": {
61-
Type: schema.TypeString,
62-
Optional: true,
65+
Description: "the speed for the physical network[1G/10G]",
66+
Type: schema.TypeString,
67+
Optional: true,
6368
},
6469
"tags": {
65-
Type: schema.TypeString,
66-
Optional: true,
70+
Description: "Tag the physical network",
71+
Type: schema.TypeString,
72+
Optional: true,
6773
},
6874
"vlan": {
69-
Type: schema.TypeString,
70-
Optional: true,
75+
Description: "the VLAN for the physical network",
76+
Type: schema.TypeString,
77+
Optional: true,
7178
},
7279
"zone_id": {
73-
Type: schema.TypeString,
74-
Required: true,
75-
ForceNew: true,
80+
Description: "zone id of the physical network",
81+
Type: schema.TypeString,
82+
Required: true,
83+
ForceNew: true,
7684
},
7785
},
7886
}

cloudstack/resource_cloudstack_pod.go

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,33 +37,40 @@ func resourceCloudStackPod() *schema.Resource {
3737
},
3838
Schema: map[string]*schema.Schema{
3939
"allocation_state": {
40-
Type: schema.TypeString,
41-
Optional: true,
40+
Description: "Allocation state of this Pod for allocation of new resources",
41+
Type: schema.TypeString,
42+
Optional: true,
4243
},
4344
"end_ip": {
44-
Type: schema.TypeString,
45-
Optional: true,
46-
Computed: true,
45+
Description: "he ending IP address for the Pod",
46+
Type: schema.TypeString,
47+
Optional: true,
48+
Computed: true,
4749
},
4850
"gateway": {
49-
Type: schema.TypeString,
50-
Required: true,
51+
Description: "the gateway for the Pod",
52+
Type: schema.TypeString,
53+
Required: true,
5154
},
5255
"name": {
53-
Type: schema.TypeString,
54-
Required: true,
56+
Description: "the name of the Pod",
57+
Type: schema.TypeString,
58+
Required: true,
5559
},
5660
"netmask": {
57-
Type: schema.TypeString,
58-
Required: true,
61+
Description: "the netmask for the Pod",
62+
Type: schema.TypeString,
63+
Required: true,
5964
},
6065
"start_ip": {
61-
Type: schema.TypeString,
62-
Required: true,
66+
Description: "the starting IP address for the Pod",
67+
Type: schema.TypeString,
68+
Required: true,
6369
},
6470
"zone_id": {
65-
Type: schema.TypeString,
66-
Required: true,
71+
Description: "the Zone ID in which the Pod will be created",
72+
Type: schema.TypeString,
73+
Required: true,
6774
},
6875
},
6976
}

cloudstack/resource_cloudstack_secondary_storage.go

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,31 @@ func resourceCloudStackSecondaryStorage() *schema.Resource {
3636
},
3737
Schema: map[string]*schema.Schema{
3838
"name": {
39-
Type: schema.TypeString,
40-
Optional: true,
41-
Computed: true,
42-
ForceNew: true,
39+
Description: "the name of the image store",
40+
Type: schema.TypeString,
41+
Optional: true,
42+
Computed: true,
43+
ForceNew: true,
4344
},
4445
"storage_provider": {
45-
Type: schema.TypeString,
46-
Required: true,
47-
ForceNew: true,
46+
Description: "the provider name of the image store",
47+
Type: schema.TypeString,
48+
Required: true,
49+
ForceNew: true,
4850
},
4951
"url": {
50-
Type: schema.TypeString,
51-
Optional: true,
52-
Computed: true,
53-
ForceNew: true,
52+
Description: "the url of the image store",
53+
Type: schema.TypeString,
54+
Optional: true,
55+
Computed: true,
56+
ForceNew: true,
5457
},
5558
"zone_id": {
56-
Type: schema.TypeString,
57-
Optional: true,
58-
Computed: true,
59-
ForceNew: true,
59+
Description: "the Zone ID of the image store",
60+
Type: schema.TypeString,
61+
Optional: true,
62+
Computed: true,
63+
ForceNew: true,
6064
},
6165
},
6266
}

0 commit comments

Comments
 (0)