diff --git a/CHANGELOG.md b/CHANGELOG.md index f7b2b43..3d51c21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,12 @@ -### Version 3.4.1 +### Version 3.4.2 -### Features +### Bug fixes -- Add the affinity_label field into the kvmvm resource -- Add affinity_rules blocks into the kvmvm resource -- Add anti-affinity_rules blocks into the kvmvm resource -- Update samples for the kvmvm resource +- Change field type size_used from int to float in: + - resource decort_kvmvm + - resource decort_disk + - data source decort_kvmvm + - data source decort_disk + - data source decort_disk_list + - data source decort_disk_list-unattached +- Models of the resources diff --git a/internal/service/cloudapi/disks/data_source_disk.go b/internal/service/cloudapi/disks/data_source_disk.go index 2fd0276..cfd9c00 100644 --- a/internal/service/cloudapi/disks/data_source_disk.go +++ b/internal/service/cloudapi/disks/data_source_disk.go @@ -385,7 +385,7 @@ func dataSourceDiskSchemaMake() map[string]*schema.Schema { Description: "Size in GB", }, "size_used": { - Type: schema.TypeInt, + Type: schema.TypeFloat, Computed: true, Description: "Number of used space, in GB", }, diff --git a/internal/service/cloudapi/disks/data_source_disk_list.go b/internal/service/cloudapi/disks/data_source_disk_list.go index 746ad29..c211589 100644 --- a/internal/service/cloudapi/disks/data_source_disk_list.go +++ b/internal/service/cloudapi/disks/data_source_disk_list.go @@ -481,7 +481,7 @@ func dataSourceDiskListSchemaMake() map[string]*schema.Schema { Description: "Size in GB", }, "size_used": { - Type: schema.TypeInt, + Type: schema.TypeFloat, Computed: true, Description: "Number of used space, in GB", }, diff --git a/internal/service/cloudapi/disks/data_source_disk_list_unattached.go b/internal/service/cloudapi/disks/data_source_disk_list_unattached.go index 13ea8a1..574c8af 100644 --- a/internal/service/cloudapi/disks/data_source_disk_list_unattached.go +++ b/internal/service/cloudapi/disks/data_source_disk_list_unattached.go @@ -415,7 +415,7 @@ func dataSourceDiskListUnattachedSchemaMake() map[string]*schema.Schema { Description: "Size in GB", }, "size_used": { - Type: schema.TypeInt, + Type: schema.TypeFloat, Computed: true, Description: "Number of used space, in GB", }, diff --git a/internal/service/cloudapi/disks/models.go b/internal/service/cloudapi/disks/models.go index 5cd3333..8c39cd2 100644 --- a/internal/service/cloudapi/disks/models.go +++ b/internal/service/cloudapi/disks/models.go @@ -74,7 +74,7 @@ type Disk struct { Shareable bool `json:"shareable"` SepID int `json:"sepId"` // NOTE: absent from compute/get output SizeMax int `json:"sizeMax"` - SizeUsed int `json:"sizeUsed"` // sum over all snapshots of this disk to report total consumed space + SizeUsed float64 `json:"sizeUsed"` // sum over all snapshots of this disk to report total consumed space Snapshots []Snapshot `json:"snapshots"` Status string `json:"status"` TechStatus string `json:"techStatus"` @@ -165,7 +165,7 @@ type Unattached struct { Role string `json:"role"` SepID int `json:"sepId"` SizeMax int `json:"sizeMax"` - SizeUsed int `json:"sizeUsed"` + SizeUsed float64 `json:"sizeUsed"` Snapshots []Snapshot `json:"snapshots"` Status string `json:"status"` TechStatus string `json:"techStatus"` diff --git a/internal/service/cloudapi/disks/resource_disk.go b/internal/service/cloudapi/disks/resource_disk.go index cc8acbe..7599dab 100644 --- a/internal/service/cloudapi/disks/resource_disk.go +++ b/internal/service/cloudapi/disks/resource_disk.go @@ -661,7 +661,7 @@ func resourceDiskSchemaMake() map[string]*schema.Schema { Description: "Type SEP. Defines the type of storage system and contains one of the values set in the cloud platform", }, "size_used": { - Type: schema.TypeInt, + Type: schema.TypeFloat, Computed: true, Description: "Number of used space, in GB", }, diff --git a/internal/service/cloudapi/kvmvm/data_source_compute.go b/internal/service/cloudapi/kvmvm/data_source_compute.go index 7f8fbf5..1fef103 100644 --- a/internal/service/cloudapi/kvmvm/data_source_compute.go +++ b/internal/service/cloudapi/kvmvm/data_source_compute.go @@ -386,7 +386,7 @@ func DataSourceCompute() *schema.Resource { Computed: true, }, "size_used": { - Type: schema.TypeInt, + Type: schema.TypeFloat, Computed: true, }, "pool": { diff --git a/internal/service/cloudapi/kvmvm/models.go b/internal/service/cloudapi/kvmvm/models.go index a510f36..68e85ab 100644 --- a/internal/service/cloudapi/kvmvm/models.go +++ b/internal/service/cloudapi/kvmvm/models.go @@ -74,7 +74,7 @@ type DiskRecord struct { SepID int `json:"sepId"` // NOTE: absent from compute/get output Shareable bool `json:"shareable"` SizeMax int `json:"sizeMax"` - SizeUsed int `json:"sizeUsed"` // sum over all snapshots of this disk to report total consumed space + SizeUsed float64 `json:"sizeUsed"` // sum over all snapshots of this disk to report total consumed space Snapshots []SnapshotRecord `json:"snapshots"` Status string `json:"status"` TechStatus string `json:"techStatus"` diff --git a/internal/service/cloudapi/kvmvm/resource_compute.go b/internal/service/cloudapi/kvmvm/resource_compute.go index 62259ae..8a7f80c 100644 --- a/internal/service/cloudapi/kvmvm/resource_compute.go +++ b/internal/service/cloudapi/kvmvm/resource_compute.go @@ -1005,7 +1005,7 @@ func ResourceComputeSchemaMake() map[string]*schema.Schema { Computed: true, }, "size_used": { - Type: schema.TypeInt, + Type: schema.TypeFloat, Computed: true, }, "pool": { diff --git a/internal/service/cloudbroker/disks/data_source_disk.go b/internal/service/cloudbroker/disks/data_source_disk.go index f5e1982..e8890e3 100644 --- a/internal/service/cloudbroker/disks/data_source_disk.go +++ b/internal/service/cloudbroker/disks/data_source_disk.go @@ -317,7 +317,7 @@ func dataSourceDiskSchemaMake() map[string]*schema.Schema { Computed: true, }, "size_used": { - Type: schema.TypeInt, + Type: schema.TypeFloat, Computed: true, }, "snapshots": { diff --git a/internal/service/cloudbroker/disks/data_source_disk_list.go b/internal/service/cloudbroker/disks/data_source_disk_list.go index efe16b6..c64423c 100644 --- a/internal/service/cloudbroker/disks/data_source_disk_list.go +++ b/internal/service/cloudbroker/disks/data_source_disk_list.go @@ -399,7 +399,7 @@ func dataSourceDiskListSchemaMake() map[string]*schema.Schema { Computed: true, }, "size_used": { - Type: schema.TypeInt, + Type: schema.TypeFloat, Computed: true, }, "snapshots": { diff --git a/internal/service/cloudbroker/disks/models.go b/internal/service/cloudbroker/disks/models.go index b5298e0..82359d6 100644 --- a/internal/service/cloudbroker/disks/models.go +++ b/internal/service/cloudbroker/disks/models.go @@ -72,7 +72,7 @@ type Disk struct { SepType string `json:"sepType"` SepID int `json:"sepId"` // NOTE: absent from compute/get output SizeMax int `json:"sizeMax"` - SizeUsed int `json:"sizeUsed"` // sum over all snapshots of this disk to report total consumed space + SizeUsed float64 `json:"sizeUsed"` // sum over all snapshots of this disk to report total consumed space Snapshots []Snapshot `json:"snapshots"` Status string `json:"status"` TechStatus string `json:"techStatus"` diff --git a/internal/service/cloudbroker/disks/resource_disk.go b/internal/service/cloudbroker/disks/resource_disk.go index 872e2a4..3523ea3 100644 --- a/internal/service/cloudbroker/disks/resource_disk.go +++ b/internal/service/cloudbroker/disks/resource_disk.go @@ -548,7 +548,7 @@ func resourceDiskSchemaMake() map[string]*schema.Schema { Computed: true, }, "size_used": { - Type: schema.TypeInt, + Type: schema.TypeFloat, Computed: true, }, "snapshots": { diff --git a/internal/service/cloudbroker/kvmvm/models.go b/internal/service/cloudbroker/kvmvm/models.go index 220fafd..1798f21 100644 --- a/internal/service/cloudbroker/kvmvm/models.go +++ b/internal/service/cloudbroker/kvmvm/models.go @@ -72,7 +72,7 @@ type DiskRecord struct { SepType string `json:"sepType"` SepID int `json:"sepId"` // NOTE: absent from compute/get output SizeMax int `json:"sizeMax"` - SizeUsed int `json:"sizeUsed"` // sum over all snapshots of this disk to report total consumed space + SizeUsed float64 `json:"sizeUsed"` // sum over all snapshots of this disk to report total consumed space Snapshots []SnapshotRecord `json:"snapshots"` Status string `json:"status"` TechStatus string `json:"techStatus"`