Skip to content

Commit 391c9aa

Browse files
authored
feat: Improve UX clarity of "limit" query parameter (#1313)
Rename "limit" query parameter of the list operations to "page-size" for giving precise meaning (keep alias "limit"). This is necessary to finally resolve the conflict that we have in the python-openstackclient where "limit" means a page size and all entries are fetched unless you also specify the marker (which is not something anybody can really understand why). Change-Id: I9a6ddcbe30d92c4d190229ac77a10c28eb0015fb Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> Changes are triggered by https://review.opendev.org/952998
1 parent efd0f2a commit 391c9aa

File tree

114 files changed

+828
-140
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+828
-140
lines changed

openstack_cli/src/block_storage/v3/attachment/list.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ struct QueryParameters {
6060
/// value. Use the limit parameter to make an initial limited request and
6161
/// use the ID of the last-seen item from the response as the marker
6262
/// parameter value in a subsequent limited request.
63-
#[arg(help_heading = "Query parameters", long)]
63+
#[arg(
64+
help_heading = "Query parameters",
65+
long("page-size"),
66+
visible_alias("limit")
67+
)]
6468
limit: Option<i32>,
6569

6670
/// The ID of the last-seen item. Use the limit parameter to make an

openstack_cli/src/block_storage/v3/backup/list.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ struct QueryParameters {
6060
/// value. Use the limit parameter to make an initial limited request and
6161
/// use the ID of the last-seen item from the response as the marker
6262
/// parameter value in a subsequent limited request.
63-
#[arg(help_heading = "Query parameters", long)]
63+
#[arg(
64+
help_heading = "Query parameters",
65+
long("page-size"),
66+
visible_alias("limit")
67+
)]
6468
limit: Option<i32>,
6569

6670
/// The ID of the last-seen item. Use the limit parameter to make an

openstack_cli/src/block_storage/v3/group/list.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ struct QueryParameters {
6060
/// value. Use the limit parameter to make an initial limited request and
6161
/// use the ID of the last-seen item from the response as the marker
6262
/// parameter value in a subsequent limited request.
63-
#[arg(help_heading = "Query parameters", long)]
63+
#[arg(
64+
help_heading = "Query parameters",
65+
long("page-size"),
66+
visible_alias("limit")
67+
)]
6468
limit: Option<i32>,
6569

6670
/// The ID of the last-seen item. Use the limit parameter to make an

openstack_cli/src/block_storage/v3/group_snapshot/list.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ struct QueryParameters {
6060
/// value. Use the limit parameter to make an initial limited request and
6161
/// use the ID of the last-seen item from the response as the marker
6262
/// parameter value in a subsequent limited request.
63-
#[arg(help_heading = "Query parameters", long)]
63+
#[arg(
64+
help_heading = "Query parameters",
65+
long("page-size"),
66+
visible_alias("limit")
67+
)]
6468
limit: Option<i32>,
6569

6670
/// The ID of the last-seen item. Use the limit parameter to make an

openstack_cli/src/block_storage/v3/group_type/list.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ struct QueryParameters {
6060
/// value. Use the limit parameter to make an initial limited request and
6161
/// use the ID of the last-seen item from the response as the marker
6262
/// parameter value in a subsequent limited request.
63-
#[arg(help_heading = "Query parameters", long)]
63+
#[arg(
64+
help_heading = "Query parameters",
65+
long("page-size"),
66+
visible_alias("limit")
67+
)]
6468
limit: Option<i32>,
6569

6670
/// The ID of the last-seen item. Use the limit parameter to make an

openstack_cli/src/block_storage/v3/manageable_snapshot/get.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ struct QueryParameters {
5151
/// value. Use the limit parameter to make an initial limited request and
5252
/// use the ID of the last-seen item from the response as the marker
5353
/// parameter value in a subsequent limited request.
54-
#[arg(help_heading = "Query parameters", long)]
54+
#[arg(
55+
help_heading = "Query parameters",
56+
long("page-size"),
57+
visible_alias("limit")
58+
)]
5559
limit: Option<i32>,
5660

5761
/// The ID of the last-seen item. Use the limit parameter to make an

openstack_cli/src/block_storage/v3/manageable_snapshot/list.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ struct QueryParameters {
5656
/// value. Use the limit parameter to make an initial limited request and
5757
/// use the ID of the last-seen item from the response as the marker
5858
/// parameter value in a subsequent limited request.
59-
#[arg(help_heading = "Query parameters", long)]
59+
#[arg(
60+
help_heading = "Query parameters",
61+
long("page-size"),
62+
visible_alias("limit")
63+
)]
6064
limit: Option<i32>,
6165

6266
/// The ID of the last-seen item. Use the limit parameter to make an

openstack_cli/src/block_storage/v3/manageable_volume/get.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ struct QueryParameters {
5151
/// value. Use the limit parameter to make an initial limited request and
5252
/// use the ID of the last-seen item from the response as the marker
5353
/// parameter value in a subsequent limited request.
54-
#[arg(help_heading = "Query parameters", long)]
54+
#[arg(
55+
help_heading = "Query parameters",
56+
long("page-size"),
57+
visible_alias("limit")
58+
)]
5559
limit: Option<i32>,
5660

5761
/// The ID of the last-seen item. Use the limit parameter to make an

openstack_cli/src/block_storage/v3/manageable_volume/list.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ struct QueryParameters {
5656
/// value. Use the limit parameter to make an initial limited request and
5757
/// use the ID of the last-seen item from the response as the marker
5858
/// parameter value in a subsequent limited request.
59-
#[arg(help_heading = "Query parameters", long)]
59+
#[arg(
60+
help_heading = "Query parameters",
61+
long("page-size"),
62+
visible_alias("limit")
63+
)]
6064
limit: Option<i32>,
6165

6266
/// The ID of the last-seen item. Use the limit parameter to make an

openstack_cli/src/block_storage/v3/message/list.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ struct QueryParameters {
5656
/// value. Use the limit parameter to make an initial limited request and
5757
/// use the ID of the last-seen item from the response as the marker
5858
/// parameter value in a subsequent limited request.
59-
#[arg(help_heading = "Query parameters", long)]
59+
#[arg(
60+
help_heading = "Query parameters",
61+
long("page-size"),
62+
visible_alias("limit")
63+
)]
6064
limit: Option<i32>,
6165

6266
/// The ID of the last-seen item. Use the limit parameter to make an

0 commit comments

Comments
 (0)