-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #723 from tzvatot/pending-delete-clusters
Add pending delete cluster API
- Loading branch information
Showing
4 changed files
with
134 additions
and
3 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
model/clusters_mgmt/v1/pending_delete_cluster_resource.model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
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 a specific pending delete cluster. | ||
resource PendingDeleteCluster { | ||
// Retrieves the details of the pending delete cluster. | ||
method Get { | ||
out Body PendingDeleteCluster | ||
} | ||
|
||
// Updates the pending delete cluster entry. | ||
method Update { | ||
in out Body PendingDeleteCluster | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
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. | ||
*/ | ||
|
||
// Represents a pending delete entry for a specific cluster. | ||
class PendingDeleteCluster { | ||
// Cluster is the details of the cluster that is pending deletion. | ||
link Cluster Cluster | ||
|
||
// Date and time when the cluster was initially created, using the | ||
// format defined in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). | ||
CreationTimestamp Date | ||
|
||
// Flag indicating if the cluster deletion should be best-effort mode or not. | ||
BestEffort Boolean | ||
} |
70 changes: 70 additions & 0 deletions
70
model/clusters_mgmt/v1/pending_delete_clusters_resource.model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
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 pending delete clusters. | ||
resource PendingDeleteClusters { | ||
// Retrieves the list of pending delete clusters. | ||
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 | ||
|
||
// 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 pending delete cluster instead of | ||
// the names of the columns of a table. For example, in order to retrieve all the | ||
// pending delete clusters with creation time later than 2023-03-01T00:00:00Z the following is required: | ||
// | ||
// ```sql | ||
// creation_timestamp > '2023-03-01T00:00:00Z' | ||
// ``` | ||
// | ||
// If the parameter isn't provided, or if the value is empty, then all the | ||
// pending delete clusters 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 pending delete cluster instead of | ||
// the names of the columns of a table. For example, in order to sort the pending delete clusters | ||
// descending by creation timestamp (i.e. their deletion time) the value should be: | ||
// | ||
// ```sql | ||
// creation_timestamp 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 that match the search criteria, | ||
// regardless of the size of the page. | ||
out Total Integer | ||
|
||
// Retrieved list of pending delete clusters. | ||
out Items []PendingDeleteCluster | ||
} | ||
|
||
// Returns a reference to the service that manages an specific pending delete cluster. | ||
locator PendingDeleteCluster { | ||
target PendingDeleteCluster | ||
variable ID | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters