Skip to content

Commit

Permalink
Revert "Fixed a bug causing backup module not to find a virtual disk …
Browse files Browse the repository at this point in the history
…after running inventory"
  • Loading branch information
pbesret authored Feb 8, 2024
1 parent a55bc30 commit fc3631d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 109 deletions.
6 changes: 0 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
## 0.12.4-rc.2 (February 8th, 2024)

BUG FIXES :

* Fixed a bug causing backup module not to find the virtual disk after running hypervisor inventory.

## 0.12.4-rc.1 (February 2nd, 2024)

BUG FIXED :
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/compute_datastore.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ data "cloudtemple_compute_datastore" "name" {
- `hosts_names` (List of String)
- `hosts_number` (Number)
- `id` (String) The ID of this resource.
- `maintenance_status` (String)
- `maintenance_status` (Boolean)
- `max_capacity` (Number)
- `moref` (String)
- `type` (String)
Expand Down
98 changes: 0 additions & 98 deletions internal/client/backup_virtual_disk.go

This file was deleted.

2 changes: 1 addition & 1 deletion internal/client/compute_datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Datastore struct {
MaxCapacity int `terraform:"max_capacity"`
FreeCapacity int `terraform:"free_capacity"`
Accessible int `terraform:"accessible"`
MaintenanceStatus string `terraform:"maintenance_status"`
MaintenanceStatus bool `terraform:"maintenance_status"`
UniqueId string `terraform:"unique_id"`
MachineManagerId string `terraform:"machine_manager_id"`
Type string `terraform:"type"`
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/data_source_compute_datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func dataSourceDatastore() *schema.Resource {
Computed: true,
},
"maintenance_status": {
Type: schema.TypeString,
Type: schema.TypeBool,
Computed: true,
},
"unique_id": {
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/resource_compute_virtual_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ func computeVirtualDiskCreate(ctx context.Context, d *schema.ResourceData, meta
return diag.Errorf("failed to update catalog, %s", err)
}

_, err = c.Backup().VirtualDisk().WaitForInventory(ctx, d.Id(), getWaiterOptions(ctx))
_, err = c.Backup().Job().WaitForCompletion(ctx, job.ID, getWaiterOptions(ctx))
if err != nil {
return diag.Errorf("failed to find virtual disk in backup inventory : %s", err)
return diag.Errorf("failed to update catalog, %s", err)
}

slaPolicies := []string{}
Expand Down

0 comments on commit fc3631d

Please sign in to comment.