* Add isolate to the demo script.
Signed-off-by: Suchi Raman <suchi.raman@plexxi.com>
import org.opendaylight.affinity.affinity.AffinityAttributeType;
import org.opendaylight.affinity.affinity.AffinityAttribute;
import org.opendaylight.affinity.affinity.SetDeny;
+import org.opendaylight.affinity.affinity.SetPathIsolate;
import org.opendaylight.affinity.affinity.SetPathRedirect;
import org.opendaylight.affinity.affinity.SetTap;
import org.opendaylight.affinity.l2agent.IfL2Agent;
return fwdactions;
}
+ // Apply isolate (no-op now), and continue to add other affinity types to the forwarding actions list.
+ aatype = AffinityAttributeType.SET_PATH_ISOLATE;
+
+ if (attribs.get(aatype) != null) {
+ log.info("Found a path isolate setting.");
+ }
+
// Apply redirect
aatype = AffinityAttributeType.SET_PATH_REDIRECT;
return
print "AffinityLink %s added between %s and %s" % (link_name, src_group, dst_group)
+ # Add isolate to the link.
+ def add_isolate(self, link_name):
+ resp, content = self.http.request(self.url_prefix + "link/%s/setisolate/%s" % (link_name), "PUT")
+ if (resp.status != 201):
+ print "Isolate could not be set for link %s" % (link_name)
+ return
+ print "Isolate successfully set for link %s" % (link_name)
+
# Add waypoint
def add_waypoint(self, link_name, ip):
resp, content = self.http.request(self.url_prefix + "link/%s/setwaypoint/%s" % (link_name, ip), "PUT")
link_name = "inflows"
ac.add_affinity_link(link_name, src_ag_name, dst_ag_name)
ac.add_waypoint(link_name, self.waypoint_address)
+ ac.add_isolate(link_name)
# ac.enable_waypoint(link_name)
ac.enable_affinity()
did_waypoint = True