From caa5768a32a385bf7997029929f29fe3b156348e Mon Sep 17 00:00:00 2001 From: Skip Wonnell Date: Sat, 23 Dec 2017 00:18:18 -0600 Subject: Platform Hardening for DG - Part 8 Issue-ID: APPC-305 Change-Id: I70fa76837b02314bdd3211190306cfbd3564d639 Signed-off-by: Skip Wonnell --- appc-directed-graph/dg-loader/provider/pom.xml | 2 +- .../org/onap/sdnc/dg/loader/DGLoaderActivator.java | 8 +- .../org/onap/sdnc/dg/loader/DGXMLGenerator.java | 8 +- .../java/org/onap/sdnc/dg/loader/DGXMLLoad.java | 4 +- .../onap/sdnc/dg/loader/DGXMLLoadNActivate.java | 4 +- .../provider/src/main/resources/adaptor.properties | 8 +- .../provider/src/main/resources/js/dg_xml2json.js | 24 ++-- .../src/main/resources/scripts/dg_load_activate.sh | 8 +- .../sdnc/dg/loader/MockSvcLogicDblibStore.java | 11 +- .../src/test/resources/json/Appc_UniTest.json | 142 +++++++++++---------- 10 files changed, 127 insertions(+), 92 deletions(-) (limited to 'appc-directed-graph/dg-loader/provider') 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 @@ jcl-over-slf4j - org.powermock + org.powermock powermock-api-mockito 1.6.4 test 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() == ""){ - fullXmlStr += ""; - }else{ - fullXmlStr +=xmlStr; - } + if(xmlStr != undefined && xmlStr != null && xmlStr.trim() == ""){ + fullXmlStr += ""; + }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 += ""; - } + if(startTag != "break"){ + fullXmlStr += ""; + } /* 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": "", - "outputs": 1, - "x": 642.75, - "y": 151.75, - "z": "7174441c.9fb7f4", - "wires": [ - ["10b2117c.ee118f"] - ] -}, { - "id": "e928ee64.3762c", - "type": "block", - "name": "block", - "xml": "\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": "\n\n", - "comments": "", - "x": 1115.75, - "y": 146.75, - "z": "7174441c.9fb7f4", - "wires": [] -}, { - "id": "10b2117c.ee118f", - "type": "method", - "name": "unitTest", - "xml": "\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": "", + "outputs": 1, + "x": 642.75, + "y": 151.75, + "z": "7174441c.9fb7f4", + "wires": [ + [ + "10b2117c.ee118f" + ] + ] + }, + { + "id": "e928ee64.3762c", + "type": "block", + "name": "block", + "xml": "\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": "\n\n", + "comments": "", + "x": 1115.75, + "y": 146.75, + "z": "7174441c.9fb7f4", + "wires": [] + }, + { + "id": "10b2117c.ee118f", + "type": "method", + "name": "unitTest", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 815.75, + "y": 147.75, + "z": "7174441c.9fb7f4", + "wires": [ + [ + "e928ee64.3762c" + ] + ] + } +] -- cgit 1.2.3-korg