Struct RebuildBuilder

Source
pub struct RebuildBuilder<'a> { /* private fields */ }
Expand description

Builder for Rebuild.

Implementations§

Source§

impl<'a> RebuildBuilder<'a>

Source

pub fn access_ipv4<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE, ) -> &mut Self

IPv4 address that should be used to access this server.

Source

pub fn access_ipv6<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE, ) -> &mut Self

IPv6 address that should be used to access this server.

Source

pub fn admin_pass<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE, ) -> &mut Self

The administrative password of the server. If you omit this parameter, the operation generates a new password.

Source

pub fn description<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE, ) -> &mut Self

A free form description of the server. Limited to 255 characters in length. Before microversion 2.19 this was set to the server name.

New in version 2.19

Source

pub fn image_ref<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE, ) -> &mut Self

The UUID of the image to rebuild for your server instance. It must be a valid UUID otherwise API will return 400. To rebuild a volume-backed server with a new image, at least microversion 2.93 needs to be provided in the request else the request will fall back to old behaviour i.e. the API will return 400 (for an image different from the image used when creating the volume). For non-volume-backed servers, specifying a new image will result in validating that the image is acceptable for the current compute host on which the server exists. If the new image is not valid, the server will go into ERROR status.

Source

pub fn key_name<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE, ) -> &mut Self

Key pair name for rebuild API. If null is specified, the existing keypair is unset.

Note

Users within the same project are able to rebuild other user’s instances in that project with a new keypair. Keys are owned by users (which is the only resource that’s true of). Servers are owned by projects. Because of this a rebuild with a key_name is looking up the keypair by the user calling rebuild.

New in version 2.54

Source

pub fn name<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self

The server name.

Source

pub fn os_dcf_disk_config(&mut self, value: OsDcfDiskConfig) -> &mut Self

Controls how the API partitions the disk when you create, rebuild, or resize servers. A server inherits the OS-DCF:diskConfig value from the image from which it was created, and an image inherits the OS-DCF:diskConfig value from the server from which it was created. To override the inherited setting, you can include this attribute in the request body of a server create, rebuild, or resize request. If the OS-DCF:diskConfig value for an image is MANUAL, you cannot create a server from that image and set its OS-DCF:diskConfig value to AUTO. A valid value is:

  • AUTO. The API builds the server with a single partition the size of the target flavor disk. The API automatically adjusts the file system to fit the entire partition.
  • MANUAL. The API builds the server by using whatever partition scheme and file system is in the source image. If the target flavor disk is larger, the API does not partition the remaining disk space.
Source

pub fn preserve_ephemeral<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Indicates whether the server is rebuilt with the preservation of the ephemeral partition (true).

Note

This only works with baremetal servers provided by Ironic. Passing it to any other server instance results in a fault and will prevent the rebuild from happening.

Source

pub fn trusted_image_certificates<VALUE: Into<Vec<Cow<'a, str>>>>( &mut self, value: VALUE, ) -> &mut Self

A list of trusted certificate IDs, which are used during image signature verification to verify the signing certificate. The list is restricted to a maximum of 50 IDs. This parameter is optional in server rebuild requests if allowed by policy, and is not supported for volume-backed instances.

If null is specified, the existing trusted certificate IDs are either unset or reset to the configured defaults.

New in version 2.63

Source

pub fn user_data<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE, ) -> &mut Self

Configuration information or scripts to use upon rebuild. Must be Base64 encoded. Restricted to 65535 bytes. If null is specified, the existing user_data is unset.

New in version 2.57

Source

pub fn build(&self) -> Result<Rebuild<'a>, RebuildBuilderError>

Builds a new Rebuild.

§Errors

If a required field has not been initialized.

Source§

impl<'a> RebuildBuilder<'a>

Source

pub fn metadata<I, K, V>(&mut self, iter: I) -> &mut Self
where I: Iterator<Item = (K, V)>, K: Into<Cow<'a, str>>, V: Into<Cow<'a, str>>,

Metadata key and value pairs. The maximum size of the metadata key and value is 255 bytes each.

Trait Implementations§

Source§

impl<'a> Clone for RebuildBuilder<'a>

Source§

fn clone(&self) -> RebuildBuilder<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Default for RebuildBuilder<'a>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for RebuildBuilder<'a>

§

impl<'a> RefUnwindSafe for RebuildBuilder<'a>

§

impl<'a> Send for RebuildBuilder<'a>

§

impl<'a> Sync for RebuildBuilder<'a>

§

impl<'a> Unpin for RebuildBuilder<'a>

§

impl<'a> UnwindSafe for RebuildBuilder<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,