Skip to content

Commit

Permalink
adding timeout attribute and fixing xen for listing in hypervisor isos
Browse files Browse the repository at this point in the history
  • Loading branch information
abhimutant committed Mar 25, 2022
1 parent 0edc793 commit 323769c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion client/foundation/foundation_structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ type NodeNetworkDetail struct {

//Node network details api input
type NodeNetworkDetailsInput struct {
Nodes []NodeIpv6Input `json:"nodes"`
Nodes []NodeIpv6Input `json:"nodes"`
Timeout string `json:"timeout,omitempty"`
}

//Node ipv6 details for node network details api
Expand Down
2 changes: 1 addition & 1 deletion nutanix/data_source_foundation_hypervisor_isos.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func dataSourceFoundationHypervisorIsosRead(ctx context.Context, d *schema.Resou
if err := d.Set("linux", flattenHypervisorIsos(resp.Linux)); err != nil {
return diag.FromErr(err)
}
if err := d.Set("xen", flattenHypervisorIsos(resp.Linux)); err != nil {
if err := d.Set("xen", flattenHypervisorIsos(resp.Xen)); err != nil {
return diag.FromErr(err)
}

Expand Down
8 changes: 8 additions & 0 deletions nutanix/data_source_foundation_node_network_details.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ func dataSourceNodeNetworkDetails() *schema.Resource {
Required: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"timeout": {
Type: schema.TypeString,
Optional: true,
},
"nodes": {
Type: schema.TypeList,
Computed: true,
Expand Down Expand Up @@ -105,6 +109,10 @@ func dataSourceNodeNetworkDetailsRead(ctx context.Context, d *schema.ResourceDat
for _, val := range ipv6Addresses {
input.Nodes = append(input.Nodes, foundation.NodeIpv6Input{Ipv6Address: *val})
}
tout, ok := d.GetOk("timeout")
if ok {
input.Timeout = (tout.(string))
}

resp, err := conn.Networking.NodeNetworkDetails(ctx, input)
if err != nil {
Expand Down

0 comments on commit 323769c

Please sign in to comment.