Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions openstack_cli/src/compute/v2/server/volume_attachment/set_20.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,10 @@ use openstack_types::compute::v2::server::volume_attachment::response::set::Volu

/// Update a volume attachment.
///
/// Policy default role is ‘rule:system_admin_or_owner’, its scope is \[system,
/// project\], which allow project members or system admins to change the
/// fields of an attached volume of a server. Policy defaults enable only users
/// with the administrative role to change `volumeId` via this operation. Cloud
/// providers can change these permissions through the `policy.json` file.
///
/// Updating, or what is commonly referred to as “swapping”, volume attachments
/// with volumes that have more than one read/write attachment, is not
/// supported.
/// Policy default role is ‘rule:admin_or_owner’, its scope is [project], which
/// allow project members or admins to change the fields of an attached volume
/// of a server. Cloud providers can change these permissions through the
/// `policy.yaml` file.
///
/// Normal response codes: 202
///
Expand Down Expand Up @@ -94,7 +89,7 @@ struct PathParameters {
/// VolumeAttachment Body data
#[derive(Args, Clone)]
struct VolumeAttachment {
/// The UUID of the volume to attach instead of the attached volume.
/// The UUID of the attached volume.
#[arg(help_heading = "Body parameters", long)]
volume_id: String,
}
Expand Down
15 changes: 5 additions & 10 deletions openstack_cli/src/compute/v2/server/volume_attachment/set_285.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,10 @@ use openstack_types::compute::v2::server::volume_attachment::response::set::Volu

/// Update a volume attachment.
///
/// Policy default role is ‘rule:system_admin_or_owner’, its scope is \[system,
/// project\], which allow project members or system admins to change the
/// fields of an attached volume of a server. Policy defaults enable only users
/// with the administrative role to change `volumeId` via this operation. Cloud
/// providers can change these permissions through the `policy.json` file.
///
/// Updating, or what is commonly referred to as “swapping”, volume attachments
/// with volumes that have more than one read/write attachment, is not
/// supported.
/// Policy default role is ‘rule:admin_or_owner’, its scope is [project], which
/// allow project members or admins to change the fields of an attached volume
/// of a server. Cloud providers can change these permissions through the
/// `policy.yaml` file.
///
/// Normal response codes: 202
///
Expand Down Expand Up @@ -129,7 +124,7 @@ struct VolumeAttachment {
#[arg(help_heading = "Body parameters", long)]
tag: Option<String>,

/// The UUID of the volume to attach instead of the attached volume.
/// The UUID of the attached volume.
#[arg(help_heading = "Body parameters", long)]
volume_id: String,
}
Expand Down
6 changes: 6 additions & 0 deletions openstack_cli/src/image/v2/image/file/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ use openstack_sdk::api::image::v2::image::file::upload;
/// is returned. When the header is not present, the image data is placed into
/// the default backing store.
///
/// An optional `x-openstack-image-size` header may be added to the request.
/// When present, the server will validate that the uploaded data size matches
/// this value. If the actual size does not match the expected size, a 400 (Bad
/// Request) response is returned. When not present, the server will calculate
/// the image size based on the actual request body size.
///
/// Example call:
///
/// **Preconditions**
Expand Down
11 changes: 7 additions & 4 deletions openstack_sdk/src/api/block_storage/v3/quota_class_set/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl RestEndpoint for Request<'_> {
}

fn response_key(&self) -> Option<Cow<'static, str>> {
None
Some("quota_class_set".into())
}

/// Returns headers to be set into the request
Expand Down Expand Up @@ -120,7 +120,10 @@ mod tests {

#[test]
fn test_response_key() {
assert!(Request::builder().build().unwrap().response_key().is_none())
assert_eq!(
Request::builder().build().unwrap().response_key().unwrap(),
"quota_class_set"
);
}

#[cfg(feature = "sync")]
Expand All @@ -134,7 +137,7 @@ mod tests {

then.status(200)
.header("content-type", "application/json")
.json_body(json!({ "dummy": {} }));
.json_body(json!({ "quota_class_set": {} }));
});

let endpoint = Request::builder().id("id").build().unwrap();
Expand All @@ -154,7 +157,7 @@ mod tests {
.header("not_foo", "not_bar");
then.status(200)
.header("content-type", "application/json")
.json_body(json!({ "dummy": {} }));
.json_body(json!({ "quota_class_set": {} }));
});

