From 9a94c7d9f1a6c94a5773b4d6802dc3aeca234df6 Mon Sep 17 00:00:00 2001 From: Maggie Chen Date: Fri, 8 Dec 2023 10:40:38 -0500 Subject: [PATCH 1/2] OCM-5156 | add search and order param to nodepools Signed-off-by: Maggie Chen --- .../v1/node_pools_resource.model | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/model/clusters_mgmt/v1/node_pools_resource.model b/model/clusters_mgmt/v1/node_pools_resource.model index 5780407f..e2496bc1 100644 --- a/model/clusters_mgmt/v1/node_pools_resource.model +++ b/model/clusters_mgmt/v1/node_pools_resource.model @@ -24,6 +24,37 @@ resource NodePools { // 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 cluster instead of + // the names of the columns of a table. For example, in order to retrieve all the + // clusters with a name starting with `my` in the `us-east-1` region the value + // should be: + // + // ```sql + // name like 'my%' and region.id = 'us-east-1' + // ``` + // + // If the parameter isn't provided, or if the value is empty, then all the + // 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 cluster instead of + // the names of the columns of a table. For example, in order to sort the clusters + // descending by region identifier the value should be: + // + // ```sql + // region.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 From 068754d41f8508b7661e07cddd2800e2eaf866c7 Mon Sep 17 00:00:00 2001 From: Maggie Chen Date: Fri, 8 Dec 2023 11:10:09 -0500 Subject: [PATCH 2/2] fix tab and add examples Signed-off-by: Maggie Chen --- .../v1/node_pools_resource.model | 63 +++++++++---------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/model/clusters_mgmt/v1/node_pools_resource.model b/model/clusters_mgmt/v1/node_pools_resource.model index e2496bc1..44088704 100644 --- a/model/clusters_mgmt/v1/node_pools_resource.model +++ b/model/clusters_mgmt/v1/node_pools_resource.model @@ -16,61 +16,60 @@ limitations under the License. // Manages the collection of node pools of a cluster. resource NodePools { - // Retrieves the list of node pools. - method List { - // Index of the requested page, where one corresponds to the first page. - in out Page Integer = 1 + // Retrieves the list of node pools. + 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 + // Number of items contained in the returned page. + in out Size Integer = 100 - // Search criteria. - // + // 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 cluster instead of + // SQL statement, but using the names of the attributes of the node pools instead of // the names of the columns of a table. For example, in order to retrieve all the - // clusters with a name starting with `my` in the `us-east-1` region the value - // should be: + // node pools with replicas of two the following is required: // // ```sql - // name like 'my%' and region.id = 'us-east-1' + // replicas = 2 // ``` // // If the parameter isn't provided, or if the value is empty, then all the - // clusters that the user has permission to see will be returned. + // node pools 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 cluster instead of - // the names of the columns of a table. For example, in order to sort the clusters - // descending by region identifier the value should be: + // a SQL statement, but using the names of the attributes of the node pools instead of + // the names of the columns of a table. For example, in order to sort the node pools + // descending by identifier the value should be: // // ```sql - // region.id desc + // 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 + // Total number of items of the collection. + out Total Integer - // Retrieved list of node pools. - out Items []NodePool - } + // Retrieved list of node pools. + out Items []NodePool + } - // Adds a new node pool to the cluster. - method Add { - // Description of the node pool - in out Body NodePool - } + // Adds a new node pool to the cluster. + method Add { + // Description of the node pool + in out Body NodePool + } - // Reference to the service that manages a specific node pool. - locator NodePool { - target NodePool - variable ID - } + // Reference to the service that manages a specific node pool. + locator NodePool { + target NodePool + variable ID + } }