Skip to content

Commit

Permalink
Allow IP CIDR or Range as source/dest groups
Browse files Browse the repository at this point in the history
Adds a new validator specific to source and destination policy groups.
NSX-T can accept an IP, Range, CIDR, or a Group Path as a source
and/or destination group through the security policy interface.

Updates the getSecurityPolicyAndGatewayRulesSchema function to use the
new validator.

Updates docs to reference IP, Range, and CIDR as valid source /
destination groups. Also include reference for using empty set
to specify "ANY".

Resolves: Issue vmware#584
  • Loading branch information
akgiesler committed Mar 12, 2021
1 parent 7860cf2 commit 23b612d
Show file tree
Hide file tree
Showing 6 changed files with 791 additions and 6 deletions.
4 changes: 2 additions & 2 deletions nsxt/policy_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func getSecurityPolicyAndGatewayRulesSchema(scopeRequired bool, isIds bool) *sch
Description: "List of destination groups",
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validatePolicyPath(),
ValidateFunc: validatePolicySourceDestinationGroups(),
},
Optional: true,
},
Expand Down Expand Up @@ -241,7 +241,7 @@ func getSecurityPolicyAndGatewayRulesSchema(scopeRequired bool, isIds bool) *sch
Description: "List of source groups",
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validatePolicyPath(),
ValidateFunc: validatePolicySourceDestinationGroups(),
},
Optional: true,
},
Expand Down
Loading

0 comments on commit 23b612d

Please sign in to comment.