Skip to content

Commit

Permalink
Merge pull request #987 from vmware/rename-profile
Browse files Browse the repository at this point in the history
Rename uplink host switch profile for consistency
  • Loading branch information
ksamoray authored Oct 4, 2023
2 parents 7e25a0d + 3364c29 commit 3b1a538
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ func dataSourceNsxtUplinkHostSwitchProfileRead(d *schema.ResourceData, m interfa
return nil
}

return fmt.Errorf("UplinkHostSwitchProfile with name '%s' was not found", d.Get("display_name").(string))
return fmt.Errorf("PolicyUplinkHostSwitchProfile with name '%s' was not found", d.Get("display_name").(string))
}
134 changes: 67 additions & 67 deletions nsxt/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,72 +231,72 @@ func Provider() *schema.Provider {
},

DataSourcesMap: map[string]*schema.Resource{
"nsxt_provider_info": dataSourceNsxtProviderInfo(),
"nsxt_transport_zone": dataSourceNsxtTransportZone(),
"nsxt_switching_profile": dataSourceNsxtSwitchingProfile(),
"nsxt_logical_tier0_router": dataSourceNsxtLogicalTier0Router(),
"nsxt_logical_tier1_router": dataSourceNsxtLogicalTier1Router(),
"nsxt_mac_pool": dataSourceNsxtMacPool(),
"nsxt_ns_group": dataSourceNsxtNsGroup(),
"nsxt_ns_groups": dataSourceNsxtNsGroups(),
"nsxt_ns_service": dataSourceNsxtNsService(),
"nsxt_ns_services": dataSourceNsxtNsServices(),
"nsxt_edge_cluster": dataSourceNsxtEdgeCluster(),
"nsxt_certificate": dataSourceNsxtCertificate(),
"nsxt_ip_pool": dataSourceNsxtIPPool(),
"nsxt_firewall_section": dataSourceNsxtFirewallSection(),
"nsxt_management_cluster": dataSourceNsxtManagementCluster(),
"nsxt_policy_edge_cluster": dataSourceNsxtPolicyEdgeCluster(),
"nsxt_policy_edge_node": dataSourceNsxtPolicyEdgeNode(),
"nsxt_policy_tier0_gateway": dataSourceNsxtPolicyTier0Gateway(),
"nsxt_policy_tier1_gateway": dataSourceNsxtPolicyTier1Gateway(),
"nsxt_policy_service": dataSourceNsxtPolicyService(),
"nsxt_policy_realization_info": dataSourceNsxtPolicyRealizationInfo(),
"nsxt_policy_segment_realization": dataSourceNsxtPolicySegmentRealization(),
"nsxt_policy_transport_zone": dataSourceNsxtPolicyTransportZone(),
"nsxt_policy_ip_discovery_profile": dataSourceNsxtPolicyIPDiscoveryProfile(),
"nsxt_policy_spoofguard_profile": dataSourceNsxtPolicySpoofGuardProfile(),
"nsxt_policy_qos_profile": dataSourceNsxtPolicyQosProfile(),
"nsxt_policy_ipv6_ndra_profile": dataSourceNsxtPolicyIpv6NdraProfile(),
"nsxt_policy_ipv6_dad_profile": dataSourceNsxtPolicyIpv6DadProfile(),
"nsxt_policy_gateway_qos_profile": dataSourceNsxtPolicyGatewayQosProfile(),
"nsxt_policy_segment_security_profile": dataSourceNsxtPolicySegmentSecurityProfile(),
"nsxt_policy_mac_discovery_profile": dataSourceNsxtPolicyMacDiscoveryProfile(),
"nsxt_policy_vm": dataSourceNsxtPolicyVM(),
"nsxt_policy_vms": dataSourceNsxtPolicyVMs(),
"nsxt_policy_lb_app_profile": dataSourceNsxtPolicyLBAppProfile(),
"nsxt_policy_lb_client_ssl_profile": dataSourceNsxtPolicyLBClientSslProfile(),
"nsxt_policy_lb_server_ssl_profile": dataSourceNsxtPolicyLBServerSslProfile(),
"nsxt_policy_lb_monitor": dataSourceNsxtPolicyLBMonitor(),
"nsxt_policy_certificate": dataSourceNsxtPolicyCertificate(),
"nsxt_policy_lb_persistence_profile": dataSourceNsxtPolicyLbPersistenceProfile(),
"nsxt_policy_vni_pool": dataSourceNsxtPolicyVniPool(),
"nsxt_policy_ip_block": dataSourceNsxtPolicyIPBlock(),
"nsxt_policy_ip_pool": dataSourceNsxtPolicyIPPool(),
"nsxt_policy_site": dataSourceNsxtPolicySite(),
"nsxt_policy_gateway_policy": dataSourceNsxtPolicyGatewayPolicy(),
"nsxt_policy_security_policy": dataSourceNsxtPolicySecurityPolicy(),
"nsxt_policy_group": dataSourceNsxtPolicyGroup(),
"nsxt_policy_context_profile": dataSourceNsxtPolicyContextProfile(),
"nsxt_policy_dhcp_server": dataSourceNsxtPolicyDhcpServer(),
"nsxt_policy_bfd_profile": dataSourceNsxtPolicyBfdProfile(),
"nsxt_policy_intrusion_service_profile": dataSourceNsxtPolicyIntrusionServiceProfile(),
"nsxt_policy_lb_service": dataSourceNsxtPolicyLbService(),
"nsxt_policy_gateway_locale_service": dataSourceNsxtPolicyGatewayLocaleService(),
"nsxt_policy_bridge_profile": dataSourceNsxtPolicyBridgeProfile(),
"nsxt_policy_ipsec_vpn_local_endpoint": dataSourceNsxtPolicyIPSecVpnLocalEndpoint(),
"nsxt_policy_ipsec_vpn_service": dataSourceNsxtPolicyIPSecVpnService(),
"nsxt_policy_l2_vpn_service": dataSourceNsxtPolicyL2VpnService(),
"nsxt_policy_segment": dataSourceNsxtPolicySegment(),
"nsxt_policy_project": dataSourceNsxtPolicyProject(),
"nsxt_policy_gateway_prefix_list": dataSourceNsxtPolicyGatewayPrefixList(),
"nsxt_policy_gateway_route_map": dataSourceNsxtPolicyGatewayRouteMap(),
"nsxt_uplink_host_switch_profile": dataSourceNsxtUplinkHostSwitchProfile(),
"nsxt_compute_manager": dataSourceNsxtComputeManager(),
"nsxt_transport_node_realization": dataSourceNsxtTransportNodeRealization(),
"nsxt_failure_domain": dataSourceNsxtFailureDomain(),
"nsxt_compute_collection": dataSourceNsxtComputeCollection(),
"nsxt_compute_manager_realization": dataSourceNsxtComputeManagerRealization(),
"nsxt_provider_info": dataSourceNsxtProviderInfo(),
"nsxt_transport_zone": dataSourceNsxtTransportZone(),
"nsxt_switching_profile": dataSourceNsxtSwitchingProfile(),
"nsxt_logical_tier0_router": dataSourceNsxtLogicalTier0Router(),
"nsxt_logical_tier1_router": dataSourceNsxtLogicalTier1Router(),
"nsxt_mac_pool": dataSourceNsxtMacPool(),
"nsxt_ns_group": dataSourceNsxtNsGroup(),
"nsxt_ns_groups": dataSourceNsxtNsGroups(),
"nsxt_ns_service": dataSourceNsxtNsService(),
"nsxt_ns_services": dataSourceNsxtNsServices(),
"nsxt_edge_cluster": dataSourceNsxtEdgeCluster(),
"nsxt_certificate": dataSourceNsxtCertificate(),
"nsxt_ip_pool": dataSourceNsxtIPPool(),
"nsxt_firewall_section": dataSourceNsxtFirewallSection(),
"nsxt_management_cluster": dataSourceNsxtManagementCluster(),
"nsxt_policy_edge_cluster": dataSourceNsxtPolicyEdgeCluster(),
"nsxt_policy_edge_node": dataSourceNsxtPolicyEdgeNode(),
"nsxt_policy_tier0_gateway": dataSourceNsxtPolicyTier0Gateway(),
"nsxt_policy_tier1_gateway": dataSourceNsxtPolicyTier1Gateway(),
"nsxt_policy_service": dataSourceNsxtPolicyService(),
"nsxt_policy_realization_info": dataSourceNsxtPolicyRealizationInfo(),
"nsxt_policy_segment_realization": dataSourceNsxtPolicySegmentRealization(),
"nsxt_policy_transport_zone": dataSourceNsxtPolicyTransportZone(),
"nsxt_policy_ip_discovery_profile": dataSourceNsxtPolicyIPDiscoveryProfile(),
"nsxt_policy_spoofguard_profile": dataSourceNsxtPolicySpoofGuardProfile(),
"nsxt_policy_qos_profile": dataSourceNsxtPolicyQosProfile(),
"nsxt_policy_ipv6_ndra_profile": dataSourceNsxtPolicyIpv6NdraProfile(),
"nsxt_policy_ipv6_dad_profile": dataSourceNsxtPolicyIpv6DadProfile(),
"nsxt_policy_gateway_qos_profile": dataSourceNsxtPolicyGatewayQosProfile(),
"nsxt_policy_segment_security_profile": dataSourceNsxtPolicySegmentSecurityProfile(),
"nsxt_policy_mac_discovery_profile": dataSourceNsxtPolicyMacDiscoveryProfile(),
"nsxt_policy_vm": dataSourceNsxtPolicyVM(),
"nsxt_policy_vms": dataSourceNsxtPolicyVMs(),
"nsxt_policy_lb_app_profile": dataSourceNsxtPolicyLBAppProfile(),
"nsxt_policy_lb_client_ssl_profile": dataSourceNsxtPolicyLBClientSslProfile(),
"nsxt_policy_lb_server_ssl_profile": dataSourceNsxtPolicyLBServerSslProfile(),
"nsxt_policy_lb_monitor": dataSourceNsxtPolicyLBMonitor(),
"nsxt_policy_certificate": dataSourceNsxtPolicyCertificate(),
"nsxt_policy_lb_persistence_profile": dataSourceNsxtPolicyLbPersistenceProfile(),
"nsxt_policy_vni_pool": dataSourceNsxtPolicyVniPool(),
"nsxt_policy_ip_block": dataSourceNsxtPolicyIPBlock(),
"nsxt_policy_ip_pool": dataSourceNsxtPolicyIPPool(),
"nsxt_policy_site": dataSourceNsxtPolicySite(),
"nsxt_policy_gateway_policy": dataSourceNsxtPolicyGatewayPolicy(),
"nsxt_policy_security_policy": dataSourceNsxtPolicySecurityPolicy(),
"nsxt_policy_group": dataSourceNsxtPolicyGroup(),
"nsxt_policy_context_profile": dataSourceNsxtPolicyContextProfile(),
"nsxt_policy_dhcp_server": dataSourceNsxtPolicyDhcpServer(),
"nsxt_policy_bfd_profile": dataSourceNsxtPolicyBfdProfile(),
"nsxt_policy_intrusion_service_profile": dataSourceNsxtPolicyIntrusionServiceProfile(),
"nsxt_policy_lb_service": dataSourceNsxtPolicyLbService(),
"nsxt_policy_gateway_locale_service": dataSourceNsxtPolicyGatewayLocaleService(),
"nsxt_policy_bridge_profile": dataSourceNsxtPolicyBridgeProfile(),
"nsxt_policy_ipsec_vpn_local_endpoint": dataSourceNsxtPolicyIPSecVpnLocalEndpoint(),
"nsxt_policy_ipsec_vpn_service": dataSourceNsxtPolicyIPSecVpnService(),
"nsxt_policy_l2_vpn_service": dataSourceNsxtPolicyL2VpnService(),
"nsxt_policy_segment": dataSourceNsxtPolicySegment(),
"nsxt_policy_project": dataSourceNsxtPolicyProject(),
"nsxt_policy_gateway_prefix_list": dataSourceNsxtPolicyGatewayPrefixList(),
"nsxt_policy_gateway_route_map": dataSourceNsxtPolicyGatewayRouteMap(),
"nsxt_policy_uplink_host_switch_profile": dataSourceNsxtUplinkHostSwitchProfile(),
"nsxt_compute_manager": dataSourceNsxtComputeManager(),
"nsxt_transport_node_realization": dataSourceNsxtTransportNodeRealization(),
"nsxt_failure_domain": dataSourceNsxtFailureDomain(),
"nsxt_compute_collection": dataSourceNsxtComputeCollection(),
"nsxt_compute_manager_realization": dataSourceNsxtComputeManagerRealization(),
},

