Merge "Fix for bug #236 and bug #240 Have made changes in opendaylight-table-types...
[controller.git] / opendaylight / md-sal / compatibility / inventory-topology-compatibility / src / main / java / org / opendaylight / controller / md / compatibility / switchmanager / CompatibleSwitchManager.xtend
index 430b5957efc1e3d4d9f707963871897b68341f54..72508416a6c00475ddb7c51c54eb9f67b63bf630 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.controller.md.compatibility.switchmanager
 
 import org.opendaylight.controller.switchmanager.ISwitchManager
@@ -225,7 +232,7 @@ class CompatibleSwitchManager extends ConfigurableSwitchManager implements ISwit
         val ret = new HashSet<NodeConnector>();
         for (nc : data.nodeConnector) {
             val flowConn = nc.getAugmentation(FlowCapableNodeConnector);
-            if (flowConn != null && flowConn.state == PortState.Live) {
+            if (flowConn != null && flowConn.state != null && !flowConn.state.linkDown) {
                 ret.add(new NodeConnector(MD_SAL_TYPE, nc.key, node));
             }
         }
@@ -286,4 +293,7 @@ class CompatibleSwitchManager extends ConfigurableSwitchManager implements ISwit
         throw new UnsupportedOperationException("TODO: auto-generated method stub")
     }
 
+    override getConfiguredNotConnectedSwitches() {
+        return null;
     }
+}