diff options
19 files changed, 404 insertions, 130 deletions
diff --git a/aai-resources/src/main/java/org/openecomp/aai/dbgen/UpdateEdgeTags.java b/aai-resources/src/main/java/org/openecomp/aai/dbgen/UpdateEdgeTags.java index abe2a10..c79abec 100644 --- a/aai-resources/src/main/java/org/openecomp/aai/dbgen/UpdateEdgeTags.java +++ b/aai-resources/src/main/java/org/openecomp/aai/dbgen/UpdateEdgeTags.java @@ -1,45 +1,18 @@ -/*- - * ============LICENSE_START======================================================= - * org.openecomp.aai - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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. - * ============LICENSE_END========================================================= - */ - package org.openecomp.aai.dbgen; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.UUID; - +import com.google.common.collect.Multimap; +import com.thinkaurelius.titan.core.TitanGraph; import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.structure.Graph; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.openecomp.aai.dbmap.AAIGraph; -import org.openecomp.aai.dbmodel.DbEdgeRules; import org.openecomp.aai.exceptions.AAIException; import org.openecomp.aai.logging.ErrorLogHelper; import org.openecomp.aai.serialization.db.EdgeRule; import org.openecomp.aai.serialization.db.EdgeRules; import org.openecomp.aai.util.AAIConfig; -import com.thinkaurelius.titan.core.TitanGraph; - +import java.util.*; public class UpdateEdgeTags { @@ -62,33 +35,34 @@ public class UpdateEdgeTags { String edgeRuleKeyVal = args[0]; TitanGraph graph = null; + EdgeRules edgeRulesInstance = EdgeRules.getInstance(); + Multimap<String, EdgeRule> edgeRuleMultimap = edgeRulesInstance.getAllRules(); HashMap <String,Object> edgeRuleHash = new HashMap <String,Object>(); HashMap <String,Object> edgeRulesFullHash = new HashMap <String,Object>(); HashMap <String,Object> edgeRuleLabelToKeyHash = new HashMap <String,Object>(); ArrayList <String> labelMapsToMultipleKeys = new <String> ArrayList (); - int tagCount = DbEdgeRules.EdgeInfoMap.size(); // Loop through all the edge-rules make sure they look right and // collect info about which labels support duplicate ruleKeys. - Iterator<String> edgeRulesIterator = DbEdgeRules.EdgeRules.keySet().iterator(); + Iterator<String> edgeRulesIterator = edgeRuleMultimap.keySet().iterator(); + while( edgeRulesIterator.hasNext() ){ String ruleKey = edgeRulesIterator.next(); - Collection <String> edRuleColl = DbEdgeRules.EdgeRules.get(ruleKey); - Iterator <String> ruleItr = edRuleColl.iterator(); + Collection <EdgeRule> edRuleColl = edgeRuleMultimap.get(ruleKey); + Iterator <EdgeRule> ruleItr = edRuleColl.iterator(); if( ruleItr.hasNext() ){ // For now, we only look for one type of edge between two nodes. - String fullRuleString = ruleItr.next(); - edgeRulesFullHash.put(ruleKey,fullRuleString); - // An EdgeRule is comma-separated and the first item is the edgeLabel - String [] rules = fullRuleString.split(","); - //System.out.println( "rules.length = " + rules.length + ", tagCount = " + tagCount ); - if( rules.length != tagCount ){ - String detail = "Bad EdgeRule data (itemCount=" + rules.length + ") for key = [" + ruleKey + "]."; - System.out.println(detail); - System.exit(0); - } - String edgeLabel = rules[0]; + EdgeRule edgeRule = ruleItr.next(); + String edgeRuleString = String.format("%s,%s,%s,%s,%s,%s", + edgeRule.getLabel(), + edgeRule.getDirection(), + edgeRule.getMultiplicityRule(), + edgeRule.getContains(), + edgeRule.getDeleteOtherV(), + edgeRule.getServiceInfrastructure()); + edgeRulesFullHash.put(ruleKey,edgeRuleString); + String edgeLabel = edgeRule.getLabel(); if( edgeRuleLabelToKeyHash.containsKey(edgeLabel) ){ // This label maps to more than one edge rule - we'll have to figure out // which rule applies when we look at each edge that uses this label. @@ -106,11 +80,11 @@ public class UpdateEdgeTags { if( ! edgeRuleKeyVal.equals( "all" ) ){ // If they passed in a (non-"all") argument, that is the single edgeRule that they want to update. // Note - the key looks like "nodeA|nodeB" as it appears in DbEdgeRules.EdgeRules - Collection <String> edRuleColl = DbEdgeRules.EdgeRules.get(edgeRuleKeyVal); - Iterator <String> ruleItr = edRuleColl.iterator(); + Collection <EdgeRule> edRuleColl = edgeRuleMultimap.get(edgeRuleKeyVal); + Iterator <EdgeRule> ruleItr = edRuleColl.iterator(); if( ruleItr.hasNext() ){ // For now, we only look for one type of edge between two nodes (Ie. for one key). - String edRule = ruleItr.next(); + EdgeRule edRule = ruleItr.next(); edgeRuleHash.put(edgeRuleKeyVal, edRule); System.out.println("Adding this rule to list of rules to do: key = " + edgeRuleKeyVal + ", rule = [" + edRule + "]"); } @@ -150,6 +124,7 @@ public class UpdateEdgeTags { System.exit(0); } + Graph g = graph.newTransaction(); try { Iterator<Edge> edgeItr = graph.traversal().E(); @@ -166,7 +141,7 @@ public class UpdateEdgeTags { String derivedEdgeKey = ""; if( labelMapsToMultipleKeys.contains(edLab) ){ // need to figure out which key is right for this edge - derivedEdgeKey = deriveEdgeRuleKeyForThisEdge( TRANSID, FROMAPPID, graph, tmpEd ); + derivedEdgeKey = deriveEdgeRuleKeyForThisEdge( TRANSID, FROMAPPID, g, tmpEd ); } else { // This kind of label only maps to one key -- so we can just look it up. @@ -254,7 +229,7 @@ public class UpdateEdgeTags { * @throws AAIException the AAI exception */ public static String deriveEdgeRuleKeyForThisEdge( String transId, String fromAppId, Graph graph, - Edge tEdge ) throws AAIException{ + Edge tEdge ) throws AAIException { Vertex fromVtx = tEdge.outVertex(); Vertex toVtx = tEdge.inVertex(); @@ -272,74 +247,13 @@ public class UpdateEdgeTags { } else { // Couldn't find a rule for this edge - throw new AAIException("AAI_6120", "No EdgeRule found for passed nodeTypes: " + startNodeType + ", " + throw new AAIException("AAI_6120", "No EdgeRule found for passed nodeTypes: " + startNodeType + ", " + targetNodeType); } } }// end of deriveEdgeRuleKeyForThisEdge() - /** - * Gets the edge tag prop put hash 4 rule. - * - * @param transId the trans id - * @param fromAppId the from app id - * @param edRule the ed rule - * @return the edge tag prop put hash 4 rule - * @throws AAIException the AAI exception - */ - public static HashMap <String,Object> getEdgeTagPropPutHash4Rule( String transId, String fromAppId, String edRule ) - throws AAIException{ - // For a given edgeRule - already pulled out of DbEdgeRules.EdgeRules -- parse out the "tags" that - // need to be set for this kind of edge. - // These are the Boolean properties like, "isParent", "usesResource" etc. - HashMap <String,Object> retEdgePropPutMap = new HashMap <String,Object>(); - - if( (edRule == null) || edRule.equals("") ){ - // No edge rule found for this - throw new AAIException("AAI_6120", "blank edRule passed to getEdgeTagPropPutHash4Rule()"); - } - - int tagCount = DbEdgeRules.EdgeInfoMap.size(); - String [] rules = edRule.split(","); - if( rules.length != tagCount ){ - throw new AAIException("AAI_6121", "Bad EdgeRule data (itemCount =" + rules.length + ") for rule = [" + edRule + "]."); - } - - // In DbEdgeRules.EdgeRules -- What we have as "edRule" is a comma-delimited set of strings. - // The first item is the edgeLabel. - // The second in the list is always "direction" which is always OUT for the way we've implemented it. - // Items starting at "firstTagIndex" and up are all assumed to be booleans that map according to - // tags as defined in EdgeInfoMap. - // Note - if they are tagged as 'reverse', that means they get the tag name with "-REV" on it - for( int i = DbEdgeRules.firstTagIndex; i < tagCount; i++ ){ - String booleanStr = rules[i]; - Integer mapKey = new Integer(i); - String propName = DbEdgeRules.EdgeInfoMap.get(mapKey); - String revPropName = propName + "-REV"; - - if( booleanStr.equals("true") ){ - retEdgePropPutMap.put(propName, true); - retEdgePropPutMap.put(revPropName,false); - } - else if( booleanStr.equals("false") ){ - retEdgePropPutMap.put(propName, false); - retEdgePropPutMap.put(revPropName,false); - } - else if( booleanStr.equals("reverse") ){ - retEdgePropPutMap.put(propName, false); - retEdgePropPutMap.put(revPropName,true); - } - else { - throw new AAIException("AAI_6121", "Bad EdgeRule data for rule = [" + edRule + "], val = [" + booleanStr + "]."); - } - - } - return retEdgePropPutMap; - - } // End of getEdgeTagPropPutHash() - - /** * Gets the edge tag prop put hash. * @@ -349,8 +263,8 @@ public class UpdateEdgeTags { * @return the edge tag prop put hash * @throws AAIException the AAI exception */ - public static Map<String, EdgeRule> getEdgeTagPropPutHash( String transId, String fromAppId, String edgeRuleKey ) - throws AAIException{ + public static Map<String, EdgeRule> getEdgeTagPropPutHash(String transId, String fromAppId, String edgeRuleKey ) + throws AAIException { // For a given edgeRuleKey (nodeTypeA|nodeTypeB), look up the rule that goes with it in // DbEdgeRules.EdgeRules and parse out the "tags" that need to be set on each edge. // These are the Boolean properties like, "isParent", "usesResource" etc. @@ -359,7 +273,7 @@ public class UpdateEdgeTags { String[] edgeRuleKeys = edgeRuleKey.split("\\|"); if (edgeRuleKeys.length < 2 || ! EdgeRules.getInstance().hasEdgeRule(edgeRuleKeys[0], edgeRuleKeys[1])) { - throw new AAIException("AAI_6120", "Could not find an DbEdgeRule entry for passed edgeRuleKey (nodeTypeA|nodeTypeB): " + edgeRuleKey + "."); + throw new AAIException("AAI_6120", "Could not find an DbEdgeRule entry for passed edgeRuleKey (nodeTypeA|nodeTypeB): " + edgeRuleKey + "."); } Map<String, EdgeRule> edgeRules = EdgeRules.getInstance().getEdgeRules(edgeRuleKeys[0], edgeRuleKeys[1]); diff --git a/aai-resources/src/test/java/org/openecomp/aai/AAISetup.java b/aai-resources/src/test/java/org/openecomp/aai/AAISetup.java index 0f2480d..e210f3d 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/AAISetup.java +++ b/aai-resources/src/test/java/org/openecomp/aai/AAISetup.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai; import org.apache.commons.io.IOUtils; diff --git a/aai-resources/src/test/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptorTest.java b/aai-resources/src/test/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptorTest.java index a61feba..14c6fb4 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptorTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptorTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.interceptors; import org.apache.cxf.message.Exchange; @@ -36,4 +56,4 @@ public class AAILogJAXRSInInterceptorTest extends AAISetup { when(message.get("CamelHttpUrl")).thenReturn("/somestring"); aaiLogJAXRSInInterceptor.handleMessage(message); } -}
\ No newline at end of file +} diff --git a/aai-resources/src/test/java/org/openecomp/aai/interceptors/PostAaiAjscInterceptorTest.java b/aai-resources/src/test/java/org/openecomp/aai/interceptors/PostAaiAjscInterceptorTest.java index dc6879d..17f5c44 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/interceptors/PostAaiAjscInterceptorTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/interceptors/PostAaiAjscInterceptorTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.interceptors; import org.junit.Before; @@ -50,4 +70,4 @@ public class PostAaiAjscInterceptorTest { assertTrue("Expecting the post interceptor to return success regardless", success); } -}
\ No newline at end of file +} diff --git a/aai-resources/src/test/java/org/openecomp/aai/interceptors/PreAaiAjscInterceptorTest.java b/aai-resources/src/test/java/org/openecomp/aai/interceptors/PreAaiAjscInterceptorTest.java index 5debe72..3379182 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/interceptors/PreAaiAjscInterceptorTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/interceptors/PreAaiAjscInterceptorTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.interceptors; import org.junit.Before; @@ -38,4 +58,4 @@ public class PreAaiAjscInterceptorTest { assertTrue("Expecting the post interceptor to return success regardless", success); } -}
\ No newline at end of file +} diff --git a/aai-resources/src/test/java/org/openecomp/aai/rest/BulkAddConsumerTest.java b/aai-resources/src/test/java/org/openecomp/aai/rest/BulkAddConsumerTest.java index 2804566..1368d73 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/rest/BulkAddConsumerTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/rest/BulkAddConsumerTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.rest; import com.att.eelf.configuration.EELFLogger; @@ -165,4 +185,4 @@ public class BulkAddConsumerTest extends AAISetup { public BulkConsumer getConsumer(){ return new BulkAddConsumer(); } -}
\ No newline at end of file +} diff --git a/aai-resources/src/test/java/org/openecomp/aai/rest/BulkProcessConsumerTest.java b/aai-resources/src/test/java/org/openecomp/aai/rest/BulkProcessConsumerTest.java index 64639d4..6d2bea2 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/rest/BulkProcessConsumerTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/rest/BulkProcessConsumerTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.rest; import com.att.eelf.configuration.EELFLogger; @@ -51,4 +71,4 @@ public class BulkProcessConsumerTest extends BulkAddConsumerTest { public BulkConsumer getConsumer(){ return new BulkProcessConsumer(); } -}
\ No newline at end of file +} diff --git a/aai-resources/src/test/java/org/openecomp/aai/rest/ExampleConsumerTest.java b/aai-resources/src/test/java/org/openecomp/aai/rest/ExampleConsumerTest.java index 28d5527..f67e59d 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/rest/ExampleConsumerTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/rest/ExampleConsumerTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.rest; import com.att.eelf.configuration.EELFLogger; @@ -128,4 +148,4 @@ public class ExampleConsumerTest extends AAISetup { assertEquals(response.getStatus(), code); } -}
\ No newline at end of file +} diff --git a/aai-resources/src/test/java/org/openecomp/aai/rest/ExceptionHandlerTest.java b/aai-resources/src/test/java/org/openecomp/aai/rest/ExceptionHandlerTest.java index 2c47a2e..38a243a 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/rest/ExceptionHandlerTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/rest/ExceptionHandlerTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.rest; import com.fasterxml.jackson.core.JsonLocation; @@ -135,4 +155,4 @@ public class ExceptionHandlerTest extends AAISetup { assertNotNull(response.getEntity()); assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatus()); } -}
\ No newline at end of file +} diff --git a/aai-resources/src/test/java/org/openecomp/aai/rest/LegacyMoxyConsumerTest.java b/aai-resources/src/test/java/org/openecomp/aai/rest/LegacyMoxyConsumerTest.java index 1620f3e..8128b42 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/rest/LegacyMoxyConsumerTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/rest/LegacyMoxyConsumerTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.rest; import com.att.eelf.configuration.EELFLogger; diff --git a/aai-resources/src/test/java/org/openecomp/aai/rest/URLFromVertexIdConsumerTest.java b/aai-resources/src/test/java/org/openecomp/aai/rest/URLFromVertexIdConsumerTest.java index 5ba9ea6..caad6a2 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/rest/URLFromVertexIdConsumerTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/rest/URLFromVertexIdConsumerTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.rest; import com.att.eelf.configuration.EELFLogger; @@ -176,4 +196,4 @@ public class URLFromVertexIdConsumerTest extends AAISetup { assertEquals(Response.Status.NOT_FOUND.getStatusCode(), response.getStatus()); } -}
\ No newline at end of file +} diff --git a/aai-resources/src/test/java/org/openecomp/aai/rest/VertexIdConsumerTest.java b/aai-resources/src/test/java/org/openecomp/aai/rest/VertexIdConsumerTest.java index 12e2411..284f4c1 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/rest/VertexIdConsumerTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/rest/VertexIdConsumerTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.rest; import com.att.eelf.configuration.EELFLogger; @@ -155,4 +175,4 @@ public class VertexIdConsumerTest extends AAISetup { System.out.println(pserverObject); } -}
\ No newline at end of file +} diff --git a/aai-resources/src/test/java/org/openecomp/aai/rest/retired/RetiredConsumerTest.java b/aai-resources/src/test/java/org/openecomp/aai/rest/retired/RetiredConsumerTest.java index 1f204f5..2b0bc6e 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/rest/retired/RetiredConsumerTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/rest/retired/RetiredConsumerTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.rest.retired; import com.att.eelf.configuration.EELFLogger; diff --git a/aai-resources/src/test/java/org/openecomp/aai/rest/retired/V3ThroughV7ConsumerTest.java b/aai-resources/src/test/java/org/openecomp/aai/rest/retired/V3ThroughV7ConsumerTest.java index 8dc1c10..ceda6d1 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/rest/retired/V3ThroughV7ConsumerTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/rest/retired/V3ThroughV7ConsumerTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.rest.retired; public class V3ThroughV7ConsumerTest extends RetiredConsumerTest { @@ -6,4 +26,4 @@ public class V3ThroughV7ConsumerTest extends RetiredConsumerTest { public RetiredConsumer getRetiredConsumer() { return new V3ThroughV7Consumer(); } -}
\ No newline at end of file +} diff --git a/aai-resources/src/test/java/org/openecomp/aai/rest/retired/V7V8ModelsTest.java b/aai-resources/src/test/java/org/openecomp/aai/rest/retired/V7V8ModelsTest.java index b6c340e..ce4ed70 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/rest/retired/V7V8ModelsTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/rest/retired/V7V8ModelsTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.rest.retired; public class V7V8ModelsTest extends RetiredConsumerTest { @@ -6,4 +26,4 @@ public class V7V8ModelsTest extends RetiredConsumerTest { public RetiredConsumer getRetiredConsumer() { return new V7V8Models(); } -}
\ No newline at end of file +} diff --git a/aai-resources/src/test/java/org/openecomp/aai/rest/retired/V7V8NamedQueriesTest.java b/aai-resources/src/test/java/org/openecomp/aai/rest/retired/V7V8NamedQueriesTest.java index db4d35d..a2f87e5 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/rest/retired/V7V8NamedQueriesTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/rest/retired/V7V8NamedQueriesTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.rest.retired; public class V7V8NamedQueriesTest extends RetiredConsumerTest { @@ -6,4 +26,4 @@ public class V7V8NamedQueriesTest extends RetiredConsumerTest { public RetiredConsumer getRetiredConsumer() { return new V7V8NamedQueries(); } -}
\ No newline at end of file +} diff --git a/aai-resources/src/test/java/org/openecomp/aai/rest/tools/ModelVersionTransformerTest.java b/aai-resources/src/test/java/org/openecomp/aai/rest/tools/ModelVersionTransformerTest.java index 75d25df..a76a245 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/rest/tools/ModelVersionTransformerTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/rest/tools/ModelVersionTransformerTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.rest.tools; import com.att.eelf.configuration.EELFLogger; @@ -113,4 +133,4 @@ public class ModelVersionTransformerTest extends AAISetup { assertNotNull(response); } -}
\ No newline at end of file +} diff --git a/aai-resources/src/test/java/org/openecomp/aai/rest/util/EchoResponseTest.java b/aai-resources/src/test/java/org/openecomp/aai/rest/util/EchoResponseTest.java index c4d435a..54f6127 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/rest/util/EchoResponseTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/rest/util/EchoResponseTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.rest.util; import com.att.eelf.configuration.EELFLogger; @@ -113,4 +133,4 @@ public class EchoResponseTest extends AAISetup { assertNotNull(response); assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatus()); } -}
\ No newline at end of file +} diff --git a/aai-resources/src/test/java/org/openecomp/aai/rest/util/LogFormatToolsTest.java b/aai-resources/src/test/java/org/openecomp/aai/rest/util/LogFormatToolsTest.java index 55d8ce3..6b0d1fb 100644 --- a/aai-resources/src/test/java/org/openecomp/aai/rest/util/LogFormatToolsTest.java +++ b/aai-resources/src/test/java/org/openecomp/aai/rest/util/LogFormatToolsTest.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + package org.openecomp.aai.rest.util; import org.junit.Test; @@ -12,4 +32,4 @@ public class LogFormatToolsTest { String dateTime = new LogFormatTools().getCurrentDateTime(); assertNotNull(dateTime); } -}
\ No newline at end of file +} |