From 67413b671bbc409a231b32c3c1aaff2ed6ba538b Mon Sep 17 00:00:00 2001 From: Denis Bozzato Date: Tue, 21 Jan 2025 19:15:40 -0600 Subject: [PATCH] PCCM-101165-Included service download health in avaulable image object --- .../components/schemas/AvailableImage.yaml | 7 +- .../OSServiceImageDetailedDownloadHealth.yaml | 12 ++- .../schemas/OSServiceImageDownloadHealth.yaml | 14 ++++ .../OSServiceImageDownloadHealthDetails.yaml | 9 +-- v1/pkg/client/api/openapi.yaml | 76 +++++++++++++++++-- v1/pkg/client/docs/AvailableImage.md | 1 + .../docs/OsServiceImageDownloadHealth.md | 4 +- .../OsServiceImageDownloadHealthDetails.md | 3 +- v1/pkg/client/model_available_image.go | 2 + .../model_os_service_image_download_health.go | 2 + ...s_service_image_download_health_details.go | 2 +- 11 files changed, 114 insertions(+), 18 deletions(-) diff --git a/v1/api/swagger/components/schemas/AvailableImage.yaml b/v1/api/swagger/components/schemas/AvailableImage.yaml index 58df3b2c..3ddf0a20 100644 --- a/v1/api/swagger/components/schemas/AvailableImage.yaml +++ b/v1/api/swagger/components/schemas/AvailableImage.yaml @@ -7,6 +7,7 @@ required: - Name - Version - Description + - DownloadHealth properties: ID: type: string @@ -35,4 +36,8 @@ properties: Description: type: string example: ubuntu OS also including Docker runtime - description: Additional image information for additional services added to the OS \ No newline at end of file + description: Additional image information for additional services added to the OS + DownloadHealth: + type: object + $ref: ./OSServiceImageDownloadHealth.yaml + description: Provides download health info of the service. \ No newline at end of file diff --git a/v1/api/swagger/components/schemas/OSServiceImageDetailedDownloadHealth.yaml b/v1/api/swagger/components/schemas/OSServiceImageDetailedDownloadHealth.yaml index f5d73be1..f3b848eb 100644 --- a/v1/api/swagger/components/schemas/OSServiceImageDetailedDownloadHealth.yaml +++ b/v1/api/swagger/components/schemas/OSServiceImageDetailedDownloadHealth.yaml @@ -1,3 +1,13 @@ type: object +description: This is a map of controllers ID to detailed dpwnload health info. additionalProperties: - $ref: OSServiceImageDownloadHealthDetails.yaml \ No newline at end of file + $ref: OSServiceImageDownloadHealthDetails.yaml +example: + 046b6c7f-0b8a-43b9-b35d-6489e6daee91: + Summary: OK + Reason: '' + Changed: 2019-06-27T22:59:01.661Z + 91eec8b5-6460-4532-aad1-47b983edb63c: + Summary: OK + Reason: '' + Changed: 2019-06-27T22:59:01.661Z \ No newline at end of file diff --git a/v1/api/swagger/components/schemas/OSServiceImageDownloadHealth.yaml b/v1/api/swagger/components/schemas/OSServiceImageDownloadHealth.yaml index 8d354380..df956973 100644 --- a/v1/api/swagger/components/schemas/OSServiceImageDownloadHealth.yaml +++ b/v1/api/swagger/components/schemas/OSServiceImageDownloadHealth.yaml @@ -4,8 +4,22 @@ required: - DownloadHealthSummary properties: DetailedDownloadHealth: + type: object + description: This is a map of controllers ID to detailed download health info. $ref: OSServiceImageDetailedDownloadHealth.yaml + example: + 046b6c7f-0b8a-43b9-b35d-6489e6daee91: + Summary: OK + Reason: '' + Changed: 2019-06-27T22:59:01.661Z + 91eec8b5-6460-4532-aad1-47b983edb63c: + Summary: OK + Reason: '' + Changed: 2019-06-27T22:59:01.661Z DownloadHealthSummary: + type: string + description: This is a high-level summary of the download health status. $ref: OSServiceImageDownloadHealthSummary.yaml + example: OK description: >- Provides download health info of the OS service image. \ No newline at end of file diff --git a/v1/api/swagger/components/schemas/OSServiceImageDownloadHealthDetails.yaml b/v1/api/swagger/components/schemas/OSServiceImageDownloadHealthDetails.yaml index f869cd16..2fa67ba4 100644 --- a/v1/api/swagger/components/schemas/OSServiceImageDownloadHealthDetails.yaml +++ b/v1/api/swagger/components/schemas/OSServiceImageDownloadHealthDetails.yaml @@ -11,14 +11,13 @@ properties: 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 \ No newline at end of file + type: string + description: High-level summary of the download health status. + $ref: OSServiceImageDownloadHealthSummary.yaml + example: OK \ No newline at end of file diff --git a/v1/pkg/client/api/openapi.yaml b/v1/pkg/client/api/openapi.yaml index 6aed47f0..e3883dd0 100644 --- a/v1/pkg/client/api/openapi.yaml +++ b/v1/pkg/client/api/openapi.yaml @@ -3903,13 +3903,35 @@ components: LocationID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 SizeID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 Images: - - Category: Linux + - DownloadHealth: + DetailedDownloadHealth: + "046b6c7f-0b8a-43b9-b35d-6489e6daee91": + Summary: OK + Reason: "" + Changed: 2019-06-27T22:59:01.661Z + "91eec8b5-6460-4532-aad1-47b983edb63c": + Summary: OK + Reason: "" + Changed: 2019-06-27T22:59:01.661Z + DownloadHealthSummary: OK + Category: Linux Description: ubuntu OS also including Docker runtime Version: "18.04" ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 Flavor: ubuntu Name: HPE Ubuntu 18.04 - - Category: Linux + - DownloadHealth: + DetailedDownloadHealth: + "046b6c7f-0b8a-43b9-b35d-6489e6daee91": + Summary: OK + Reason: "" + Changed: 2019-06-27T22:59:01.661Z + "91eec8b5-6460-4532-aad1-47b983edb63c": + Summary: OK + Reason: "" + Changed: 2019-06-27T22:59:01.661Z + DownloadHealthSummary: OK + Category: Linux Description: ubuntu OS also including Docker runtime Version: "18.04" ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 @@ -5061,6 +5083,17 @@ components: AvailableImage: description: Entry describing an available imaging service example: + DownloadHealth: + DetailedDownloadHealth: + "046b6c7f-0b8a-43b9-b35d-6489e6daee91": + Summary: OK + Reason: "" + Changed: 2019-06-27T22:59:01.661Z + "91eec8b5-6460-4532-aad1-47b983edb63c": + Summary: OK + Reason: "" + Changed: 2019-06-27T22:59:01.661Z + DownloadHealthSummary: OK Category: Linux Description: ubuntu OS also including Docker runtime Version: "18.04" @@ -5095,9 +5128,12 @@ components: to the OS example: ubuntu OS also including Docker runtime type: string + DownloadHealth: + $ref: '#/components/schemas/OSServiceImageDownloadHealth' required: - Category - Description + - DownloadHealth - Flavor - ID - Name @@ -5891,10 +5927,32 @@ components: type: object OSServiceImageDownloadHealth: description: Provides download health info of the OS service image. + example: + DetailedDownloadHealth: + "046b6c7f-0b8a-43b9-b35d-6489e6daee91": + Summary: OK + Reason: "" + Changed: 2019-06-27T22:59:01.661Z + "91eec8b5-6460-4532-aad1-47b983edb63c": + Summary: OK + Reason: "" + Changed: 2019-06-27T22:59:01.661Z + DownloadHealthSummary: OK properties: DetailedDownloadHealth: additionalProperties: $ref: '#/components/schemas/OSServiceImageDownloadHealthDetails' + description: This is a map of controllers ID to detailed dpwnload health + info. + example: + "046b6c7f-0b8a-43b9-b35d-6489e6daee91": + Summary: OK + Reason: "" + Changed: 2019-06-27T22:59:01.661Z + "91eec8b5-6460-4532-aad1-47b983edb63c": + Summary: OK + Reason: "" + Changed: 2019-06-27T22:59:01.661Z type: object DownloadHealthSummary: $ref: '#/components/schemas/OSServiceImageDownloadHealthSummary' @@ -6578,6 +6636,16 @@ components: OSServiceImageDetailedDownloadHealth: additionalProperties: $ref: '#/components/schemas/OSServiceImageDownloadHealthDetails' + description: This is a map of controllers ID to detailed dpwnload health info. + example: + "046b6c7f-0b8a-43b9-b35d-6489e6daee91": + Summary: OK + Reason: "" + Changed: 2019-06-27T22:59:01.661Z + "91eec8b5-6460-4532-aad1-47b983edb63c": + Summary: OK + Reason: "" + Changed: 2019-06-27T22:59:01.661Z type: object OSServiceImageDownloadHealthSummary: description: Indicates the download health summary of the OS service image. @@ -6730,10 +6798,6 @@ components: 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. diff --git a/v1/pkg/client/docs/AvailableImage.md b/v1/pkg/client/docs/AvailableImage.md index 4cfe3baf..e96cd679 100644 --- a/v1/pkg/client/docs/AvailableImage.md +++ b/v1/pkg/client/docs/AvailableImage.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **Name** | **string** | Name of imaging service. | **Version** | **string** | Specific version of a imaging service flavor. | **Description** | **string** | Additional image information for additional services added to the OS | +**DownloadHealth** | [**OsServiceImageDownloadHealth**](.md) | Provides download health info of the service. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/v1/pkg/client/docs/OsServiceImageDownloadHealth.md b/v1/pkg/client/docs/OsServiceImageDownloadHealth.md index 1e0b17c9..3cd06678 100644 --- a/v1/pkg/client/docs/OsServiceImageDownloadHealth.md +++ b/v1/pkg/client/docs/OsServiceImageDownloadHealth.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**DetailedDownloadHealth** | [**map[string]OsServiceImageDownloadHealthDetails**](OSServiceImageDownloadHealthDetails.md) | | -**DownloadHealthSummary** | [**OsServiceImageDownloadHealthSummary**](OSServiceImageDownloadHealthSummary.md) | | +**DetailedDownloadHealth** | [**map[string]OsServiceImageDownloadHealthDetails**](OSServiceImageDownloadHealthDetails.md) | This is a map of controllers ID to detailed dpwnload health info. | +**DownloadHealthSummary** | [**OsServiceImageDownloadHealthSummary**](OSServiceImageDownloadHealthSummary.md) | This is a high-level summary of the download health status. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/v1/pkg/client/docs/OsServiceImageDownloadHealthDetails.md b/v1/pkg/client/docs/OsServiceImageDownloadHealthDetails.md index f2ae12a0..3e6116f6 100644 --- a/v1/pkg/client/docs/OsServiceImageDownloadHealthDetails.md +++ b/v1/pkg/client/docs/OsServiceImageDownloadHealthDetails.md @@ -5,9 +5,8 @@ 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) | | +**Summary** | [**OsServiceImageDownloadHealthSummary**](OSServiceImageDownloadHealthSummary.md) | High-level summary of the download health status. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/v1/pkg/client/model_available_image.go b/v1/pkg/client/model_available_image.go index 587f0a3e..ffa164c5 100644 --- a/v1/pkg/client/model_available_image.go +++ b/v1/pkg/client/model_available_image.go @@ -24,4 +24,6 @@ type AvailableImage struct { Version string `json:"Version"` // Additional image information for additional services added to the OS Description string `json:"Description"` + // Provides download health info of the service. + DownloadHealth OsServiceImageDownloadHealth `json:"DownloadHealth"` } diff --git a/v1/pkg/client/model_os_service_image_download_health.go b/v1/pkg/client/model_os_service_image_download_health.go index 7e4df35f..31021c12 100644 --- a/v1/pkg/client/model_os_service_image_download_health.go +++ b/v1/pkg/client/model_os_service_image_download_health.go @@ -12,6 +12,8 @@ package client // OsServiceImageDownloadHealth Provides download health info of the OS service image. type OsServiceImageDownloadHealth struct { + // This is a map of controllers ID to detailed dpwnload health info. DetailedDownloadHealth map[string]OsServiceImageDownloadHealthDetails `json:"DetailedDownloadHealth"` + // This is a high-level summary of the download health status. DownloadHealthSummary OsServiceImageDownloadHealthSummary `json:"DownloadHealthSummary"` } diff --git a/v1/pkg/client/model_os_service_image_download_health_details.go b/v1/pkg/client/model_os_service_image_download_health_details.go index 6bec35bb..1ad828eb 100644 --- a/v1/pkg/client/model_os_service_image_download_health_details.go +++ b/v1/pkg/client/model_os_service_image_download_health_details.go @@ -17,8 +17,8 @@ import ( 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"` + // High-level summary of the download health status. Summary OsServiceImageDownloadHealthSummary `json:"Summary"` }