summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
3afbe23)
Change-Id: I1a78614e04c0d2b1c345c7d4538003aa790ea8ec
Signed-off-by: Alessandro Boch <aboch@cisco.com>
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.opendaylight.controller.forwardingrulesmanager.FlowEntry;
import org.opendaylight.controller.sal.action.Action;
import org.opendaylight.controller.sal.action.ActionType;
import org.opendaylight.controller.sal.action.Controller;
import org.opendaylight.controller.sal.action.Action;
import org.opendaylight.controller.sal.action.ActionType;
import org.opendaylight.controller.sal.action.Controller;
public boolean installInHw() {
if (installInHw == null) {
// backward compatibility
public boolean installInHw() {
if (installInHw == null) {
// backward compatibility
+ installInHw = Boolean.toString(true);
- return installInHw.equals("true");
+ return Boolean.valueOf(installInHw);
}
public void setInstallInHw(boolean inHw) {
}
public void setInstallInHw(boolean inHw) {
- installInHw = inHw ? "true" : "false";
+ installInHw = String.valueOf(inHw);
}
public String getInstallInHw() {
}
public String getInstallInHw() {
}
public void toggleInstallation() {
}
public void toggleInstallation() {
- installInHw = (installInHw == null) ? "true" : (installInHw.equals("true")) ? "false" : "true";
+ installInHw = (installInHw == null) ? Boolean.toString(false) : Boolean.toString(!Boolean.valueOf(installInHw));
@Test
public void testStatusToggle() throws UnknownHostException {
@Test
public void testStatusToggle() throws UnknownHostException {
+ // default is install in Hw
FlowConfig fc = new FlowConfig();
fc.toggleInstallation();
FlowConfig fc = new FlowConfig();
fc.toggleInstallation();
- Assert.assertTrue(fc.installInHw());
- fc.toggleInstallation();
Assert.assertFalse(fc.installInHw());
fc.toggleInstallation();
Assert.assertTrue(fc.installInHw());
Assert.assertFalse(fc.installInHw());
fc.toggleInstallation();
Assert.assertTrue(fc.installInHw());
+ fc.toggleInstallation();
+ Assert.assertFalse(fc.installInHw());