let endpoint = Request::builder()
Expand Down
21 changes: 12 additions & 9 deletions openstack_sdk/src/api/block_storage/v3/quota_class_set/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl RestEndpoint for Request<'_> {
}

fn response_key(&self) -> Option<Cow<'static, str>> {
None
Some("quota_class_set".into())
}

/// Returns headers to be set into the request
Expand Down Expand Up @@ -151,12 +151,15 @@ mod tests {

#[test]
fn test_response_key() {
assert!(Request::builder()
.quota_class_set(BTreeMap::<String, i32>::new().into_iter())
.build()
.unwrap()
.response_key()
.is_none())
assert_eq!(
Request::builder()
.quota_class_set(BTreeMap::<String, i32>::new().into_iter())
.build()
.unwrap()
.response_key()
.unwrap(),
"quota_class_set"
);
}

#[cfg(feature = "sync")]
Expand All @@ -170,7 +173,7 @@ mod tests {

then.status(200)
.header("content-type", "application/json")
.json_body(json!({ "dummy": {} }));
.json_body(json!({ "quota_class_set": {} }));
});

let endpoint = Request::builder()
Expand All @@ -194,7 +197,7 @@ mod tests {
.header("not_foo", "not_bar");
then.status(200)
.header("content-type", "application/json")
.json_body(json!({ "dummy": {} }));
.json_body(json!({ "quota_class_set": {} }));
});

let endpoint = Request::builder()
Expand Down
11 changes: 7 additions & 4 deletions openstack_sdk/src/api/block_storage/v3/quota_set/defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl RestEndpoint for Request<'_> {
}

fn response_key(&self) -> Option<Cow<'static, str>> {
None
Some("quota_set".into())
}

/// Returns headers to be set into the request
Expand Down Expand Up @@ -120,7 +120,10 @@ mod tests {

#[test]
fn test_response_key() {
assert!(Request::builder().build().unwrap().response_key().is_none())
assert_eq!(
Request::builder().build().unwrap().response_key().unwrap(),
"quota_set"
);
}

#[cfg(feature = "sync")]
Expand All @@ -134,7 +137,7 @@ mod tests {

then.status(200)
.header("content-type", "application/json")
.json_body(json!({ "dummy": {} }));
.json_body(json!({ "quota_set": {} }));
});

let endpoint = Request::builder().id("id").build().unwrap();
Expand All @@ -154,7 +157,7 @@ mod tests {
.header("not_foo", "not_bar");
then.status(200)
.header("content-type", "application/json")
.json_body(json!({ "dummy": {} }));
.json_body(json!({ "quota_set": {} }));
});

let endpoint = Request::builder()
Expand Down
11 changes: 7 additions & 4 deletions openstack_sdk/src/api/block_storage/v3/quota_set/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl RestEndpoint for Request<'_> {
}

fn response_key(&self) -> Option<Cow<'static, str>> {
None
Some("quota_set".into())
}

/// Returns headers to be set into the request
Expand Down Expand Up @@ -125,7 +125,10 @@ mod tests {

#[test]
fn test_response_key() {
assert!(Request::builder().build().unwrap().response_key().is_none())
assert_eq!(
Request::builder().build().unwrap().response_key().unwrap(),
"quota_set"
);
}

#[cfg(feature = "sync")]
Expand All @@ -139,7 +142,7 @@ mod tests {

then.status(200)
.header("content-type", "application/json")
.json_body(json!({ "dummy": {} }));
.json_body(json!({ "quota_set": {} }));
});

let endpoint = Request::builder().id("id").build().unwrap();
Expand All @@ -159,7 +162,7 @@ mod tests {
.header("not_foo", "not_bar");
then.status(200)
.header("content-type", "application/json")
.json_body(json!({ "dummy": {} }));
.json_body(json!({ "quota_set": {} }));
});

let endpoint = Request::builder()
Expand Down
21 changes: 12 additions & 9 deletions openstack_sdk/src/api/block_storage/v3/quota_set/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl RestEndpoint for Request<'_> {
}

fn response_key(&self) -> Option<Cow<'static, str>> {
None
Some("quota_set".into())
}

