BUG-1105: Implement subtree filtering in netconf
[controller.git] / opendaylight / netconf / config-netconf-connector / src / main / java / org / opendaylight / controller / netconf / confignetconfconnector / operations / getconfig / GetConfig.java
index 03e0176e32892b034b413443d3edf35cca7afb3c..bc059d345c647d2ea3316efea1887be1eee39a56 100644 (file)
@@ -9,6 +9,8 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.operations.getconfig;
 
 import com.google.common.base.Optional;
+import java.util.Set;
+import javax.management.ObjectName;
 import org.opendaylight.controller.config.util.ConfigRegistryClient;
 import org.opendaylight.controller.config.util.ConfigTransactionClient;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
@@ -30,9 +32,6 @@ import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import javax.management.ObjectName;
-import java.util.Set;
-
 public class GetConfig extends AbstractConfigNetconfOperation {
 
     public static final String GET_CONFIG = "get-config";
@@ -65,11 +64,7 @@ public class GetConfig extends AbstractConfigNetconfOperation {
         logger.debug("Setting source datastore to '{}'", sourceParsed);
         Datastore sourceDatastore = Datastore.valueOf(sourceParsed);
 
-        // Filter option - unsupported
-        if (xml.getChildElements(XmlNetconfConstants.FILTER).size() != 0){
-            throw new UnsupportedOperationException("Unsupported option " + XmlNetconfConstants.FILTER + " for "
-                    + GET_CONFIG);
-        }
+        // Filter option: ignore for now, TODO only load modules specified by the filter
 
         return sourceDatastore;