office cell and associated fixes (role, idle timeout)

Change-Id: Icc1fbed46c59f9be1d124569779250c0796150ce
diff --git a/openflow/api/src/main/java/org/onlab/onos/openflow/controller/driver/AbstractOpenFlowSwitch.java b/openflow/api/src/main/java/org/onlab/onos/openflow/controller/driver/AbstractOpenFlowSwitch.java
index 69ddc71..4334395 100644
--- a/openflow/api/src/main/java/org/onlab/onos/openflow/controller/driver/AbstractOpenFlowSwitch.java
+++ b/openflow/api/src/main/java/org/onlab/onos/openflow/controller/driver/AbstractOpenFlowSwitch.java
@@ -243,6 +243,8 @@
                 if (role == RoleState.SLAVE || role == RoleState.EQUAL) {
                     this.role = role;
                 }
+            } else {
+                this.role = role;
             }
         } catch (IOException e) {
             log.error("Unable to write to switch {}.", this.dpid);
diff --git a/openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/OFChannelHandler.java b/openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/OFChannelHandler.java
index 75c139d..3f2984b 100644
--- a/openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/OFChannelHandler.java
+++ b/openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/OFChannelHandler.java
@@ -651,7 +651,7 @@
          * @param error The error message
          */
         protected void logError(OFChannelHandler h, OFErrorMsg error) {
-            log.error("{} from switch {} in state {}",
+            log.debug("{} from switch {} in state {}",
                     new Object[] {
                     error,
                     h.getSwitchInfoString(),
diff --git a/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/FlowModBuilder.java b/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/FlowModBuilder.java
index efe436f..51e4a98 100644
--- a/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/FlowModBuilder.java
+++ b/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/FlowModBuilder.java
@@ -77,6 +77,7 @@
                 .setCookie(U64.of(cookie.value()))
                 .setBufferId(OFBufferId.NO_BUFFER)
                 .setActions(actions)
+                .setIdleTimeout(10)
                 .setMatch(match)
                 .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
                 .setPriority(priority)
@@ -93,7 +94,7 @@
         OFFlowMod fm = factory.buildFlowDelete()
                 .setCookie(U64.of(cookie.value()))
                 .setBufferId(OFBufferId.NO_BUFFER)
-                //.setActions(actions)
+                .setActions(actions)
                 .setMatch(match)
                 .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
                 .setPriority(priority)
diff --git a/tools/test/cells/office b/tools/test/cells/office
new file mode 100644
index 0000000..0edf04d
--- /dev/null
+++ b/tools/test/cells/office
@@ -0,0 +1,10 @@
+# ProxMox-based cell of ONOS instances 1,2 & ONOS mininet box
+. $ONOS_ROOT/tools/test/cells/.reset
+
+export ONOS_NIC="10.128.4.*"
+
+export OC1="10.128.4.60"
+#export OC2="192.168.97.131"
+
+#export OCN="192.168.97.130"
+