pub struct Router { /* private fields */ }Expand description
Structure representing a single router.
Implementations§
Source§impl Router
impl Router
Sourcepub fn admin_state_up(&self) -> bool
pub fn admin_state_up(&self) -> bool
The administrative state of the router.
Sourcepub fn set_admin_state_up(&mut self, value: bool)
pub fn set_admin_state_up(&mut self, value: bool)
Set the administrative state of the router.
Sourcepub fn with_admin_state_up(self, value: bool) -> Self
pub fn with_admin_state_up(self, value: bool) -> Self
Set the administrative state of the router.
Sourcepub fn availability_zone_hints(&self) -> &Vec<String>
pub fn availability_zone_hints(&self) -> &Vec<String>
Availability zone candidates for the router
Sourcepub fn availability_zones(&self) -> &Vec<String>
pub fn availability_zones(&self) -> &Vec<String>
The availability zones for the router (if available).
Sourcepub fn conntrack_helpers(&self) -> &Vec<ConntrackHelper>
pub fn conntrack_helpers(&self) -> &Vec<ConntrackHelper>
The associated conntrack helper resources for the router.
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>
Router 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 distributed(&self) -> Option<bool>
pub fn distributed(&self) -> Option<bool>
Indicates if the router is distributed.
Sourcepub fn set_distributed(&mut self, value: bool)
pub fn set_distributed(&mut self, value: bool)
Update whether this is a distributed router.
Sourcepub fn with_distributed(self, value: bool) -> Self
pub fn with_distributed(self, value: bool) -> Self
Update whether this is a distributed router.
Sourcepub fn external_gateway(&self) -> &Option<ExternalGateway>
pub fn external_gateway(&self) -> &Option<ExternalGateway>
External gateway information.
Sourcepub async fn external_network(&self) -> Result<Network>
pub async fn external_network(&self) -> Result<Network>
Get external network associated with this router.
Fails if external gateway information is not provided.
Sourcepub fn set_external_gateway(&mut self, value: ExternalGateway)
pub fn set_external_gateway(&mut self, value: ExternalGateway)
Update the external gateway information.
Sourcepub fn with_external_gateway(self, value: ExternalGateway) -> Self
pub fn with_external_gateway(self, value: ExternalGateway) -> Self
Update the external gateway information.
Sourcepub fn project_id(&self) -> &Option<String>
pub fn project_id(&self) -> &Option<String>
Project ID.
Sourcepub fn revision_number(&self) -> Option<u32>
pub fn revision_number(&self) -> Option<u32>
Revision number.
Sourcepub fn set_routes(&mut self, value: Vec<HostRoute>)
pub fn set_routes(&mut self, value: Vec<HostRoute>)
Update extra routes.
Sourcepub fn with_routes(self, value: Vec<HostRoute>) -> Self
pub fn with_routes(self, value: Vec<HostRoute>) -> Self
Update extra routes.
Sourcepub fn service_type_id(&self) -> &Option<String>
pub fn service_type_id(&self) -> &Option<String>
ID of the service type associated to the router.
Sourcepub fn status(&self) -> RouterStatus
pub fn status(&self) -> RouterStatus
Status of the router.
Tags.
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<Router>>
pub async fn delete(self) -> Result<DeletionWaiter<Router>>
Delete the router.
Sourcepub async fn add_router_interface(
&mut self,
subnet_id: Option<&String>,
port_id: Option<&String>,
) -> Result<()>
pub async fn add_router_interface( &mut self, subnet_id: Option<&String>, port_id: Option<&String>, ) -> Result<()>
Add an interface to the router.
Sourcepub async fn remove_router_interface(
&mut self,
subnet_id: Option<&String>,
port_id: Option<&String>,
) -> Result<()>
pub async fn remove_router_interface( &mut self, subnet_id: Option<&String>, port_id: Option<&String>, ) -> Result<()>
Remove an interface from the router.