Skip to content

Commit 35f14a9

Browse files
Remove unnecessary 'none' check from ip6cidr validation
The ip6cidr field does not have a default value of 'none' (unlike aclid), so checking for != none is unnecessary and could cause confusion if a user actually tries to set ip6cidr = "none". The GetOk() check is sufficient to determine if the field has been set.
1 parent f26d076 commit 35f14a9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cloudstack/resource_cloudstack_network.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func resourceCloudStackNetworkCreate(d *schema.ResourceData, meta interface{}) e
237237
}
238238

239239
// IPv6 support
240-
if ip6cidr, ok := d.GetOk("ip6cidr"); ok && ip6cidr.(string) != none {
240+
if ip6cidr, ok := d.GetOk("ip6cidr"); ok {
241241
m6, err := parseCIDRv6(d, no.Specifyipranges)
242242
if err != nil {
243243
return err

0 commit comments

Comments
 (0)