Skip to content

Commit

Permalink
Merge pull request #823 from Lir10/release_0_1_364
Browse files Browse the repository at this point in the history
chore: release v0.1.364
  • Loading branch information
tzvatot authored Aug 22, 2023
2 parents 3bf771c + 463320b commit 0c8ce93
Show file tree
Hide file tree
Showing 10 changed files with 921 additions and 106 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
This document describes the relevant changes between releases of the OCM API
SDK.

## 0.1.364
- Update model version v0.0.311
- Add a new resource to OSL clusters/cluster_log

## 0.1.363
- Modify SelfAccessReview to return IsOCMInternal field

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
export CGO_ENABLED=0

# Details of the model to use:
model_version:=v0.0.310
model_version:=v0.0.311
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
3 changes: 2 additions & 1 deletion metrics/path_tree_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,8 @@ var pathTreeData = `{
"clusters": {
"-": {
"cluster_logs": null
}
},
"cluster_logs": null
}
}
},
Expand Down
105 changes: 104 additions & 1 deletion openapi/service_logs/v1/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
}
},
"get": {
"description": "Retrieves the list of cluster logs.",
"description": "Retrieves the list of cluster logs.\nUse this endpoint to list service logs (including private logs).\nThis endpoint is limited to users who allowed to view private logs.",
"parameters": [
{
"name": "order",
Expand Down Expand Up @@ -236,6 +236,109 @@
}
}
},
"/api/service_logs/v1/clusters/cluster_logs": {
"get": {
"description": "Retrieves the list of cluster logs by the cluster_id and/or cluster_uuid parameters.\nUse this endpoint to list service logs for a specific cluster (excluding private logs).\nAny authenticated user is able to use this endpoint without any special permissions.",
"parameters": [
{
"name": "cluster_id",
"description": "cluster_id parameter.",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "cluster_uuid",
"description": "cluster_uuid parameter.",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "order",
"description": "Order criteria.\n\nThe syntax of this parameter is similar to the syntax of the _order by_ clause of\na SQL statement. For example, in order to sort the\ncluster logs descending by name identifier the value should be:\n\n```sql\nname desc\n```\n\nIf the parameter isn't provided, or if the value is empty, then the order of the\nresults is undefined.",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "page",
"description": "Index of the requested page, where one corresponds to the first page.",
"in": "query",
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "search",
"description": "Search criteria.\n\nThe syntax of this parameter is similar to the syntax of the _where_ clause\nof an SQL statement, but using the names of the attributes of the cluster logs\ninstead of the names of the columns of a table. For example, in order to\nretrieve cluster logs with service_name starting with my:\n\n```sql\nservice_name like 'my%'\n```\n\nIf the parameter isn't provided, or if the value is empty, then all the\nitems that the user has permission to see will be returned.",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "size",
"description": "Maximum number of items that will be contained in the returned page.",
"in": "query",
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"description": "Retrieved list of Cluster logs.",
"type": "array",
"items": {
"$ref": "#/components/schemas/LogEntry"
}
},
"page": {
"description": "Index of the requested page, where one corresponds to the first page.",
"type": "integer",
"format": "int32"
},
"size": {
"description": "Maximum number of items that will be contained in the returned page.",
"type": "integer",
"format": "int32"
},
"total": {
"description": "Total number of items of the collection that match the search criteria,\nregardless of the size of the page.",
"type": "integer",
"format": "int32"
}
}
}
}
}
},
"default": {
"description": "Error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/api/service_logs/v1/clusters/{cluster_id}/cluster_logs": {
"get": {
"description": "Retrieves the list of cluster logs by cluster uuid.",
Expand Down
2 changes: 2 additions & 0 deletions servicelogs/v1/cluster_logs_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ func (c *ClusterLogsClient) Add() *ClusterLogsAddRequest {
// List creates a request for the 'list' method.
//
// 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.
func (c *ClusterLogsClient) List() *ClusterLogsListRequest {
return &ClusterLogsListRequest{
transport: c.transport,
Expand Down
10 changes: 10 additions & 0 deletions servicelogs/v1/clusters_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@ func (c *ClustersClient) Cluster(id string) *ClusterClient {
path.Join(c.path, id),
)
}

// ClusterLogs returns the target 'clusters_cluster_logs' resource.
//
// Reference to the service that manages the cluster logs.
func (c *ClustersClient) ClusterLogs() *ClustersClusterLogsClient {
return NewClustersClusterLogsClient(
c.transport,
path.Join(c.path, "cluster_logs"),
)
}
Loading

0 comments on commit 0c8ce93

Please sign in to comment.