-
Notifications
You must be signed in to change notification settings - Fork 84
Add cidr_list attribute to nsxt_policy_ip_block #1611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@@ -55,6 +55,15 @@ func resourceNsxtPolicyIPBlock() *schema.Resource { | |||
Optional: true, | |||
ValidateFunc: validation.StringInSlice(visibilityTypes, false), | |||
}, | |||
"cidr_list": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two additional new attributes - RangeList
and ReservedIps
. Not sure about SyncRealization
one (its not new)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. We don't have to incldue sync_realization in the Terraform provider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have to include sync_realization but maybe it's worthwhile to turn it on to save users some realization issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understood from the docs it is auto-assigned to true
, but only in some cases.. not sure why
Elem: &schema.Schema{ | ||
Type: schema.TypeString, | ||
ValidateFunc: validateCidr(), | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add ConflictsWIth
with cidr
@@ -376,7 +376,7 @@ func resourceNsxtPolicyEdgeClusterDelete(d *schema.ResourceData, m interface{}) | |||
|
|||
connector := getPolicyConnector(m) | |||
client := enforcement_points.NewEdgeClustersClient(connector) | |||
err = client.Delete(siteID, epID, id) | |||
err = client.Delete(siteID, epID, id, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you making this change? Is it due to SDK update? (If so, what should the 4th argument be)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is derived from PR #1610, and its:
deleteMemberEdgeNodesParam Flag to specify whether to delete edge transport nodes within edge cluster. (optional, default to false)
@@ -46,7 +46,7 @@ func resourceNsxtPolicyIPBlock() *schema.Resource { | |||
"cidr": { | |||
Type: schema.TypeString, | |||
Description: "Network address and the prefix length which will be associated with a layer-2 broadcast domain", | |||
Required: true, | |||
Optional: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cidr should also be deprecated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We mark it as deprecated even though it's the only option for v9.0 and below?
@@ -55,6 +55,15 @@ func resourceNsxtPolicyIPBlock() *schema.Resource { | |||
Optional: true, | |||
ValidateFunc: validation.StringInSlice(visibilityTypes, false), | |||
}, | |||
"cidr_list": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. We don't have to incldue sync_realization in the Terraform provider.
495f16a
to
83b84df
Compare
* `cidr` - (Required) Network address and the prefix length which will be associated with a layer-2 broadcast domain. | ||
* `cidr` - (Optional) Network address and the prefix length which will be associated with a layer-2 broadcast domain. | ||
* `cidr_list` - (Optional) Array of contiguous IP address spaces represented by network address and prefix length. This attribute is supported with NSX 9.1.0 onwards. | ||
* `range_list` - (Optional) Represents list of IP address ranges in the form of start and end IPs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two attributes should also be marked as supported with NSX 9.1.0 onwards
@@ -42,6 +42,40 @@ func TestAccResourceNsxtPolicyIPBlock_minimal(t *testing.T) { | |||
}) | |||
} | |||
|
|||
func TestAccResourceNsxtPolicyIPBlock_v910(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to add a test that switches from cidr
to cidr_list
with an update?
5afbe8b
to
ed5f00c
Compare
eee575e
to
cca2d01
Compare
/test-all |
Use the dev branch of the SDK to obtain the latest API changes. Signed-off-by: Kobi Samoray <[email protected]>
This attribute is added for NSX v9.1.0. Signed-off-by: Kobi Samoray <[email protected]>
Tests pass with v9.1.0
|
This attribute is added for NSX v9.1.0.