Skip to content

Commit

Permalink
Update variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
ZsoltFejes committed Dec 11, 2024
1 parent f9ba664 commit 4c12fdc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vra/resource_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,8 @@ func attachAndDetachDisks(ctx context.Context, d *schema.ResourceData, apiClient
Name: diskToAttach["name"].(string),
}

if v_scsi_controller, ok_scsi_controller := diskToAttach["scsi_controller"].(string); ok_scsi_controller && v_scsi_controller != "" {
if v_unit_number, ok_unit_number := diskToAttach["unit_number"].(string); ok_unit_number && v_unit_number != "" {
if vScsiController, okScsiController := diskToAttach["scsi_controller"].(string); okScsiController && vScsiController != "" {
if vUnitNumber, okUnitNumber := diskToAttach["unit_number"].(string); okUnitNumber && vUnitNumber != "" {
diskAttachmentSpecification.DiskAttachmentProperties = map[string]string{"scsiController": diskToAttach["scsi_controller"].(string), "unitNumber": diskToAttach["unit_number"].(string)}
}
}
Expand Down Expand Up @@ -655,8 +655,8 @@ func expandDisks(configDisks []interface{}) []*models.DiskAttachmentSpecificatio
BlockDeviceID: withString(diskMap["block_device_id"].(string)),
}

if v_scsi_controller, ok_scsi_controller := diskMap["scsi_controller"].(string); ok_scsi_controller && v_scsi_controller != "" {
if v_unit_number, ok_unit_number := diskMap["unit_number"].(string); ok_unit_number && v_unit_number != "" {
if vScsiController, okScsiController := diskMap["scsi_controller"].(string); okScsiController && vScsiController != "" {
if vUnitNumber, okUnitNumber := diskMap["unit_number"].(string); okUnitNumber && vUnitNumber != "" {
disk.DiskAttachmentProperties = map[string]string{"scsiController": diskMap["scsi_controller"].(string), "unitNumber": diskMap["unit_number"].(string)}
}
}
Expand Down

0 comments on commit 4c12fdc

Please sign in to comment.