Different vlan-id for leaf spine pws.
With this patch we introduce a special vlan for transporting
traffic for leaf-spine pseudowires. Each l-s pw is assigned
a different vlan from the range 4000-2000. This information is
kept internally and exposed to the user with the "pseudowires"
cli command.
Leaf-Leaf pseudowire traffic is still transported untagged, but
we will probably soon need to use special transport vlans there
also.
Change-Id: If6d0b7176a9bd4b89fb7d46db2a49e048bd953ee
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/pwaas/DefaultL2Tunnel.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/pwaas/DefaultL2Tunnel.java
index 60de5c8..64923bb 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/pwaas/DefaultL2Tunnel.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/pwaas/DefaultL2Tunnel.java
@@ -58,6 +58,12 @@
private List<Link> pathUsed;
/**
+ * Vlan which will be used for the encapsualted
+ * vlan traffic.
+ */
+ private VlanId transportVlan;
+
+ /**
* Creates a inter-co l2 tunnel using the
* supplied parameters.
*
@@ -93,6 +99,7 @@
this.pwLabel = l2Tunnel.pwLabel();
this.interCoLabel = l2Tunnel.interCoLabel();
this.pathUsed = l2Tunnel.pathUsed();
+ this.transportVlan = l2Tunnel.transportVlan;
}
/**
@@ -167,6 +174,15 @@
}
/**
+ * Set the transport vlan for the pseudowire.
+ *
+ * @param vlan the vlan to use.
+ */
+ public void setTransportVlan(VlanId vlan) {
+ transportVlan = vlan;
+ }
+
+ /**
* Returns the used path of the pseudowire.
*
* @return pathUsed
@@ -175,6 +191,11 @@
return pathUsed;
}
+ public VlanId transportVlan() {
+ return transportVlan;
+ }
+
+
/**
* Returns the inter-co label.
*
@@ -215,6 +236,7 @@
.add("tunnelId", tunnelId())
.add("pwLabel", pwLabel())
.add("interCoLabel", interCoLabel())
+ .add("transportVlan", transportVlan())
.toString();
}