-
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.
OCM-7800 | Define and add pagination model to cloud_provider_inquiries
Signed-off-by: Chetan Giradkar <[email protected]>
- Loading branch information
Showing
3 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
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,23 @@ | ||
/* | ||
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. | ||
*/ | ||
|
||
// Pagination contains the data which enables pagination on the response | ||
struct Pagination { | ||
Page Integer | ||
Size Integer | ||
Search String | ||
Order String | ||
} |
63 changes: 63 additions & 0 deletions
63
model/clusters_mgmt/v1/provider_data_inquiries_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,63 @@ | ||
/* | ||
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 the cloud provider data of a cluster. | ||
resource CloudProvidersData { | ||
// Retrieves the list of cloud provider data. | ||
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 | ||
|
||
// Retrieved list of cloud provider data. | ||
out Items []CloudProviderData | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
model/clusters_mgmt/v1/provider_data_inquiry_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,23 @@ | ||
/* | ||
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 a specific cloud provider data. | ||
resource CloudProviderData { | ||
// Retrieves the details of the cloud provider data. | ||
method Get { | ||
out Body CloudProviderData | ||
} | ||
} |