Skip to content

Commit

Permalink
volume: field for external vol import
Browse files Browse the repository at this point in the history
  • Loading branch information
achu-1612 committed Aug 27, 2024
1 parent 9a91850 commit 8581943
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 0 deletions.
26 changes: 26 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,18 @@ allOf:
- FlavorID
- StoragePoolID
- Capacity
- CapacityUsed
- Shareable
- LocationID
- State
- SubState
- Status
- Labels
- WWN
- UnmanagedVolume
- ActiveSite
- CreatedSite

properties:
Description:
type: string
Expand All @@ -35,6 +40,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 +74,18 @@ allOf:
WWN:
type: string
description: Serial number of the volume.
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.
UnmanagedVolume:
type: boolean
description: Indicates whether the volume is a native Metal created one or an external one.

24 changes: 24 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,8 +7150,24 @@ components:
WWN:
description: Serial number of the volume.
type: string
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
UnmanagedVolume:
description: Indicates whether the volume is a native Metal created one
or an external one.
type: boolean
required:
- ActiveSite
- Capacity
- CapacityUsed
- CreatedSite
- Description
- FlavorID
- Labels
Expand All @@ -7154,6 +7177,7 @@ components:
- Status
- StoragePoolID
- SubState
- UnmanagedVolume
- WWN
UpdateVolume_allOf:
properties:
Expand Down
4 changes: 4 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,9 @@ 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. |
**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. |
**UnmanagedVolume** | **bool** | Indicates whether the volume is a native Metal created one or an external one. |

[[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
4 changes: 4 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,9 @@ 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. |
**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. |
**UnmanagedVolume** | **bool** | Indicates whether the volume is a native Metal created one or an external one. |

[[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
8 changes: 8 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,10 @@ type Volume struct {
Labels map[string]string `json:"Labels"`
// Serial number of the volume.
WWN string `json:"WWN"`
// 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"`
// Indicates whether the volume is a native Metal created one or an external one.
UnmanagedVolume bool `json:"UnmanagedVolume"`
}
8 changes: 8 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,10 @@ type VolumeAllOf struct {
Labels map[string]string `json:"Labels"`
// Serial number of the volume.
WWN string `json:"WWN"`
// 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"`
// Indicates whether the volume is a native Metal created one or an external one.
UnmanagedVolume bool `json:"UnmanagedVolume"`
}

0 comments on commit 8581943

Please sign in to comment.