pub struct Server { /* private fields */ }
Expand description
Structure representing a single server.
Implementations
sourceimpl Server
impl Server
sourcepub fn access_ipv4(&self) -> Option<Ipv4Addr>
pub fn access_ipv4(&self) -> Option<Ipv4Addr>
IPv4 address to access the server (if provided).
sourcepub fn access_ipv6(&self) -> Option<Ipv6Addr>
pub fn access_ipv6(&self) -> Option<Ipv6Addr>
IPv6 address to access the server (if provided).
sourcepub fn addresses(&self) -> &HashMap<String, Vec<ServerAddress>>
pub fn addresses(&self) -> &HashMap<String, Vec<ServerAddress>>
Addresses (floating and fixed) associated with the server.
sourcepub fn availability_zone(&self) -> &String
pub fn availability_zone(&self) -> &String
Availability zone.
sourcepub fn created_at(&self) -> DateTime<FixedOffset>
pub fn created_at(&self) -> DateTime<FixedOffset>
Creation date and time.
sourcepub fn description(&self) -> &Option<String>
pub fn description(&self) -> &Option<String>
Server description.
sourcepub fn flavor(&self) -> &ServerFlavor
pub fn flavor(&self) -> &ServerFlavor
Flavor information used to create this server.
sourcepub fn floating_ip(&self) -> Option<IpAddr>
pub fn floating_ip(&self) -> Option<IpAddr>
Find a floating IP, if it exists.
If multiple floating IPs exist, the first is returned.
sourcepub fn has_config_drive(&self) -> bool
pub fn has_config_drive(&self) -> bool
Whether the server was created with a config drive.
sourcepub fn has_image(&self) -> bool
pub fn has_image(&self) -> bool
Whether the server has an image.
May return false
if the server was created from a volume.
sourcepub fn image(&self) -> Result<Image>
pub fn image(&self) -> Result<Image>
Fetch the associated image.
Fails with ResourceNotFound
if the server does not have an image.
sourcepub fn image_id(&self) -> Option<&String>
pub fn image_id(&self) -> Option<&String>
Get a reference to the image.
May be None if the server was created from a volume.
sourcepub fn key_pair_name(&self) -> &Option<String>
pub fn key_pair_name(&self) -> &Option<String>
Name of a key pair used with this server (if any).
sourcepub fn power_state(&self) -> ServerPowerState
pub fn power_state(&self) -> ServerPowerState
Server power state.
sourcepub fn status(&self) -> ServerStatus
pub fn status(&self) -> ServerStatus
Server status.
sourcepub fn updated_at(&self) -> DateTime<FixedOffset>
pub fn updated_at(&self) -> DateTime<FixedOffset>
Last update date and time.
sourcepub fn delete(self) -> Result<DeletionWaiter<Server>>
pub fn delete(self) -> Result<DeletionWaiter<Server>>
Delete the server.
sourcepub fn reboot<'server>(
&'server mut self,
reboot_type: RebootType
) -> Result<ServerStatusWaiter<'server>>
pub fn reboot<'server>(
&'server mut self,
reboot_type: RebootType
) -> Result<ServerStatusWaiter<'server>>
Reboot the server.
sourcepub fn start<'server>(&'server mut self) -> Result<ServerStatusWaiter<'server>>
pub fn start<'server>(&'server mut self) -> Result<ServerStatusWaiter<'server>>
Start the server, optionally wait for it to be active.
sourcepub fn stop<'server>(&'server mut self) -> Result<ServerStatusWaiter<'server>>
pub fn stop<'server>(&'server mut self) -> Result<ServerStatusWaiter<'server>>
Stop the server, optionally wait for it to be powered off.