pub struct Port { /* private fields */ }
Expand description
Structure representing a port - a virtual NIC.
Implementations
sourceimpl 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 fn delete(self) -> Result<DeletionWaiter<Port>>
pub fn delete(self) -> Result<DeletionWaiter<Port>>
Delete the port.