Skip to content

Commit

Permalink
Modified OS Service Image model to include download service health at…
Browse files Browse the repository at this point in the history
…tributes
  • Loading branch information
dbozzato81 committed Oct 29, 2024
1 parent f3109d3 commit 784f11c
Show file tree
Hide file tree
Showing 17 changed files with 209 additions and 0 deletions.
3 changes: 3 additions & 0 deletions v1/api/swagger/components/schemas/OSServiceImage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ allOf:
- UserDefinedSteps
- Classifiers
- ProjectID
- DownloadHealth
properties:
ProjectID:
type: string
format: uuid
description: >-
Unique ID of the project that owns this OS service image.
example: 046b6c7f-0b8a-43b9-b35d-6489e6daee92
DownloadHealth:
$ref: OSServiceImageDownloadHealth.yaml
Description:
type: string
example: Description of the image
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type: object
additionalProperties:
$ref: OSServiceImageDownloadHealthDetails.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
type: object
required:
- DetailedDownloadHealth
- DownloadHealthSummary
properties:
DetailedDownloadHealth:
$ref: OSServiceImageDetailedDownloadHealth.yaml
DownloadHealthSummary:
$ref: OSServiceImageDownloadHealthSummary.yaml
description: >-
Provides download health info of the OS service image.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
type: object
required:
- Changed
- Details
- Reason
- Summary
properties:
Changed:
type: string
format: date-time
example: 2019-06-27T22:59:01.661Z
description: >-
Indicates last time this download health has been updated.
Details:
type: object
additionalProperties:
$ref: OSServiceImageDownloadHealthSummary.yaml
Reason:
type: string
example: "Service download health timed out"
description: >-
Indicates the reason for the reported download health status if not OK.
Summary:
$ref: OSServiceImageDownloadHealthSummary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type: string
enum:
- OK
- Warning
- Critical
- Unknown
example: OK
description: >
Indicates the download health summary of the OS service image.
3 changes: 3 additions & 0 deletions v1/pkg/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ Class | Method | HTTP request | Description
- [OsServiceImage](docs/OsServiceImage.md)
- [OsServiceImageAllOf](docs/OsServiceImageAllOf.md)
- [OsServiceImageApproach](docs/OsServiceImageApproach.md)
- [OsServiceImageDownloadHealth](docs/OsServiceImageDownloadHealth.md)
- [OsServiceImageDownloadHealthDetails](docs/OsServiceImageDownloadHealthDetails.md)
- [OsServiceImageDownloadHealthSummary](docs/OsServiceImageDownloadHealthSummary.md)
- [OsServiceImageOrigin](docs/OsServiceImageOrigin.md)
- [Partition](docs/Partition.md)
- [PartitionFormula](docs/PartitionFormula.md)
Expand Down
53 changes: 53 additions & 0 deletions v1/pkg/client/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5866,6 +5866,19 @@ components:
- AllocatedCount
- ServiceType
type: object
OSServiceImageDownloadHealth:
description: Provides download health info of the OS service image.
properties:
DetailedDownloadHealth:
additionalProperties:
$ref: '#/components/schemas/OSServiceImageDownloadHealthDetails'
type: object
DownloadHealthSummary:
$ref: '#/components/schemas/OSServiceImageDownloadHealthSummary'
required:
- DetailedDownloadHealth
- DownloadHealthSummary
type: object
OSServiceImageOrigin:
description: |
Indicates the origin of the OS service image.
Expand Down Expand Up @@ -6539,6 +6552,19 @@ components:
- InUse
- Total
type: object
OSServiceImageDetailedDownloadHealth:
additionalProperties:
$ref: '#/components/schemas/OSServiceImageDownloadHealthDetails'
type: object
OSServiceImageDownloadHealthSummary:
description: Indicates the download health summary of the OS service image.
enum:
- OK
- Warning
- Critical
- Unknown
example: OK
type: string
PartitionTable:
description: Defines the type of partition table.
enum:
Expand Down Expand Up @@ -6674,6 +6700,30 @@ components:
required:
- SubAttributeRules
type: object
OSServiceImageDownloadHealthDetails:
properties:
Changed:
description: Indicates last time this download health has been updated.
example: 2019-06-27T22:59:01.661Z
format: date-time
type: string
Details:
additionalProperties:
$ref: '#/components/schemas/OSServiceImageDownloadHealthSummary'
type: object
Reason:
description: Indicates the reason for the reported download health status
if not OK.
example: Service download health timed out
type: string
Summary:
$ref: '#/components/schemas/OSServiceImageDownloadHealthSummary'
required:
- Changed
- Details
- Reason
- Summary
type: object
PartitionType:
description: It defines the available partition types. This should be defined
to correspond to target OS known partition types (as known by name on that
Expand Down Expand Up @@ -7506,6 +7556,8 @@ components:
example: 046b6c7f-0b8a-43b9-b35d-6489e6daee92
format: uuid
type: string
DownloadHealth:
$ref: '#/components/schemas/OSServiceImageDownloadHealth'
Description:
example: Description of the image
type: string
Expand Down Expand Up @@ -7585,6 +7637,7 @@ components:
- Classifiers
- Description
- DeviceLayouts
- DownloadHealth
- FWBaselineID
- Files
- Flavor
Expand Down
1 change: 1 addition & 0 deletions v1/pkg/client/docs/OsServiceImage.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**Created** | [**time.Time**](time.Time.md) | Time when the resource was created in the database |
**Modified** | [**time.Time**](time.Time.md) | Time when the resource was last modified in the database |
**ProjectID** | **string** | Unique ID of the project that owns this OS service image. |
**DownloadHealth** | [**OsServiceImageDownloadHealth**](OSServiceImageDownloadHealth.md) | |
**Description** | **string** | |
**Category** | **string** | A high level classification of the service. |
**Flavor** | **string** | An high level description of the OS image type. |
Expand Down
1 change: 1 addition & 0 deletions v1/pkg/client/docs/OsServiceImageAllOf.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ProjectID** | **string** | Unique ID of the project that owns this OS service image. |
**DownloadHealth** | [**OsServiceImageDownloadHealth**](OSServiceImageDownloadHealth.md) | |
**Description** | **string** | |
**Category** | **string** | A high level classification of the service. |
**Flavor** | **string** | An high level description of the OS image type. |
Expand Down
12 changes: 12 additions & 0 deletions v1/pkg/client/docs/OsServiceImageDownloadHealth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# OsServiceImageDownloadHealth

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**DetailedDownloadHealth** | [**map[string]OsServiceImageDownloadHealthDetails**](OSServiceImageDownloadHealthDetails.md) | |
**DownloadHealthSummary** | [**OsServiceImageDownloadHealthSummary**](OSServiceImageDownloadHealthSummary.md) | |

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


14 changes: 14 additions & 0 deletions v1/pkg/client/docs/OsServiceImageDownloadHealthDetails.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# OsServiceImageDownloadHealthDetails

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Changed** | [**time.Time**](time.Time.md) | Indicates last time this download health has been updated. |
**Details** | [**map[string]OsServiceImageDownloadHealthSummary**](OSServiceImageDownloadHealthSummary.md) | |
**Reason** | **string** | Indicates the reason for the reported download health status if not OK. |
**Summary** | [**OsServiceImageDownloadHealthSummary**](OSServiceImageDownloadHealthSummary.md) | |

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


10 changes: 10 additions & 0 deletions v1/pkg/client/docs/OsServiceImageDownloadHealthSummary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# OsServiceImageDownloadHealthSummary

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

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


1 change: 1 addition & 0 deletions v1/pkg/client/model_os_service_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type OsServiceImage struct {
Modified time.Time `json:"Modified"`
// Unique ID of the project that owns this OS service image.
ProjectID string `json:"ProjectID"`
DownloadHealth OsServiceImageDownloadHealth `json:"DownloadHealth"`
Description string `json:"Description"`
// A high level classification of the service.
Category string `json:"Category"`
Expand Down
1 change: 1 addition & 0 deletions v1/pkg/client/model_os_service_image_all_of.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ package client
type OsServiceImageAllOf struct {
// Unique ID of the project that owns this OS service image.
ProjectID string `json:"ProjectID"`
DownloadHealth OsServiceImageDownloadHealth `json:"DownloadHealth"`
Description string `json:"Description"`
// A high level classification of the service.
Category string `json:"Category"`
Expand Down
17 changes: 17 additions & 0 deletions v1/pkg/client/model_os_service_image_download_health.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// (C) Copyright 2021-2024 Hewlett Packard Enterprise Development LP

/*
* HPE GreenLake for bare metal API
*
* This Metal Client REST API provides access to bare metal as-a-service (BMaaS) within a single project context. Clients are able to create fully-provisioned hosts, storage volumes, and project-specific private networks in an isolated project environment. Project-owned resources that can be accessed via this API include - Host, Volume, VolumeAttachment, Network (project private), and SSH Key. Each API call is done within a single project context. The specific Project identifier must be provided within the header of for each REST call. The server will validate that the provided authentication credentials (JWTs) are valid for the referenced project before any operation is performed. If a single credential is valid for multiple projects, the client must still reference a single project in the header for each API call. Clients can also access information about available services and resources through the AvailableResources object. This object provides detailed information about the OS imaging options, the machine size options, the storage volume options, and data center locations which are needed when creating hosts and volumes.
*
* API version: v1
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/

package client
// OsServiceImageDownloadHealth Provides download health info of the OS service image.
type OsServiceImageDownloadHealth struct {
DetailedDownloadHealth map[string]OsServiceImageDownloadHealthDetails `json:"DetailedDownloadHealth"`
DownloadHealthSummary OsServiceImageDownloadHealthSummary `json:"DownloadHealthSummary"`
}
24 changes: 24 additions & 0 deletions v1/pkg/client/model_os_service_image_download_health_details.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// (C) Copyright 2021-2024 Hewlett Packard Enterprise Development LP

/*
* HPE GreenLake for bare metal API
*
* This Metal Client REST API provides access to bare metal as-a-service (BMaaS) within a single project context. Clients are able to create fully-provisioned hosts, storage volumes, and project-specific private networks in an isolated project environment. Project-owned resources that can be accessed via this API include - Host, Volume, VolumeAttachment, Network (project private), and SSH Key. Each API call is done within a single project context. The specific Project identifier must be provided within the header of for each REST call. The server will validate that the provided authentication credentials (JWTs) are valid for the referenced project before any operation is performed. If a single credential is valid for multiple projects, the client must still reference a single project in the header for each API call. Clients can also access information about available services and resources through the AvailableResources object. This object provides detailed information about the OS imaging options, the machine size options, the storage volume options, and data center locations which are needed when creating hosts and volumes.
*
* API version: v1
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/

package client
import (
"time"
)
// OsServiceImageDownloadHealthDetails struct for OsServiceImageDownloadHealthDetails
type OsServiceImageDownloadHealthDetails struct {
// Indicates last time this download health has been updated.
Changed time.Time `json:"Changed"`
Details map[string]OsServiceImageDownloadHealthSummary `json:"Details"`
// Indicates the reason for the reported download health status if not OK.
Reason string `json:"Reason"`
Summary OsServiceImageDownloadHealthSummary `json:"Summary"`
}
22 changes: 22 additions & 0 deletions v1/pkg/client/model_os_service_image_download_health_summary.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// (C) Copyright 2021-2024 Hewlett Packard Enterprise Development LP

/*
* HPE GreenLake for bare metal API
*
* This Metal Client REST API provides access to bare metal as-a-service (BMaaS) within a single project context. Clients are able to create fully-provisioned hosts, storage volumes, and project-specific private networks in an isolated project environment. Project-owned resources that can be accessed via this API include - Host, Volume, VolumeAttachment, Network (project private), and SSH Key. Each API call is done within a single project context. The specific Project identifier must be provided within the header of for each REST call. The server will validate that the provided authentication credentials (JWTs) are valid for the referenced project before any operation is performed. If a single credential is valid for multiple projects, the client must still reference a single project in the header for each API call. Clients can also access information about available services and resources through the AvailableResources object. This object provides detailed information about the OS imaging options, the machine size options, the storage volume options, and data center locations which are needed when creating hosts and volumes.
*
* API version: v1
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/

package client
// OsServiceImageDownloadHealthSummary Indicates the download health summary of the OS service image.
type OsServiceImageDownloadHealthSummary string

// List of OSServiceImageDownloadHealthSummary
const (
OSSERVICEIMAGEDOWNLOADHEALTHSUMMARY_OK OsServiceImageDownloadHealthSummary = "OK"
OSSERVICEIMAGEDOWNLOADHEALTHSUMMARY_WARNING OsServiceImageDownloadHealthSummary = "Warning"
OSSERVICEIMAGEDOWNLOADHEALTHSUMMARY_CRITICAL OsServiceImageDownloadHealthSummary = "Critical"
OSSERVICEIMAGEDOWNLOADHEALTHSUMMARY_UNKNOWN OsServiceImageDownloadHealthSummary = "Unknown"
)

0 comments on commit 784f11c

Please sign in to comment.