Skip to content

Commit

Permalink
removing unnecessary brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
abhimutant committed Apr 14, 2022
1 parent dc1310d commit c5afffe
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 35 deletions.
5 changes: 3 additions & 2 deletions nutanix/data_source_nutanix_foundation_central_api_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ func dataSourceNutanixFCAPIKeys() *schema.Resource {
Required: true,
},
"api_key": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
Sensitive: true,
},
"current_time": {
Type: schema.TypeString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,108 +174,108 @@ func dataSourceFCImagedNodeDetailsRead(ctx context.Context, d *schema.ResourceDa
return diag.FromErr(err)
}

if err := d.Set("aos_version", (res.AosVersion)); err != nil {
if err := d.Set("aos_version", res.AosVersion); err != nil {
return diag.FromErr(err)
}
if err := d.Set("api_key_uuid", (res.APIKeyUUID)); err != nil {
if err := d.Set("api_key_uuid", res.APIKeyUUID); err != nil {
return diag.FromErr(err)
}
if err := d.Set("available", (res.Available)); err != nil {
if err := d.Set("available", res.Available); err != nil {
return diag.FromErr(err)
}
if err := d.Set("block_serial", (res.BlockSerial)); err != nil {
if err := d.Set("block_serial", res.BlockSerial); err != nil {
return diag.FromErr(err)
}
if err := d.Set("created_timestamp", (res.CreatedTimestamp)); err != nil {
if err := d.Set("created_timestamp", res.CreatedTimestamp); err != nil {
return diag.FromErr(err)
}
if err := d.Set("current_time", (res.CurrentTime)); err != nil {
if err := d.Set("current_time", res.CurrentTime); err != nil {
return diag.FromErr(err)
}
if err := d.Set("cvm_gateway", (res.CvmGateway)); err != nil {
if err := d.Set("cvm_gateway", res.CvmGateway); err != nil {
return diag.FromErr(err)
}
if err := d.Set("cvm_ip", (res.CvmIP)); err != nil {
if err := d.Set("cvm_ip", res.CvmIP); err != nil {
return diag.FromErr(err)
}
if err := d.Set("cvm_ipv6", (res.CvmIpv6)); err != nil {
if err := d.Set("cvm_ipv6", res.CvmIpv6); err != nil {
return diag.FromErr(err)
}
if err := d.Set("cvm_netmask", (res.CvmNetmask)); err != nil {
if err := d.Set("cvm_netmask", res.CvmNetmask); err != nil {
return diag.FromErr(err)
}
if err := d.Set("cvm_up", (res.CvmUp)); err != nil {
if err := d.Set("cvm_up", res.CvmUp); err != nil {
return diag.FromErr(err)
}
if err := d.Set("cvm_uuid", (res.CvmUUID)); err != nil {
if err := d.Set("cvm_uuid", res.CvmUUID); err != nil {
return diag.FromErr(err)
}
if err := d.Set("cvm_vlan_id", (res.CvmVlanID)); err != nil {
if err := d.Set("cvm_vlan_id", res.CvmVlanID); err != nil {
return diag.FromErr(err)
}
if err := d.Set("foundation_version", (res.FoundationVersion)); err != nil {
if err := d.Set("foundation_version", res.FoundationVersion); err != nil {
return diag.FromErr(err)
}
if err := d.Set("hypervisor_gateway", (res.HypervisorGateway)); err != nil {
if err := d.Set("hypervisor_gateway", res.HypervisorGateway); err != nil {
return diag.FromErr(err)
}
if err := d.Set("hypervisor_hostname", (res.HypervisorHostname)); err != nil {
if err := d.Set("hypervisor_hostname", res.HypervisorHostname); err != nil {
return diag.FromErr(err)
}
if err := d.Set("hypervisor_ip", (res.HypervisorIP)); err != nil {
if err := d.Set("hypervisor_ip", res.HypervisorIP); err != nil {
return diag.FromErr(err)
}
if err := d.Set("hypervisor_netmask", (res.HypervisorNetmask)); err != nil {
if err := d.Set("hypervisor_netmask", res.HypervisorNetmask); err != nil {
return diag.FromErr(err)
}
if err := d.Set("hypervisor_type", (res.HypervisorType)); err != nil {
if err := d.Set("hypervisor_type", res.HypervisorType); err != nil {
return diag.FromErr(err)
}
if err := d.Set("hypervisor_version", (res.HypervisorVersion)); err != nil {
if err := d.Set("hypervisor_version", res.HypervisorVersion); err != nil {
return diag.FromErr(err)
}
if err := d.Set("imaged_cluster_uuid", (res.ImagedClusterUUID)); err != nil {
if err := d.Set("imaged_cluster_uuid", res.ImagedClusterUUID); err != nil {
return diag.FromErr(err)
}
if err := d.Set("ipmi_gateway", (res.IpmiGateway)); err != nil {
if err := d.Set("ipmi_gateway", res.IpmiGateway); err != nil {
return diag.FromErr(err)
}
if err := d.Set("ipmi_ip", (res.IpmiIP)); err != nil {
if err := d.Set("ipmi_ip", res.IpmiIP); err != nil {
return diag.FromErr(err)
}
if err := d.Set("ipmi_netmask", (res.IpmiNetmask)); err != nil {
if err := d.Set("ipmi_netmask", res.IpmiNetmask); err != nil {
return diag.FromErr(err)
}
if err := d.Set("ipv6_interface", (res.Ipv6Interface)); err != nil {
if err := d.Set("ipv6_interface", res.Ipv6Interface); err != nil {
return diag.FromErr(err)
}
if err := d.Set("model", (res.Model)); err != nil {
if err := d.Set("model", res.Model); err != nil {
return diag.FromErr(err)
}
if err := d.Set("node_position", (res.NodePosition)); err != nil {
if err := d.Set("node_position", res.NodePosition); err != nil {
return diag.FromErr(err)
}
if err := d.Set("node_serial", (res.NodeSerial)); err != nil {
if err := d.Set("node_serial", res.NodeSerial); err != nil {
return diag.FromErr(err)
}
if err := d.Set("node_state", (res.NodeState)); err != nil {
if err := d.Set("node_state", res.NodeState); err != nil {
return diag.FromErr(err)
}
if err := d.Set("node_type", (res.NodeType)); err != nil {
if err := d.Set("node_type", res.NodeType); err != nil {
return diag.FromErr(err)
}
if err := d.Set("object_version", (res.ObjectVersion)); err != nil {
if err := d.Set("object_version", res.ObjectVersion); err != nil {
return diag.FromErr(err)
}
if err := d.Set(("imaged_node_uuid"), res.ImagedNodeUUID); err != nil {
return diag.FromErr(err)
}

if err := d.Set(("latest_hb_ts_list"), (utils.StringValueSlice(res.LatestHbTSList))); err != nil {
if err := d.Set(("latest_hb_ts_list"), utils.StringValueSlice(res.LatestHbTSList)); err != nil {
return diag.FromErr(err)
}

if err := d.Set(("hardware_attributes"), (flattenHardwareAttributes(res.HardwareAttributes))); err != nil {
if err := d.Set(("hardware_attributes"), flattenHardwareAttributes(res.HardwareAttributes)); err != nil {
return diag.FromErr(err)
}

Expand Down

0 comments on commit c5afffe

Please sign in to comment.