Skip to content
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

Implement host transport node collection resource #965

Merged
merged 1 commit into from
Oct 7, 2023

Conversation

ksamoray
Copy link
Collaborator

@ksamoray ksamoray commented Sep 7, 2023

No description provided.

@ksamoray ksamoray force-pushed the host_transport_node_collection branch 8 times, most recently from 18c5454 to a8d27e4 Compare September 7, 2023 11:38
@ksamoray ksamoray changed the title Implemnt host transport node collection resource Implement host transport node collection resource Sep 7, 2023
@ksamoray ksamoray force-pushed the host_transport_node_collection branch 2 times, most recently from de0f64c to b7a0a38 Compare September 14, 2023 07:34
"transport_node_profile_id": {
Type: schema.TypeString,
Optional: true,
Description: "Transport Node Profile Path",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this path or id?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a path - as this is a policy resource, it requires paths as object references. I followed the API naming where this attribute is called transport_node_profile_id but maybe it makes more sense to name it transport_node_profile_path.

@ksamoray ksamoray force-pushed the host_transport_node_collection branch 3 times, most recently from 21cd5ee to 8d994e8 Compare September 21, 2023 16:47
@ksamoray ksamoray requested a review from annakhm September 26, 2023 09:10
resource "nsxt_policy_host_transport_node_collection" "htnc1" {
display_name = "HostTransportNodeCollection1"
compute_collection_id = data.vsphere_compute_cluster.compute_cluster.id
transport_node_profile_path = nsxt_policy_host_transport_node_profile.tnp.id
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be nsxt_policy_host_transport_node_profile.tnp.path?

@ksamoray ksamoray force-pushed the host_transport_node_collection branch 4 times, most recently from 9e1ba7f to 952b07e Compare September 27, 2023 07:53
@ksamoray
Copy link
Collaborator Author

/test-all

1 similar comment
@ksamoray
Copy link
Collaborator Author

/test-all

@ksamoray ksamoray force-pushed the host_transport_node_collection branch from 952b07e to 04ff267 Compare September 29, 2023 08:23
@ksamoray
Copy link
Collaborator Author

ksamoray commented Oct 4, 2023

/test-all

@ksamoray ksamoray force-pushed the host_transport_node_collection branch 3 times, most recently from 090e0fe to 49512a2 Compare October 4, 2023 14:36
"tag": getTagsSchema(),
"site_path": {
Type: schema.TypeString,
Description: "Path to the site this Transport Zone belongs to",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transport Zone => resource ?

},
"enforcement_point": {
Type: schema.TypeString,
Description: "ID of the enforcement point this Transport Zone belongs to",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transport Zone => resource ?

Update: resourceNsxtPolicyHostTransportNodeCollectionUpdate,
Delete: resourceNsxtPolicyHostTransportNodeCollectionDelete,
Importer: &schema.ResourceImporter{
State: nsxtPolicyPathResourceImporter,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this can work out of the box here, since enforcement point and site need to be set before Read is called?

@annakhm
Copy link
Collaborator

annakhm commented Oct 5, 2023

Is it too complex to add a test for this? perhaps with env variable indicating VC compute ID?

@ksamoray
Copy link
Collaborator Author

ksamoray commented Oct 5, 2023

Is it too complex to add a test for this? perhaps with env variable indicating VC compute ID?

It means that we'll need a cluster on VC which isn't configured with NSX. We can create such with the LM topology but it'll require an additional ESXi node per topology.

@ksamoray ksamoray force-pushed the host_transport_node_collection branch from 49512a2 to 9c05e13 Compare October 5, 2023 13:09
@ksamoray ksamoray force-pushed the host_transport_node_collection branch from 9c05e13 to 7b1ff98 Compare October 5, 2023 15:16
@ksamoray
Copy link
Collaborator Author

ksamoray commented Oct 5, 2023

/test-all

@ksamoray ksamoray merged commit 6ed3a27 into vmware:master Oct 7, 2023
2 checks passed
@ksamoray ksamoray deleted the host_transport_node_collection branch October 7, 2023 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants