From a9a7e8a1b5d4076ea23c1d94ee3d4ab9f8660324 Mon Sep 17 00:00:00 2001 From: Kobi Samoray Date: Wed, 13 Sep 2023 21:30:20 +0300 Subject: [PATCH] Rename pnics to pnic To match the naming convention rename pnics (plural) ->pnic (singular) Signed-off-by: Kobi Samoray --- nsxt/resource_nsxt_transport_node.go | 6 +++--- website/docs/d/transport_node_realization.html.markdown | 2 +- website/docs/r/transport_node.html.markdown | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nsxt/resource_nsxt_transport_node.go b/nsxt/resource_nsxt_transport_node.go index ff885047a..f38b7a6c7 100644 --- a/nsxt/resource_nsxt_transport_node.go +++ b/nsxt/resource_nsxt_transport_node.go @@ -626,7 +626,7 @@ func getStandardHostSwitchSchema() *schema.Schema { Description: "Migrate any pnics which are in use", Optional: true, }, - "pnics": { + "pnic": { Type: schema.TypeList, Optional: true, Description: "Physical NICs connected to the host switch", @@ -1378,7 +1378,7 @@ func getHostSwitchSpecFromSchema(d *schema.ResourceData) (*data.StructValue, err iPAssignmentSpec, err := getIPAssignmentFromSchema(swData["ip_assignment"]) isMigratePNics := swData["is_migrate_pnics"].(bool) var pNics []model.Pnic - for _, p := range swData["pnics"].([]interface{}) { + for _, p := range swData["pnic"].([]interface{}) { data := p.(map[string]interface{}) deviceName := data["device_name"].(string) uplinkName := data["uplink_name"].(string) @@ -1797,7 +1797,7 @@ func setHostSwitchSpecInSchema(d *schema.ResourceData, spec *data.StructValue) e e["uplink_name"] = pnic.UplinkName pnics = append(pnics, e) } - elem["pnics"] = pnics + elem["pnic"] = pnics elem["portgroup_transport_zone_id"] = sw.PortgroupTransportZoneId var tnpSubConfig []map[string]interface{} for _, tnpsc := range sw.TransportNodeProfileSubConfigs { diff --git a/website/docs/d/transport_node_realization.html.markdown b/website/docs/d/transport_node_realization.html.markdown index d9fdd52ae..d3dc83de1 100644 --- a/website/docs/d/transport_node_realization.html.markdown +++ b/website/docs/d/transport_node_realization.html.markdown @@ -27,7 +27,7 @@ resource "nsxt_transport_node" "test" { } host_switch_profile_id = [nsxt_uplink_host_switch_profile.hsw_profile1.id] is_migrate_pnics = false - pnics { + pnic { device_name = "fp-eth0" uplink_name = "uplink1" } diff --git a/website/docs/r/transport_node.html.markdown b/website/docs/r/transport_node.html.markdown index d8c619521..3f8d7d914 100644 --- a/website/docs/r/transport_node.html.markdown +++ b/website/docs/r/transport_node.html.markdown @@ -28,7 +28,7 @@ resource "nsxt_transport_node" "test" { } host_switch_profile_id = [nsxt_uplink_host_switch_profile.hsw_profile1.id] is_migrate_pnics = false - pnics { + pnic { device_name = "fp-eth0" uplink_name = "uplink1" } @@ -91,7 +91,7 @@ The following arguments are supported: * `mac` - (Required) MAC address. * `static_ip_pool_id` - (Optional) IP assignment specification for Static IP Pool. * `is_migrate_pnics` - (Optional) Migrate any pnics which are in use. - * `pnics` - (Optional) Physical NICs connected to the host switch. + * `pnic` - (Optional) Physical NICs connected to the host switch. * `device_name` - (Required) Device name or key. * `uplink_name` - (Required) Uplink name for this Pnic. * `portgroup_transport_zone_id` - (Optional) Transport Zone ID representing the DVS used in NSX on DVPG.