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 proper host_switch_profile type with id, while setting in hostswitch #1442

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

ksamoray
Copy link
Collaborator

The code assumes that specified host_switch_profile is always of type uplink which is incorrect.

Fixes: #1441

@@ -29,47 +31,56 @@ var ipAssignmentTypes = []string{
"static_ip_pool",
}

var mpTypeFromPolicyType = map[string]string{
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the code assumes MP and Policy values are the same, do we need this translation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We query the host switch profile type using this policy API which returns policy types, e.g PolicyUplinkHostSwitchProfile.
The switch type consumes HostSwitchSpec type has host_switch_profile_id attribute which is a string - which is enumerated by HostSwitchProfileType that has no "Policy" prefix to its values. Hence translation is required even though it's not MP.
However mpTypeFromPolicyType name is bad - it's just HostSwitchProfileType translation and not any Policy->MP translation. I'll rename this var.

The code assumes that specified host_switch_profile is always of type uplink which is incorrect.

Fixes: vmware#1441
Signed-off-by: Kobi Samoray <kobi.samoray@broadcom.com>
@ksamoray ksamoray merged commit f74a4c4 into vmware:master Oct 29, 2024
3 checks passed
@ksamoray ksamoray deleted the vtep_ha_fix branch October 29, 2024 09:16
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.

Cannot use nsxt_policy_vtep_ha_host_switch_profile in nsxt_policy_host_transport_node_profile
2 participants