Update components monitor to check enabled component states

Change-Id: I1485df83fa793fcfc48adc3b8fe4c51b5dacb64c
diff --git a/core/net/src/main/java/org/onosproject/cluster/impl/ComponentsMonitor.java b/core/net/src/main/java/org/onosproject/cluster/impl/ComponentsMonitor.java
index 7a0295e..3dd5dda 100644
--- a/core/net/src/main/java/org/onosproject/cluster/impl/ComponentsMonitor.java
+++ b/core/net/src/main/java/org/onosproject/cluster/impl/ComponentsMonitor.java
@@ -29,6 +29,7 @@
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.component.ComponentContext;
+import org.osgi.service.component.runtime.dto.ComponentConfigurationDTO;
 import org.osgi.service.component.runtime.dto.ComponentDescriptionDTO;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -113,8 +114,12 @@
 
     private boolean isFullyStarted(Bundle bundle) {
         for (ComponentDescriptionDTO component : scrService.getComponentDescriptionDTOs(bundle)) {
-            if (!scrService.isComponentEnabled(component)) {
-                return false;
+            if (scrService.isComponentEnabled(component)) {
+                for (ComponentConfigurationDTO config : scrService.getComponentConfigurationDTOs(component)) {
+                    if (config.state != ComponentConfigurationDTO.ACTIVE) {
+                        return false;
+                    }
+                }
             }
         }
         return true;