ResourcesMap: map[string]*schema.Resource{
Expand Down Expand Up @@ -426,7 +426,7 @@ func Provider() *schema.Provider {
"nsxt_edge_cluster": resourceNsxtEdgeCluster(),
"nsxt_compute_manager": resourceNsxtComputeManager(),
"nsxt_manager_cluster": resourceNsxtManagerCluster(),
"nsxt_uplink_host_switch_profile": resourceNsxtUplinkHostSwitchProfile(),
"nsxt_policy_uplink_host_switch_profile": resourceNsxtUplinkHostSwitchProfile(),
"nsxt_transport_node": resourceNsxtTransportNode(),
"nsxt_failure_domain": resourceNsxtFailureDomain(),
"nsxt_cluster_virtual_ip": resourceNsxtClusterVirualIP(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ var accTestUplinkHostSwitchProfileUpdateAttributes = map[string]string{
"named_teaming_policy": "FAILOVER_ORDER",
}

func TestAccResourceNsxtUplinkHostSwitchProfile_basic(t *testing.T) {
testResourceName := "nsxt_uplink_host_switch_profile.test"
func TestAccResourceNsxtPolicyUplinkHostSwitchProfile_basic(t *testing.T) {
testResourceName := "nsxt_policy_uplink_host_switch_profile.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() {
Expand Down Expand Up @@ -180,8 +180,8 @@ func TestAccResourceNsxtUplinkHostSwitchProfile_basic(t *testing.T) {
})
}

func TestAccResourceNsxtUplinkHostSwitchProfile_importBasic(t *testing.T) {
testResourceName := "nsxt_uplink_host_switch_profile.test"
func TestAccResourceNsxtPolicyUplinkHostSwitchProfile_importBasic(t *testing.T) {
testResourceName := "nsxt_policy_uplink_host_switch_profile.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() {
Expand Down Expand Up @@ -261,7 +261,7 @@ func testAccNsxtUplinkHostSwitchProfileTemplate(createFlow bool) string {
attrMap = accTestUplinkHostSwitchProfileUpdateAttributes
}
return fmt.Sprintf(`
resource "nsxt_uplink_host_switch_profile" "test" {
resource "nsxt_policy_uplink_host_switch_profile" "test" {
display_name = "%s"
description = "%s"
Expand Down Expand Up @@ -305,15 +305,15 @@ resource "nsxt_uplink_host_switch_profile" "test" {
}
}
data "nsxt_uplink_host_switch_profile" "test" {
data "nsxt_policy_uplink_host_switch_profile" "test" {
display_name = "%s"
depends_on = [nsxt_uplink_host_switch_profile.test]
depends_on = [nsxt_policy_uplink_host_switch_profile.test]
}`, attrMap["display_name"], attrMap["description"], attrMap["mtu"], attrMap["transport_vlan"], attrMap["overlay_encap"], attrMap["lag_name"], attrMap["lag_load_balance_algorithm"], attrMap["lag_mode"], attrMap["lag_number_of_uplinks"], attrMap["lag_timeout_type"], attrMap["teaming_al_uplink_name"], attrMap["teaming_al_uplink_type"], attrMap["teaming_sl_uplink_name"], attrMap["teaming_sl_uplink_type"], attrMap["teaming_policy"], attrMap["named_teaming_al_uplink_name"], attrMap["named_teaming_al_uplink_type"], attrMap["named_teaming_sl_uplink_name"], attrMap["named_teaming_sl_uplink_type"], attrMap["named_teaming_policy"], attrMap["named_teaming_name"], attrMap["display_name"])
}

func testAccNsxtUplinkHostSwitchProfileMinimalistic() string {
return fmt.Sprintf(`
resource "nsxt_uplink_host_switch_profile" "test" {
resource "nsxt_policy_uplink_host_switch_profile" "test" {
display_name = "%s"
teaming {
active {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
subcategory: "Beta"
layout: "nsxt"
page_title: "NSXT: nsxt_uplink_host_switch_profile"
description: A host switch profile data source.
page_title: "NSXT: nsxt_policy_uplink_host_switch_profile"
description: An uplink host switch profile data source.
---

# nsxt_uplink_host_switch_profile
# nsxt_policy_uplink_host_switch_profile

This data source provides information about uplink host switch profile configured on NSX.
This data source is applicable to NSX Policy Manager.

## Example Usage

```hcl
data "nsxt_uplink_host_switch_profile" "uplink_host_switch_profile" {
data "nsxt_policy_uplink_host_switch_profile" "uplink_host_switch_profile" {
display_name = "uplink_host_switch_profile1"
}
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
subcategory: "Beta"
layout: "nsxt"
page_title: "NSXT: nsxt_uplink_host_switch_profile"
page_title: "NSXT: nsxt_policy_uplink_host_switch_profile"
description: A resource to configure a uplink host switch profile in NSX Policy.
---

# nsxt_uplink_host_switch_profile
# nsxt_policy_uplink_host_switch_profile

This resource provides a method for the management of a uplink host switch profile which can be used within NSX Policy.

Expand All @@ -14,7 +14,7 @@ This resource is applicable to NSX Policy Manager.
## Example Usage

```hcl
resource "nsxt_uplink_host_switch_profile" "uplink_host_switch_profile" {
resource "nsxt_policy_uplink_host_switch_profile" "uplink_host_switch_profile" {
description = "Uplink host switch profile provisioned by Terraform"
display_name = "uplink_host_switch_profile"
Expand Down

0 comments on commit 3b1a538

Please sign in to comment.