diff --git a/appc-directed-graph/appc-dgraph/pom.xml b/appc-directed-graph/appc-dgraph/pom.xml
index d421dd3..508bcfc 100644
--- a/appc-directed-graph/appc-dgraph/pom.xml
+++ b/appc-directed-graph/appc-dgraph/pom.xml
@@ -1,6 +1,31 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+  ============LICENSE_START=======================================================
+  ONAP : APPC
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+  ================================================================================
+  Copyright (C) 2017 Amdocs
+  =============================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ECOMP is a trademark and service mark of AT&T Intellectual Property.
+  ============LICENSE_END=========================================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <parent>
         <groupId>org.openecomp.appc</groupId>
         <artifactId>appc-directed-graph</artifactId>
@@ -13,7 +38,7 @@
     <artifactId>appc-dgraph</artifactId>
     <version>1.1.0-SNAPSHOT</version>
 
-    <name>APPC DG</name>
+    <name>APPC Directed Graph</name>
     <description>APPC DG Module</description>
 
     <properties>
@@ -23,31 +48,9 @@
         <openecomp.sdnc.sli.version>1.1.0</openecomp.sdnc.sli.version>
         <openecomp.sdnc.dblib.version>1.1.0</openecomp.sdnc.dblib.version>
         <openecomp.sdnc.sql-resource.version>1.1.0</openecomp.sdnc.sql-resource.version>
+        <licenseDir>${project.parent.parent.basedir}</licenseDir>
     </properties>
 
-
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.openecomp.sdnctl</groupId>
-                <artifactId>appc-dg-provider</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-
-            <!-- OpenEcomp -->
-            <dependency>
-                <groupId>org.openecomp.sdnc.core</groupId>
-                <artifactId>sli-provider</artifactId>
-            </dependency>
-
-            <dependency>
-                <groupId>org.openecomp.sdnc.core</groupId>
-                <artifactId>dblib-provider</artifactId>
-                <version>${sdnctl.dblib.version}</version>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
     <profiles>
         <profile>
             <id>default</id>
diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/TestPublishConfiguration.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/TestPublishConfiguration.java
index bae4034..357896e 100644
--- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/TestPublishConfiguration.java
+++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/TestPublishConfiguration.java
@@ -39,94 +39,13 @@
 
 import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
-/* need to move to OPENSOURCE
-import org.apache.sling.testing.mock.osgi.MockOsgi;
-import com.att.sdnctl.dgtestlibrary.AbstractDGTestCase;
-import com.att.sdnctl.dgtestlibrary.DGTestCase;
-import com.att.sdnctl.dgtestlibrary.GraphKey;
-*/
 import org.openecomp.sdnc.sli.SvcLogicContext;
 import org.openecomp.sdnc.sli.provider.ExecuteNodeExecutor;
 import org.openecomp.sdnc.sli.provider.SvcLogicAdaptorFactory;
 
 
-public class TestPublishConfiguration /* extends AbstractDGTestCase */ {
-	//private final static Logger logger = LoggerFactory.getLogger(TestGetParams.class);
-	private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestPublishConfiguration.class);
-	public static String PublishConfigurationXML = "src/main/resources/xml/APPC_PublishConfiguration.xml";
-
-
-/*
-
-	@Test
-	public void TestPublishConfigurationSuccess() {
-		try {
-
-			String propertyfileName = "APPC/PublishConfiguration/PublishConfig_Success.properties";
-			Map<String, Object> serviceReferences = new HashMap<String, Object>();
-
-
-			serviceReferences.put("org.openecomp.sdnc.config.generator.convert.ConvertNode", new org.openecomp.sdnc.config.generator.convert.ConvertNode());
-
-			
-			
-			serviceReferences.put("org.openecomp.sdnc.config.generator.writer.FileWriterNode", new org.openecomp.sdnc.config.generator.writer.FileWriterNode());
-			// Register Call graphs
-			String injectGraphXmls[] = new String[] { PublishConfigurationXML };
-
-
-			GraphKey  graphKey = new GraphKey("APPC", null, "PublishConfiguration", null);
-			DGTestCase tc = new DGTestCase(graphKey);
-			tc.setInjectGraphXmls(injectGraphXmls);
-			tc.setServiceReferences(serviceReferences);
-			tc.setPropertyfileName(propertyfileName);
-
-			SvcLogicContext ctx = new SvcLogicContext();
-			processTestCase(tc, ctx);
-			
-			System.out.println("JSON " + ctx.getAttribute("tmp.jsonConversion.jsonContent"));
-
-	
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-
-	}
-
-
-
-
-	@Test
-	public void TestPublishConfigurationFailure() {
-		try {
-
-			String propertyfileName = "APPC/PublishConfiguration/PublishConfig_Failure.properties";
-			Map<String, Object> serviceReferences = new HashMap<String, Object>();
-
-
-			// Register Call graphs
-			String injectGraphXmls[] = new String[] { PublishConfigurationXML };
-
-
-			GraphKey  graphKey = new GraphKey("APPC", null, "PublishConfiguration", null);
-			DGTestCase tc = new DGTestCase(graphKey);
-			tc.setInjectGraphXmls(injectGraphXmls);
-			tc.setServiceReferences(serviceReferences);
-			tc.setPropertyfileName(propertyfileName);
-
-			SvcLogicContext ctx = new SvcLogicContext();
-			processTestCase(tc, ctx);
-
-
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-
-	}
-
-	
-	
-*/
-
+public class TestPublishConfiguration  {
+    private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestPublishConfiguration.class);
+    public static String PublishConfigurationXML = "src/main/resources/xml/APPC_PublishConfiguration.xml";
 
 }
diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/mock/instance/MockAaiResource.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/mock/instance/MockAaiResource.java
index 5e55f2f..9a271fa 100644
--- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/mock/instance/MockAaiResource.java
+++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/mock/instance/MockAaiResource.java
@@ -35,211 +35,150 @@
 
 public class MockAaiResource implements SvcLogicResource {
 
-	private final static Logger logger = LoggerFactory.getLogger(MockAaiResource.class);
-	
-	@Override
-	public QueryStatus isAvailable(String resource, String key, String prefix, SvcLogicContext ctx) throws SvcLogicException {
-		
-		return QueryStatus.SUCCESS;
-		
-	}
-	
-	@Override
-	public QueryStatus exists(String resource, String key, String prefix, SvcLogicContext ctx)  throws SvcLogicException {
-		
-		return QueryStatus.SUCCESS;
-	}
-	
-	
-	
-	public QueryStatus query(String resource, boolean localOnly, String select, String key,  String prefix, String orderBy, SvcLogicContext ctx) throws SvcLogicException {
-		
-		if (ctx.getAttribute("j").equals("0") && "tmp.aai-data-vm".equals(prefix)) {
-			logger.info("Mock VM Get query1 called " + ctx.getAttribute("j") );
-			
-			assertEquals(resource, "vserver");
-			assertEquals(key, "'vserver-name = $request-parameters.vm[$j].vm-name'");
-			
-			ctx.setAttribute("tmp.aai-data-vm.vserver-id", "vserverid1");
-			
-			ctx.setAttribute("tmp.aai-data-vm.tenant-id", "tenantid1");
-			ctx.setAttribute("tmp.aai-data-vm.cloud-owner", "att-aic");
-			ctx.setAttribute("tmp.aai-data-vm.cloud-region-id", "cloudregionid1");
-		}
-		else if (ctx.getAttribute("j").equals("1") && "tmp.aai-data-vm".equals(prefix)) {
-			logger.info("Mock VM Get query1 called " + ctx.getAttribute("j") );
-			
-			assertEquals(resource, "vserver");
-			assertEquals(key, "'vserver-name = $request-parameters.vm[$j].vm-name'");
-			
-			
-			ctx.setAttribute("tmp.aai-data-vm.vserver-id", "vserverid2");
-			
-			ctx.setAttribute("tmp.aai-data-vm.tenant-id", "tenantid2");
-			ctx.setAttribute("tmp.aai-data-vm.cloud-owner", "att-aic");
-			ctx.setAttribute("tmp.aai-data-vm.cloud-region-id", "cloudregionid2");
-		}
-		else if ("tmp.aai-data-vnfc".equals(prefix)) {
-			logger.info("Mock VNFC Get query1 called "  );
-			
-			assertEquals(resource, "vnfc");
-			assertEquals(key, "'vnfc-name = $request-parameters.vm[$j].vnfc[$k].vnfc-name'");
-			
-			return QueryStatus.NOT_FOUND;
-		}
-		return QueryStatus.SUCCESS;
-	}
-	
-	
-	public QueryStatus query(String resource, boolean localOnly, String select, String key, String prefix, SvcLogicContext ctx)  throws SvcLogicException {
-		
-		logger.info("Mock query2 called " + ctx.getAttribute("j"));
-		
-				
-		return QueryStatus.SUCCESS;
-	}
-	
-	@Override
-	public QueryStatus reserve(String resource, String select, String key, String prefix, SvcLogicContext ctx) throws SvcLogicException {
-		
-		return QueryStatus.SUCCESS;
-	}
-	
-	@Override
-	public QueryStatus save(String resource, boolean force, boolean localOnly, String key, Map<String, String> parms, String prefix, SvcLogicContext ctx) throws SvcLogicException {
-		
-		logger.info("Mock Save called");
-		if (ctx.getAttribute("j").equals("0") && 
-				ctx.getAttribute("k").equals("0") &&
-				"tmp.vnfc-sys-controller".equals(prefix)) {
-			
-			assertEquals(resource, "vnfc");
-			
-			assertEquals(key, "'vnfc-name = $request-parameters.vm[$j].vnfc[$k].vnfc-name'");
-			
-			
-			assertEquals(parms.get("prov-status"), "NVTPROV");
-			assertEquals(parms.get("orchestration-status"), "CONFIGURED");
-			assertEquals(parms.get("in-maint"), "false");
-			assertEquals(parms.get("is-closed-loop"), "false");
-			
-			
-			assertEquals(parms.get("vnfc-function-code"), "funccode");
-			assertEquals(parms.get("vnfc-type"), "vnfctype");
-			assertEquals(parms.get("ipaddress-v4-oam-vip"), "135.1.1.1");
-			assertEquals(parms.get("group-notation"), "groupnotation");
-			
-			assertEquals(parms.get("relationship-list.relationship[0].related-to"), "vserver");
-			assertEquals(parms.get("relationship-list.relationship[0].relationship-data[0].relationship-key"), "vserver.vserver-id");
-			assertEquals(parms.get("relationship-list.relationship[0].relationship-data[0].relationship-value"), "vserverid1");
-			
-			
-			assertEquals(parms.get("relationship-list.relationship[0].relationship-data[1].relationship-key"), "tenant.tenant-id");
-			assertEquals(parms.get("relationship-list.relationship[0].relationship-data[1].relationship-value"), "tenantid1");
-			
-			
-			assertEquals(parms.get("relationship-list.relationship[0].relationship-data[2].relationship-key"), "cloud-region.cloud-owner");
-			assertEquals(parms.get("relationship-list.relationship[0].relationship-data[2].relationship-value"), "att-aic");
-			
-			
-			assertEquals(parms.get("relationship-list.relationship[0].relationship-data[3].relationship-key"), "cloud-region.cloud-region-id");
-			assertEquals(parms.get("relationship-list.relationship[0].relationship-data[3].relationship-value"), "cloudregionid1");
-			
-			
-			assertEquals(parms.get("relationship-list.relationship[1].related-to"), "generic-vnf");
-			assertEquals(parms.get("relationship-list.relationship[1].relationship-data[0].relationship-key"), "generic-vnf.vnf-id");
-			assertEquals(parms.get("relationship-list.relationship[1].relationship-data[0].relationship-value"), "ibcx0001v");
-			
-			
-			assertEquals(parms.get("relationship-list.relationship[2].related-to"), "vf-module");
-			assertEquals(parms.get("relationship-list.relationship[2].relationship-data[0].relationship-key"), "generic-vnf.vnf-id");
-			assertEquals(parms.get("relationship-list.relationship[2].relationship-data[0].relationship-value"), "ibcx0001v");
-			
-			assertEquals(parms.get("relationship-list.relationship[2].relationship-data[1].relationship-key"), "vf-module.vf-module-id");
-			assertEquals(parms.get("relationship-list.relationship[2].relationship-data[1].relationship-value"), "1");
-			
-		}
-		else if (ctx.getAttribute("j").equals("1") && 
-				ctx.getAttribute("k").equals("0") &&
-				"tmp.vnfc-sys-controller".equals(prefix)) {
-			
-			assertEquals(resource, "vnfc");
-			
-			assertEquals(key, "'vnfc-name = $request-parameters.vm[$j].vnfc[$k].vnfc-name'");
-			
-			
-			assertEquals(parms.get("prov-status"), "NVTPROV");
-			assertEquals(parms.get("orchestration-status"), "CONFIGURED");
-			assertEquals(parms.get("in-maint"), "false");
-			assertEquals(parms.get("is-closed-loop"), "false");
-			
-			
-			assertEquals(parms.get("vnfc-function-code"), "funccode1");
-			assertEquals(parms.get("vnfc-type"), "vnfctype1");
-			assertEquals(parms.get("ipaddress-v4-oam-vip"), "135.2.2.2");
-			assertEquals(parms.get("group-notation"), "groupnotation1");
-			
-			assertEquals(parms.get("relationship-list.relationship[0].related-to"), "vserver");
-			assertEquals(parms.get("relationship-list.relationship[0].relationship-data[0].relationship-key"), "vserver.vserver-id");
-			assertEquals(parms.get("relationship-list.relationship[0].relationship-data[0].relationship-value"), "vserverid2");
-			
-			
-			assertEquals(parms.get("relationship-list.relationship[0].relationship-data[1].relationship-key"), "tenant.tenant-id");
-			assertEquals(parms.get("relationship-list.relationship[0].relationship-data[1].relationship-value"), "tenantid2");
-			
-			
-			assertEquals(parms.get("relationship-list.relationship[0].relationship-data[2].relationship-key"), "cloud-region.cloud-owner");
-			assertEquals(parms.get("relationship-list.relationship[0].relationship-data[2].relationship-value"), "att-aic");
-			
-			
-			assertEquals(parms.get("relationship-list.relationship[0].relationship-data[3].relationship-key"), "cloud-region.cloud-region-id");
-			assertEquals(parms.get("relationship-list.relationship[0].relationship-data[3].relationship-value"), "cloudregionid2");
-			
-			
-			assertEquals(parms.get("relationship-list.relationship[1].related-to"), "generic-vnf");
-			assertEquals(parms.get("relationship-list.relationship[1].relationship-data[0].relationship-key"), "generic-vnf.vnf-id");
-			assertEquals(parms.get("relationship-list.relationship[1].relationship-data[0].relationship-value"), "ibcx0001v");
-			
-			
-			assertEquals(parms.get("relationship-list.relationship[2].related-to"), "vf-module");
-			assertEquals(parms.get("relationship-list.relationship[2].relationship-data[0].relationship-key"), "generic-vnf.vnf-id");
-			assertEquals(parms.get("relationship-list.relationship[2].relationship-data[0].relationship-value"), "ibcx0001v");
-			
-			assertEquals(parms.get("relationship-list.relationship[2].relationship-data[1].relationship-key"), "vf-module.vf-module-id");
-			assertEquals(parms.get("relationship-list.relationship[2].relationship-data[1].relationship-value"), "1");
-		}
-		return QueryStatus.SUCCESS;
-	}
-	
-	@Override
-	public QueryStatus release(String resource, String key, SvcLogicContext ctx)  throws SvcLogicException {
-		
-		return QueryStatus.SUCCESS;
-	}
-	
-	@Override
-	public QueryStatus delete(String resource, String key, SvcLogicContext ctx) throws SvcLogicException {
-		
-		return QueryStatus.SUCCESS;
-	}
-	
-	
-	
-	@Override
-	public QueryStatus notify(String resource, 	String action,	String key, SvcLogicContext ctx) throws SvcLogicException {
-	
+    private final static Logger logger = LoggerFactory.getLogger(MockAaiResource.class);
 
+    @Override
+    public QueryStatus isAvailable(String resource, String key, String prefix, SvcLogicContext ctx) throws SvcLogicException {
+        return QueryStatus.SUCCESS;
+    }
 
-		return QueryStatus.SUCCESS;
-	}
+    @Override
+    public QueryStatus exists(String resource, String key, String prefix, SvcLogicContext ctx)  throws SvcLogicException {
+        return QueryStatus.SUCCESS;
+    }
 
-	
-	public QueryStatus update(String resource, String key,
-			Map<String, String> parms, String prefix, SvcLogicContext ctx)
-			throws SvcLogicException {
-		
-		return QueryStatus.SUCCESS;
-	}
+    public QueryStatus query(String resource, boolean localOnly, String select, String key,  String prefix, String orderBy, SvcLogicContext ctx) throws SvcLogicException {
+        if (ctx.getAttribute("j").equals("0") && "tmp.aai-data-vm".equals(prefix)) {
+            logger.info("Mock VM Get query1 called " + ctx.getAttribute("j") );
+
+            assertEquals(resource, "vserver");
+            assertEquals(key, "'vserver-name = $request-parameters.vm[$j].vm-name'");
+
+            ctx.setAttribute("tmp.aai-data-vm.vserver-id", "vserverid1");
+
+            ctx.setAttribute("tmp.aai-data-vm.tenant-id", "tenantid1");
+            ctx.setAttribute("tmp.aai-data-vm.cloud-owner", "att-aic");
+            ctx.setAttribute("tmp.aai-data-vm.cloud-region-id", "cloudregionid1");
+        }
+        else if (ctx.getAttribute("j").equals("1") && "tmp.aai-data-vm".equals(prefix)) {
+            logger.info("Mock VM Get query1 called " + ctx.getAttribute("j") );
+
+            assertEquals(resource, "vserver");
+            assertEquals(key, "'vserver-name = $request-parameters.vm[$j].vm-name'");
+
+            ctx.setAttribute("tmp.aai-data-vm.vserver-id", "vserverid2");
+            ctx.setAttribute("tmp.aai-data-vm.tenant-id", "tenantid2");
+            ctx.setAttribute("tmp.aai-data-vm.cloud-owner", "att-aic");
+            ctx.setAttribute("tmp.aai-data-vm.cloud-region-id", "cloudregionid2");
+        }
+        else if ("tmp.aai-data-vnfc".equals(prefix)) {
+            logger.info("Mock VNFC Get query1 called "  );
+
+            assertEquals(resource, "vnfc");
+            assertEquals(key, "'vnfc-name = $request-parameters.vm[$j].vnfc[$k].vnfc-name'");
+            return QueryStatus.NOT_FOUND;
+        }
+        return QueryStatus.SUCCESS;
+    }
+
+    public QueryStatus query(String resource, boolean localOnly, String select, String key, String prefix, SvcLogicContext ctx)  throws SvcLogicException {
+        logger.info("Mock query2 called " + ctx.getAttribute("j"));
+        return QueryStatus.SUCCESS;
+    }
+
+    @Override
+    public QueryStatus reserve(String resource, String select, String key, String prefix, SvcLogicContext ctx) throws SvcLogicException {
+        return QueryStatus.SUCCESS;
+    }
+
+    @Override
+    public QueryStatus save(String resource, boolean force, boolean localOnly, String key, Map<String, String> parms, String prefix, SvcLogicContext ctx) throws SvcLogicException {
+        logger.info("Mock Save called");
+        if (ctx.getAttribute("j").equals("0") &&
+                ctx.getAttribute("k").equals("0") &&
+                "tmp.vnfc-sys-controller".equals(prefix)) {
+            assertEquals(resource, "vnfc");
+            assertEquals(key, "'vnfc-name = $request-parameters.vm[$j].vnfc[$k].vnfc-name'");
+            assertEquals(parms.get("prov-status"), "NVTPROV");
+            assertEquals(parms.get("orchestration-status"), "CONFIGURED");
+            assertEquals(parms.get("in-maint"), "false");
+            assertEquals(parms.get("is-closed-loop"), "false");
+            assertEquals(parms.get("vnfc-function-code"), "funccode");
+            assertEquals(parms.get("vnfc-type"), "vnfctype");
+            assertEquals(parms.get("ipaddress-v4-oam-vip"), "135.1.1.1");
+            assertEquals(parms.get("group-notation"), "groupnotation");
+            assertEquals(parms.get("relationship-list.relationship[0].related-to"), "vserver");
+            assertEquals(parms.get("relationship-list.relationship[0].relationship-data[0].relationship-key"), "vserver.vserver-id");
+            assertEquals(parms.get("relationship-list.relationship[0].relationship-data[0].relationship-value"), "vserverid1");
+            assertEquals(parms.get("relationship-list.relationship[0].relationship-data[1].relationship-key"), "tenant.tenant-id");
+            assertEquals(parms.get("relationship-list.relationship[0].relationship-data[1].relationship-value"), "tenantid1");
+            assertEquals(parms.get("relationship-list.relationship[0].relationship-data[2].relationship-key"), "cloud-region.cloud-owner");
+            assertEquals(parms.get("relationship-list.relationship[0].relationship-data[2].relationship-value"), "att-aic");
+            assertEquals(parms.get("relationship-list.relationship[0].relationship-data[3].relationship-key"), "cloud-region.cloud-region-id");
+            assertEquals(parms.get("relationship-list.relationship[0].relationship-data[3].relationship-value"), "cloudregionid1");
+            assertEquals(parms.get("relationship-list.relationship[1].related-to"), "generic-vnf");
+            assertEquals(parms.get("relationship-list.relationship[1].relationship-data[0].relationship-key"), "generic-vnf.vnf-id");
+            assertEquals(parms.get("relationship-list.relationship[1].relationship-data[0].relationship-value"), "ibcx0001v");
+            assertEquals(parms.get("relationship-list.relationship[2].related-to"), "vf-module");
+            assertEquals(parms.get("relationship-list.relationship[2].relationship-data[0].relationship-key"), "generic-vnf.vnf-id");
+            assertEquals(parms.get("relationship-list.relationship[2].relationship-data[0].relationship-value"), "ibcx0001v");
+            assertEquals(parms.get("relationship-list.relationship[2].relationship-data[1].relationship-key"), "vf-module.vf-module-id");
+            assertEquals(parms.get("relationship-list.relationship[2].relationship-data[1].relationship-value"), "1");
+        }
+        else if (ctx.getAttribute("j").equals("1") &&
+                ctx.getAttribute("k").equals("0") &&
+                "tmp.vnfc-sys-controller".equals(prefix)) {
+            assertEquals(resource, "vnfc");
+            assertEquals(key, "'vnfc-name = $request-parameters.vm[$j].vnfc[$k].vnfc-name'");
+            assertEquals(parms.get("prov-status"), "NVTPROV");
+            assertEquals(parms.get("orchestration-status"), "CONFIGURED");
+            assertEquals(parms.get("in-maint"), "false");
+            assertEquals(parms.get("is-closed-loop"), "false");
+            assertEquals(parms.get("vnfc-function-code"), "funccode1");
+            assertEquals(parms.get("vnfc-type"), "vnfctype1");
+            assertEquals(parms.get("ipaddress-v4-oam-vip"), "135.2.2.2");
+            assertEquals(parms.get("group-notation"), "groupnotation1");
+            assertEquals(parms.get("relationship-list.relationship[0].related-to"), "vserver");
+            assertEquals(parms.get("relationship-list.relationship[0].relationship-data[0].relationship-key"), "vserver.vserver-id");
+            assertEquals(parms.get("relationship-list.relationship[0].relationship-data[0].relationship-value"), "vserverid2");
+            assertEquals(parms.get("relationship-list.relationship[0].relationship-data[1].relationship-key"), "tenant.tenant-id");
+            assertEquals(parms.get("relationship-list.relationship[0].relationship-data[1].relationship-value"), "tenantid2");
+            assertEquals(parms.get("relationship-list.relationship[0].relationship-data[2].relationship-key"), "cloud-region.cloud-owner");
+            assertEquals(parms.get("relationship-list.relationship[0].relationship-data[2].relationship-value"), "att-aic");
+            assertEquals(parms.get("relationship-list.relationship[0].relationship-data[3].relationship-key"), "cloud-region.cloud-region-id");
+            assertEquals(parms.get("relationship-list.relationship[0].relationship-data[3].relationship-value"), "cloudregionid2");
+            assertEquals(parms.get("relationship-list.relationship[1].related-to"), "generic-vnf");
+            assertEquals(parms.get("relationship-list.relationship[1].relationship-data[0].relationship-key"), "generic-vnf.vnf-id");
+            assertEquals(parms.get("relationship-list.relationship[1].relationship-data[0].relationship-value"), "ibcx0001v");
+            assertEquals(parms.get("relationship-list.relationship[2].related-to"), "vf-module");
+            assertEquals(parms.get("relationship-list.relationship[2].relationship-data[0].relationship-key"), "generic-vnf.vnf-id");
+            assertEquals(parms.get("relationship-list.relationship[2].relationship-data[0].relationship-value"), "ibcx0001v");
+            assertEquals(parms.get("relationship-list.relationship[2].relationship-data[1].relationship-key"), "vf-module.vf-module-id");
+            assertEquals(parms.get("relationship-list.relationship[2].relationship-data[1].relationship-value"), "1");
+        }
+        return QueryStatus.SUCCESS;
+    }
+
+    @Override
+    public QueryStatus release(String resource, String key, SvcLogicContext ctx)  throws SvcLogicException {
+        return QueryStatus.SUCCESS;
+    }
+
+    @Override
+    public QueryStatus delete(String resource, String key, SvcLogicContext ctx) throws SvcLogicException {
+        return QueryStatus.SUCCESS;
+    }
+
+    @Override
+    public QueryStatus notify(String resource,     String action,    String key, SvcLogicContext ctx) throws SvcLogicException {
+        return QueryStatus.SUCCESS;
+    }
+
+    public QueryStatus update(String resource, String key,
+            Map<String, String> parms, String prefix, SvcLogicContext ctx)
+            throws SvcLogicException {
+        return QueryStatus.SUCCESS;
+    }
 
 }
 
diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/mock/instance/MockConfigureNodeExecutor.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/mock/instance/MockConfigureNodeExecutor.java
index 165c399..bcfd613 100644
--- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/mock/instance/MockConfigureNodeExecutor.java
+++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/mock/instance/MockConfigureNodeExecutor.java
@@ -28,51 +28,44 @@
 
 public class MockConfigureNodeExecutor implements SvcLogicAdaptor{
 
-	@Override
-	public ConfigStatus configure(String key, Map<String, String> parameters, SvcLogicContext ctx) {
-		
-		
-		if ( "get".equals(key)) {
-			
-			if ("135.1.1.1".equals(parameters.get("host") )) {
-					String fullPathFileName = parameters.get("fullPathFileName");
-					if (("SuccessFile").equals(fullPathFileName ) )
-						return ConfigStatus.FAILURE;
-					if (("FailureFile").equals(fullPathFileName ) )
-						return ConfigStatus.SUCCESS;
-					if (("FailureLogFile").equals(fullPathFileName ) )
-						return ConfigStatus.SUCCESS;
-			}
-			else if ("135.2.2.2".equals(parameters.get("host")) ) {
-				String fullPathFileName = parameters.get("fullPathFileName");
-				if (("SuccessFile").equals(fullPathFileName ) )
-					return ConfigStatus.FAILURE;
-				if (("FailureFile").equals(fullPathFileName ) )
-					return ConfigStatus.FAILURE;
-				
-			}
-			
-			return ConfigStatus.SUCCESS;
-		}
-		else {
-			ctx.setAttribute("Status", "Success");
-		
-			return ConfigStatus.SUCCESS;
-		}
-	}
+    @Override
+    public ConfigStatus configure(String key, Map<String, String> parameters, SvcLogicContext ctx) {
 
-	@Override
-	public ConfigStatus activate(String key, SvcLogicContext ctx) {
-		// TODO Auto-generated method stub
-		return null;
-	}
+        if ( "get".equals(key)) {
 
-	@Override
-	public ConfigStatus deactivate(String key, SvcLogicContext ctx) {
-		// TODO Auto-generated method stub
-		return null;
-	}
+            if ("135.1.1.1".equals(parameters.get("host") )) {
+                    String fullPathFileName = parameters.get("fullPathFileName");
+                    if (("SuccessFile").equals(fullPathFileName ) )
+                        return ConfigStatus.FAILURE;
+                    if (("FailureFile").equals(fullPathFileName ) )
+                        return ConfigStatus.SUCCESS;
+                    if (("FailureLogFile").equals(fullPathFileName ) )
+                        return ConfigStatus.SUCCESS;
+            }
+            else if ("135.2.2.2".equals(parameters.get("host")) ) {
+                String fullPathFileName = parameters.get("fullPathFileName");
+                if (("SuccessFile").equals(fullPathFileName ) )
+                    return ConfigStatus.FAILURE;
+                if (("FailureFile").equals(fullPathFileName ) )
+                    return ConfigStatus.FAILURE;
+            }
 
+            return ConfigStatus.SUCCESS;
+        }
+        else {
+            ctx.setAttribute("Status", "Success");
 
+            return ConfigStatus.SUCCESS;
+        }
+    }
 
+    @Override
+    public ConfigStatus activate(String key, SvcLogicContext ctx) {
+        return null;
+    }
+
+    @Override
+    public ConfigStatus deactivate(String key, SvcLogicContext ctx) {
+        return null;
+    }
 }
diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/mock/instance/MockSvcLogicJavaPlugin.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/mock/instance/MockSvcLogicJavaPlugin.java
index e132126..9bf7e41 100644
--- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/mock/instance/MockSvcLogicJavaPlugin.java
+++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/mock/instance/MockSvcLogicJavaPlugin.java
@@ -33,116 +33,74 @@
 import org.openecomp.sdnc.sli.SvcLogicJavaPlugin;
 
 public class MockSvcLogicJavaPlugin implements SvcLogicJavaPlugin{
-	private final static Logger logger = LoggerFactory.getLogger(MockSvcLogicJavaPlugin.class);
-	public static String INPUT_PARAM_RESPONSE_PREFIX = "responsePrefix";
-	public static String OUTPUT_STATUS_SUCCESS = "success";
-	public static String OUTPUT_STATUS_FAILURE = "failure";
-	public static String OUTPUT_PARAM_STATUS = "status";
-	
-
-	public void mountDevice(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException{
-		logger.info("Executed MountDevice Plugin");
-	}
-
-	public void downloadDeviceConfiguration(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException{
-		ctx.setAttribute("downloadStatus", "success");
-		logger.info("Executed Download Device Configuration Plugin");
-		throw new SvcLogicException("failed in Download..");
-	}
+    private final static Logger logger = LoggerFactory.getLogger(MockSvcLogicJavaPlugin.class);
+    public static String INPUT_PARAM_RESPONSE_PREFIX = "responsePrefix";
+    public static String OUTPUT_STATUS_SUCCESS = "success";
+    public static String OUTPUT_STATUS_FAILURE = "failure";
+    public static String OUTPUT_PARAM_STATUS = "status";
 
 
-	
-	
-	public void getCommonConfigInfo(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException, FileNotFoundException, IOException {
-		logger.info("Mock getCommonConfigInfo Called....");
-		
-	
-		/***
-		ctx.setAttribute("device-authentication.USER-NAME", "root");
-		
-		String responsePrefix = inParams.get(INPUT_PARAM_RESPONSE_PREFIX);
-		responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix+".") : "";
-		
-		
-		ctx.setAttribute(responsePrefix +OUTPUT_PARAM_STATUS,
-				OUTPUT_STATUS_SUCCESS);
-				
-		**/
-		
-	}
+    public void mountDevice(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException{
+        logger.info("Executed MountDevice Plugin");
+    }
 
-	
-	public void getConfigFileReference(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
-		logger.info("Mock getConfigFileReference Called....");
-	}
-	
-	
-	
-	public void getTemplate(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
+    public void downloadDeviceConfiguration(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException{
+        ctx.setAttribute("downloadStatus", "success");
+        logger.info("Executed Download Device Configuration Plugin");
+        throw new SvcLogicException("failed in Download..");
+    }
 
-		logger.info("Mock getTemplate Called....");
-	}
-	
-	
-	
-	public void saveConfigFiles(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
+    public void getCommonConfigInfo(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException, FileNotFoundException, IOException {
+        logger.info("Mock getCommonConfigInfo Called....");
+    }
 
-		logger.info("Mock saveConfigFiles called...");
-		
-	}
-	
-	
-	
-	public void updateUploadConfig(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
+    public void getConfigFileReference(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
+        logger.info("Mock getConfigFileReference Called....");
+    }
 
-		logger.info("Mock updateUploadConfig called...");
-	}
-	
-	
-	
-	
-	public void savePrepareRelationship(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
-		logger.info("Mock savePrepareRelationship called...");
-	}
-	
-	
-	
-	
-	
-	public void saveConfigBlock(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
-		logger.info("Mock saveConfigBlock called...");
-		
-		if (StringUtils.isBlank(ctx.getAttribute("configuration-params"))) {
-			logger.info("No params...");
-			ctx.setAttribute("file-category", "device_configuration");
-			ctx.setAttribute("deviceconfig-file-content", "deviceConfig");
-		
-		} else {
-			logger.info("Config params exist...");
-			ctx.setAttribute("file-category", "device_configuration");
-			ctx.setAttribute("file-category1", "configuration_block");
-			ctx.setAttribute("file-category2", "config_data");
-			
-		}
-	
-	}
-	
-	public void saveTemplateConfig(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
-		
-		logger.info("Mock saveTemplateConfig called...");
-		
-		if (StringUtils.isBlank(ctx.getAttribute("configuration-params"))) {
-			logger.info("No params...");
-			ctx.setAttribute("file-category", "device_configuration");
-			ctx.setAttribute("deviceconfig-file-content", "deviceConfig");
-		
-		} else {
-			logger.info("Config params exist...");
-			ctx.setAttribute("file-category", "device_configuration");
-			ctx.setAttribute("file-category1", "config_data");
-			
-		}
-		
-		
-	}
+    public void getTemplate(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
+        logger.info("Mock getTemplate Called....");
+    }
+
+    public void saveConfigFiles(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
+        logger.info("Mock saveConfigFiles called...");
+    }
+
+    public void updateUploadConfig(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
+        logger.info("Mock updateUploadConfig called...");
+    }
+
+    public void savePrepareRelationship(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
+        logger.info("Mock savePrepareRelationship called...");
+    }
+
+    public void saveConfigBlock(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
+        logger.info("Mock saveConfigBlock called...");
+
+        if (StringUtils.isBlank(ctx.getAttribute("configuration-params"))) {
+            logger.info("No params...");
+            ctx.setAttribute("file-category", "device_configuration");
+            ctx.setAttribute("deviceconfig-file-content", "deviceConfig");
+        } else {
+            logger.info("Config params exist...");
+            ctx.setAttribute("file-category", "device_configuration");
+            ctx.setAttribute("file-category1", "configuration_block");
+            ctx.setAttribute("file-category2", "config_data");
+        }
+    }
+
+    public void saveTemplateConfig(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
+        logger.info("Mock saveTemplateConfig called...");
+
+        if (StringUtils.isBlank(ctx.getAttribute("configuration-params"))) {
+            logger.info("No params...");
+            ctx.setAttribute("file-category", "device_configuration");
+            ctx.setAttribute("deviceconfig-file-content", "deviceConfig");
+
+        } else {
+            logger.info("Config params exist...");
+            ctx.setAttribute("file-category", "device_configuration");
+            ctx.setAttribute("file-category1", "config_data");
+        }
+    }
 }
diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/resources/properties/APPC/PublishConfiguration/PublishConfig_Failure.properties b/appc-directed-graph/appc-dgraph/provider/src/test/resources/properties/APPC/PublishConfiguration/PublishConfig_Failure.properties
index 4e2dccf..2a84acc 100644
--- a/appc-directed-graph/appc-dgraph/provider/src/test/resources/properties/APPC/PublishConfiguration/PublishConfig_Failure.properties
+++ b/appc-directed-graph/appc-dgraph/provider/src/test/resources/properties/APPC/PublishConfiguration/PublishConfig_Failure.properties
@@ -17,6 +17,7 @@
 # limitations under the License.
 # ============LICENSE_END=========================================================
 ###
+
 input.vnf-id=ibcx0001v
 input.tmp.uploadConfigInfo.VNF-ID=ibcx0001v
 input.tmp.uploadConfigInfo.UPLOAD-CONFIG-ID=12434
diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/resources/properties/APPC/PublishConfiguration/PublishConfig_Success.properties b/appc-directed-graph/appc-dgraph/provider/src/test/resources/properties/APPC/PublishConfiguration/PublishConfig_Success.properties
index bf851ed..a1e160f 100644
--- a/appc-directed-graph/appc-dgraph/provider/src/test/resources/properties/APPC/PublishConfiguration/PublishConfig_Success.properties
+++ b/appc-directed-graph/appc-dgraph/provider/src/test/resources/properties/APPC/PublishConfiguration/PublishConfig_Success.properties
@@ -17,6 +17,7 @@
 # limitations under the License.
 # ============LICENSE_END=========================================================
 ###
+
 input.vnf-id=ibcx0001v
 input.tmp.uploadConfigInfo.VNF-ID=ibcx0001v
 input.tmp.uploadConfigInfo.UPLOAD-CONFIG-ID=12434
diff --git a/appc-directed-graph/dg-loader/features/src/main/resources/features.xml b/appc-directed-graph/dg-loader/features/src/main/resources/features.xml
index 2d4a654..49bf358 100644
--- a/appc-directed-graph/dg-loader/features/src/main/resources/features.xml
+++ b/appc-directed-graph/dg-loader/features/src/main/resources/features.xml
@@ -20,6 +20,7 @@
   -->
 
 
+
 <features name="sdnc-dg-loader-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
diff --git a/appc-directed-graph/dg-loader/pom.xml b/appc-directed-graph/dg-loader/pom.xml
index 5579693..40b3b90 100644
--- a/appc-directed-graph/dg-loader/pom.xml
+++ b/appc-directed-graph/dg-loader/pom.xml
@@ -1,4 +1,27 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+  ONAP : APPC
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+  ================================================================================
+  Copyright (C) 2017 Amdocs
+  =============================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ECOMP is a trademark and service mark of AT&T Intellectual Property.
+  ============LICENSE_END=========================================================
+  -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
@@ -31,45 +54,9 @@
         <openecomp.sdnc.sli.version>1.1.0</openecomp.sdnc.sli.version>
         <openecomp.sdnc.dblib.version>1.1.0</openecomp.sdnc.dblib.version>
         <openecomp.sdnc.sql-resource.version>1.1.0</openecomp.sdnc.sql-resource.version>
+        <licenseDir>${project.parent.parent.basedir}</licenseDir>
     </properties>
 
-    <dependencyManagement>
-
-        <dependencies>
-            <dependency>
-                <groupId>org.openecomp.appc.plugins</groupId>
-                <artifactId>dg-loader.features</artifactId>
-                <classifier>features</classifier>
-                <type>xml</type>
-                <version>${project.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>org.openecomp.appc.plugins</groupId>
-                <artifactId>dg-loader.provider</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>org.openecomp.sdnc.core</groupId>
-                <artifactId>sli-common</artifactId>
-                <version>${sdnctl.sli.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>org.openecomp.sdnc.core</groupId>
-                <artifactId>sli-provider</artifactId>
-            </dependency>
-
-            <dependency>
-                <groupId>org.openecomp.sdnc.core</groupId>
-                <artifactId>dblib-provider</artifactId>
-                <version>${sdnctl.dblib.version}</version>
-            </dependency>
-
-        </dependencies>
-    </dependencyManagement>
-
     <modules>
         <module>features</module>
         <module>provider</module>
diff --git a/appc-directed-graph/dg-loader/provider/pom.xml b/appc-directed-graph/dg-loader/provider/pom.xml
index 3bd0ae9..587c92a 100644
--- a/appc-directed-graph/dg-loader/provider/pom.xml
+++ b/appc-directed-graph/dg-loader/provider/pom.xml
@@ -1,4 +1,27 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+  ONAP : APPC
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+  ================================================================================
+  Copyright (C) 2017 Amdocs
+  =============================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ECOMP is a trademark and service mark of AT&T Intellectual Property.
+  ============LICENSE_END=========================================================
+  -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
@@ -9,8 +32,7 @@
     </parent>
     <artifactId>dg-loader-provider</artifactId>
     <packaging>bundle</packaging>
-    <name>Directed Graph Loader - Provider</name>
-    <url>http://maven.apache.org</url>
+    <name>APPC Directed Graph Loader - Provider</name>
 
     <dependencies>
         <dependency>
@@ -22,25 +44,20 @@
         <dependency>
             <groupId>commons-io</groupId>
             <artifactId>commons-io</artifactId>
-            <version>${common.io.version}</version>
         </dependency>
         <dependency>
             <groupId>com.att.eelf</groupId>
             <artifactId>eelf-core</artifactId>
-            <version>${eelf.version}</version>
         </dependency>
-
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
-
     </dependencies>
 
     <build>
         <plugins>
-
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGLoaderActivator.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGLoaderActivator.java
index dd56e6c..99f7f8b 100644
--- a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGLoaderActivator.java
+++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGLoaderActivator.java
@@ -32,27 +32,27 @@
 
 public class DGLoaderActivator implements BundleActivator{
 
-	private List<ServiceRegistration> registrations = new LinkedList<ServiceRegistration>();
+    private List<ServiceRegistration> registrations = new LinkedList<ServiceRegistration>();
 
 
-	private static final EELFLogger log = EELFManager.getInstance().getLogger(DGLoaderActivator.class);
+    private static final EELFLogger log = EELFManager.getInstance().getLogger(DGLoaderActivator.class);
 
-	@Override
-	public void start(BundleContext ctx) throws Exception
-	{
+    @Override
+    public void start(BundleContext ctx) throws Exception
+    {
 
-		
+        
 
-	}
-	@Override
-	public void stop(BundleContext arg0) throws Exception
-	{
-		for (ServiceRegistration registration: registrations)
-		{
-			registration.unregister();
-			registration = null;
-		}
+    }
+    @Override
+    public void stop(BundleContext arg0) throws Exception
+    {
+        for (ServiceRegistration registration: registrations)
+        {
+            registration.unregister();
+            registration = null;
+        }
 
-	}
+    }
 
 }
diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLActivate.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLActivate.java
index 1cb446a..b37400b 100644
--- a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLActivate.java
+++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLActivate.java
@@ -36,93 +36,90 @@
 
 public class DGXMLActivate {
 
-	private final static Logger logger = LoggerFactory.getLogger(DGXMLLoadNActivate.class);
-	private final SvcLogicStore store;
-	public static String STRING_ENCODING = "utf-8";
+    private final static Logger logger = LoggerFactory.getLogger(DGXMLLoadNActivate.class);
+    private final SvcLogicStore store;
+    public static String STRING_ENCODING = "utf-8";
 
-	public DGXMLActivate(String propfile) throws Exception{
-		if(StringUtils.isBlank(propfile)){
-			throw new Exception(propfile + " Profile file is not defined");
-		}
-		this.store = SvcLogicStoreFactory.getSvcLogicStore(propfile);
-	}
+    public DGXMLActivate(String propfile) throws Exception{
+        if(StringUtils.isBlank(propfile)){
+            throw new Exception(propfile + " Profile file is not defined");
+        }
+        this.store = SvcLogicStoreFactory.getSvcLogicStore(propfile);
+    }
 
 
-	public void activateDg(String activateFilePath) throws Exception {
-		logger.info("******************** Activating DG into Database *****************************");
-		try {
-			List<String> errors = new ArrayList<String>();
-			if(this.store != null){
-				File activateFile = new File(activateFilePath);
-				if(activateFile != null && activateFile.isFile()){
-					List<String> fileLines = FileUtils.readLines(activateFile,STRING_ENCODING);
-					if(fileLines != null ){
-						for (String line : fileLines) {
-							if(line != null && ! line.trim().startsWith("#")){
-								String lineArray[] = line.trim().split(":");
-								try {
-									if(lineArray != null && lineArray.length >= 4){
-										String module = lineArray[0];
-										String rpc = lineArray[1];
-										String version = lineArray[2];
-										String mode = lineArray[3];
-										if(StringUtils.isNotBlank(module) && StringUtils.isNotBlank(rpc)
-												&& StringUtils.isNotBlank(version) && StringUtils.isNotBlank(mode)){
-											logger.info("Activating DG :" + line);
-											SvcLogicGraph graph = this.store.fetch(module, rpc, version, mode);
-											if(graph != null){
-												logger.info("Found Graph :" + line + " Activating ...");
-												this.store.activate(graph);
-											}else{
-												throw new Exception("Failed to fetch from Database");
-											}
-										}
-									}
-								} catch (Exception e) {
-									e.printStackTrace();
-									errors.add("Failed to Activate "+line + ", "+e.getMessage());
-								}
-							}
-						}
-					}
-				}else{
-					throw new Exception(activateFile + " is not a valid Activate file Path");
-				}
-			}else{
-				throw new Exception("Failed to initialise SvcLogicStore");
-			}
+    public void activateDg(String activateFilePath) throws Exception {
+        logger.info("******************** Activating DG into Database *****************************");
+        try {
+            List<String> errors = new ArrayList<String>();
+            if(this.store != null){
+                File activateFile = new File(activateFilePath);
+                if(activateFile != null && activateFile.isFile()){
+                    List<String> fileLines = FileUtils.readLines(activateFile,STRING_ENCODING);
+                    if(fileLines != null ){
+                        for (String line : fileLines) {
+                            if(line != null && ! line.trim().startsWith("#")){
+                                String lineArray[] = line.trim().split(":");
+                                try {
+                                    if(lineArray != null && lineArray.length >= 4){
+                                        String module = lineArray[0];
+                                        String rpc = lineArray[1];
+                                        String version = lineArray[2];
+                                        String mode = lineArray[3];
+                                        if(StringUtils.isNotBlank(module) && StringUtils.isNotBlank(rpc)
+                                                && StringUtils.isNotBlank(version) && StringUtils.isNotBlank(mode)){
+                                            logger.info("Activating DG :" + line);
+                                            SvcLogicGraph graph = this.store.fetch(module, rpc, version, mode);
+                                            if(graph != null){
+                                                logger.info("Found Graph :" + line + " Activating ...");
+                                                this.store.activate(graph);
+                                            }else{
+                                                throw new Exception("Failed to fetch from Database");
+                                            }
+                                        }
+                                    }
+                                } catch (Exception e) {
+                                    e.printStackTrace();
+                                    errors.add("Failed to Activate "+line + ", "+e.getMessage());
+                                }
+                            }
+                        }
+                    }
+                }else{
+                    throw new Exception(activateFile + " is not a valid Activate file Path");
+                }
+            }else{
+                throw new Exception("Failed to initialise SvcLogicStore");
+            }
 
-			if(errors.size() > 0){
-				throw new Exception(errors.toString());
-			}
-		} catch (Exception e) {
-			logger.error(e.getMessage());
-		}
-	}
+            if(errors.size() > 0){
+                throw new Exception(errors.toString());
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage());
+        }
+    }
 
 
-	public static void main(String[] args) {
-		try {
-			
-			String activateFile = null;
-			String propertyPath = null;
-			
-			if(args != null && args.length >= 2){
-				activateFile = args[0];
-				propertyPath = args[1];
-			}else{
-				throw new Exception("Sufficient inputs for DGXMLActivate are missing <activatefile> <dbPropertyfile>");
-			}
+    public static void main(String[] args) {
+        try {
+            String activateFile = null;
+            String propertyPath = null;
 
-			DGXMLActivate dgXmlActivate = new DGXMLActivate(propertyPath);
-			dgXmlActivate.activateDg(activateFile);
-		} catch (Exception e) {
-			e.printStackTrace();
-		}finally {
-			System.exit(1);
-		}
-	}
+            if(args != null && args.length >= 2){
+                activateFile = args[0];
+                propertyPath = args[1];
+            }else{
+                throw new Exception("Sufficient inputs for DGXMLActivate are missing <activatefile> <dbPropertyfile>");
+            }
 
-
+            DGXMLActivate dgXmlActivate = new DGXMLActivate(propertyPath);
+            dgXmlActivate.activateDg(activateFile);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }finally {
+            System.exit(1);
+        }
+    }
 
 }
diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLGenerator.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLGenerator.java
index 3ffef14..60fcd5b 100644
--- a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLGenerator.java
+++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLGenerator.java
@@ -34,95 +34,95 @@
 
 
 public class DGXMLGenerator {
-	private final static Logger logger = LoggerFactory.getLogger(DGXMLGenerator.class);
+    private final static Logger logger = LoggerFactory.getLogger(DGXMLGenerator.class);
 
-	public static String STRING_ENCODING = "utf-8";
-	public static String JS_INTERFACE_DG_CONVERTOR = "dgconverter";
-	public static String JS_METHOD_GET_NODE_TO_XML = "getNodeToXml";
-	public static String GENERATOR_TEMPLATE_FILE = "js/dg_xml2json.js";
+    public static String STRING_ENCODING = "utf-8";
+    public static String JS_INTERFACE_DG_CONVERTOR = "dgconverter";
+    public static String JS_METHOD_GET_NODE_TO_XML = "getNodeToXml";
+    public static String GENERATOR_TEMPLATE_FILE = "js/dg_xml2json.js";
 
-	public void generateXMLFromJSON(String jsonPath, String xmlpath, String propertyPath) throws Exception {
-		try{
-			ScriptEngineManager manager = new ScriptEngineManager();
-			ScriptEngine engine = manager.getEngineByName("JavaScript");
-			if (!(engine instanceof Invocable)) {
-				logger.error("Invoking methods is not supported.");
-				return;
-			}
-			Invocable inv = (Invocable) engine;
-			//		engine.eval(new FileReader(DGXMLGenerator.class.getClassLoader().getResource(GENERATOR_TEMPLATE_FILE).getPath()));
-			String js = IOUtils.toString(DGXMLGenerator.class.getClassLoader().getResourceAsStream(GENERATOR_TEMPLATE_FILE),STRING_ENCODING);
-			engine.eval(js);
+    public void generateXMLFromJSON(String jsonPath, String xmlpath, String propertyPath) throws Exception {
+        try{
+            ScriptEngineManager manager = new ScriptEngineManager();
+            ScriptEngine engine = manager.getEngineByName("JavaScript");
+            if (!(engine instanceof Invocable)) {
+                logger.error("Invoking methods is not supported.");
+                return;
+            }
+            Invocable inv = (Invocable) engine;
+            //        engine.eval(new FileReader(DGXMLGenerator.class.getClassLoader().getResource(GENERATOR_TEMPLATE_FILE).getPath()));
+            String js = IOUtils.toString(DGXMLGenerator.class.getClassLoader().getResourceAsStream(GENERATOR_TEMPLATE_FILE),STRING_ENCODING);
+            engine.eval(js);
 
-			Object dgconverter = engine.get(JS_INTERFACE_DG_CONVERTOR);
+            Object dgconverter = engine.get(JS_INTERFACE_DG_CONVERTOR);
 
-			List<File> files = new ArrayList<File>();
-			if(dgconverter != null){
-				File jsonPathFile = new File(jsonPath);
-				if(jsonPathFile.isDirectory()){
-					String[] extensions = new String[] { "json", "JSON" };
-					files = (List<File>) FileUtils.listFiles(jsonPathFile, extensions, true);
-				}else if(jsonPathFile.isFile()){
-					files.add(jsonPathFile);
-				}else{
-					throw new Exception("Failed to get the nature of the JSON path :"+ jsonPath);
-				}
+            List<File> files = new ArrayList<File>();
+            if(dgconverter != null){
+                File jsonPathFile = new File(jsonPath);
+                if(jsonPathFile.isDirectory()){
+                    String[] extensions = new String[] { "json", "JSON" };
+                    files = (List<File>) FileUtils.listFiles(jsonPathFile, extensions, true);
+                }else if(jsonPathFile.isFile()){
+                    files.add(jsonPathFile);
+                }else{
+                    throw new Exception("Failed to get the nature of the JSON path :"+ jsonPath);
+                }
 
-				logger.info("JSON Files identified "+ files.size());
+                logger.info("JSON Files identified "+ files.size());
 
-				if(files.size() > 0){
-					boolean isXmlPathDeleted = FileUtils.deleteQuietly(new File(xmlpath));
-					logger.info("Cleaning old DG XML under : " + xmlpath + ", delete status :" + isXmlPathDeleted);
+                if(files.size() > 0){
+                    boolean isXmlPathDeleted = FileUtils.deleteQuietly(new File(xmlpath));
+                    logger.info("Cleaning old DG XML under : " + xmlpath + ", delete status :" + isXmlPathDeleted);
 
-					for (File file : files) {
-						String dgJson = FileUtils.readFileToString(file,STRING_ENCODING);
-						logger.info("Generating XML from  :" + file.getName());
-						String xmlFileName = xmlpath +"/"+file.getName().replace(".json", ".xml");
+                    for (File file : files) {
+                        String dgJson = FileUtils.readFileToString(file,STRING_ENCODING);
+                        logger.info("Generating XML from  :" + file.getName());
+                        String xmlFileName = xmlpath +"/"+file.getName().replace(".json", ".xml");
 
-						Object dgXMl = inv.invokeMethod(dgconverter, JS_METHOD_GET_NODE_TO_XML, dgJson);
-						// Write the XML File
-						if(dgXMl != null){
-							File xmlFile = new File(xmlFileName);
-							FileUtils.writeStringToFile(xmlFile, dgXMl.toString(), STRING_ENCODING);
-							logger.info("Generated XML File under  :" + xmlFile.getCanonicalPath());
-						}
-					}
+                        Object dgXMl = inv.invokeMethod(dgconverter, JS_METHOD_GET_NODE_TO_XML, dgJson);
+                        // Write the XML File
+                        if(dgXMl != null){
+                            File xmlFile = new File(xmlFileName);
+                            FileUtils.writeStringToFile(xmlFile, dgXMl.toString(), STRING_ENCODING);
+                            logger.info("Generated XML File under  :" + xmlFile.getCanonicalPath());
+                        }
+                    }
 
-				}else{
-					logger.info("No JSON Files to generate XML");
-				}
-			}else{
-				logger.error("Couldn't get Java Script Engine..");
-			}
-		}catch (Exception e) {
-			logger.error("Failed to generate generateXMLFromJSON :"+e.getMessage());
-		}
-	}
+                }else{
+                    logger.info("No JSON Files to generate XML");
+                }
+            }else{
+                logger.error("Couldn't get Java Script Engine..");
+            }
+        }catch (Exception e) {
+            logger.error("Failed to generate generateXMLFromJSON :"+e.getMessage());
+        }
+    }
 
 
-	public static void main(String[] args) {
-		try {
-			DGXMLGenerator application = new DGXMLGenerator();
-			String jsonPath = null;
-			String xmlPath = null;
-			String propertyPath = null;
-			// Generate, GenerateLoad, GenerateLoadActivate
-			//args = new String[]{"src/main/resources/json","src/test/resources/xml"};
-			logger.info("DGXML Conversion Started with arguments :"+ args[0] +":"+ args[1]);
-			if(args != null && args.length >= 2){
-				jsonPath = args[0];
-				xmlPath = args[1];
-			}else{
-				throw new Exception("Sufficient inputs are missing <jsonPath> <xmlPath>");
-			}
+    public static void main(String[] args) {
+        try {
+            DGXMLGenerator application = new DGXMLGenerator();
+            String jsonPath = null;
+            String xmlPath = null;
+            String propertyPath = null;
+            // Generate, GenerateLoad, GenerateLoadActivate
+            //args = new String[]{"src/main/resources/json","src/test/resources/xml"};
+            logger.info("DGXML Conversion Started with arguments :"+ args[0] +":"+ args[1]);
+            if(args != null && args.length >= 2){
+                jsonPath = args[0];
+                xmlPath = args[1];
+            }else{
+                throw new Exception("Sufficient inputs are missing <jsonPath> <xmlPath>");
+            }
 
-			application.generateXMLFromJSON(jsonPath, xmlPath, propertyPath);
-			logger.info("DGXML Conversion Completed...");
-		} catch (Exception e) {
-			logger.error("Failed in DG XML Generation :"+e.getMessage());
-			e.printStackTrace();
-		}
+            application.generateXMLFromJSON(jsonPath, xmlPath, propertyPath);
+            logger.info("DGXML Conversion Completed...");
+        } catch (Exception e) {
+            logger.error("Failed in DG XML Generation :"+e.getMessage());
+            e.printStackTrace();
+        }
 
-	}
+    }
 
 }
diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoad.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoad.java
index 5e96730..b7651bb 100644
--- a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoad.java
+++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoad.java
@@ -35,80 +35,74 @@
 import org.openecomp.sdnc.sli.SvcLogicStoreFactory;
 
 public class DGXMLLoad {
-	private final static Logger logger = LoggerFactory.getLogger(DGXMLLoad.class);
-	private final SvcLogicStore store;
-	public static String STRING_ENCODING = "utf-8";
+    private final static Logger logger = LoggerFactory.getLogger(DGXMLLoad.class);
+    private final SvcLogicStore store;
+    public static String STRING_ENCODING = "utf-8";
 
-	public DGXMLLoad(String propfile) throws Exception{
-		if(StringUtils.isBlank(propfile)){
-			throw new Exception(propfile + " Profile file is not defined");
-		}
-		this.store = SvcLogicStoreFactory.getSvcLogicStore(propfile);
-	}
+    public DGXMLLoad(String propfile) throws Exception{
+        if(StringUtils.isBlank(propfile)){
+            throw new Exception(propfile + " Profile file is not defined");
+        }
+        this.store = SvcLogicStoreFactory.getSvcLogicStore(propfile);
+    }
 
-	public void loadDGXMLFile(String dgXMLpath) throws SvcLogicException{
-		if(dgXMLpath != null ){
-			SvcLogicParser.load(dgXMLpath, this.store);
-		}
-	}
+    public void loadDGXMLFile(String dgXMLpath) throws SvcLogicException{
+        if(dgXMLpath != null ){
+            SvcLogicParser.load(dgXMLpath, this.store);
+        }
+    }
 
-	private void loadDGXMLDir(String xmlPath) throws Exception {
-		try {
-			logger.info("******************** Loading DG into Database *****************************");
-			List<String> errors = new ArrayList<String>();
-			if(this.store != null){
-				File xmlDir = new File(xmlPath);
-				if(xmlDir != null && xmlDir.isDirectory()){
-					String[] extensions = new String[] { "xml", "XML" };
-					List<File> files = (List<File>) FileUtils.listFiles(xmlDir, extensions, true);
-					for (File file : files) {
-						logger.info("Loading DG XML file :" + file.getCanonicalPath());
-						try{
-							SvcLogicParser.load(file.getCanonicalPath(), this.store);
-						}catch (Exception e) {
-							errors.add("Failed to load XML "+file.getCanonicalPath() + ", Exception : "+e.getMessage());
-						}
-					}
-				}else{
-					throw new Exception(xmlPath + " is not a valid XML Directory");
-				}
-			}else{
-				throw new Exception("Failed to initialise SvcLogicStore");
-			}
+    private void loadDGXMLDir(String xmlPath) throws Exception {
+        try {
+            logger.info("******************** Loading DG into Database *****************************");
+            List<String> errors = new ArrayList<String>();
+            if(this.store != null){
+                File xmlDir = new File(xmlPath);
+                if(xmlDir != null && xmlDir.isDirectory()){
+                    String[] extensions = new String[] { "xml", "XML" };
+                    List<File> files = (List<File>) FileUtils.listFiles(xmlDir, extensions, true);
+                    for (File file : files) {
+                        logger.info("Loading DG XML file :" + file.getCanonicalPath());
+                        try{
+                            SvcLogicParser.load(file.getCanonicalPath(), this.store);
+                        }catch (Exception e) {
+                            errors.add("Failed to load XML "+file.getCanonicalPath() + ", Exception : "+e.getMessage());
+                        }
+                    }
+                }else{
+                    throw new Exception(xmlPath + " is not a valid XML Directory");
+                }
+            }else{
+                throw new Exception("Failed to initialise SvcLogicStore");
+            }
 
-			if(errors.size() > 0){
-				throw new Exception(errors.toString());
-			}
-		} catch (Exception e) {
-			logger.error(e.getMessage());
-		}
-	}
+            if(errors.size() > 0){
+                throw new Exception(errors.toString());
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage());
+        }
+    }
 
-	
+    public static void main(String[] args) {
+        try {
+            String xmlPath = null;
+            String propertyPath = null;
 
+            if(args != null && args.length >= 2){
+                xmlPath = args[0];
+                propertyPath = args[1];
+            }else{
+                throw new Exception("Sufficient inputs for DGXMLLoadNActivate are missing <xmlpath> <dbPropertyfile>");
+            }
 
-	public static void main(String[] args) {
-		try {
-			String xmlPath = null;
-			String propertyPath = null;
-
-			if(args != null && args.length >= 2){
-				xmlPath = args[0];
-				propertyPath = args[1];
-			}else{
-				throw new Exception("Sufficient inputs for DGXMLLoadNActivate are missing <xmlpath> <dbPropertyfile>");
-			}
-			
-			//propertyPath = "/Users/bs2796/0Source/ecomp/bvc-3.2.2/others/properties/dblib.properties";
-			//xmlPath = DGXMLLoadNActivate.class.getClassLoader().getResource(".").getPath() +"/xml" ;
-
-			DGXMLLoad dgXMLLoadDB = new DGXMLLoad(propertyPath);
-			dgXMLLoadDB.loadDGXMLDir(xmlPath);
-		} catch (Exception e) {
-			e.printStackTrace();
-		}finally {
-			System.exit(1);
-		}
-	}
+            DGXMLLoad dgXMLLoadDB = new DGXMLLoad(propertyPath);
+            dgXMLLoadDB.loadDGXMLDir(xmlPath);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }finally {
+            System.exit(1);
+        }
+    }
 
 }
diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoadNActivate.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoadNActivate.java
index 1373143..f5eb244 100644
--- a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoadNActivate.java
+++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoadNActivate.java
@@ -36,133 +36,133 @@
 import org.openecomp.sdnc.sli.SvcLogicStoreFactory;
 
 public class DGXMLLoadNActivate {
-	private final static Logger logger = LoggerFactory.getLogger(DGXMLLoadNActivate.class);
-	private final SvcLogicStore store;
-	public static String STRING_ENCODING = "utf-8";
+    private final static Logger logger = LoggerFactory.getLogger(DGXMLLoadNActivate.class);
+    private final SvcLogicStore store;
+    public static String STRING_ENCODING = "utf-8";
 
-	public DGXMLLoadNActivate(String propfile) throws Exception{
-		if(StringUtils.isBlank(propfile)){
-			throw new Exception(propfile + " Profile file is not defined");
-		}
-		this.store = SvcLogicStoreFactory.getSvcLogicStore(propfile);
-	}
+    public DGXMLLoadNActivate(String propfile) throws Exception{
+        if(StringUtils.isBlank(propfile)){
+            throw new Exception(propfile + " Profile file is not defined");
+        }
+        this.store = SvcLogicStoreFactory.getSvcLogicStore(propfile);
+    }
 
-	public void loadDGXMLFile(String dgXMLpath) throws SvcLogicException{
-		if(dgXMLpath != null ){
-			SvcLogicParser.load(dgXMLpath, this.store);
-		}
-	}
+    public void loadDGXMLFile(String dgXMLpath) throws SvcLogicException{
+        if(dgXMLpath != null ){
+            SvcLogicParser.load(dgXMLpath, this.store);
+        }
+    }
 
-	private void loadDGXMLDir(String xmlPath) throws Exception {
-		try {
-			logger.info("******************** Loading DG into Database *****************************");
-			List<String> errors = new ArrayList<String>();
-			if(this.store != null){
-				File xmlDir = new File(xmlPath);
-				if(xmlDir != null && xmlDir.isDirectory()){
-					String[] extensions = new String[] { "xml", "XML" };
-					List<File> files = (List<File>) FileUtils.listFiles(xmlDir, extensions, true);
-					for (File file : files) {
-						logger.info("Loading DG XML file :" + file.getCanonicalPath());
-						try{
-							SvcLogicParser.load(file.getCanonicalPath(), this.store);
-						}catch (Exception e) {
-							errors.add("Failed to load XML "+file.getCanonicalPath() + ", Exception : "+e.getMessage());
-						}
-					}
-				}else{
-					throw new Exception(xmlPath + " is not a valid XML Directory");
-				}
-			}else{
-				throw new Exception("Failed to initialise SvcLogicStore");
-			}
+    private void loadDGXMLDir(String xmlPath) throws Exception {
+        try {
+            logger.info("******************** Loading DG into Database *****************************");
+            List<String> errors = new ArrayList<String>();
+            if(this.store != null){
+                File xmlDir = new File(xmlPath);
+                if(xmlDir != null && xmlDir.isDirectory()){
+                    String[] extensions = new String[] { "xml", "XML" };
+                    List<File> files = (List<File>) FileUtils.listFiles(xmlDir, extensions, true);
+                    for (File file : files) {
+                        logger.info("Loading DG XML file :" + file.getCanonicalPath());
+                        try{
+                            SvcLogicParser.load(file.getCanonicalPath(), this.store);
+                        }catch (Exception e) {
+                            errors.add("Failed to load XML "+file.getCanonicalPath() + ", Exception : "+e.getMessage());
+                        }
+                    }
+                }else{
+                    throw new Exception(xmlPath + " is not a valid XML Directory");
+                }
+            }else{
+                throw new Exception("Failed to initialise SvcLogicStore");
+            }
 
-			if(errors.size() > 0){
-				throw new Exception(errors.toString());
-			}
-		} catch (Exception e) {
-			logger.error(e.getMessage());
-		}
-	}
+            if(errors.size() > 0){
+                throw new Exception(errors.toString());
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage());
+        }
+    }
 
-	public void activateDg(String activateFilePath) throws Exception {
-		logger.info("******************** Activating DG into Database *****************************");
-		try {
-			List<String> errors = new ArrayList<String>();
-			if(this.store != null){
-				File activateFile = new File(activateFilePath);
-				if(activateFile != null && activateFile.isFile()){
-					List<String> fileLines = FileUtils.readLines(activateFile,STRING_ENCODING);
-					if(fileLines != null ){
-						for (String line : fileLines) {
-							if(line != null && ! line.trim().startsWith("#")){
-								String lineArray[] = line.trim().split(":");
-								try {
-									if(lineArray != null && lineArray.length >= 4){
-										String module = lineArray[0];
-										String rpc = lineArray[1];
-										String version = lineArray[2];
-										String mode = lineArray[3];
-										if(StringUtils.isNotBlank(module) && StringUtils.isNotBlank(rpc)
-												&& StringUtils.isNotBlank(version) && StringUtils.isNotBlank(mode)){
-											logger.info("Activating DG :" + line);
-											SvcLogicGraph graph = this.store.fetch(module, rpc, version, mode);
-											if(graph != null){
-												logger.info("Found Graph :" + line + " Activating ...");
-												this.store.activate(graph);
-											}else{
-												throw new Exception("Failed to fetch from Database");
-											}
-										}
-									}
-								} catch (Exception e) {
-									e.printStackTrace();
-									errors.add("Failed to Activate "+line + ", "+e.getMessage());
-								}
-							}
-						}
-					}
-				}else{
-					throw new Exception(activateFile + " is not a valid Activate file Path");
-				}
-			}else{
-				throw new Exception("Failed to initialise SvcLogicStore");
-			}
+    public void activateDg(String activateFilePath) throws Exception {
+        logger.info("******************** Activating DG into Database *****************************");
+        try {
+            List<String> errors = new ArrayList<String>();
+            if(this.store != null){
+                File activateFile = new File(activateFilePath);
+                if(activateFile != null && activateFile.isFile()){
+                    List<String> fileLines = FileUtils.readLines(activateFile,STRING_ENCODING);
+                    if(fileLines != null ){
+                        for (String line : fileLines) {
+                            if(line != null && ! line.trim().startsWith("#")){
+                                String lineArray[] = line.trim().split(":");
+                                try {
+                                    if(lineArray != null && lineArray.length >= 4){
+                                        String module = lineArray[0];
+                                        String rpc = lineArray[1];
+                                        String version = lineArray[2];
+                                        String mode = lineArray[3];
+                                        if(StringUtils.isNotBlank(module) && StringUtils.isNotBlank(rpc)
+                                                && StringUtils.isNotBlank(version) && StringUtils.isNotBlank(mode)){
+                                            logger.info("Activating DG :" + line);
+                                            SvcLogicGraph graph = this.store.fetch(module, rpc, version, mode);
+                                            if(graph != null){
+                                                logger.info("Found Graph :" + line + " Activating ...");
+                                                this.store.activate(graph);
+                                            }else{
+                                                throw new Exception("Failed to fetch from Database");
+                                            }
+                                        }
+                                    }
+                                } catch (Exception e) {
+                                    e.printStackTrace();
+                                    errors.add("Failed to Activate "+line + ", "+e.getMessage());
+                                }
+                            }
+                        }
+                    }
+                }else{
+                    throw new Exception(activateFile + " is not a valid Activate file Path");
+                }
+            }else{
+                throw new Exception("Failed to initialise SvcLogicStore");
+            }
 
-			if(errors.size() > 0){
-				throw new Exception(errors.toString());
-			}
-		} catch (Exception e) {
-			logger.error(e.getMessage());
-		}
-	}
+            if(errors.size() > 0){
+                throw new Exception(errors.toString());
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage());
+        }
+    }
 
 
-	public static void main(String[] args) {
-		try {
-			String xmlPath = null;
-			String propertyPath = null;
-			String activateFile = null;
+    public static void main(String[] args) {
+        try {
+            String xmlPath = null;
+            String propertyPath = null;
+            String activateFile = null;
 
-			if(args != null && args.length >= 3){
-				xmlPath = args[0];
-				activateFile = args[1];
-				propertyPath = args[2];
-			}else{
-				throw new Exception("Sufficient inputs for DGXMLLoadNActivate are missing <xmlpath> <activatefile> <dbPropertyfile>");
-			}
+            if(args != null && args.length >= 3){
+                xmlPath = args[0];
+                activateFile = args[1];
+                propertyPath = args[2];
+            }else{
+                throw new Exception("Sufficient inputs for DGXMLLoadNActivate are missing <xmlpath> <activatefile> <dbPropertyfile>");
+            }
 
-			//propertyPath = "/Users/bs2796/0Source/ecomp/bvc-3.2.2/others/properties/dblib.properties";
-			//xmlPath = DGXMLLoadNActivate.class.getClassLoader().getResource(".").getPath() +"/xml" ;
+            //propertyPath = "/Users/bs2796/0Source/ecomp/bvc-3.2.2/others/properties/dblib.properties";
+            //xmlPath = DGXMLLoadNActivate.class.getClassLoader().getResource(".").getPath() +"/xml" ;
 
-			DGXMLLoadNActivate dgXMLLoadDB = new DGXMLLoadNActivate(propertyPath);
-			dgXMLLoadDB.loadDGXMLDir(xmlPath);
-			dgXMLLoadDB.activateDg(activateFile);
-		} catch (Exception e) {
-			e.printStackTrace();
-		}finally {
-			System.exit(1);
-		}
-	}
+            DGXMLLoadNActivate dgXMLLoadDB = new DGXMLLoadNActivate(propertyPath);
+            dgXMLLoadDB.loadDGXMLDir(xmlPath);
+            dgXMLLoadDB.activateDg(activateFile);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }finally {
+            System.exit(1);
+        }
+    }
 
 }
diff --git a/appc-directed-graph/dg-loader/provider/src/main/resources/scripts/dg_load_activate.sh b/appc-directed-graph/dg-loader/provider/src/main/resources/scripts/dg_load_activate.sh
index 7d34a45..e92efce 100644
--- a/appc-directed-graph/dg-loader/provider/src/main/resources/scripts/dg_load_activate.sh
+++ b/appc-directed-graph/dg-loader/provider/src/main/resources/scripts/dg_load_activate.sh
@@ -20,6 +20,7 @@
 # ============LICENSE_END=========================================================
 ###
 
+
 export BVC_DIR=/opt/app/bvc
 export DG_DIR=${BVC_DIR}/dg
 
diff --git a/appc-directed-graph/pom.xml b/appc-directed-graph/pom.xml
index d4a43ca..5779ee4 100644
--- a/appc-directed-graph/pom.xml
+++ b/appc-directed-graph/pom.xml
@@ -1,6 +1,31 @@
+<!--
+  ============LICENSE_START=======================================================
+  ONAP : APPC
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+  ================================================================================
+  Copyright (C) 2017 Amdocs
+  =============================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ECOMP is a trademark and service mark of AT&T Intellectual Property.
+  ============LICENSE_END=========================================================
+  -->
+
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
+
     <parent>
         <groupId>org.openecomp.appc</groupId>
         <artifactId>appc</artifactId>
@@ -21,11 +46,11 @@
         <jettison.version>1.3.7</jettison.version>
         <common.collections.version>3.2.1</common.collections.version>
         <common.io.version>2.5</common.io.version>
-
         <sdnc.sql.resource.version>1.1.0</sdnc.sql.resource.version>
         <openecomp.sdnc.sql-resource.version>1.1.0</openecomp.sdnc.sql-resource.version>
         <sdnc.sli.version>1.1.0</sdnc.sli.version>
         <tosca.datatype.version>1.1.0</tosca.datatype.version>
+        <licenseDir>${project.parent.basedir}</licenseDir>
     </properties>
 
     <dependencyManagement>
@@ -84,7 +109,6 @@
                 <scope>provided</scope>
             </dependency>
         </dependencies>
-
     </dependencyManagement>
 
     <modules>
