summaryrefslogtreecommitdiffstats
path: root/appc-directed-graph/dg-loader
diff options
context:
space:
mode:
authorSkip Wonnell <skip@att.com>2017-12-23 00:18:18 -0600
committerPatrick Brady <pb071s@att.com>2018-01-03 18:57:22 +0000
commitcaa5768a32a385bf7997029929f29fe3b156348e (patch)
tree15e5671b75577de5cd19473eea278c3f731d9e7a /appc-directed-graph/dg-loader
parente7752e8d2dd4e4460bf68a7b36548282cc68d0e9 (diff)
Platform Hardening for DG - Part 8
Issue-ID: APPC-305 Change-Id: I70fa76837b02314bdd3211190306cfbd3564d639 Signed-off-by: Skip Wonnell <skip@att.com>
Diffstat (limited to 'appc-directed-graph/dg-loader')
-rw-r--r--appc-directed-graph/dg-loader/features/src/main/resources/features.xml28
-rw-r--r--appc-directed-graph/dg-loader/provider/pom.xml2
-rw-r--r--appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGLoaderActivator.java8
-rw-r--r--appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGXMLGenerator.java8
-rw-r--r--appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGXMLLoad.java4
-rw-r--r--appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGXMLLoadNActivate.java4
-rw-r--r--appc-directed-graph/dg-loader/provider/src/main/resources/adaptor.properties8
-rw-r--r--appc-directed-graph/dg-loader/provider/src/main/resources/js/dg_xml2json.js24
-rw-r--r--appc-directed-graph/dg-loader/provider/src/main/resources/scripts/dg_load_activate.sh8
-rw-r--r--appc-directed-graph/dg-loader/provider/src/test/java/org/onap/sdnc/dg/loader/MockSvcLogicDblibStore.java11
-rw-r--r--appc-directed-graph/dg-loader/provider/src/test/resources/json/Appc_UniTest.json142
11 files changed, 141 insertions, 106 deletions
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 519530eed..633dd94fd 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
@@ -22,19 +22,19 @@
<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">
+ 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">
- <repository>mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.version}/xml/features</repository>
- <feature name='sdnc-dg-loader' description="SDNC DG Loader"
- version='${project.version}'>
- <!-- Most applications will have a dependency on the ODL MD-SAL Broker -->
- <feature>odl-mdsal-broker</feature>
- <feature>sdnc-sli</feature>
- <bundle>mvn:commons-lang/commons-lang/2.6</bundle>
- <bundle>wrap:mvn:com.att.eelf/eelf-core/${eelf.version}</bundle>
- <bundle>mvn:ch.qos.logback/logback-core/${logback.version}</bundle>
- <bundle>mvn:ch.qos.logback/logback-classic/${logback.version}</bundle>
- <bundle>mvn:org.onap.appc.plugins/dg-loader-provider/${project.version}</bundle>
- </feature>
+ <repository>mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.version}/xml/features</repository>
+ <feature name='sdnc-dg-loader' description="SDNC DG Loader"
+ version='${project.version}'>
+ <!-- Most applications will have a dependency on the ODL MD-SAL Broker -->
+ <feature>odl-mdsal-broker</feature>
+ <feature>sdnc-sli</feature>
+ <bundle>mvn:commons-lang/commons-lang/2.6</bundle>
+ <bundle>wrap:mvn:com.att.eelf/eelf-core/${eelf.version}</bundle>
+ <bundle>mvn:ch.qos.logback/logback-core/${logback.version}</bundle>
+ <bundle>mvn:ch.qos.logback/logback-classic/${logback.version}</bundle>
+ <bundle>mvn:org.onap.appc.plugins/dg-loader-provider/${project.version}</bundle>
+ </feature>
</features>
diff --git a/appc-directed-graph/dg-loader/provider/pom.xml b/appc-directed-graph/dg-loader/provider/pom.xml
index 8e124c70b..cb9e332f5 100644
--- a/appc-directed-graph/dg-loader/provider/pom.xml
+++ b/appc-directed-graph/dg-loader/provider/pom.xml
@@ -73,7 +73,7 @@
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
- <groupId>org.powermock</groupId>
+ <groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>1.6.4</version>
<scope>test</scope>
diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGLoaderActivator.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGLoaderActivator.java
index db437a9b2..01f32d244 100644
--- a/appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGLoaderActivator.java
+++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGLoaderActivator.java
@@ -1,9 +1,11 @@
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
@@ -15,6 +17,8 @@
* 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=========================================================
*/
diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGXMLGenerator.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGXMLGenerator.java
index 0d60a7135..f9722a04d 100644
--- a/appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGXMLGenerator.java
+++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGXMLGenerator.java
@@ -1,9 +1,11 @@
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
@@ -15,6 +17,8 @@
* 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=========================================================
*/
diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGXMLLoad.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGXMLLoad.java
index ced6b007c..4e7e57406 100644
--- a/appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGXMLLoad.java
+++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGXMLLoad.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGXMLLoadNActivate.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGXMLLoadNActivate.java
index 490a1f9bb..d88958239 100644
--- a/appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGXMLLoadNActivate.java
+++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/onap/sdnc/dg/loader/DGXMLLoadNActivate.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
diff --git a/appc-directed-graph/dg-loader/provider/src/main/resources/adaptor.properties b/appc-directed-graph/dg-loader/provider/src/main/resources/adaptor.properties
index 367d25db0..205a8f884 100644
--- a/appc-directed-graph/dg-loader/provider/src/main/resources/adaptor.properties
+++ b/appc-directed-graph/dg-loader/provider/src/main/resources/adaptor.properties
@@ -1,9 +1,11 @@
###
# ============LICENSE_START=======================================================
-# ONAP : APP-C
+# ONAP : APPC
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# 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
@@ -15,6 +17,8 @@
# 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=========================================================
###
diff --git a/appc-directed-graph/dg-loader/provider/src/main/resources/js/dg_xml2json.js b/appc-directed-graph/dg-loader/provider/src/main/resources/js/dg_xml2json.js
index 052d75d21..00e347339 100644
--- a/appc-directed-graph/dg-loader/provider/src/main/resources/js/dg_xml2json.js
+++ b/appc-directed-graph/dg-loader/provider/src/main/resources/js/dg_xml2json.js
@@ -1,9 +1,11 @@
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
@@ -15,6 +17,8 @@
* 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=========================================================
*/
@@ -91,11 +95,11 @@ dgconverter.getNodeToXml = function (inputNodeSet) {
xmlStr += node.xml;
startTag = getStartTag(node);
//special handling for break node
- if(xmlStr != undefined && xmlStr != null && xmlStr.trim() == "<break>"){
- fullXmlStr += "<break/>";
- }else{
- fullXmlStr +=xmlStr;
- }
+ if(xmlStr != undefined && xmlStr != null && xmlStr.trim() == "<break>"){
+ fullXmlStr += "<break/>";
+ }else{
+ fullXmlStr +=xmlStr;
+ }
/*
if(level > 0){
var spacing = Array(level).join(" ");
@@ -137,9 +141,9 @@ dgconverter.getNodeToXml = function (inputNodeSet) {
//append end tag
if (startTag != "") {
- if(startTag != "break"){
- fullXmlStr += "</" + startTag + ">";
- }
+ if(startTag != "break"){
+ fullXmlStr += "</" + startTag + ">";
+ }
/*
if(level >0){
var spacing = Array(level).join(" ");
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 da117361b..d12654282 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
@@ -2,10 +2,12 @@
###
# ============LICENSE_START=======================================================
-# ONAP : APP-C
+# ONAP : APPC
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# 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
@@ -17,6 +19,8 @@
# 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=========================================================
###
diff --git a/appc-directed-graph/dg-loader/provider/src/test/java/org/onap/sdnc/dg/loader/MockSvcLogicDblibStore.java b/appc-directed-graph/dg-loader/provider/src/test/java/org/onap/sdnc/dg/loader/MockSvcLogicDblibStore.java
index f3c10725e..d0964299b 100644
--- a/appc-directed-graph/dg-loader/provider/src/test/java/org/onap/sdnc/dg/loader/MockSvcLogicDblibStore.java
+++ b/appc-directed-graph/dg-loader/provider/src/test/java/org/onap/sdnc/dg/loader/MockSvcLogicDblibStore.java
@@ -59,19 +59,18 @@ public class MockSvcLogicDblibStore implements SvcLogicStore {
}
- @Override
+
public void registerNodeType(String nodeType) throws SvcLogicException {
// TODO Auto-generated method stub
}
- @Override
public void unregisterNodeType(String nodeType) throws SvcLogicException {
// TODO Auto-generated method stub
}
- @Override
+
public boolean isValidNodeType(String nodeType) throws SvcLogicException {
// TODO Auto-generated method stub
return true;
@@ -81,12 +80,14 @@ public class MockSvcLogicDblibStore implements SvcLogicStore {
public void delete(String module, String rpc, String version, String mode)
throws SvcLogicException {
// TODO Auto-generated method stub
-
}
@Override
public void activate(SvcLogicGraph graph) throws SvcLogicException {
// TODO Auto-generated method stub
-
+ }
+ public void activate(String module, String rpc, String version, String mode)
+ throws SvcLogicException {
+ // TODO Auto-generated method stub
}
}
diff --git a/appc-directed-graph/dg-loader/provider/src/test/resources/json/Appc_UniTest.json b/appc-directed-graph/dg-loader/provider/src/test/resources/json/Appc_UniTest.json
index b56c8f64c..c6e82fc99 100644
--- a/appc-directed-graph/dg-loader/provider/src/test/resources/json/Appc_UniTest.json
+++ b/appc-directed-graph/dg-loader/provider/src/test/resources/json/Appc_UniTest.json
@@ -1,64 +1,78 @@
-[{
- "id": "1606180e.6254c",
- "type": "dgstart",
- "name": "DGSTART",
- "outputs": 1,
- "x": 494.75,
- "y": 149.75,
- "z": "7174441c.9fb7f4",
- "wires": [
- ["f650067e.2ad7e"]
- ]
-}, {
- "id": "f650067e.2ad7e",
- "type": "service-logic",
- "name": "Appc 4.0.0",
- "module": "Appc",
- "version": "4.0.0",
- "comments": "",
- "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='Appc' version='4.0.0'>",
- "outputs": 1,
- "x": 642.75,
- "y": 151.75,
- "z": "7174441c.9fb7f4",
- "wires": [
- ["10b2117c.ee118f"]
- ]
-}, {
- "id": "e928ee64.3762c",
- "type": "block",
- "name": "block",
- "xml": "<block>\n",
- "atomic": "false",
- "comments": "",
- "outputs": 1,
- "x": 952.75,
- "y": 145.75,
- "z": "7174441c.9fb7f4",
- "wires": [
- ["342ce050.4a2fe8"]
- ]
-}, {
- "id": "342ce050.4a2fe8",
- "type": "returnSuccess",
- "name": "return success",
- "xml": "<return status='success'>\n\n",
- "comments": "",
- "x": 1115.75,
- "y": 146.75,
- "z": "7174441c.9fb7f4",
- "wires": []
-}, {
- "id": "10b2117c.ee118f",
- "type": "method",
- "name": "unitTest",
- "xml": "<method rpc='unitTestDG' mode='sync'>\n",
- "comments": "",
- "outputs": 1,
- "x": 815.75,
- "y": 147.75,
- "z": "7174441c.9fb7f4",
- "wires": [
- ["e928ee64.3762c"]
- ]
-}]
+[
+ {
+ "id": "1606180e.6254c",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 494.75,
+ "y": 149.75,
+ "z": "7174441c.9fb7f4",
+ "wires": [
+ [
+ "f650067e.2ad7e"
+ ]
+ ]
+ },
+ {
+ "id": "f650067e.2ad7e",
+ "type": "service-logic",
+ "name": "Appc 4.0.0",
+ "module": "Appc",
+ "version": "4.0.0",
+ "comments": "",
+ "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='Appc' version='4.0.0'>",
+ "outputs": 1,
+ "x": 642.75,
+ "y": 151.75,
+ "z": "7174441c.9fb7f4",
+ "wires": [
+ [
+ "10b2117c.ee118f"
+ ]
+ ]
+ },
+ {
+ "id": "e928ee64.3762c",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 952.75,
+ "y": 145.75,
+ "z": "7174441c.9fb7f4",
+ "wires": [
+ [
+ "342ce050.4a2fe8"
+ ]
+ ]
+ },
+ {
+ "id": "342ce050.4a2fe8",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n\n",
+ "comments": "",
+ "x": 1115.75,
+ "y": 146.75,
+ "z": "7174441c.9fb7f4",
+ "wires": []
+ },
+ {
+ "id": "10b2117c.ee118f",
+ "type": "method",
+ "name": "unitTest",
+ "xml": "<method rpc='unitTestDG' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 815.75,
+ "y": 147.75,
+ "z": "7174441c.9fb7f4",
+ "wires": [
+ [
+ "e928ee64.3762c"
+ ]
+ ]
+ }
+]