Skip to content

Commit

Permalink
Add device_channel_name to the network_interfaces netscaler#79
Browse files Browse the repository at this point in the history
  • Loading branch information
rein-tollevik committed Nov 16, 2024
1 parent 8e405aa commit af10ef3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/resources/provision_vpx.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,21 @@ resource "netscalersdx_provision_vpx" "device1" {
network_interfaces = [
{
port_name = "LA/1"
device_channel_name = "LA/1"
mac_mode = "default"
receiveuntagged = true
vlan_whitelist_array = ["2", "3", "5"]
},
{
port_name = "LA/2"
device_channel_name = "LA/2"
mac_mode = "default"
receiveuntagged = true
vlan_whitelist_array = ["4000", "4001", "4005"] // individual vlan id (Ascending order)
},
{
port_name = "LA/3"
device_channel_name = "LA/3"
mac_mode = "default"
receiveuntagged = true
vlan_whitelist_array = ["100-105", "4000-4004"] // maintain the order as well (Ascending order)
Expand Down Expand Up @@ -195,6 +198,7 @@ Required:

Optional:

- `device_channel_name` (String) The name of the device channel. Must be the same as the `port_name` value when a channel network interface is used, or the interface will start "flapping" if the VPX is reprovisioned by a change in the cpu or memory configuration.
- `gateway` (String) Gateway
- `id` (String) Id
- `interface_name` (String) Interface Name
Expand Down
6 changes: 6 additions & 0 deletions internal/ns/resource_provision_vpx.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,11 @@ func (r *provisionVpxResource) Schema(ctx context.Context, req resource.SchemaRe
Description: "Network Interfaces.",
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"device_channel_name": schema.StringAttribute{
Optional: true,
Description: "Device channel name of the interface on the host machine.",
MarkdownDescription: "Device channel name of the interface on the host machine.",
},
"gateway": schema.StringAttribute{
Optional: true,
Description: "Gateway",
Expand Down Expand Up @@ -1362,6 +1367,7 @@ func (r *provisionVpxResource) Read(ctx context.Context, req resource.ReadReques
func networkinterfaceTonetworkinterfaceTF(nif []interface{}, stateNetworkInterface basetypes.ListValue, ctx context.Context) basetypes.ListValue {
var nifSchemaAttributes = []string{
"port_name",
"device_channel_name",
"name_server",
"is_mgmt_ifc",
"gateway",
Expand Down

0 comments on commit af10ef3

Please sign in to comment.