<containermanager.it.version>0.5.2-SNAPSHOT</containermanager.it.version>
<switchmanager.api.version>0.7.1-SNAPSHOT</switchmanager.api.version>
<connectionmanager.version>0.1.2-SNAPSHOT</connectionmanager.version>
- <sal.version>0.7.1-SNAPSHOT</sal.version>
+ <sal.version>0.8.1-SNAPSHOT</sal.version>
<sal.networkconfiguration.version>0.0.3-SNAPSHOT</sal.networkconfiguration.version>
<sal.connection.version>0.1.2-SNAPSHOT</sal.connection.version>
<networkconfig.bridgedomain.northbound.version>0.0.3-SNAPSHOT</networkconfig.bridgedomain.northbound.version>
<sonar.branch>${user.name}-private-view</sonar.branch>
<sonar.language>java</sonar.language>
<exam.version>3.0.0</exam.version>
- <sal.version>0.7.1-SNAPSHOT</sal.version>
+ <sal.version>0.8.1-SNAPSHOT</sal.version>
</properties>
<dependencyManagement>
</scm>
<artifactId>sal</artifactId>
- <version>0.7.1-SNAPSHOT</version>
+ <version>0.8.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<build>
}
}
+ /**
+ * Create the reversed edge
+ * @return The reversed edge.
+ */
+ public Edge reverse() {
+ Edge re;
+ try {
+ re = new Edge(this.headNodeConnector, this.tailNodeConnector);
+ } catch (ConstructionException e) {
+ re = null;
+ }
+ return re;
+ }
/**
* getter of edge
*
package org.opendaylight.controller.sal.core;
import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
this.edges = edges;
}
+ /**
+ * Create the reversed path
+ * @return The reversed path
+ */
+ public Path reverse() {
+ int j = edges.size(); // size always > 0
+ Edge[] aEdges = new Edge[j];
+ for (Edge e : edges) {
+ j--;
+ aEdges[j] = e.reverse();
+ }
+ Path rp;
+ try {
+ rp = new Path(Arrays.asList(aEdges));
+ } catch (ConstructionException ce) {
+ rp = null;
+ }
+ return rp;
+ }
+
+ /**
+ * Return the list of nodes of this path, the first node is the start node
+ * @return the list of nodes
+ */
+ public List<Node> getNodes() {
+ List<Node> nl = new ArrayList<Node>();
+ nl.add(this.getStartNode());
+ for (Edge e : edges) {
+ nl.add(e.getHeadNodeConnector().getNode());
+ }
+ return nl;
+ }
+
/**
* Copy Construct for a path
*