Skip to content

Commit

Permalink
Merge pull request #818 from Lir10/add_new_osl_endpoint_v1_clusters_c…
Browse files Browse the repository at this point in the history
…luster_logs

Add a new resource to OSL clusters/cluster_logs
  • Loading branch information
tzvatot authored Aug 21, 2023
2 parents 8cddfc0 + 70193fa commit aa9616e
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
2 changes: 2 additions & 0 deletions model/service_logs/v1/cluster_logs_resource.model
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ limitations under the License.
// Manages the collection of cluster logs.
resource ClusterLogs {
// Retrieves the list of cluster logs.
// Use this endpoint to list service logs (including private logs).
// This endpoint is limited to users who allowed to view private logs.
method List {
// Index of the requested page, where one corresponds to the first page.
in out Page Integer = 1
Expand Down
71 changes: 71 additions & 0 deletions model/service_logs/v1/clusters_cluster_logs_resource.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
Copyright (c) 2023 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 the collection of Clusters cluster logs.
resource ClustersClusterLogs {
// Retrieves the list of cluster logs by the cluster_id and/or cluster_uuid parameters.
// Use this endpoint to list service logs for a specific cluster (excluding private logs).
// Any authenticated user is able to use this endpoint without any special permissions.
method List {
// Index of the requested page, where one corresponds to the first page.
in out Page Integer = 1

// Maximum number of items that will be contained in the returned page.
in out Size Integer = 100

// Total number of items of the collection that match the search criteria,
// regardless of the size of the page.
out Total Integer

// Order criteria.
//
// The syntax of this parameter is similar to the syntax of the _order by_ clause of
// a SQL statement. For example, in order to sort the
// cluster logs descending by name identifier the value should be:
//
// ```sql
// name desc
// ```
//
// If the parameter isn't provided, or if the value is empty, then the order of the
// results is undefined.
in Order String

// Search criteria.
//
// The syntax of this parameter is similar to the syntax of the _where_ clause
// of an SQL statement, but using the names of the attributes of the cluster logs
// instead of the names of the columns of a table. For example, in order to
// retrieve cluster logs with service_name starting with my:
//
// ```sql
// service_name like 'my%'
// ```
//
// If the parameter isn't provided, or if the value is empty, then all the
// items that the user has permission to see will be returned.
in Search String

// cluster_id parameter.
in ClusterID String

// cluster_uuid parameter.
in ClusterUUID String

// Retrieved list of Cluster logs.
out Items []LogEntry
}
}
5 changes: 5 additions & 0 deletions model/service_logs/v1/clusters_resource.model
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ limitations under the License.
// Manages the collection of clusters for clusters logs.
resource Clusters {

// Reference to the service that manages the cluster logs.
locator ClusterLogs {
target ClustersClusterLogs
}

// Reference to the service that manages a specific Cluster uuid.
locator Cluster {
target Cluster
Expand Down

0 comments on commit aa9616e

Please sign in to comment.