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

Add discover node data source #1084

Merged
merged 1 commit into from
Jan 19, 2024
Merged

Conversation

GraysonWu
Copy link
Collaborator

  1. Add Discover Node data source.

  2. Remove node_deployment_info from Host Transport Node. Considering we only support Host Transport Node create from vCenter server managing the ESXi type HostNode and in this case, discovered_node_id is required, so no need to provide node_deployment_info.
    Additionally, this could fix the issue that using node_deployment_info with VDS type host switch, which is the only host switch type supported, will receive error from NSX:

Failed to create HostTransportNode 9756979d-0165-4cc6-93dc-0c30bb6da065:
VDS Configuration is specified for host 9756979d-0165-4cc6-93dc-0c30bb6da065
and its not managed by a vCenter. Please correct TransportNode configuration
or connect the host to a VCenter. (code 9549)

@GraysonWu GraysonWu requested review from ksamoray and annakhm January 18, 2024 06:18
1. Add Discover Node data source.

2. Remove node_deployment_info from Host Transport Node. Considering
we only support Host Transport Node create from vCenter server managing
the ESXi type HostNode and in this case, discovered_node_id is required,
so no need to provide node_deployment_info.
Additionally, this could fix the issue that using node_deployment_info
with VDS type host switch, which is the only host switch type supported,
will receive error from NSX:
```
Failed to create HostTransportNode 9756979d-0165-4cc6-93dc-0c30bb6da065:
VDS Configuration is specified for host 9756979d-0165-4cc6-93dc-0c30bb6da065
and its not managed by a vCenter. Please correct TransportNode configuration
or connect the host to a VCenter. (code 9549)
```

Signed-off-by: graysonwu <[email protected]>
return fmt.Errorf("Error obtaining Discover Node external ID or IP address during read")
} else {
// Get by IP address
objList, err := discoverNodeClient.List(nil, nil, nil, nil, nil, nil, &ipAddress, nil, nil, nil, nil, nil, nil, nil)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel pagination might be required here for big deployments?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe I misunderstood something. Can multiple Nodes share the same IP address? I expect only one or none(NotFound) Node will be returned.

Copy link
Collaborator

Choose a reason for hiding this comment

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

My bad, I didn't realize the List has IP filter already in the call

@GraysonWu GraysonWu merged commit 1c61486 into vmware:master Jan 19, 2024
2 checks passed
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