/// Returns headers to be set into the request
Expand Down Expand Up @@ -155,12 +155,15 @@ mod tests {

#[test]
fn test_response_key() {
assert!(Request::builder()
.quota_set(BTreeMap::<String, Value>::new().into_iter())
.build()
.unwrap()
.response_key()
.is_none())
assert_eq!(
Request::builder()
.quota_set(BTreeMap::<String, Value>::new().into_iter())
.build()
.unwrap()
.response_key()
.unwrap(),
"quota_set"
);
}

#[cfg(feature = "sync")]
Expand All @@ -174,7 +177,7 @@ mod tests {

then.status(200)
.header("content-type", "application/json")
.json_body(json!({ "dummy": {} }));
.json_body(json!({ "quota_set": {} }));
});

let endpoint = Request::builder()
Expand All @@ -198,7 +201,7 @@ mod tests {
.header("not_foo", "not_bar");
then.status(200)
.header("content-type", "application/json")
.json_body(json!({ "dummy": {} }));
.json_body(json!({ "quota_set": {} }));
});

let endpoint = Request::builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@

//! Update a volume attachment.
//!
//! Policy default role is ‘rule:system_admin_or_owner’, its scope is \[system,
//! project\], which allow project members or system admins to change the
//! fields of an attached volume of a server. Policy defaults enable only users
//! with the administrative role to change `volumeId` via this operation. Cloud
//! providers can change these permissions through the `policy.json` file.
//!
//! Updating, or what is commonly referred to as “swapping”, volume attachments
//! with volumes that have more than one read/write attachment, is not
//! supported.
//! Policy default role is ‘rule:admin_or_owner’, its scope is [project], which
//! allow project members or admins to change the fields of an attached volume
//! of a server. Cloud providers can change these permissions through the
//! `policy.yaml` file.
//!
//! Normal response codes: 202
//!
Expand All @@ -47,7 +42,7 @@ use std::borrow::Cow;
#[derive(Builder, Debug, Deserialize, Clone, Serialize)]
#[builder(setter(strip_option))]
pub struct VolumeAttachment<'a> {
/// The UUID of the volume to attach instead of the attached volume.
/// The UUID of the attached volume.
#[serde(rename = "volumeId")]
#[builder(setter(into))]
pub(crate) volume_id: Cow<'a, str>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@

//! Update a volume attachment.
//!
//! Policy default role is ‘rule:system_admin_or_owner’, its scope is \[system,
//! project\], which allow project members or system admins to change the
//! fields of an attached volume of a server. Policy defaults enable only users
//! with the administrative role to change `volumeId` via this operation. Cloud
//! providers can change these permissions through the `policy.json` file.
//!
//! Updating, or what is commonly referred to as “swapping”, volume attachments
//! with volumes that have more than one read/write attachment, is not
//! supported.
//! Policy default role is ‘rule:admin_or_owner’, its scope is [project], which
//! allow project members or admins to change the fields of an attached volume
//! of a server. Cloud providers can change these permissions through the
//! `policy.yaml` file.
//!
//! Normal response codes: 202
//!
Expand Down Expand Up @@ -83,7 +78,7 @@ pub struct VolumeAttachment<'a> {
#[builder(default, setter(into))]
pub(crate) tag: Option<Cow<'a, str>>,

/// The UUID of the volume to attach instead of the attached volume.
/// The UUID of the attached volume.
#[serde(rename = "volumeId")]
#[builder(setter(into))]
pub(crate) volume_id: Cow<'a, str>,
Expand Down
6 changes: 6 additions & 0 deletions openstack_sdk/src/api/image/v2/image/file/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
//! is returned. When the header is not present, the image data is placed into
//! the default backing store.
//!
//! An optional `x-openstack-image-size` header may be added to the request.
//! When present, the server will validate that the uploaded data size matches
//! this value. If the actual size does not match the expected size, a 400 (Bad
//! Request) response is returned. When not present, the server will calculate
//! the image size based on the actual request body size.
//!
//! Example call:
//!
//! **Preconditions**
Expand Down
6 changes: 6 additions & 0 deletions openstack_sdk/src/api/image/v2/image/stage/stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
//!
//! Set the `Content-Type` request header to `application/octet-stream`.
//!
//! An optional `x-openstack-image-size` header may be added to the request.
//! When present, the server will validate that the uploaded data size matches
//! this value. If the actual size does not match the expected size, a 400 (Bad
//! Request) response is returned. When not present, the server will calculate
//! the image size based on the actual request body size.
//!
//! Example call:
//!
//! **Preconditions**
Expand Down
Loading
Loading