Skip to content

Commit

Permalink
Merge branch 'main' into OCM-6535-API
Browse files Browse the repository at this point in the history
  • Loading branch information
davidleerh committed Apr 24, 2024
2 parents ecb846f + ac7f60a commit 564dca6
Show file tree
Hide file tree
Showing 7 changed files with 153 additions and 4 deletions.
13 changes: 13 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

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.

## 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

Expand Down
45 changes: 45 additions & 0 deletions model/clusters_mgmt/v1/azure_type.model
Original file line number Diff line number Diff line change
@@ -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
}
34 changes: 30 additions & 4 deletions model/clusters_mgmt/v1/break_glass_credentials_resource.model
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,43 @@ 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

// 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

Expand Down
3 changes: 3 additions & 0 deletions model/clusters_mgmt/v1/cluster_type.model
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions model/clusters_mgmt/v1/root_resource.model
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,9 @@ resource Root {
locator LoadBalancerQuotaValues{
target LoadBalancerQuotaValues
}

// Reference to the resource that manages the storage quota values.
locator StorageQuotaValues{
target StorageQuotaValues
}
}
24 changes: 24 additions & 0 deletions model/clusters_mgmt/v1/storage_quota_type.model
Original file line number Diff line number Diff line change
@@ -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
}
33 changes: 33 additions & 0 deletions model/clusters_mgmt/v1/storage_quota_values_resource.model
Original file line number Diff line number Diff line change
@@ -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
}
}

0 comments on commit 564dca6

Please sign in to comment.