Skip to content

Commit

Permalink
US69000: Adding extra fields for external volume import (#128)
Browse files Browse the repository at this point in the history
* volume: field for external vol import

* [auto generated] Checking in generated offline HTML doc

* volume: added model.ReplicationEnabled sup to client

* [auto generated] Checking in generated offline HTML doc

---------

Co-authored-by: achu-1612 <[email protected]>
  • Loading branch information
achu-1612 and achu-1612 authored Aug 29, 2024
1 parent 9a91850 commit 77c13cf
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 5 deletions.
29 changes: 29 additions & 0 deletions v1/api/swagger/components/schemas/Volume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@ allOf:
- FlavorID
- StoragePoolID
- Capacity
- CapacityUsed
- Shareable
- LocationID
- State
- SubState
- Status
- Labels
- WWN
- ReplicationEnabled
- UnmanagedVolume
- ActiveSite
- CreatedSite

properties:
Description:
type: string
Expand All @@ -35,6 +41,12 @@ allOf:
example: 10485760
minimum: 0
description: The size of the volume in KiB
CapacityUsed:
type: integer
format: int64
example: 10485760
minimum: 0
description: The amount of the volume currently used as reported by the array in KiB
Shareable:
type: boolean
description: Indicates if the volume can be attached to multiple hosts
Expand Down Expand Up @@ -63,3 +75,20 @@ allOf:
WWN:
type: string
description: Serial number of the volume.
ReplicationEnabled:
type: boolean
description: Indicates whether replication is enabled for this volume.
UnmanagedVolume:
type: boolean
description: Indicates whether the volume is a native Metal created one or an external one.
ActiveSite:
type: string
format: uuid
description: >-
The site where the remote copy role for the volume is
Primary at the time of most recent import.
CreatedSite:
type: string
format: uuid
description: >-
The site where the volume was originally created.
10 changes: 5 additions & 5 deletions v1/html/index.html

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions v1/pkg/client/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7111,6 +7111,13 @@ components:
format: int64
minimum: 0
type: integer
CapacityUsed:
description: The amount of the volume currently used as reported by the
array in KiB
example: 10485760
format: int64
minimum: 0
type: integer
Shareable:
description: Indicates if the volume can be attached to multiple hosts
type: boolean
Expand Down Expand Up @@ -7143,17 +7150,38 @@ components:
WWN:
description: Serial number of the volume.
type: string
ReplicationEnabled:
description: Indicates whether replication is enabled for this volume.
type: boolean
UnmanagedVolume:
description: Indicates whether the volume is a native Metal created one
or an external one.
type: boolean
ActiveSite:
description: The site where the remote copy role for the volume is Primary
at the time of most recent import.
format: uuid
type: string
CreatedSite:
description: 'The site where the volume was originally created. '
format: uuid
type: string
required:
- ActiveSite
- Capacity
- CapacityUsed
- CreatedSite
- Description
- FlavorID
- Labels
- LocationID
- ReplicationEnabled
- Shareable
- State
- Status
- StoragePoolID
- SubState
- UnmanagedVolume
- WWN
UpdateVolume_allOf:
properties:
Expand Down
5 changes: 5 additions & 0 deletions v1/pkg/client/docs/Volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Name | Type | Description | Notes
**FlavorID** | **string** | The VolumeFlavorID matching an entry in the VolumeFlavors array returned as part of the get /available-resources call |
**StoragePoolID** | **string** | The storage pool ID matching an entry in the StoragePools array returned as part of the get /available-resources call |
**Capacity** | **int64** | The size of the volume in KiB |
**CapacityUsed** | **int64** | The amount of the volume currently used as reported by the array in KiB |
**Shareable** | **bool** | Indicates if the volume can be attached to multiple hosts |
**LocationID** | **string** | The location of the volume (and the storage array) LocationID is one of those listed by the LocationInfo array returned as part of the get /available-resources call. Any volumes must be in the same location as their attached Host. |
**VolumeCollectionID** | **string** | The optional volume collection ID matching an entry in the VolumeCollections array returned as part of the get /available-resources call | [optional]
Expand All @@ -21,6 +22,10 @@ Name | Type | Description | Notes
**Status** | [**VolumeStatus**](VolumeStatus.md) | |
**Labels** | **map[string]string** | The map of label name to label value for the resource. |
**WWN** | **string** | Serial number of the volume. |
**ReplicationEnabled** | **bool** | Indicates whether replication is enabled for this volume. |
**UnmanagedVolume** | **bool** | Indicates whether the volume is a native Metal created one or an external one. |
**ActiveSite** | **string** | The site where the remote copy role for the volume is Primary at the time of most recent import. |
**CreatedSite** | **string** | The site where the volume was originally created. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
5 changes: 5 additions & 0 deletions v1/pkg/client/docs/VolumeAllOf.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**FlavorID** | **string** | The VolumeFlavorID matching an entry in the VolumeFlavors array returned as part of the get /available-resources call |
**StoragePoolID** | **string** | The storage pool ID matching an entry in the StoragePools array returned as part of the get /available-resources call |
**Capacity** | **int64** | The size of the volume in KiB |
**CapacityUsed** | **int64** | The amount of the volume currently used as reported by the array in KiB |
**Shareable** | **bool** | Indicates if the volume can be attached to multiple hosts |
**LocationID** | **string** | The location of the volume (and the storage array) LocationID is one of those listed by the LocationInfo array returned as part of the get /available-resources call. Any volumes must be in the same location as their attached Host. |
**VolumeCollectionID** | **string** | The optional volume collection ID matching an entry in the VolumeCollections array returned as part of the get /available-resources call | [optional]
Expand All @@ -16,6 +17,10 @@ Name | Type | Description | Notes
**Status** | [**VolumeStatus**](VolumeStatus.md) | |
**Labels** | **map[string]string** | The map of label name to label value for the resource. |
**WWN** | **string** | Serial number of the volume. |
**ReplicationEnabled** | **bool** | Indicates whether replication is enabled for this volume. |
**UnmanagedVolume** | **bool** | Indicates whether the volume is a native Metal created one or an external one. |
**ActiveSite** | **string** | The site where the remote copy role for the volume is Primary at the time of most recent import. |
**CreatedSite** | **string** | The site where the volume was originally created. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
10 changes: 10 additions & 0 deletions v1/pkg/client/model_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ type Volume struct {
StoragePoolID string `json:"StoragePoolID"`
// The size of the volume in KiB
Capacity int64 `json:"Capacity"`
// The amount of the volume currently used as reported by the array in KiB
CapacityUsed int64 `json:"CapacityUsed"`
// Indicates if the volume can be attached to multiple hosts
Shareable bool `json:"Shareable"`
// The location of the volume (and the storage array) LocationID is one of those listed by the LocationInfo array returned as part of the get /available-resources call. Any volumes must be in the same location as their attached Host.
Expand All @@ -45,4 +47,12 @@ type Volume struct {
Labels map[string]string `json:"Labels"`
// Serial number of the volume.
WWN string `json:"WWN"`
// Indicates whether replication is enabled for this volume.
ReplicationEnabled bool `json:"ReplicationEnabled"`
// Indicates whether the volume is a native Metal created one or an external one.
UnmanagedVolume bool `json:"UnmanagedVolume"`
// The site where the remote copy role for the volume is Primary at the time of most recent import.
ActiveSite string `json:"ActiveSite"`
// The site where the volume was originally created.
CreatedSite string `json:"CreatedSite"`
}
10 changes: 10 additions & 0 deletions v1/pkg/client/model_volume_all_of.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ type VolumeAllOf struct {
StoragePoolID string `json:"StoragePoolID"`
// The size of the volume in KiB
Capacity int64 `json:"Capacity"`
// The amount of the volume currently used as reported by the array in KiB
CapacityUsed int64 `json:"CapacityUsed"`
// Indicates if the volume can be attached to multiple hosts
Shareable bool `json:"Shareable"`
// The location of the volume (and the storage array) LocationID is one of those listed by the LocationInfo array returned as part of the get /available-resources call. Any volumes must be in the same location as their attached Host.
Expand All @@ -32,4 +34,12 @@ type VolumeAllOf struct {
Labels map[string]string `json:"Labels"`
// Serial number of the volume.
WWN string `json:"WWN"`
// Indicates whether replication is enabled for this volume.
ReplicationEnabled bool `json:"ReplicationEnabled"`
// Indicates whether the volume is a native Metal created one or an external one.
UnmanagedVolume bool `json:"UnmanagedVolume"`
// The site where the remote copy role for the volume is Primary at the time of most recent import.
ActiveSite string `json:"ActiveSite"`
// The site where the volume was originally created.
CreatedSite string `json:"CreatedSite"`
}

0 comments on commit 77c13cf

Please sign in to comment.