Skip to content

Commit

Permalink
update falcon labs
Browse files Browse the repository at this point in the history
  • Loading branch information
rcgoodfellow committed Oct 29, 2021
1 parent 5149d8b commit 226f395
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 22 deletions.
4 changes: 2 additions & 2 deletions lab/src/duo/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ async fn main() -> Result<(), Error> {

match run(&mut d).await? {
RunMode::Launch => {
d.exec(r0, "ipadm create-addr -t -T addrconf duo_r0_vnic0/v6")?;
d.exec(r1, "ipadm create-addr -t -T addrconf duo_r1_vnic0/v6")?;
d.exec(r0, "ipadm create-addr -t -T addrconf duo_r0_vnic0/v6").await?;
d.exec(r1, "ipadm create-addr -t -T addrconf duo_r1_vnic0/v6").await?;
Ok(())
}
RunMode::Destroy => Ok(()),
Expand Down
28 changes: 14 additions & 14 deletions lab/src/quartet/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,26 @@ async fn main() -> Result<(), Error> {

match run(&mut d).await? {
RunMode::Launch => {
d.exec(r0, "ipadm create-addr -t -T addrconf quartet_r0_vnic0/v6")?;
d.exec(r0, "ipadm create-addr -t -T addrconf quartet_r0_vnic1/v6")?;
d.exec(r0, "routeadm -e ipv6-forwarding")?;
d.exec(r0, "routeadm -u")?;

d.exec(r1, "ipadm create-addr -t -T addrconf quartet_r1_vnic0/v6")?;
d.exec(r1, "ipadm create-addr -t -T addrconf quartet_r1_vnic1/v6")?;
d.exec(r1, "routeadm -e ipv6-forwarding")?;
d.exec(r1, "routeadm -u")?;

d.exec(h0, "ipadm create-addr -t -T addrconf quartet_h0_vnic0/v6")?;
d.exec(h0, "ipadm create-addr -t -T addrconf quartet_h0_vnic1/v6")?;
d.exec(r0, "ipadm create-addr -t -T addrconf quartet_r0_vnic0/v6").await?;
d.exec(r0, "ipadm create-addr -t -T addrconf quartet_r0_vnic1/v6").await?;
d.exec(r0, "routeadm -e ipv6-forwarding").await?;
d.exec(r0, "routeadm -u").await?;

d.exec(r1, "ipadm create-addr -t -T addrconf quartet_r1_vnic0/v6").await?;
d.exec(r1, "ipadm create-addr -t -T addrconf quartet_r1_vnic1/v6").await?;
d.exec(r1, "routeadm -e ipv6-forwarding").await?;
d.exec(r1, "routeadm -u").await?;

d.exec(h0, "ipadm create-addr -t -T addrconf quartet_h0_vnic0/v6").await?;
d.exec(h0, "ipadm create-addr -t -T addrconf quartet_h0_vnic1/v6").await?;
/*XXX via automatic underlay init now
d.exec(h0,
"ipadm create-addr -t -T static \
-a fd00:1701:d:101::1/64 lo0/underlay")?;
*/

d.exec(h1, "ipadm create-addr -t -T addrconf quartet_h1_vnic0/v6")?;
d.exec(h1, "ipadm create-addr -t -T addrconf quartet_h1_vnic1/v6")?;
d.exec(h1, "ipadm create-addr -t -T addrconf quartet_h1_vnic0/v6").await?;
d.exec(h1, "ipadm create-addr -t -T addrconf quartet_h1_vnic1/v6").await?;
/*XXX via automatic underlay init now
d.exec(h1,
"ipadm create-addr -t -T \
Expand Down
8 changes: 4 additions & 4 deletions lab/src/trio/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ async fn main() -> Result<(), Error> {

match run(&mut d).await? {
RunMode::Launch => {
d.exec(r, "ipadm create-addr -t -T addrconf trio_r_vnic0/v6")?;
d.exec(r, "ipadm create-addr -t -T addrconf trio_r_vnic1/v6")?;
d.exec(h0, "ipadm create-addr -t -T addrconf trio_h0_vnic0/v6")?;
d.exec(h1, "ipadm create-addr -t -T addrconf trio_h1_vnic0/v6")?;
d.exec(r, "ipadm create-addr -t -T addrconf trio_r_vnic0/v6").await?;
d.exec(r, "ipadm create-addr -t -T addrconf trio_r_vnic1/v6").await?;
d.exec(h0, "ipadm create-addr -t -T addrconf trio_h0_vnic0/v6").await?;
d.exec(h1, "ipadm create-addr -t -T addrconf trio_h1_vnic0/v6").await?;
Ok(())
},
RunMode::Destroy => Ok(()),
Expand Down
8 changes: 6 additions & 2 deletions platform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,21 @@ pub trait Platform {
fn get_interface_v6ll(&self, interface: impl AsRef<str>)
-> Result<Option<IpIfAddr>, Error>;

/// Ensure that the provide address is present for the named interface
/// Ensure that the provided address is present for the named interface
fn ensure_address_present(
&self,
interface: impl AsRef<str>,
addr: IpAddr,
mask: u8,
) -> Result<(), Error>;


/// Get all current routes
fn get_routes(&self) -> Result<Vec::<Route>, Error>;

/// Set a route
fn set_route(&self, route: Route) -> Result<(), Error>;

/// Clear a route
fn clear_route(&self, route: Route) -> Result<(), Error>;

// IPv6 RDP
Expand Down

0 comments on commit 226f395

Please sign in to comment.