From 395bd9f9c65da4d9e1c68cef863b7e3474cbddcb Mon Sep 17 00:00:00 2001 From: Andrea Decorte Date: Wed, 10 Apr 2024 09:41:02 +0200 Subject: [PATCH 1/8] OCM-7027 | feat: document pagination and ordering support for break glass Break glass credentials now support it, so we document it properly --- .../v1/break_glass_credentials_resource.model | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/model/clusters_mgmt/v1/break_glass_credentials_resource.model b/model/clusters_mgmt/v1/break_glass_credentials_resource.model index 425ce491..3bb73e8d 100644 --- a/model/clusters_mgmt/v1/break_glass_credentials_resource.model +++ b/model/clusters_mgmt/v1/break_glass_credentials_resource.model @@ -17,10 +17,6 @@ limitations under the License. // Manages the break glass credentials of a cluster. resource BreakGlassCredentials { // Retrieves the list of break glass credentials. - // - // IMPORTANT: This collection doesn't currently support paging or searching, so the returned - // `page` will always be 1 and `size` and `total` will always be the total number of break - // glass credentials for this cluster. method List { // Index of the requested page, where one corresponds to the first page. in out Page Integer = 1 @@ -28,6 +24,36 @@ resource BreakGlassCredentials { // Number of items contained in the returned page. in out Size Integer = 100 + // Search criteria. + // + // The syntax of this parameter is similar to the syntax of the _where_ clause of a + // SQL statement, but using the names of the attributes of the break glass credentials + // instead of the names of the columns of a table. For example, in order to retrieve all + // the credentials with a specific username and status the following is required: + // + // ```sql + // username='user1' AND status='expired' + // ``` + // + // If the parameter isn't provided, or if the value is empty, then all the + // break glass credentials that the user has permission to see will be returned. + in Search String + + // Order criteria. + // + // The syntax of this parameter is similar to the syntax of the _order by_ clause of + // a SQL statement, but using the names of the attributes of the break glass credentials + // instead of the the names of the columns of a table. For example, in order to sort the + // credentials descending by identifier the value should be: + // + // ```sql + // id desc + // ``` + // + // If the parameter isn't provided, or if the value is empty, then the order of the + // results is undefined. + in Order String + // Total number of items of the collection. out Total Integer From 208a4e1bda454b166a706c60687af0ab55265c63 Mon Sep 17 00:00:00 2001 From: Miguel Soriano Date: Wed, 10 Apr 2024 10:17:15 +0200 Subject: [PATCH 2/8] ARO-5950 | feat: add initial ARO-HCP Azure attributes --- model/clusters_mgmt/v1/azure_type.model | 45 +++++++++++++++++++++++ model/clusters_mgmt/v1/cluster_type.model | 3 ++ 2 files changed, 48 insertions(+) create mode 100644 model/clusters_mgmt/v1/azure_type.model diff --git a/model/clusters_mgmt/v1/azure_type.model b/model/clusters_mgmt/v1/azure_type.model new file mode 100644 index 00000000..60023339 --- /dev/null +++ b/model/clusters_mgmt/v1/azure_type.model @@ -0,0 +1,45 @@ +/* +Copyright (c) 2024 Red Hat, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Microsoft Azure settings of a cluster. +struct Azure { + // [Required] The Azure Subscription ID associated with the cluster. It must belong to + // the Microsoft Entra Tenant ID `tenant_id`. + SubscriptionID String + + // [Required] The Azure Resource Group Name of the cluster. It must be within `subscription_id` + // of the cluster. `resource_group_name` is located in the same Azure location + // as the cluster's region. + ResourceGroupName String + + // [Required] The Azure Resource Name of the cluster. It must be within the + // Azure Resource Group Name `resource_group_name`. + // `resource_name` is located in the same Azure location as the cluster's region. + ResourceName String + + // [Required] The Microsoft Entra Tenant ID where the cluster belongs. + TenantID String + + // [Required] The name of the Azure Resource Group where the Azure Resources related + // to the cluster are created. The Azure Resource Group is created with the given + // value, within the Azure Subscription `subscription_id` of the cluster. + // `managed_resource_group_name` cannot be equal to the value of `managed_resource_group`. + // `managed_resource_group_name` is located in the same Azure location as the + // cluster's region. + // Not to be confused with `resource_group_name`, which is the Azure Resource Group Name + // where the own Azure Resource associated to the cluster resides. + ManagedResourceGroupName String +} diff --git a/model/clusters_mgmt/v1/cluster_type.model b/model/clusters_mgmt/v1/cluster_type.model index 9b8072aa..5cd683d9 100644 --- a/model/clusters_mgmt/v1/cluster_type.model +++ b/model/clusters_mgmt/v1/cluster_type.model @@ -103,6 +103,9 @@ class Cluster { // Google cloud platform settings of the cluster. GCP GCP + // Microsoft Azure settings of the cluster. + Azure Azure + // Network settings of the cluster. Network Network From b2231ddb848e5f8d6d7bda94c04b2017223e55db Mon Sep 17 00:00:00 2001 From: Chetan Giradkar Date: Fri, 5 Apr 2024 14:13:48 +0100 Subject: [PATCH 3/8] OCM-7144 | Add model for storage quota values resource The CS backend supported /storage_quota_values endpoint but the OCM sdk did not. Hence ocm-api-model needed to be updated. Signed-off-by: Chetan Giradkar --- model/clusters_mgmt/v1/root_resource.model | 5 +++ .../clusters_mgmt/v1/storage_quota_type.model | 24 ++++++++++++++ .../v1/storage_quota_values_resource.model | 33 +++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 model/clusters_mgmt/v1/storage_quota_type.model create mode 100644 model/clusters_mgmt/v1/storage_quota_values_resource.model diff --git a/model/clusters_mgmt/v1/root_resource.model b/model/clusters_mgmt/v1/root_resource.model index 2ddc2ed7..40f51714 100644 --- a/model/clusters_mgmt/v1/root_resource.model +++ b/model/clusters_mgmt/v1/root_resource.model @@ -121,4 +121,9 @@ resource Root { locator LoadBalancerQuotaValues{ target LoadBalancerQuotaValues } + + // Reference to the resource that manages the storage quota values. + locator StorageQuotaValues{ + target StorageQuotaValues + } } diff --git a/model/clusters_mgmt/v1/storage_quota_type.model b/model/clusters_mgmt/v1/storage_quota_type.model new file mode 100644 index 00000000..05b36571 --- /dev/null +++ b/model/clusters_mgmt/v1/storage_quota_type.model @@ -0,0 +1,24 @@ +/* +Copyright (c) 2024 Red Hat, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Representation of a storage quota +struct StorageQuota { + // Numerical value + Value Float + + // Unit of storage + Unit String +} diff --git a/model/clusters_mgmt/v1/storage_quota_values_resource.model b/model/clusters_mgmt/v1/storage_quota_values_resource.model new file mode 100644 index 00000000..1baaf40f --- /dev/null +++ b/model/clusters_mgmt/v1/storage_quota_values_resource.model @@ -0,0 +1,33 @@ +/* +Copyright (c) 2024 Red Hat, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Manages storage quota values. +resource StorageQuotaValues { + // Retrieves the list of Storage Quota Values. + method List { + // Index of the requested page, where one corresponds to the first page. + in out Page Integer = 1 + + // Number of items contained in the returned page. + in out Size Integer = 100 + + // Total number of items of the collection. + out Total Integer + + // Retrieved list of values. + out Items []StorageQuota + } +} From 06be150c82a22871812a07826747ca3ad7cc6c3a Mon Sep 17 00:00:00 2001 From: Alba Hita Catala Date: Wed, 10 Apr 2024 14:43:38 +0200 Subject: [PATCH 4/8] chore: update changes for new release 0.0.367 Signed-off-by: Alba Hita Catala --- CHANGES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 3063cb1d..bdda0fb2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,12 @@ This document describes the relevant changes between releases of the API model. +# 0.0.367 Apr 10 2024 +- Update metamodel version to 0.0.60 +- [OCM-6294] add /load_balancer_quota_values endpoint +- [OCM-7027] feat: document pagination and ordering support for break glass +- [OCM-7144] Add /storage_quota_values endpoint + ## 0.0.366 Mar 18 2024 - Fix default capabilities From 4d52653f63ed71b81f510ce2d5d504a59ed87268 Mon Sep 17 00:00:00 2001 From: Miguel Soriano Date: Wed, 10 Apr 2024 17:12:19 +0200 Subject: [PATCH 5/8] chore: Release v0.0.368 --- CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index bdda0fb2..537a226c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,9 @@ This document describes the relevant changes between releases of the API model. +# 0.0.368 Apr 10 2024 +- Add `Azure` resource to `Cluster` resource. + # 0.0.367 Apr 10 2024 - Update metamodel version to 0.0.60 - [OCM-6294] add /load_balancer_quota_values endpoint From 98ce691aa080b24c1adb2f45f66c6c0d145b8b1c Mon Sep 17 00:00:00 2001 From: Miguel Soriano Date: Wed, 10 Apr 2024 17:31:33 +0200 Subject: [PATCH 6/8] fix: fix CHANGES.md formatting To fix the GitHub action that reads from the CHANGES.md file --- CHANGES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 537a226c..0246d414 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,10 +2,10 @@ This document describes the relevant changes between releases of the API model. -# 0.0.368 Apr 10 2024 +## 0.0.368 Apr 10 2024 - Add `Azure` resource to `Cluster` resource. -# 0.0.367 Apr 10 2024 +## 0.0.367 Apr 10 2024 - Update metamodel version to 0.0.60 - [OCM-6294] add /load_balancer_quota_values endpoint - [OCM-7027] feat: document pagination and ordering support for break glass From 7d9e440582baac7ab9e1b71531f52d5ba6cd63a8 Mon Sep 17 00:00:00 2001 From: Miguel Soriano Date: Wed, 10 Apr 2024 17:53:17 +0200 Subject: [PATCH 7/8] fix: fix spacing in description of Azure's ManagedResourceGroupName The metamodel does not deal correctly with the generation of Go code comments when the descriptions of the model have a different number of spaces after the comment markers --- model/clusters_mgmt/v1/azure_type.model | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/clusters_mgmt/v1/azure_type.model b/model/clusters_mgmt/v1/azure_type.model index 60023339..b78eadd7 100644 --- a/model/clusters_mgmt/v1/azure_type.model +++ b/model/clusters_mgmt/v1/azure_type.model @@ -38,7 +38,7 @@ struct Azure { // value, within the Azure Subscription `subscription_id` of the cluster. // `managed_resource_group_name` cannot be equal to the value of `managed_resource_group`. // `managed_resource_group_name` is located in the same Azure location as the - // cluster's region. + // cluster's region. // Not to be confused with `resource_group_name`, which is the Azure Resource Group Name // where the own Azure Resource associated to the cluster resides. ManagedResourceGroupName String From eed9a0f997b7731196ac0cad377e1164108228ab Mon Sep 17 00:00:00 2001 From: Miguel Soriano Date: Wed, 10 Apr 2024 18:08:41 +0200 Subject: [PATCH 8/8] chore: Release v0.0.369 --- CHANGES.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 0246d414..18f4e807 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,10 @@ This document describes the relevant changes between releases of the API model. +## 0.0.369 Apr 10 2024 +- Fix spacing in description of Azure's ManagedResourceGroupName +- Fix CHANGES.md formatting + ## 0.0.368 Apr 10 2024 - Add `Azure` resource to `Cluster` resource.