pub struct Port { /* private fields */ }Expand description
Structure representing a port - a virtual NIC.
Implementations§
Source§impl Port
impl Port
Sourcepub fn admin_state_up(&self) -> bool
pub fn admin_state_up(&self) -> bool
The administrative state of the port.
Sourcepub fn set_admin_state_up(&mut self, value: bool)
pub fn set_admin_state_up(&mut self, value: bool)
Update the administrative state.
Sourcepub fn with_admin_state_up(self, value: bool) -> Self
pub fn with_admin_state_up(self, value: bool) -> Self
Update the administrative state.
Sourcepub fn attached_to_server(&self) -> bool
pub fn attached_to_server(&self) -> bool
Whether the device_owner is a Compute server.
Sourcepub fn created_at(&self) -> Option<DateTime<FixedOffset>>
pub fn created_at(&self) -> Option<DateTime<FixedOffset>>
Creation data and time (if available).
Sourcepub fn description(&self) -> &Option<String>
pub fn description(&self) -> &Option<String>
Port description.
Sourcepub fn set_description<S: Into<String>>(&mut self, value: S)
pub fn set_description<S: Into<String>>(&mut self, value: S)
Update the description.
Sourcepub fn with_description<S: Into<String>>(self, value: S) -> Self
pub fn with_description<S: Into<String>>(self, value: S) -> Self
Update the description.
Sourcepub fn device_id(&self) -> &Option<String>
pub fn device_id(&self) -> &Option<String>
ID of object (server, router, etc) to which this port is attached.
Sourcepub fn set_device_id<S: Into<String>>(&mut self, value: S)
pub fn set_device_id<S: Into<String>>(&mut self, value: S)
Update the device ID.
Sourcepub fn with_device_id<S: Into<String>>(self, value: S) -> Self
pub fn with_device_id<S: Into<String>>(self, value: S) -> Self
Update the device ID.
Sourcepub fn device_owner(&self) -> &Option<String>
pub fn device_owner(&self) -> &Option<String>
Type of object to which this port is attached.
Sourcepub fn set_device_owner<S: Into<String>>(&mut self, value: S)
pub fn set_device_owner<S: Into<String>>(&mut self, value: S)
Update the device owner.
Sourcepub fn with_device_owner<S: Into<String>>(self, value: S) -> Self
pub fn with_device_owner<S: Into<String>>(self, value: S) -> Self
Update the device owner.
Sourcepub fn dns_domain(&self) -> &Option<String>
pub fn dns_domain(&self) -> &Option<String>
DNS domain for the port (if available).
Sourcepub fn set_dns_domain<S: Into<String>>(&mut self, value: S)
pub fn set_dns_domain<S: Into<String>>(&mut self, value: S)
Update the DNS domain.
Sourcepub fn with_dns_domain<S: Into<String>>(self, value: S) -> Self
pub fn with_dns_domain<S: Into<String>>(self, value: S) -> Self
Update the DNS domain.
Sourcepub fn set_dns_name<S: Into<String>>(&mut self, value: S)
pub fn set_dns_name<S: Into<String>>(&mut self, value: S)
Update the DNS name.
Sourcepub fn with_dns_name<S: Into<String>>(self, value: S) -> Self
pub fn with_dns_name<S: Into<String>>(self, value: S) -> Self
Update the DNS name.
Sourcepub fn extra_dhcp_opts(&self) -> &Vec<PortExtraDhcpOption>
pub fn extra_dhcp_opts(&self) -> &Vec<PortExtraDhcpOption>
DHCP options configured for this port.
Sourcepub fn extra_dhcp_opts_mut(&mut self) -> &mut Vec<PortExtraDhcpOption>
pub fn extra_dhcp_opts_mut(&mut self) -> &mut Vec<PortExtraDhcpOption>
Mutable access to DHCP options.
Sourcepub fn set_extra_dhcp_opts(&mut self, value: Vec<PortExtraDhcpOption>)
pub fn set_extra_dhcp_opts(&mut self, value: Vec<PortExtraDhcpOption>)
Update the DHCP options.
Sourcepub fn with_extra_dhcp_opts(self, value: Vec<PortExtraDhcpOption>) -> Self
pub fn with_extra_dhcp_opts(self, value: Vec<PortExtraDhcpOption>) -> Self
Update the DHCP options.
Sourcepub fn fixed_ips(&self) -> &Vec<PortIpAddress>
pub fn fixed_ips(&self) -> &Vec<PortIpAddress>
Fixed IP addresses of the port.
Sourcepub fn mac_address(&self) -> MacAddress
pub fn mac_address(&self) -> MacAddress
MAC address of the port.
Sourcepub fn set_mac_address(&mut self, value: MacAddress)
pub fn set_mac_address(&mut self, value: MacAddress)
Update the MAC address (admin-only).
Sourcepub fn with_mac_address(self, value: MacAddress) -> Self
pub fn with_mac_address(self, value: MacAddress) -> Self
Update the MAC address (admin-only).
Sourcepub fn network_id(&self) -> &String
pub fn network_id(&self) -> &String
ID of the network this port belongs to.
Sourcepub fn status(&self) -> NetworkStatus
pub fn status(&self) -> NetworkStatus
Port status.
Sourcepub fn updated_at(&self) -> Option<DateTime<FixedOffset>>
pub fn updated_at(&self) -> Option<DateTime<FixedOffset>>
Last update data and time (if available).
Sourcepub async fn delete(self) -> Result<DeletionWaiter<Port>>
pub async fn delete(self) -> Result<DeletionWaiter<Port>>
Delete the port.