From ac7bf840f1eaae0cd4255629e65f53cfc3b7663a Mon Sep 17 00:00:00 2001 From: Gerrit Date: Mon, 29 Jul 2024 14:27:16 +0200 Subject: [PATCH] Remove volume storage class. (#120) --- api/models/models_v1_size_reservation.go | 3 +++ api/models/v1_volume_response.go | 17 ----------------- api/models/v1_volume_usage.go | 17 ----------------- cloud-api.json | 15 ++++++--------- 4 files changed, 9 insertions(+), 43 deletions(-) diff --git a/api/models/models_v1_size_reservation.go b/api/models/models_v1_size_reservation.go index 29256b0..1c04893 100644 --- a/api/models/models_v1_size_reservation.go +++ b/api/models/models_v1_size_reservation.go @@ -26,6 +26,9 @@ type ModelsV1SizeReservation struct { // description Description string `json:"description,omitempty"` + // labels + Labels map[string]string `json:"labels,omitempty"` + // partitionids // Required: true Partitionids []string `json:"partitionids"` diff --git a/api/models/v1_volume_response.go b/api/models/v1_volume_response.go index 72d8200..d99f18a 100644 --- a/api/models/v1_volume_response.go +++ b/api/models/v1_volume_response.go @@ -75,10 +75,6 @@ type V1VolumeResponse struct { // Required: true Statistics *V1VolumeStatistics `json:"Statistics"` - // storage class - // Required: true - StorageClass *string `json:"StorageClass"` - // tenant ID // Required: true TenantID *string `json:"TenantID"` @@ -156,10 +152,6 @@ func (m *V1VolumeResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateStorageClass(formats); err != nil { - res = append(res, err) - } - if err := m.validateTenantID(formats); err != nil { res = append(res, err) } @@ -319,15 +311,6 @@ func (m *V1VolumeResponse) validateStatistics(formats strfmt.Registry) error { return nil } -func (m *V1VolumeResponse) validateStorageClass(formats strfmt.Registry) error { - - if err := validate.Required("StorageClass", "body", m.StorageClass); err != nil { - return err - } - - return nil -} - func (m *V1VolumeResponse) validateTenantID(formats strfmt.Registry) error { if err := validate.Required("TenantID", "body", m.TenantID); err != nil { diff --git a/api/models/v1_volume_usage.go b/api/models/v1_volume_usage.go index 1345929..7977529 100644 --- a/api/models/v1_volume_usage.go +++ b/api/models/v1_volume_usage.go @@ -27,10 +27,6 @@ type V1VolumeUsage struct { // Required: true Capacityseconds *string `json:"capacityseconds"` - // the class of this volume - // Required: true - Class *string `json:"class"` - // the cluster id of this volume // Required: true Clusterid *string `json:"clusterid"` @@ -106,10 +102,6 @@ func (m *V1VolumeUsage) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateClass(formats); err != nil { - res = append(res, err) - } - if err := m.validateClusterid(formats); err != nil { res = append(res, err) } @@ -194,15 +186,6 @@ func (m *V1VolumeUsage) validateCapacityseconds(formats strfmt.Registry) error { return nil } -func (m *V1VolumeUsage) validateClass(formats strfmt.Registry) error { - - if err := validate.Required("class", "body", m.Class); err != nil { - return err - } - - return nil -} - func (m *V1VolumeUsage) validateClusterid(formats strfmt.Registry) error { if err := validate.Required("clusterid", "body", m.Clusterid); err != nil { diff --git a/cloud-api.json b/cloud-api.json index 696adb0..b442c4b 100644 --- a/cloud-api.json +++ b/cloud-api.json @@ -1054,6 +1054,12 @@ "description": { "type": "string" }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, "partitionids": { "items": { "type": "string" @@ -5564,9 +5570,6 @@ "Statistics": { "$ref": "#/definitions/v1.VolumeStatistics" }, - "StorageClass": { - "type": "string" - }, "TenantID": { "type": "string" }, @@ -5595,7 +5598,6 @@ "SourceSnapshotUUID", "State", "Statistics", - "StorageClass", "TenantID", "VolumeHandle", "VolumeID", @@ -5650,10 +5652,6 @@ "description": "the capacity seconds of this volume (byte*s)", "type": "string" }, - "class": { - "description": "the class of this volume", - "type": "string" - }, "clusterid": { "description": "the cluster id of this volume", "type": "string" @@ -5721,7 +5719,6 @@ "required": [ "annotations", "capacityseconds", - "class", "clusterid", "clustername", "contract",