Skip to content

Commit

Permalink
Rename pnics to pnic
Browse files Browse the repository at this point in the history
To match the naming convention rename pnics (plural) ->pnic (singular)

Signed-off-by: Kobi Samoray <[email protected]>
  • Loading branch information
ksamoray committed Sep 13, 2023
1 parent c40cc41 commit a9a7e8a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions nsxt/resource_nsxt_transport_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/transport_node_realization.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/transport_node.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit a9a7e8a

Please sign in to comment.