From a93b19450f6fb966afa1c30a6795e8e670d2aee7 Mon Sep 17 00:00:00 2001 From: Venkata Harish K Kajur Date: Wed, 24 May 2017 13:46:23 -0400 Subject: [PATCH] Update the aai-common with the latest code Change-Id: Ia4758a3d7e462e5120fa1db7ebe97adaeac3ebc2 Signed-off-by: Venkata Harish K Kajur --- .../org/openecomp/aai/annotations/Metadata.java | 1 + .../openecomp/aai/annotations/AnnotationsTest.java | 27 + aai-core/.gitignore | 11 + .../java/org/openecomp/aai/db/DbMethHelper.java | 158 + .../java/org/openecomp/aai/dbgen/DataGrooming.java | 101 +- .../java/org/openecomp/aai/dbgen/GenTester.java | 58 +- .../org/openecomp/aai/dbgen/SchemaGenerator.java | 66 +- .../org/openecomp/aai/dbmodel/DbEdgeRules.java | 2 +- .../openecomp/aai/introspection/Introspector.java | 2 +- .../openecomp/aai/introspection/ModelInjestor.java | 1 - .../introspection/sideeffect/DataLinkReader.java | 24 +- .../introspection/sideeffect/SideEffectRunner.java | 13 +- .../sideeffect/SideEffectRunnerHelper.java | 14 +- .../introspection/tools/IntrospectorValidator.java | 12 +- .../aai/introspection/tools/IssueType.java | 2 +- .../openecomp/aai/logging/EcompElapsedTime.java | 3 +- .../org/openecomp/aai/logging/EcompStartTime.java | 3 +- .../org/openecomp/aai/logging/ErrorLogHelper.java | 65 +- .../org/openecomp/aai/logging/LoggingContext.java | 101 +- .../aai/parsers/query/LegacyQueryParser.java | 13 +- .../openecomp/aai/parsers/query/QueryParser.java | 14 +- .../aai/parsers/query/UniqueURIQueryParser.java | 60 +- .../org/openecomp/aai/parsers/uri/Parsable.java | 18 +- .../org/openecomp/aai/parsers/uri/URIParser.java | 35 +- .../org/openecomp/aai/parsers/uri/URIToDBKey.java | 38 +- .../aai/parsers/uri/URIToExtensionInformation.java | 38 +- .../org/openecomp/aai/parsers/uri/URIToObject.java | 102 +- .../aai/parsers/uri/URIToRelationshipObject.java | 61 +- .../org/openecomp/aai/parsers/uri/URIValidate.java | 29 +- .../aai/query/builder/GraphTraversalBuilder.java | 125 +- .../aai/query/builder/GremlinPipelineBuilder.java | 2 +- .../aai/query/builder/GremlinQueryBuilder.java | 104 +- .../aai/query/builder/GremlinTraversal.java | 16 +- .../openecomp/aai/query/builder/GremlinUnique.java | 16 +- .../openecomp/aai/query/builder/QueryBuilder.java | 50 +- .../aai/query/builder/TraversalQuery.java | 28 +- .../java/org/openecomp/aai/rest/RestTokens.java | 36 + .../java/org/openecomp/aai/restcore/RESTAPI.java | 61 +- .../search/GremlinGroovyShellSingleton.java | 4 +- .../aai/serialization/db/DBSerializer.java | 106 +- .../openecomp/aai/serialization/db/EdgeRules.java | 51 +- .../db/exceptions/EdgeMultiplicityException.java | 40 + .../engines/TransactionalGraphEngine.java | 22 +- .../engines/query/GraphTraversalQueryEngine.java | 9 + .../engines/query/GremlinPipelineQueryEngine.java | 2 +- .../serialization/engines/query/QueryEngine.java | 2 + .../aai/serialization/queryformats/Formatter.java | 20 +- .../java/org/openecomp/aai/util/AAIConfig.java | 19 +- .../java/org/openecomp/aai/util/AAITxnLog.java | 32 +- .../org/openecomp/aai/util/HttpsAuthClient.java | 140 + .../openecomp/aai/exceptions/AAIExceptionTest.java | 15 +- .../aai/exceptions/AAIExceptionWithInfoTest.java | 9 +- .../aai/introspection/IntrospectorTestSpec.java | 9 +- .../aai/introspection/MoxyEngineTest.java | 12 +- .../aai/introspection/PojoInjestorTest.java | 9 +- .../aai/introspection/PojoLoaderTest.java | 6 +- .../aai/introspection/PojoStrategyTest.java | 5 +- .../aai/introspection/PropertyPredicatesTest.java | 11 +- .../aai/introspection/ReflectionEngineTest.java | 16 +- .../aai/introspection/sideeffect/DataCopyTest.java | 4 +- .../aai/introspection/sideeffect/DataLinkTest.java | 4 +- .../validation/IntrospectorValidationTest.java | 99 + .../openecomp/aai/logging/LoggingContextTest.java | 114 + .../aai/parsers/query/GraphTraversalTest.java | 145 +- .../aai/parsers/query/LegacyQueryTest.java | 67 +- .../query/RelationshipGremlinQueryTest.java | 4 +- .../aai/parsers/query/RelationshipQueryTest.java | 6 +- .../parsers/query/UniqueRelationshipQueryTest.java | 30 +- .../relationship/RelationshipToURITest.java | 4 +- .../openecomp/aai/parsers/uri/URIParserTest.java | 4 +- .../parsers/uri/URIToExtensionInformationTest.java | 4 +- .../openecomp/aai/parsers/uri/URIToObjectTest.java | 4 +- .../parsers/uri/URIToRelationshipObjectTest.java | 7 +- .../aai/query/builder/TraversalQueryTest.java | 19 +- .../aai/serialization/db/DbAliasTest.java | 6 +- .../aai/workarounds/RemoveDME2QueryParamsTest.java | 91 + .../etc/appprops/error.properties | 1 + .../bundleconfig-local/etc/oxm/aai_oxm_v10.xml | 6 +- .../bundleconfig-local/etc/oxm/aai_oxm_v9.xml | 6 +- .../dependencies/vRouterServiceInstanceFile.txt | 6 + aai-core/src/test/resources/log4j.properties | 3 + aai-core/src/test/resources/logback.xml | 292 + aai-schema/.classpath | 6 - .../aai/schema/enums/PropertyMetadata.java | 4 + .../main/resources/aai_schema/aai_schema_v10.xsd | 60 +- .../main/resources/aai_schema/aai_schema_v8.xsd | 4701 +++++--- .../main/resources/aai_schema/aai_schema_v9.xsd | 36 +- aai-schema/src/main/resources/oxm/aai_oxm_v10.xml | 11080 ++++++++++--------- aai-schema/src/main/resources/oxm/aai_oxm_v8.xml | 2268 +++- aai-schema/src/main/resources/oxm/aai_oxm_v9.xml | 10866 +++++++++--------- 90 files changed, 18666 insertions(+), 13330 deletions(-) create mode 100755 aai-annotations/src/test/java/org/openecomp/aai/annotations/AnnotationsTest.java create mode 100644 aai-core/.gitignore create mode 100644 aai-core/src/main/java/org/openecomp/aai/db/DbMethHelper.java create mode 100644 aai-core/src/main/java/org/openecomp/aai/rest/RestTokens.java create mode 100644 aai-core/src/main/java/org/openecomp/aai/serialization/db/exceptions/EdgeMultiplicityException.java create mode 100644 aai-core/src/main/java/org/openecomp/aai/util/HttpsAuthClient.java create mode 100644 aai-core/src/test/java/org/openecomp/aai/introspection/validation/IntrospectorValidationTest.java create mode 100644 aai-core/src/test/java/org/openecomp/aai/logging/LoggingContextTest.java create mode 100644 aai-core/src/test/java/org/openecomp/aai/workarounds/RemoveDME2QueryParamsTest.java create mode 100644 aai-core/src/test/resources/bundleconfig-local/etc/scriptdata/dependencies/vRouterServiceInstanceFile.txt create mode 100644 aai-core/src/test/resources/log4j.properties create mode 100644 aai-core/src/test/resources/logback.xml diff --git a/aai-annotations/src/main/java/org/openecomp/aai/annotations/Metadata.java b/aai-annotations/src/main/java/org/openecomp/aai/annotations/Metadata.java index fa83aff6..d35ff808 100644 --- a/aai-annotations/src/main/java/org/openecomp/aai/annotations/Metadata.java +++ b/aai-annotations/src/main/java/org/openecomp/aai/annotations/Metadata.java @@ -45,6 +45,7 @@ public @interface Metadata { String alternateKeys1() default ""; String maximumDepth() default ""; String crossEntityReference() default ""; + String requires() default ""; String dbAlias() default ""; String dataLocation() default ""; String containsSuggestibleProps() default ""; diff --git a/aai-annotations/src/test/java/org/openecomp/aai/annotations/AnnotationsTest.java b/aai-annotations/src/test/java/org/openecomp/aai/annotations/AnnotationsTest.java new file mode 100755 index 00000000..9efc38a6 --- /dev/null +++ b/aai-annotations/src/test/java/org/openecomp/aai/annotations/AnnotationsTest.java @@ -0,0 +1,27 @@ +package org.openecomp.aai.annotations; + +import org.openecomp.aai.annotations.Metadata; + +public class AnnotationsTest { + + public AnnotationsTest() { + } + + @Metadata(isKey=false, + description="", + nameProps="", + indexedProps="", + dependentOn="", + container="", + namespace="", + defaultValue="", + searchable="", + uniqueProps="", + extendsFrom="", + isAbstract="", + alternateKeys1="", + maximumDepth="", + crossEntityReference="") + public void testAnnotation() { + } +} diff --git a/aai-core/.gitignore b/aai-core/.gitignore new file mode 100644 index 00000000..574ae547 --- /dev/null +++ b/aai-core/.gitignore @@ -0,0 +1,11 @@ +.settings +target/ +**/logs/ +bundleconfig-local/etc/auth/aai-client-cert.p12 +bundleconfig-local/etc/auth/tomcat_keystore +bundleconfig-local/etc/oxm +src/main/aai_schema +bundleconfig-local/etc/logback.xml +/.pydevproject +/test_csvWriter.csv +/bin/ diff --git a/aai-core/src/main/java/org/openecomp/aai/db/DbMethHelper.java b/aai-core/src/main/java/org/openecomp/aai/db/DbMethHelper.java new file mode 100644 index 00000000..79172d9b --- /dev/null +++ b/aai-core/src/main/java/org/openecomp/aai/db/DbMethHelper.java @@ -0,0 +1,158 @@ +/*- + * ============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.db; + +import java.io.UnsupportedEncodingException; +import java.net.URI; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Optional; + +import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.apache.tinkerpop.gremlin.structure.VertexProperty; + +import org.openecomp.aai.exceptions.AAIException; +import org.openecomp.aai.introspection.Introspector; +import org.openecomp.aai.introspection.Loader; +import org.openecomp.aai.introspection.exceptions.AAIUnknownObjectException; +import org.openecomp.aai.parsers.query.QueryParser; +import org.openecomp.aai.parsers.relationship.RelationshipToURI; +import org.openecomp.aai.query.builder.QueryBuilder; +import org.openecomp.aai.serialization.engines.TransactionalGraphEngine; + +public class DbMethHelper { + + private final Loader loader; + private final TransactionalGraphEngine engine; + + protected DbMethHelper() { + this.loader = null; + this.engine = null; + } + public DbMethHelper(Loader loader, TransactionalGraphEngine engine) { + this.loader = loader; + this.engine = engine; + } + /** + * + * @param type + * @param map - form [{type}.{propname}:{value}] + * @return + * @throws UnsupportedEncodingException + * @throws AAIException + */ + public Optional searchVertexByIdentityMap(String type, Map map) throws AAIException { + + Introspector relationship = constructRelationship(type, map); + RelationshipToURI parser; + URI uri; + QueryParser queryParser; + try { + parser = new RelationshipToURI(loader, relationship); + uri = parser.getUri(); + queryParser = this.engine.getQueryBuilder().createQueryFromURI(uri); + } catch (UnsupportedEncodingException e) { + throw new AAIException("AAI_3000"); + } + + List results = queryParser.getQueryBuilder().toList(); + + return reduceToSingleVertex(results, map); + } + + /** + * @param type + * @param map - form [{propname}:{value}] + * @return + * @throws AAIException + */ + public Optional locateUniqueVertex(String type, Map map) throws AAIException { + + return reduceToSingleVertex(locateUniqueVertices(type, map), map); + } + + public List locateUniqueVertices(String type, Map map) throws AAIException { + Introspector obj = this.createIntrospectorFromMap(type, map); + QueryBuilder builder = this.engine.getQueryBuilder().exactMatchQuery(obj); + + return builder.toList(); + } + private Introspector constructRelationship(String type, Map map) throws AAIUnknownObjectException { + final Introspector relationship = loader.introspectorFromName("relationship"); + relationship.setValue("related-to", type); + final List data = relationship.getValue("relationship-data"); + for (Entry entry : map.entrySet()) { + final Introspector dataObj = loader.introspectorFromName("relationship-data"); + dataObj.setValue("relationship-key", entry.getKey()); + dataObj.setValue("relationship-value", entry.getValue()); + data.add(dataObj.getUnderlyingObject()); + } + + return relationship; + } + + private Introspector createIntrospectorFromMap(String targetNodeType, Map propHash) throws AAIUnknownObjectException { + final Introspector result = loader.introspectorFromName(targetNodeType); + for (Entry entry : propHash.entrySet()) { + result.setValue(entry.getKey(), entry.getValue()); + } + return result; + } + + private Optional reduceToSingleVertex(List vertices, Map map) throws AAIException { + if (vertices.isEmpty()){ + return Optional.empty(); + } else if (vertices.size() > 1) { + throw new AAIException("AAI_6112", "More than one Node found by getUniqueNode for params: " + map); + } + + return Optional.of(vertices.get(0)); + } + public List getVertexProperties(Vertex v) { + List retArr = new ArrayList<>(); + if( v == null ){ + retArr.add("null Node object passed to showPropertiesForNode()\n"); + } + else { + String nodeType; + Object ob = v.property("aai-node-type").orElse(null); + if( ob == null ){ + nodeType = "null"; + } + else{ + nodeType = ob.toString(); + } + + retArr.add(" AAINodeType/VtxID for this Node = [" + nodeType + "/" + v.id() + "]"); + retArr.add(" Property Detail: "); + Iterator> pI = v.properties(); + while( pI.hasNext() ){ + VertexProperty tp = pI.next(); + Object val = tp.value(); + retArr.add("Prop: [" + tp.key() + "], val = [" + val + "] "); + } + } + return retArr; + } +} diff --git a/aai-core/src/main/java/org/openecomp/aai/dbgen/DataGrooming.java b/aai-core/src/main/java/org/openecomp/aai/dbgen/DataGrooming.java index 6a8ad1b6..18f43ba8 100644 --- a/aai-core/src/main/java/org/openecomp/aai/dbgen/DataGrooming.java +++ b/aai-core/src/main/java/org/openecomp/aai/dbgen/DataGrooming.java @@ -67,7 +67,7 @@ import com.thinkaurelius.titan.core.TitanVertex; public class DataGrooming { - private static final EELFLogger LOGGER = EELFManager.getInstance().getLogger(DataGrooming.class); + private static EELFLogger LOGGER; private static final String FROMAPPID = "AAI-DB"; private static final String TRANSID = UUID.randomUUID().toString(); private static int dupeGrpsDeleted = 0; @@ -83,7 +83,7 @@ public class DataGrooming { Properties props = System.getProperties(); props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, AAIConstants.AAI_DATA_GROOMING_LOGBACK_PROPS); props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_ETC_APP_PROPERTIES); - + LOGGER = EELFManager.getInstance().getLogger(DataGrooming.class); String ver = "version"; // Placeholder Boolean doAutoFix = false; Boolean edgesOnlyFlag = false; @@ -557,7 +557,8 @@ public class DataGrooming { // NOTE --- We're just going to do the same check from the other direction - because // there could be duplicates or the pointer going the other way could be broken ArrayList tmpListSec = new ArrayList <> (); - tmpListSec = getConnectedChildren( g, parentVtx ) ; + + tmpListSec = getConnectedChildrenOfOneType( g, parentVtx, nType ) ; Iterator vIter = tmpListSec.iterator(); while (vIter.hasNext()) { TitanVertex tmpV = vIter.next(); @@ -682,7 +683,7 @@ public class DataGrooming { LOGGER.warn(">>> WARNING trying to get next vertex on the vItor2 "); continue; } - + counter++; String thisVertId = ""; try { @@ -1315,15 +1316,28 @@ public class DataGrooming { * @return the boolean */ private static Boolean anyKeyFieldsMissing(String nType, Vertex v, DbMaps dbMaps) { - + try { + if( nType != null && !nType.trim().equals("") + && !dbMaps.NodeKeyProps.containsKey(nType) ){ + // They gave us a non-empty nodeType but our NodeKeyProps does + // not have data for it. Since we do not know what the + // key params are for this type of node, we will just + // return "false". + String emsg = " -- WARNING -- Unrecognized nodeType: [" + nType + + "]. We cannot determine required keys for this nType. "; + // NOTE - this will be caught below and a "false" returned + throw new AAIException("AAI_6121", emsg); + } + // Determine what the key fields are for this nodeType Collection keyPropNamesColl = new ArrayList <>(); if( dbMaps.NodeKeyProps.containsKey(nType) ){ keyPropNamesColl = dbMaps.NodeKeyProps.get(nType); } else { - throw new AAIException("AAI_6105", "Required Property name(s) not found for nodeType = " + nType + ")"); + // NOTE - this will be caught below and a "false" returned + throw new AAIException("AAI_6121", "Definition of key props not found for nodeType = " + nType + ")"); } Iterator keyPropI = keyPropNamesColl.iterator(); @@ -1336,8 +1350,9 @@ public class DataGrooming { } } } catch (AAIException e) { - // Something was wrong - return true; + // Something was wrong -- but since we weren't able to check + // the keys, we will not declare that it is missing keys. + return false; } return false; } @@ -1769,14 +1784,12 @@ public class DataGrooming { } } else { // More than one node have the same key fields since they may - // depend on a parent node for - // uniqueness. Since we're finding more than one, we want to - // check to see if any of the - // vertices that have this set of keys are also pointing at the - // same 'parent' node. + // depend on a parent node for uniqueness. Since we're finding + // more than one, we want to check to see if any of the + // vertices that have this set of keys (and are the same nodeType) + // are also pointing at the same 'parent' node. // Note: for a given set of key data, it is possible that there - // could be more than one set of - // duplicates. + // could be more than one set of duplicates. HashMap> vertsGroupedByParentHash = groupVertsByDepNodes( transId, fromAppId, g, version, nType, checkVertList, dbMaps); @@ -1849,10 +1862,10 @@ public class DataGrooming { String transId, String fromAppId, TitanTransaction g, String version, String nType, ArrayList passedVertList, DbMaps dbMaps) throws AAIException { - // Given a list of Titan Vertices, group them together by dependent - // nodes. Ie. if given a list of - // ip address nodes (assumed to all have the same key info) they might - // sit under several different parent vertices. + // Given a list of Titan Vertices of one nodeType (see AAI-8956), group + // them together by the parent node they depend on. + // Ie. if given a list of ip address nodes (assumed to all have the + // same key info) they might sit under several different parent vertices. // Under Normal conditions, there would only be one per parent -- but // we're trying to find duplicates - so we // allow for the case where more than one is under the same parent node. @@ -1873,24 +1886,22 @@ public class DataGrooming { while (ntItr.hasNext()) { depNodeTypeL.add(ntItr.next()); } - // For each vertex, we want find its dependent vertex and add it to - // other vertexes that are dependent on that same guy. + // For each vertex, we want find its depended-on/parent vertex so we + // can track what other vertexes that are dependent on that same guy. if (passedVertList != null) { Iterator iter = passedVertList.iterator(); while (iter.hasNext()) { TitanVertex thisVert = iter.next(); - ArrayList connectedVList = getConnectedNodes( g, thisVert ); - Iterator connIter = connectedVList.iterator(); - while (connIter.hasNext()) { - TitanVertex tvCon = connIter.next(); - String conNt = ""; - Object obj = tvCon.property("aai-node-type").orElse(null); + TitanVertex tmpParentVtx = getConnectedParent( g, thisVert ); + if( tmpParentVtx != null ) { + String parentNt = null; + Object obj = tmpParentVtx.property("aai-node-type").orElse(null); if (obj != null) { - conNt = obj.toString(); + parentNt = obj.toString(); } - if (depNTColl.contains(conNt)) { + if (depNTColl.contains(parentNt)) { // This must be the parent/dependent node - String parentVid = tvCon.id().toString(); + String parentVid = tmpParentVtx.id().toString(); if (retHash.containsKey(parentVid)) { // add this vert to the list for this parent key retHash.get(parentVid).add(thisVert); @@ -2200,23 +2211,43 @@ public class DataGrooming { }// End of getConnectedNodes() - private static ArrayList getConnectedChildren( TitanTransaction graph, - TitanVertex startVtx ) throws AAIException{ + private static ArrayList getConnectedChildrenOfOneType( TitanTransaction graph, + TitanVertex startVtx, String childNType ) throws AAIException{ ArrayList childList = new ArrayList <> (); - Iterable verts = startVtx.query().direction(Direction.OUT).has("isParent",true).vertices(); Iterator vertI = verts.iterator(); TitanVertex tmpVtx = null; while( vertI != null && vertI.hasNext() ){ tmpVtx = (TitanVertex) vertI.next(); - childList.add(tmpVtx); + Object ob = tmpVtx.property("aai-node-type").orElse(null); + if (ob != null) { + String tmpNt = ob.toString(); + if( tmpNt.equals(childNType)){ + childList.add(tmpVtx); + } + } } return childList; - }// End of getConnectedChildren() + }// End of getConnectedChildrenOfOneType() + + + private static TitanVertex getConnectedParent( TitanTransaction graph, + TitanVertex startVtx ) throws AAIException{ + + TitanVertex parentVtx = null; + Iterable verts = startVtx.query().direction(Direction.IN).has("isParent",true).vertices(); + Iterator vertI = verts.iterator(); + while( vertI != null && vertI.hasNext() ){ + // Note - there better only be one! + parentVtx = (TitanVertex) vertI.next(); + } + + return parentVtx; + }// End of getConnectedParent() diff --git a/aai-core/src/main/java/org/openecomp/aai/dbgen/GenTester.java b/aai-core/src/main/java/org/openecomp/aai/dbgen/GenTester.java index a3273fb3..14c58cb5 100644 --- a/aai-core/src/main/java/org/openecomp/aai/dbgen/GenTester.java +++ b/aai-core/src/main/java/org/openecomp/aai/dbgen/GenTester.java @@ -20,22 +20,24 @@ package org.openecomp.aai.dbgen; +import java.util.Properties; + +import org.openecomp.aai.dbmap.AAIGraph; +import org.openecomp.aai.logging.ErrorLogHelper; +import org.openecomp.aai.util.AAIConfig; +import org.openecomp.aai.util.AAIConstants; import com.att.eelf.configuration.Configuration; import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; import com.thinkaurelius.titan.core.TitanGraph; import com.thinkaurelius.titan.core.schema.TitanManagement; -import org.openecomp.aai.dbmap.AAIGraph; -import org.openecomp.aai.logging.ErrorLogHelper; -import org.openecomp.aai.util.AAIConfig; -import org.openecomp.aai.util.AAIConstants; -import java.util.Properties; + public class GenTester { - private static final EELFLogger LOGGER = EELFManager.getInstance().getLogger(GenTester.class); + private static EELFLogger LOGGER; /** * The main method. @@ -50,20 +52,23 @@ public class GenTester { Properties props = System.getProperties(); props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, AAIConstants.AAI_CREATE_DB_SCHEMA_LOGBACK_PROPS); props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_ETC_APP_PROPERTIES); + LOGGER = EELFManager.getInstance().getLogger(GenTester.class); boolean addDefaultCR = true; try { AAIConfig.init(); if (args != null && args.length > 0 ){ if( "genDbRulesOnly".equals(args[0]) ){ - ErrorLogHelper.logError("AAI_3100", + ErrorLogHelper.logError("AAI_3100", " This option is no longer supported. What was in DbRules is now derived from the OXM files. "); return; } else if ( "GEN_DB_WITH_NO_SCHEMA".equals(args[0]) ){ // Note this is done to create an empty DB with no Schema so that // an HBase copyTable can be used to set up a copy of the db. - LOGGER.info(" ---- NOTE --- about to load a graph without doing any schema processing (takes a little while) -------- "); + String imsg = " ---- NOTE --- about to load a graph without doing any schema processing (takes a little while) -------- "; + System.out.println(imsg); + LOGGER.info(imsg); graph = AAIGraph.getInstance().getGraph(); if( graph == null ){ @@ -71,7 +76,9 @@ public class GenTester { return; } else { - LOGGER.auditEvent("Successfully loaded a Titan graph without doing any schema work. "); + String amsg = "Successfully loaded a Titan graph without doing any schema work. "; + System.out.println(amsg); + LOGGER.auditEvent(amsg); return; } } else if ("GEN_DB_WITH_NO_DEFAULT_CR".equals(args[0])) { @@ -79,15 +86,24 @@ public class GenTester { } else { ErrorLogHelper.logError("AAI_3000", "Unrecognized argument passed to GenTester.java: [" + args[0] + "]. "); - LOGGER.error("Unrecognized argument passed to GenTester.java: [" + args[0] + "]. "); - LOGGER.error("Either pass no argument for normal processing, or use 'GEN_DB_WITH_NO_SCHEMA'."); + + String emsg = "Unrecognized argument passed to GenTester.java: [" + args[0] + "]. "; + System.out.println(emsg); + LOGGER.error(emsg); + + emsg = "Either pass no argument for normal processing, or use 'GEN_DB_WITH_NO_SCHEMA'."; + System.out.println(emsg); + LOGGER.error(emsg); + return; } } //AAIConfig.init(); ErrorLogHelper.loadProperties(); - LOGGER.info(" ---- NOTE --- about to open graph (takes a little while)--------;"); + String imsg = " ---- NOTE --- about to open graph (takes a little while)--------;"; + System.out.println(imsg); + LOGGER.info(imsg); graph = AAIGraph.getInstance().getGraph(); if( graph == null ){ @@ -95,11 +111,13 @@ public class GenTester { return; } - // Load the propertyKeys, indexes and edge-Labels into the DB - TitanManagement graphMgt = graph.openManagement(); + // Load the propertyKeys, indexes and edge-Labels into the DB + TitanManagement graphMgt = graph.openManagement(); - LOGGER.info("-- Loading new schema elements into Titan --"); - SchemaGenerator.loadSchemaIntoTitan( graph, graphMgt, addDefaultCR ); + imsg = "-- Loading new schema elements into Titan --"; + System.out.println(imsg); + LOGGER.info(imsg); + SchemaGenerator.loadSchemaIntoTitan( graph, graphMgt, addDefaultCR ); } catch(Exception ex) { ErrorLogHelper.logError("AAI_4000", ex.getMessage()); @@ -107,10 +125,14 @@ public class GenTester { if( graph != null ){ - LOGGER.info("-- graph commit"); + String imsg = "-- graph commit"; + System.out.println(imsg); + LOGGER.info(imsg); graph.tx().commit(); - LOGGER.info("-- graph shutdown "); + imsg = "-- graph shutdown "; + System.out.println(imsg); + LOGGER.info(imsg); graph.close(); } diff --git a/aai-core/src/main/java/org/openecomp/aai/dbgen/SchemaGenerator.java b/aai-core/src/main/java/org/openecomp/aai/dbgen/SchemaGenerator.java index fa1d8e49..63606017 100644 --- a/aai-core/src/main/java/org/openecomp/aai/dbgen/SchemaGenerator.java +++ b/aai-core/src/main/java/org/openecomp/aai/dbgen/SchemaGenerator.java @@ -21,12 +21,14 @@ package org.openecomp.aai.dbgen; -import com.att.eelf.configuration.EELFLogger; -import com.att.eelf.configuration.EELFManager; -import com.google.common.collect.Multimap; -import com.thinkaurelius.titan.core.*; -import com.thinkaurelius.titan.core.schema.TitanManagement; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Optional; +import java.util.Set; + import org.apache.tinkerpop.gremlin.structure.Vertex; + import org.openecomp.aai.db.props.AAIProperties; import org.openecomp.aai.exceptions.AAIException; import org.openecomp.aai.introspection.Introspector; @@ -37,11 +39,18 @@ import org.openecomp.aai.schema.enums.PropertyMetadata; import org.openecomp.aai.serialization.db.EdgeRule; import org.openecomp.aai.serialization.db.EdgeRules; import org.openecomp.aai.util.AAIConfig; +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; +import com.google.common.collect.Multimap; +import com.thinkaurelius.titan.core.Cardinality; +import com.thinkaurelius.titan.core.Multiplicity; +import com.thinkaurelius.titan.core.PropertyKey; +import com.thinkaurelius.titan.core.TitanGraph; +import com.thinkaurelius.titan.core.schema.TitanManagement; -import java.util.*; -public class SchemaGenerator { +public class SchemaGenerator{ private static final EELFLogger LOGGER = EELFManager.getInstance().getLogger(SchemaGenerator.class); private static boolean addDefaultCR = true; @@ -72,6 +81,7 @@ public class SchemaGenerator { } catch (Exception ex){ LOGGER.error(" ERROR - Could not run AAIConfig.init(). ", ex); + System.out.println(" ERROR - Could not run AAIConfig.init(). "); System.exit(1); } @@ -93,13 +103,18 @@ public class SchemaGenerator { } } catch (AAIException e) { LOGGER.error("could not get edge rules", e); + System.out.println("could not get edge rules"); System.exit(1); } for( String label: labels){ if( graphMgmt.containsRelationType(label) ) { - LOGGER.debug(" EdgeLabel [" + label + "] already existed. "); + String dmsg = " EdgeLabel [" + label + "] already existed. "; + System.out.println(dmsg); + LOGGER.debug(dmsg); } else { - LOGGER.debug("Making EdgeLabel: [" + label + "]"); + String dmsg = "Making EdgeLabel: [" + label + "]"; + System.out.println(dmsg); + LOGGER.debug(dmsg); graphMgmt.makeEdgeLabel(label).multiplicity(Multiplicity.valueOf("MULTI")).make(); } } @@ -116,7 +131,9 @@ public class SchemaGenerator { dbPropName = alias.get(); } if( graphMgmt.containsRelationType(propName) ){ - LOGGER.debug(" PropertyKey [" + propName + "] already existed in the DB. "); + String dmsg = " PropertyKey [" + propName + "] already existed in the DB. "; + System.out.println(dmsg); + LOGGER.debug(dmsg); } else { Class type = obj.getClass(propName); Cardinality cardinality = Cardinality.SINGLE; @@ -131,7 +148,9 @@ public class SchemaGenerator { if (process) { - LOGGER.info("Creating PropertyKey: [" + dbPropName + "], ["+ type.getSimpleName() + "], [" + cardinality + "]"); + String imsg = "Creating PropertyKey: [" + dbPropName + "], ["+ type.getSimpleName() + "], [" + cardinality + "]"; + System.out.println(imsg); + LOGGER.info(imsg); PropertyKey propK; if (!seenProps.containsKey(dbPropName)) { propK = graphMgmt.makePropertyKey(dbPropName).dataType(type).cardinality(cardinality).make(); @@ -140,18 +159,26 @@ public class SchemaGenerator { propK = seenProps.get(dbPropName); } if (graphMgmt.containsGraphIndex(dbPropName)) { - LOGGER.debug(" Index [" + dbPropName + "] already existed in the DB. "); + String dmsg = " Index [" + dbPropName + "] already existed in the DB. "; + System.out.println(dmsg); + LOGGER.debug(dmsg); } else { if( obj.getIndexedProperties().contains(propName) ){ if( obj.getUniqueProperties().contains(propName) ){ - LOGGER.info("Add Unique index for PropertyKey: [" + dbPropName + "]"); - graphMgmt.buildIndex(dbPropName,Vertex.class).addKey(propK).unique().buildCompositeIndex(); + imsg = "Add Unique index for PropertyKey: [" + dbPropName + "]"; + System.out.println(imsg); + LOGGER.info(imsg); + graphMgmt.buildIndex(dbPropName,Vertex.class).addKey(propK).unique().buildCompositeIndex(); } else { - LOGGER.info("Add index for PropertyKey: [" + dbPropName + "]"); - graphMgmt.buildIndex(dbPropName,Vertex.class).addKey(propK).buildCompositeIndex(); + imsg = "Add index for PropertyKey: [" + dbPropName + "]"; + System.out.println(imsg); + LOGGER.info(imsg); + graphMgmt.buildIndex(dbPropName,Vertex.class).addKey(propK).buildCompositeIndex(); } } else { - LOGGER.info("No index added for PropertyKey: [" + dbPropName + "]"); + imsg = "No index added for PropertyKey: [" + dbPropName + "]"; + System.out.println(imsg); + LOGGER.info(imsg); } } } @@ -159,7 +186,10 @@ public class SchemaGenerator { } } - LOGGER.info("-- About to call graphMgmt commit"); + String imsg = "-- About to call graphMgmt commit"; + System.out.println(imsg); + LOGGER.info(imsg); + graphMgmt.commit(); }// End of loadSchemaIntoTitan() diff --git a/aai-core/src/main/java/org/openecomp/aai/dbmodel/DbEdgeRules.java b/aai-core/src/main/java/org/openecomp/aai/dbmodel/DbEdgeRules.java index 3f7dfb2e..f4b55504 100644 --- a/aai-core/src/main/java/org/openecomp/aai/dbmodel/DbEdgeRules.java +++ b/aai-core/src/main/java/org/openecomp/aai/dbmodel/DbEdgeRules.java @@ -397,7 +397,7 @@ public class DbEdgeRules { .putAll("ctag-pool", "THIS_NODE_ONLY") .putAll("subnet", "THIS_NODE_ONLY") .putAll("sriov-vf", "THIS_NODE_ONLY") - .putAll("vpn-binding", "ERROR_IF_ANY_IN_EDGES") + .putAll("vpn-binding", "ERROR_4_IN_EDGES_OR_CASCADE") .putAll("vnf-image", "ERROR_IF_ANY_IN_EDGES") .putAll("site-pair-set", "CASCADE_TO_CHILDREN") .putAll("routing-instance", "CASCADE_TO_CHILDREN") diff --git a/aai-core/src/main/java/org/openecomp/aai/introspection/Introspector.java b/aai-core/src/main/java/org/openecomp/aai/introspection/Introspector.java index d3f4b0fe..ff0ae173 100644 --- a/aai-core/src/main/java/org/openecomp/aai/introspection/Introspector.java +++ b/aai-core/src/main/java/org/openecomp/aai/introspection/Introspector.java @@ -171,7 +171,7 @@ public abstract class Introspector implements Cloneable { nameClass = ClassUtils.primitiveToWrapper(nameClass); result = nameClass.getConstructor(String.class).newInstance(obj.toString()); } - if (obj.getClass().getName().equals("java.lang.String")) { + if (obj instanceof String) { result = nameClass.getConstructor(String.class).newInstance(obj); } else if (!this.isListType(name) && !this.isComplexType(name)){ //box = obj.toString(); diff --git a/aai-core/src/main/java/org/openecomp/aai/introspection/ModelInjestor.java b/aai-core/src/main/java/org/openecomp/aai/introspection/ModelInjestor.java index 38775160..a8574d89 100644 --- a/aai-core/src/main/java/org/openecomp/aai/introspection/ModelInjestor.java +++ b/aai-core/src/main/java/org/openecomp/aai/introspection/ModelInjestor.java @@ -38,7 +38,6 @@ import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContextFactory; import org.openecomp.aai.util.AAIConstants; - public class ModelInjestor { private Map versionContextMap = new HashMap<>(); diff --git a/aai-core/src/main/java/org/openecomp/aai/introspection/sideeffect/DataLinkReader.java b/aai-core/src/main/java/org/openecomp/aai/introspection/sideeffect/DataLinkReader.java index 89b03eab..db3dd5ac 100644 --- a/aai-core/src/main/java/org/openecomp/aai/introspection/sideeffect/DataLinkReader.java +++ b/aai-core/src/main/java/org/openecomp/aai/introspection/sideeffect/DataLinkReader.java @@ -20,7 +20,20 @@ package org.openecomp.aai.introspection.sideeffect; +import java.io.UnsupportedEncodingException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Optional; +import java.util.regex.Matcher; + +import javax.ws.rs.core.MultivaluedMap; + import org.apache.tinkerpop.gremlin.structure.Vertex; + import org.openecomp.aai.db.props.AAIProperties; import org.openecomp.aai.exceptions.AAIException; import org.openecomp.aai.introspection.Introspector; @@ -31,17 +44,6 @@ import org.openecomp.aai.schema.enums.PropertyMetadata; import org.openecomp.aai.serialization.db.DBSerializer; import org.openecomp.aai.serialization.engines.TransactionalGraphEngine; -import javax.ws.rs.core.MultivaluedMap; -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Optional; -import java.util.regex.Matcher; - public class DataLinkReader extends SideEffect { public DataLinkReader(Introspector obj, Vertex self, TransactionalGraphEngine dbEngine, DBSerializer serializer) { diff --git a/aai-core/src/main/java/org/openecomp/aai/introspection/sideeffect/SideEffectRunner.java b/aai-core/src/main/java/org/openecomp/aai/introspection/sideeffect/SideEffectRunner.java index 3b33be1f..64a4d0cd 100644 --- a/aai-core/src/main/java/org/openecomp/aai/introspection/sideeffect/SideEffectRunner.java +++ b/aai-core/src/main/java/org/openecomp/aai/introspection/sideeffect/SideEffectRunner.java @@ -20,18 +20,19 @@ package org.openecomp.aai.introspection.sideeffect; -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.openecomp.aai.exceptions.AAIException; -import org.openecomp.aai.introspection.Introspector; -import org.openecomp.aai.serialization.db.DBSerializer; -import org.openecomp.aai.serialization.engines.TransactionalGraphEngine; - import java.io.UnsupportedEncodingException; import java.lang.reflect.InvocationTargetException; import java.net.URISyntaxException; import java.util.LinkedHashSet; import java.util.Set; +import org.apache.tinkerpop.gremlin.structure.Vertex; + +import org.openecomp.aai.exceptions.AAIException; +import org.openecomp.aai.introspection.Introspector; +import org.openecomp.aai.serialization.db.DBSerializer; +import org.openecomp.aai.serialization.engines.TransactionalGraphEngine; + public class SideEffectRunner { protected final TransactionalGraphEngine dbEngine; diff --git a/aai-core/src/main/java/org/openecomp/aai/introspection/sideeffect/SideEffectRunnerHelper.java b/aai-core/src/main/java/org/openecomp/aai/introspection/sideeffect/SideEffectRunnerHelper.java index 7362b70b..8a55ce82 100644 --- a/aai-core/src/main/java/org/openecomp/aai/introspection/sideeffect/SideEffectRunnerHelper.java +++ b/aai-core/src/main/java/org/openecomp/aai/introspection/sideeffect/SideEffectRunnerHelper.java @@ -20,18 +20,18 @@ package org.openecomp.aai.introspection.sideeffect; -import org.openecomp.aai.exceptions.AAIException; -import org.openecomp.aai.introspection.Introspector; -import org.openecomp.aai.introspection.Wanderer; -import org.openecomp.aai.serialization.db.DBSerializer; -import org.openecomp.aai.serialization.engines.TransactionalGraphEngine; - import java.io.UnsupportedEncodingException; import java.lang.reflect.InvocationTargetException; import java.net.URISyntaxException; import java.util.List; import java.util.Set; +import org.openecomp.aai.exceptions.AAIException; +import org.openecomp.aai.introspection.Introspector; +import org.openecomp.aai.introspection.Wanderer; +import org.openecomp.aai.serialization.db.DBSerializer; +import org.openecomp.aai.serialization.engines.TransactionalGraphEngine; + class SideEffectRunnerHelper implements Wanderer { @@ -77,7 +77,7 @@ class SideEffectRunnerHelper implements Wanderer { @Override public void modifyComplexList(List list, List listReference, Introspector parent, - Introspector child) { + Introspector child) { // TODO Auto-generated method stub } diff --git a/aai-core/src/main/java/org/openecomp/aai/introspection/tools/IntrospectorValidator.java b/aai-core/src/main/java/org/openecomp/aai/introspection/tools/IntrospectorValidator.java index cbe16b4e..6d451cdf 100644 --- a/aai-core/src/main/java/org/openecomp/aai/introspection/tools/IntrospectorValidator.java +++ b/aai-core/src/main/java/org/openecomp/aai/introspection/tools/IntrospectorValidator.java @@ -165,14 +165,22 @@ public class IntrospectorValidator implements Wanderer { } final Optional visibility = obj.getPropertyMetadata(prop, PropertyMetadata.VISIBILITY); - if(visibility.isPresent() && Visibility.internal.equals(Visibility.valueOf(visibility.get()))) { + if(visibility.isPresent() && Visibility.internal.equals(Visibility.valueOf(visibility.get())) && obj.getValue(prop) != null) { Issue message = this.buildMessage(Severity.ERROR, IssueType.PROPERTY_NOT_VISIBLE, "client attemptted to set property not visible: " + prop); message.setIntrospector(obj); message.setPropName(prop); issues.add(message); - } + } + final Optional requires = obj.getPropertyMetadata(prop, PropertyMetadata.REQUIRES); + if (requires.isPresent() && (obj.getValue(prop) != null && obj.getValue(requires.get()) == null)) { + Issue message = + this.buildMessage(Severity.CRITICAL, IssueType.DEPENDENT_PROP_NOT_FOUND, prop + " requires " + requires.get() + " to also be popluated."); + message.setIntrospector(obj); + message.setPropName(prop); + issues.add(message); + } } if (!relationshipChain.contains(obj.getDbName())) { diff --git a/aai-core/src/main/java/org/openecomp/aai/introspection/tools/IssueType.java b/aai-core/src/main/java/org/openecomp/aai/introspection/tools/IssueType.java index 90fd4d5a..5606926c 100644 --- a/aai-core/src/main/java/org/openecomp/aai/introspection/tools/IssueType.java +++ b/aai-core/src/main/java/org/openecomp/aai/introspection/tools/IssueType.java @@ -21,5 +21,5 @@ package org.openecomp.aai.introspection.tools; public enum IssueType { - MISSING_REQUIRED_PROP, MISSING_KEY_PROP, EXCEEDED_ALLOWED_DEPTH, PROPERTY_NOT_VISIBLE + MISSING_REQUIRED_PROP, MISSING_KEY_PROP, EXCEEDED_ALLOWED_DEPTH, PROPERTY_NOT_VISIBLE, DEPENDENT_PROP_NOT_FOUND } diff --git a/aai-core/src/main/java/org/openecomp/aai/logging/EcompElapsedTime.java b/aai-core/src/main/java/org/openecomp/aai/logging/EcompElapsedTime.java index e5f82471..f56a6fe5 100644 --- a/aai-core/src/main/java/org/openecomp/aai/logging/EcompElapsedTime.java +++ b/aai-core/src/main/java/org/openecomp/aai/logging/EcompElapsedTime.java @@ -20,9 +20,10 @@ package org.openecomp.aai.logging; +import org.openecomp.aai.logging.LoggingContext.LoggingField; + import ch.qos.logback.classic.pattern.ClassicConverter; import ch.qos.logback.classic.spi.ILoggingEvent; -import org.openecomp.aai.logging.LoggingContext.LoggingField; public class EcompElapsedTime extends ClassicConverter { diff --git a/aai-core/src/main/java/org/openecomp/aai/logging/EcompStartTime.java b/aai-core/src/main/java/org/openecomp/aai/logging/EcompStartTime.java index cc2f1fa3..c08b273a 100644 --- a/aai-core/src/main/java/org/openecomp/aai/logging/EcompStartTime.java +++ b/aai-core/src/main/java/org/openecomp/aai/logging/EcompStartTime.java @@ -20,9 +20,10 @@ package org.openecomp.aai.logging; +import org.openecomp.aai.logging.LoggingContext.LoggingField; + import ch.qos.logback.classic.pattern.ClassicConverter; import ch.qos.logback.classic.spi.ILoggingEvent; -import org.openecomp.aai.logging.LoggingContext.LoggingField; public class EcompStartTime extends ClassicConverter { diff --git a/aai-core/src/main/java/org/openecomp/aai/logging/ErrorLogHelper.java b/aai-core/src/main/java/org/openecomp/aai/logging/ErrorLogHelper.java index 0affc788..37a10748 100644 --- a/aai-core/src/main/java/org/openecomp/aai/logging/ErrorLogHelper.java +++ b/aai-core/src/main/java/org/openecomp/aai/logging/ErrorLogHelper.java @@ -20,24 +20,31 @@ package org.openecomp.aai.logging; -import com.att.eelf.configuration.EELFLogger; -import com.att.eelf.configuration.EELFManager; -import org.apache.commons.lang.StringUtils; -import org.openecomp.aai.exceptions.AAIException; -import org.openecomp.aai.logging.LoggingContext.StatusCode; -import org.openecomp.aai.util.AAIConstants; -import org.openecomp.aai.util.MapperUtil; -import org.slf4j.MDC; - -import javax.ws.rs.core.MediaType; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.Marshaller; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; import java.util.Map.Entry; +import java.util.Properties; + +import javax.ws.rs.core.MediaType; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.Marshaller; + +import org.apache.commons.lang.StringUtils; +import org.slf4j.MDC; + +import org.openecomp.aai.exceptions.AAIException; +import org.openecomp.aai.logging.LoggingContext.StatusCode; +import org.openecomp.aai.util.AAIConstants; +import org.openecomp.aai.util.MapperUtil; +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; /** * @@ -67,7 +74,7 @@ public class ErrorLogHelper { * @throws Exception the exception */ public static void loadProperties() throws IOException, ErrorObjectFormatException { - final String filePath = AAIConstants.AAI_HOME_ETC_APP_PROPERTIES + "error.properties"; + final String filePath = AAIConstants.AAI_HOME_ETC_APP_PROPERTIES + "error.properties"; final InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(filePath); final Properties properties = new Properties(); @@ -105,8 +112,8 @@ public class ErrorLogHelper { * * @param key The key for the error in the error.properties file * @throws IOException - * @throws ErrorObjectNotFoundException - * @throws ErrorObjectFormatException + * @throws ErrorObjectNotFoundException + * @throws ErrorObjectFormatException */ public static ErrorObject getErrorObject(String code) throws ErrorObjectNotFoundException { @@ -130,8 +137,8 @@ public class ErrorLogHelper { * @param are must have a restError value whose numeric value must match what should be returned in the REST API * @param variables optional list of variables to flesh out text in error string * @return appropriately formatted JSON response per the REST API spec. - * @throws ErrorObjectFormatException - * @throws ErrorObjectNotFoundException + * @throws ErrorObjectFormatException + * @throws ErrorObjectNotFoundException * @throws IOException * @deprecated */ @@ -152,8 +159,8 @@ public class ErrorLogHelper { * @param are must have a restError value whose numeric value must match what should be returned in the REST API * @param variables optional list of variables to flesh out text in error string * @return appropriately formatted JSON response per the REST API spec. - * @throws ErrorObjectFormatException - * @throws ErrorObjectNotFoundException + * @throws ErrorObjectFormatException + * @throws ErrorObjectNotFoundException * @throws IOException */ public static String getRESTAPIErrorResponse(List acceptHeadersOrig, AAIException are, ArrayList variables) { @@ -326,8 +333,8 @@ public class ErrorLogHelper { * @param variables the variables * @param logline the logline * @return the RESTAPI error response with logging - * @throws ErrorObjectFormatException - * @throws ErrorObjectNotFoundException + * @throws ErrorObjectFormatException + * @throws ErrorObjectNotFoundException * @throws IOException */ public static String getRESTAPIErrorResponseWithLogging(List acceptHeadersOrig, AAIException are, ArrayList variables) { @@ -344,8 +351,8 @@ public class ErrorLogHelper { * @param acceptHeaders the accept headers * @param areList the are list * @return the RESTAPI info response - * @throws ErrorObjectFormatException - * @throws ErrorObjectNotFoundException + * @throws ErrorObjectFormatException + * @throws ErrorObjectNotFoundException * @throws IOException */ public static Object getRESTAPIInfoResponse(List acceptHeaders, HashMap> areList) { @@ -355,10 +362,10 @@ public class ErrorLogHelper { org.openecomp.aai.domain.restResponseInfo.ObjectFactory factory = new org.openecomp.aai.domain.restResponseInfo.ObjectFactory(); org.openecomp.aai.domain.restResponseInfo.Info info = factory.createInfo(); org.openecomp.aai.domain.restResponseInfo.Info.ResponseMessages responseMessages = factory.createInfoResponseMessages(); - Iterator>> it = areList.entrySet().iterator(); - + Iterator>> it = areList.entrySet().iterator(); + while (it.hasNext()) { - Entry> pair = (Entry>)it.next(); + Map.Entry> pair = (Map.Entry>)it.next(); AAIException are = pair.getKey(); ArrayList variables = pair.getValue(); @@ -436,8 +443,8 @@ public class ErrorLogHelper { * @param are must have a restError value whose numeric value must match what should be returned in the REST API * @param variables optional list of variables to flesh out text in error string * @return appropriately formatted JSON response per the REST API spec. - * @throws ErrorObjectFormatException - * @throws ErrorObjectNotFoundException + * @throws ErrorObjectFormatException + * @throws ErrorObjectNotFoundException * @throws IOException */ public static String getRESTAPIPolicyErrorResponseXML(AAIException are, ArrayList variables) { diff --git a/aai-core/src/main/java/org/openecomp/aai/logging/LoggingContext.java b/aai-core/src/main/java/org/openecomp/aai/logging/LoggingContext.java index e1d641f9..1a46bb25 100644 --- a/aai-core/src/main/java/org/openecomp/aai/logging/LoggingContext.java +++ b/aai-core/src/main/java/org/openecomp/aai/logging/LoggingContext.java @@ -20,18 +20,22 @@ package org.openecomp.aai.logging; -import com.att.eelf.configuration.EELFLogger; -import com.att.eelf.configuration.EELFManager; -import org.json.JSONException; -import org.json.JSONObject; -import org.slf4j.MDC; - import java.net.InetAddress; import java.net.UnknownHostException; +import java.util.HashMap; import java.util.Iterator; +import java.util.Map; import java.util.UUID; import java.util.concurrent.TimeUnit; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import org.slf4j.MDC; + +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; + public class LoggingContext { public enum StatusCode { @@ -41,7 +45,7 @@ public class LoggingContext { private static final EELFLogger LOGGER = EELFManager.getInstance().getLogger(LoggingContext.class); - private static final String PREVIOUS_CONTEXT_KEY = "_PREVIOUS_CONTEXT"; + private static final String PREVIOUS_CONTEXTS_KEY = "_PREVIOUS_CONTEXTS"; //ECOMP Specific Log Event Fields public static enum LoggingField { @@ -97,6 +101,14 @@ public class LoggingContext { MDC.put(LoggingField.START_TIME.toString(), LogFormatTools.getCurrentDateTime()); } + public static UUID requestId() { + final String sUuid = MDC.get(LoggingField.REQUEST_ID.toString()); + + if (sUuid == null) return null; + + return UUID.fromString(sUuid); + } + public static void requestId(UUID requestId) { MDC.put(LoggingField.REQUEST_ID.toString(), requestId.toString()); } @@ -143,6 +155,10 @@ public class LoggingContext { MDC.put(LoggingField.RESPONSE_DESCRIPTION.toString(), responseDescription); } + public static Object instanceUuid() { + return UUID.fromString(MDC.get(LoggingField.INSTANCE_UUID.toString())); + } + public static void instanceUuid(UUID instanceUuid) { MDC.put(LoggingField.INSTANCE_UUID.toString(), instanceUuid.toString()); } @@ -193,6 +209,10 @@ public class LoggingContext { MDC.put(LoggingField.PROCESS_KEY.toString(), processKey); } + public static String customField1() { + return MDC.get(LoggingField.CUSTOM_FIELD_1.toString()); + } + public static void customField1(String customField1) { MDC.put(LoggingField.CUSTOM_FIELD_1.toString(), customField1); } @@ -223,9 +243,11 @@ public class LoggingContext { public static double stopWatchStop() { final long stopWatchEnd = System.nanoTime(); - final Long stopWatchStart = Long.valueOf(MDC.get(LoggingField.STOP_WATCH_START.toString())); + final String rawStopWatchStart = MDC.get(LoggingField.STOP_WATCH_START.toString()); - if (stopWatchStart == null) throw new StopWatchNotStartedException(); + if (rawStopWatchStart == null) throw new StopWatchNotStartedException(); + + final Long stopWatchStart = Long.valueOf(rawStopWatchStart); MDC.remove(LoggingField.STOP_WATCH_START.toString()); @@ -263,19 +285,36 @@ public class LoggingContext { } } - MDC.put("_PREVIOUS_CONTEXT", context.toString()); + final String rawJsonArray = MDC.get(PREVIOUS_CONTEXTS_KEY); + + if (rawJsonArray == null) { + final JSONArray stack = new JSONArray() + .put(context); + + MDC.put(PREVIOUS_CONTEXTS_KEY, stack.toString()); + } else { + try { + final JSONArray stack = new JSONArray(rawJsonArray) + .put(context); + + MDC.put(PREVIOUS_CONTEXTS_KEY, stack.toString()); + } catch (JSONException e) { + //Ignore + } + } } public static void restore() { - final String rawPreviousContext = MDC.get(PREVIOUS_CONTEXT_KEY); + final String rawPreviousContexts = MDC.get(PREVIOUS_CONTEXTS_KEY); - if (rawPreviousContext == null) { + if (rawPreviousContexts == null) { throw new LoggingContextNotExistsException(); } try { - final JSONObject previousContext = new JSONObject(rawPreviousContext); + final JSONArray previousContexts = new JSONArray(rawPreviousContexts); + final JSONObject previousContext = previousContexts.getJSONObject(previousContexts.length() - 1); @SuppressWarnings("unchecked") final Iterator keys = previousContext.keys(); @@ -290,10 +329,42 @@ public class LoggingContext { // or the value is invalid (they are all strings) } } - - MDC.remove(PREVIOUS_CONTEXT_KEY); + + MDC.put(PREVIOUS_CONTEXTS_KEY, removeLast(previousContexts).toString()); } catch (JSONException e) { //Ignore, the previousContext is serialized from a JSONObject } } + + /** + * AJSC declares an ancient version of org.json:json in one of the parent POMs of this project. + * I tried to update our version of that library in our POM, but it's ignored because of the way + * AJSC has organized their . Had they put it into the section, + * this method would not be necessary. + */ + private static JSONArray removeLast(JSONArray previousContexts) { + final JSONArray result = new JSONArray(); + + for (int i = 0; i < previousContexts.length() - 1; i++) { + try { + result.put(previousContexts.getJSONObject(i)); + } catch (JSONException e) { + //Ignore - not possible + } + } + + return result; + } + + public static Map getCopy() { + final Map copy = new HashMap (); + + for (LoggingField field : LoggingField.values()) { + final String value = MDC.get(field.toString()); + + if (value != null) copy.put(field.toString(), value); + } + + return copy; + } } diff --git a/aai-core/src/main/java/org/openecomp/aai/parsers/query/LegacyQueryParser.java b/aai-core/src/main/java/org/openecomp/aai/parsers/query/LegacyQueryParser.java index 489774fa..f542bef2 100644 --- a/aai-core/src/main/java/org/openecomp/aai/parsers/query/LegacyQueryParser.java +++ b/aai-core/src/main/java/org/openecomp/aai/parsers/query/LegacyQueryParser.java @@ -95,16 +95,16 @@ public class LegacyQueryParser extends QueryParser implements Parsable { public LegacyQueryParser(Loader loader, QueryBuilder queryBuilder) { super(loader, queryBuilder); } - + /** * @throws AAIException * @{inheritDoc} */ @Override - public void processObject(Introspector obj, MultivaluedMap uriKeys) throws AAIException { + public void processObject(Introspector obj, EdgeType type, MultivaluedMap uriKeys) throws AAIException { if (previous != null) { this.parentResourceType = previous.getDbName(); - queryBuilder.createEdgeTraversal(EdgeType.TREE, previous, obj); + queryBuilder.createEdgeTraversal(type, previous, obj); } if (previous == null) { queryBuilder.createDBQuery(obj); @@ -114,18 +114,18 @@ public class LegacyQueryParser extends QueryParser implements Parsable { this.handleUriKeys(obj, uriKeys); } previous = obj; - this.resultResource = obj.getDbName(); + this.resultResource = obj.getDbName(); } /** * @{inheritDoc} */ @Override - public void processContainer(Introspector obj, MultivaluedMap uriKeys, boolean isFinalContainer) throws AAIException { + public void processContainer(Introspector obj, EdgeType type, MultivaluedMap uriKeys, boolean isFinalContainer) throws AAIException { if (isFinalContainer) { if (previous != null) { this.parentResourceType = previous.getDbName(); - queryBuilder.createEdgeTraversal(EdgeType.TREE, previous, obj); + queryBuilder.createEdgeTraversal(type, previous, obj); } if (previous == null) { @@ -146,7 +146,6 @@ public class LegacyQueryParser extends QueryParser implements Parsable { this.containerResource = obj.getName(); } } - private void handleUriKeys(Introspector obj, MultivaluedMap uriKeys) throws AAIException { for (String key : uriKeys.keySet()) { //to validate whether this property exists diff --git a/aai-core/src/main/java/org/openecomp/aai/parsers/query/QueryParser.java b/aai-core/src/main/java/org/openecomp/aai/parsers/query/QueryParser.java index f568f224..90d9fefc 100644 --- a/aai-core/src/main/java/org/openecomp/aai/parsers/query/QueryParser.java +++ b/aai-core/src/main/java/org/openecomp/aai/parsers/query/QueryParser.java @@ -22,6 +22,8 @@ package org.openecomp.aai.parsers.query; import java.net.URI; +import org.apache.tinkerpop.gremlin.structure.Vertex; + import org.openecomp.aai.db.props.AAIProperties; import org.openecomp.aai.introspection.Loader; import org.openecomp.aai.introspection.LoaderFactory; @@ -34,9 +36,9 @@ public abstract class QueryParser { protected Loader loader = null; protected Loader latestLoader = null; - protected QueryBuilder queryBuilder = null; + protected QueryBuilder queryBuilder = null; - protected QueryBuilder parentQueryBuilder = null; + protected QueryBuilder parentQueryBuilder = null; protected URI uri = null; @@ -53,7 +55,7 @@ public abstract class QueryParser { * @param queryBuilder the query builder * @param uri the uri */ - protected QueryParser(Loader loader, QueryBuilder queryBuilder, URI uri) { + protected QueryParser(Loader loader, QueryBuilder queryBuilder, URI uri) { this.uri = uri; this.queryBuilder = queryBuilder; this.loader = loader; @@ -66,7 +68,7 @@ public abstract class QueryParser { * @param loader the loader * @param queryBuilder the query builder */ - protected QueryParser(Loader loader, QueryBuilder queryBuilder) { + protected QueryParser(Loader loader, QueryBuilder queryBuilder) { this.queryBuilder = queryBuilder; this.loader = loader; this.latestLoader = LoaderFactory.createLoaderForVersion(loader.getModelType(), AAIProperties.LATEST); @@ -105,7 +107,7 @@ public abstract class QueryParser { * * @return the query builder */ - public QueryBuilder getQueryBuilder() { + public QueryBuilder getQueryBuilder() { return this.queryBuilder; } @@ -123,7 +125,7 @@ public abstract class QueryParser { * * @return the parent query builder */ - public QueryBuilder getParentQueryBuilder() { + public QueryBuilder getParentQueryBuilder() { if (this.parentQueryBuilder != null) { return this.parentQueryBuilder; } else { diff --git a/aai-core/src/main/java/org/openecomp/aai/parsers/query/UniqueURIQueryParser.java b/aai-core/src/main/java/org/openecomp/aai/parsers/query/UniqueURIQueryParser.java index 2d5dea72..203de01b 100644 --- a/aai-core/src/main/java/org/openecomp/aai/parsers/query/UniqueURIQueryParser.java +++ b/aai-core/src/main/java/org/openecomp/aai/parsers/query/UniqueURIQueryParser.java @@ -109,28 +109,47 @@ public class UniqueURIQueryParser extends QueryParser implements Parsable { public UniqueURIQueryParser(Loader loader, QueryBuilder queryBuilder) { super(loader, queryBuilder); } + + /** + * @{inheritDoc} + */ + @Override + public void processNamespace(Introspector obj) { + + } + /** + * @{inheritDoc} + */ + @Override + public String getCloudRegionTransform() { + return "add"; + } /** * @{inheritDoc} */ @Override - public void processObject(Introspector obj, MultivaluedMap uriKeys) { + public boolean useOriginalLoader() { + return false; + } + + + @Override + public void processObject(Introspector obj, EdgeType type, MultivaluedMap uriKeys) + throws AAIException { this.resultResource = obj.getDbName(); if (previous != null) { this.parentName = previous.getDbName(); } this.previous = obj; - - + } - /** - * @{inheritDoc} - */ @Override - public void processContainer(Introspector obj, MultivaluedMap uriKeys, boolean isFinalContainer) { + public void processContainer(Introspector obj, EdgeType type, MultivaluedMap uriKeys, + boolean isFinalContainer) throws AAIException { this.containerResource = obj.getName(); if (previous != null) { this.parentName = previous.getDbName(); @@ -140,32 +159,7 @@ public class UniqueURIQueryParser extends QueryParser implements Parsable { this.resultResource = obj.getChildDBName(); this.finalContainer = obj; - } - - } - - /** - * @{inheritDoc} - */ - @Override - public void processNamespace(Introspector obj) { - - } - - /** - * @{inheritDoc} - */ - @Override - public String getCloudRegionTransform() { - return "add"; - } - - /** - * @{inheritDoc} - */ - @Override - public boolean useOriginalLoader() { - return false; + } } } diff --git a/aai-core/src/main/java/org/openecomp/aai/parsers/uri/Parsable.java b/aai-core/src/main/java/org/openecomp/aai/parsers/uri/Parsable.java index 7c511425..57a8d8aa 100644 --- a/aai-core/src/main/java/org/openecomp/aai/parsers/uri/Parsable.java +++ b/aai-core/src/main/java/org/openecomp/aai/parsers/uri/Parsable.java @@ -24,6 +24,7 @@ import javax.ws.rs.core.MultivaluedMap; import org.openecomp.aai.exceptions.AAIException; import org.openecomp.aai.introspection.Introspector; +import org.openecomp.aai.serialization.db.EdgeType; /** * The Interface Parsable. @@ -31,14 +32,13 @@ import org.openecomp.aai.introspection.Introspector; public interface Parsable { /** - * Process object. - * - * @param obj the obj - * @param uriKeys the uri keys - * @throws AAIException + * + * @param obj + * @param type + * @param uriKeys + * @throws AAIException */ - public void processObject(Introspector obj, MultivaluedMap uriKeys) throws AAIException; - + public void processObject(Introspector obj, EdgeType type, MultivaluedMap uriKeys) throws AAIException; /** * Process container. * @@ -47,8 +47,8 @@ public interface Parsable { * @param isFinalContainer the is final container * @throws AAIException the AAI exception */ - public void processContainer(Introspector obj, MultivaluedMap uriKeys, boolean isFinalContainer) throws AAIException; - + public void processContainer(Introspector obj, EdgeType type, MultivaluedMap uriKeys, boolean isFinalContainer) throws AAIException; + /** * Process namespace. * diff --git a/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIParser.java b/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIParser.java index e796732d..8f867172 100644 --- a/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIParser.java +++ b/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIParser.java @@ -36,7 +36,9 @@ import org.openecomp.aai.introspection.Loader; import org.openecomp.aai.introspection.LoaderFactory; import org.openecomp.aai.introspection.Version; import org.openecomp.aai.logging.ErrorLogHelper; +import org.openecomp.aai.rest.RestTokens; import org.openecomp.aai.schema.enums.ObjectMetadata; +import org.openecomp.aai.serialization.db.EdgeType; import org.openecomp.aai.util.AAIConfig; @@ -130,10 +132,35 @@ public class URIParser { Set keys = null; String part = ""; Introspector previousObj = null; - + EdgeType type = EdgeType.TREE; for (int i = 0; i < parts.length;) { part = parts[i]; Introspector introspector = null; + if (part.equals(RestTokens.COUSIN.toString())) { + if (i == parts.length-1) { + throw new AAIException("AAI_3000", uri + " not a valid path. Cannot end in " + RestTokens.COUSIN); + } + introspector = loader.introspectorFromName(parts[i+1]); + if (previousObj.isContainer() && introspector.isContainer()) { + throw new AAIException("AAI_3000", uri + " not a valid path. Cannot chain plurals together"); + } + MultivaluedMap uriKeys = new MultivaluedHashMap<>(); + if (i == parts.length-2 && queryParams != null) { + Set queryKeys = queryParams.keySet(); + for (String key : queryKeys) { + uriKeys.put(key, queryParams.get(key)); + + } + } + if (introspector.isContainer()) { + boolean isFinalContainer = i == parts.length-2; + p.processContainer(introspector, EdgeType.COUSIN, uriKeys, isFinalContainer); + } + previousObj = introspector; + type = EdgeType.COUSIN; + i+=2; + continue; + } introspector = loader.introspectorFromName(part); if (introspector != null) { @@ -172,8 +199,8 @@ public class URIParser { } } - p.processObject(introspector, uriKeys); - + p.processObject(introspector, type, uriKeys); + type = EdgeType.TREE; } else if (introspector.isContainer()) { boolean isFinalContainer = i == parts.length-1; MultivaluedMap uriKeys = new MultivaluedHashMap<>(); @@ -185,7 +212,7 @@ public class URIParser { } } - p.processContainer(introspector, uriKeys, isFinalContainer); + p.processContainer(introspector, type, uriKeys, isFinalContainer); i++; } else { diff --git a/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIToDBKey.java b/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIToDBKey.java index 4bb4ab95..ae6ff600 100644 --- a/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIToDBKey.java +++ b/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIToDBKey.java @@ -30,6 +30,7 @@ import javax.ws.rs.core.MultivaluedMap; import org.openecomp.aai.exceptions.AAIException; import org.openecomp.aai.introspection.Introspector; import org.openecomp.aai.introspection.Loader; +import org.openecomp.aai.serialization.db.EdgeType; import com.google.common.base.Joiner; /** @@ -71,27 +72,6 @@ public class URIToDBKey implements Parsable { } }*/ - /** - * @{inheritDoc} - */ - @Override - public void processObject (Introspector obj, MultivaluedMap uriKeys) { - - dbKeys.add(obj.getDbName()); - - for (String key : uriKeys.keySet()) { - dbKeys.add(uriKeys.getFirst(key).toString()); - } - } - - /** - * @{inheritDoc} - */ - @Override - public void processContainer (Introspector obj, MultivaluedMap uriKeys, boolean isFinalContainer) { - - } - /** * @{inheritDoc} */ @@ -124,4 +104,20 @@ public class URIToDBKey implements Parsable { public boolean useOriginalLoader() { return false; } + + @Override + public void processObject(Introspector obj, EdgeType type, MultivaluedMap uriKeys) + throws AAIException { + + dbKeys.add(obj.getDbName()); + + for (String key : uriKeys.keySet()) { + dbKeys.add(uriKeys.getFirst(key).toString()); + } + } + + @Override + public void processContainer(Introspector obj, EdgeType type, MultivaluedMap uriKeys, + boolean isFinalContainer) throws AAIException { + } } diff --git a/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIToExtensionInformation.java b/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIToExtensionInformation.java index defd1285..9906437b 100644 --- a/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIToExtensionInformation.java +++ b/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIToExtensionInformation.java @@ -31,6 +31,7 @@ import org.openecomp.aai.exceptions.AAIException; import org.openecomp.aai.introspection.Introspector; import org.openecomp.aai.introspection.Loader; import org.openecomp.aai.restcore.HttpMethod; +import org.openecomp.aai.serialization.db.EdgeType; import com.google.common.base.CaseFormat; import com.google.common.base.Joiner; @@ -64,27 +65,6 @@ public class URIToExtensionInformation implements Parsable { this.methodName = Joiner.on("").join(this.pieces); } - /** - * @{inheritDoc} - */ - @Override - public void processObject(Introspector obj, MultivaluedMap uriKeys) { - String upperCamel = toUpperCamel(obj.getDbName()); - if (topObject.equals("")) { - topObject = upperCamel; - } - pieces.add(upperCamel); - - } - - /** - * @{inheritDoc} - */ - @Override - public void processContainer(Introspector obj, MultivaluedMap uriKeys, boolean isFinalContainer) { - pieces.add(toUpperCamel(obj.getName())); - } - /** * @{inheritDoc} */ @@ -166,4 +146,20 @@ public class URIToExtensionInformation implements Parsable { result = CaseFormat.LOWER_HYPHEN.to(CaseFormat.UPPER_CAMEL, name); return result; } + + @Override + public void processObject(Introspector obj, EdgeType type, MultivaluedMap uriKeys) + throws AAIException { + String upperCamel = toUpperCamel(obj.getDbName()); + if (topObject.equals("")) { + topObject = upperCamel; + } + pieces.add(upperCamel); + } + + @Override + public void processContainer(Introspector obj, EdgeType type, MultivaluedMap uriKeys, + boolean isFinalContainer) throws AAIException { + pieces.add(toUpperCamel(obj.getName())); + } } diff --git a/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIToObject.java b/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIToObject.java index 5b8d25c3..cf011bf6 100644 --- a/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIToObject.java +++ b/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIToObject.java @@ -32,6 +32,7 @@ import org.openecomp.aai.introspection.Introspector; import org.openecomp.aai.introspection.Loader; import org.openecomp.aai.introspection.Version; import org.openecomp.aai.schema.enums.ObjectMetadata; +import org.openecomp.aai.serialization.db.EdgeType; /** * Given a URI this class returns an object, or series of nested objects @@ -90,61 +91,6 @@ public class URIToObject implements Parsable { } - /** - * @{inheritDoc} - */ - @Override - public void processObject(Introspector obj, MultivaluedMap uriKeys) { - - if (this.entityName == null) { - this.topEntityName = obj.getDbName(); - this.topEntity = obj; - } - this.entityName = obj.getDbName(); - this.entity = obj; - this.parentList = (List)this.previous.getValue(obj.getName()); - this.parentList.add(entity.getUnderlyingObject()); - - for (String key : uriKeys.keySet()) { - entity.setValue(key, uriKeys.getFirst(key)); - } - try { - if (relatedObjects.containsKey(entity.getObjectId())) { - Introspector relatedObject = relatedObjects.get(entity.getObjectId()); - String nameProp = relatedObject.getMetadata(ObjectMetadata.NAME_PROPS); - if (nameProp == null) { - nameProp = ""; - } - if (nameProp != null && !nameProp.equals("")) { - String[] nameProps = nameProp.split(","); - for (String prop : nameProps) { - entity.setValue(prop, relatedObject.getValue(prop)); - } - } - } - } catch (UnsupportedEncodingException e) { - } - this.previous = entity; - - } - - /** - * @{inheritDoc} - */ - @Override - public void processContainer(Introspector obj, MultivaluedMap uriKeys, boolean isFinalContainer) { - - this.previous = obj; - - if (this.entity != null) { - this.entity.setValue(obj.getName(), obj.getUnderlyingObject()); - } else { - this.entity = obj; - this.topEntity = obj; - } - - } - /** * @{inheritDoc} */ @@ -226,4 +172,50 @@ public class URIToObject implements Parsable { public Loader getLoader() { return this.loader; } + @Override + public void processObject(Introspector obj, EdgeType type, MultivaluedMap uriKeys) + throws AAIException { + + if (this.entityName == null) { + this.topEntityName = obj.getDbName(); + this.topEntity = obj; + } + this.entityName = obj.getDbName(); + this.entity = obj; + this.parentList = (List)this.previous.getValue(obj.getName()); + this.parentList.add(entity.getUnderlyingObject()); + + for (String key : uriKeys.keySet()) { + entity.setValue(key, uriKeys.getFirst(key)); + } + try { + if (relatedObjects.containsKey(entity.getObjectId())) { + Introspector relatedObject = relatedObjects.get(entity.getObjectId()); + String nameProp = relatedObject.getMetadata(ObjectMetadata.NAME_PROPS); + if (nameProp == null) { + nameProp = ""; + } + if (nameProp != null && !nameProp.equals("")) { + String[] nameProps = nameProp.split(","); + for (String prop : nameProps) { + entity.setValue(prop, relatedObject.getValue(prop)); + } + } + } + } catch (UnsupportedEncodingException e) { + } + this.previous = entity; + } + @Override + public void processContainer(Introspector obj, EdgeType type, MultivaluedMap uriKeys, + boolean isFinalContainer) throws AAIException { + this.previous = obj; + + if (this.entity != null) { + this.entity.setValue(obj.getName(), obj.getUnderlyingObject()); + } else { + this.entity = obj; + this.topEntity = obj; + } + } } diff --git a/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIToRelationshipObject.java b/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIToRelationshipObject.java index 83a3a621..853b7877 100644 --- a/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIToRelationshipObject.java +++ b/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIToRelationshipObject.java @@ -33,6 +33,7 @@ import org.openecomp.aai.introspection.Introspector; import org.openecomp.aai.introspection.Loader; import org.openecomp.aai.introspection.Version; import org.openecomp.aai.introspection.exceptions.AAIUnknownObjectException; +import org.openecomp.aai.serialization.db.EdgeType; import org.openecomp.aai.util.AAIApiServerURLBase; import org.openecomp.aai.workarounds.LegacyURITransformer; @@ -102,35 +103,6 @@ public class URIToRelationshipObject implements Parsable { public String getCloudRegionTransform(){ return "remove"; } - - /** - * @{inheritDoc} - */ - @Override - public void processObject(Introspector obj, MultivaluedMap uriKeys) { - - - for (String key : obj.getKeys()) { - try { - Introspector data = loader.introspectorFromName("relationship-data"); - data.setValue("relationship-key", obj.getDbName() + "." + key); - data.setValue("relationship-value", obj.getValue(key)); - - ((List)relationship.getValue("relationship-data")).add(data.getUnderlyingObject()); - } catch (AAIUnknownObjectException e) { - throw new RuntimeException("Fatal error - relationship-data object not found!"); - } - } - relationship.setValue("related-to", obj.getDbName()); - } - - /** - * @{inheritDoc} - */ - @Override - public void processContainer(Introspector obj, MultivaluedMap uriKeys, boolean isFinalContainer) { - - } /** * @{inheritDoc} @@ -163,9 +135,36 @@ public class URIToRelationshipObject implements Parsable { URI relatedLink = new URI(this.baseURL + this.originalVersion + "/" + originalUri); this.relationship.setValue("related-link", relatedLink); - - + if (this.originalVersion.compareTo(Version.v10) >= 0) { + //only return the path section of the URI past v10 + relatedLink = new URI(relatedLink.getRawPath()); + } + + this.relationship.setValue("related-link", relatedLink.toString()); + this.result = relationship; return this.result; } + + @Override + public void processObject(Introspector obj, EdgeType type, MultivaluedMap uriKeys) + throws AAIException { + for (String key : obj.getKeys()) { + try { + Introspector data = loader.introspectorFromName("relationship-data"); + data.setValue("relationship-key", obj.getDbName() + "." + key); + data.setValue("relationship-value", obj.getValue(key)); + + ((List)relationship.getValue("relationship-data")).add(data.getUnderlyingObject()); + } catch (AAIUnknownObjectException e) { + throw new RuntimeException("Fatal error - relationship-data object not found!"); + } + } + relationship.setValue("related-to", obj.getDbName()); + } + + @Override + public void processContainer(Introspector obj, EdgeType type, MultivaluedMap uriKeys, + boolean isFinalContainer) throws AAIException { + } } diff --git a/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIValidate.java b/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIValidate.java index 4f7a7c15..6eed095e 100644 --- a/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIValidate.java +++ b/aai-core/src/main/java/org/openecomp/aai/parsers/uri/URIValidate.java @@ -24,23 +24,10 @@ import javax.ws.rs.core.MultivaluedMap; import org.openecomp.aai.exceptions.AAIException; import org.openecomp.aai.introspection.Introspector; +import org.openecomp.aai.serialization.db.EdgeType; class URIValidate implements Parsable { - @Override - public void processObject(Introspector obj, MultivaluedMap uriKeys) throws AAIException { - //NO-OP - //just want to make sure this URI has valid tokens - } - - @Override - public void processContainer(Introspector obj, MultivaluedMap uriKeys, boolean isFinalContainer) - throws AAIException { - //NO-OP - //just want to make sure this URI has valid tokens - - } - @Override public void processNamespace(Introspector obj) { //NO-OP @@ -59,4 +46,18 @@ class URIValidate implements Parsable { return true; } + @Override + public void processObject(Introspector obj, EdgeType type, MultivaluedMap uriKeys) + throws AAIException { + //NO-OP + //just want to make sure this URI has valid tokens + } + + @Override + public void processContainer(Introspector obj, EdgeType type, MultivaluedMap uriKeys, + boolean isFinalContainer) throws AAIException { + //NO-OP + //just want to make sure this URI has valid tokens + } + } diff --git a/aai-core/src/main/java/org/openecomp/aai/query/builder/GraphTraversalBuilder.java b/aai-core/src/main/java/org/openecomp/aai/query/builder/GraphTraversalBuilder.java index b212f75f..11164d96 100644 --- a/aai-core/src/main/java/org/openecomp/aai/query/builder/GraphTraversalBuilder.java +++ b/aai-core/src/main/java/org/openecomp/aai/query/builder/GraphTraversalBuilder.java @@ -30,11 +30,13 @@ import java.util.Set; import org.apache.tinkerpop.gremlin.process.traversal.P; import org.apache.tinkerpop.gremlin.process.traversal.Traversal; import org.apache.tinkerpop.gremlin.process.traversal.Traversal.Admin; +import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__; import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper; import org.apache.tinkerpop.gremlin.structure.Direction; +import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.openecomp.aai.db.props.AAIProperties; @@ -51,10 +53,10 @@ import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException; /** * The Class GraphTraversalBuilder. */ -public abstract class GraphTraversalBuilder extends QueryBuilder { +public abstract class GraphTraversalBuilder extends QueryBuilder { - protected GraphTraversal traversal = null; - protected Admin completeTraversal = null; + protected GraphTraversal traversal = null; + protected Admin completeTraversal = null; private EdgeRules edgeRules = EdgeRules.getInstance(); protected int parentStepIndex = 0; @@ -69,7 +71,7 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { public GraphTraversalBuilder(Loader loader, GraphTraversalSource source) { super(loader, source); - traversal = __.start(); + traversal = new DefaultGraphTraversal<>(); } @@ -82,7 +84,7 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { public GraphTraversalBuilder(Loader loader, GraphTraversalSource source, Vertex start) { super(loader, source, start); - traversal = __.start(); + traversal = new DefaultGraphTraversal<>(); } @@ -90,7 +92,7 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { * @{inheritDoc} */ @Override - public QueryBuilder getVerticesByIndexedProperty(String key, Object value) { + public QueryBuilder getVerticesByIndexedProperty(String key, Object value) { return this.getVerticesByProperty(key, value); } @@ -99,7 +101,7 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { * @{inheritDoc} */ @Override - public QueryBuilder getVerticesByIndexedProperty(String key, List values) { + public QueryBuilder getVerticesByIndexedProperty(String key, List values) { return this.getVerticesByProperty(key, values); } @@ -107,7 +109,7 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { * @{inheritDoc} */ @Override - public QueryBuilder getVerticesByProperty(String key, Object value) { + public QueryBuilder getVerticesByProperty(String key, Object value) { //this is because the index is registered as an Integer value = this.correctObjectType(value); @@ -115,14 +117,14 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { traversal.has(key, value); stepIndex++; - return this; + return (QueryBuilder) this; } /** * @{inheritDoc} */ @Override - public QueryBuilder getVerticesByProperty(final String key, final List values) { + public QueryBuilder getVerticesByProperty(final String key, final List values) { //this is because the index is registered as an Integer List correctedValues = new ArrayList<>(); @@ -133,24 +135,24 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { traversal.has(key, P.within(correctedValues)); stepIndex++; - return this; + return (QueryBuilder) this; } /** * @{inheritDoc} */ @Override - public QueryBuilder getChildVerticesFromParent(String parentKey, String parentValue, String childType) { + public QueryBuilder getChildVerticesFromParent(String parentKey, String parentValue, String childType) { traversal.has(parentKey, parentValue).has(AAIProperties.NODE_TYPE, childType); stepIndex++; - return this; + return (QueryBuilder) this; } /** * @{inheritDoc} */ @Override - public QueryBuilder getTypedVerticesByMap(String type, LinkedHashMap map) { + public QueryBuilder getTypedVerticesByMap(String type, LinkedHashMap map) { for (String key : map.keySet()) { traversal.has(key, map.get(key)); @@ -158,24 +160,24 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { } traversal.has(AAIProperties.NODE_TYPE, type); stepIndex++; - return this; + return (QueryBuilder) this; } /** * @{inheritDoc} */ @Override - public QueryBuilder createDBQuery(Introspector obj) { + public QueryBuilder createDBQuery(Introspector obj) { this.createKeyQuery(obj); this.createContainerQuery(obj); - return this; + return (QueryBuilder) this; } /** * @{inheritDoc} */ @Override - public QueryBuilder createKeyQuery(Introspector obj) { + public QueryBuilder createKeyQuery(Introspector obj) { Set keys = obj.getKeys(); Object val; for (String key : keys) { @@ -195,15 +197,15 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { stepIndex++; } } - return this; + return (QueryBuilder) this; } @Override - public QueryBuilder exactMatchQuery(Introspector obj) { + public QueryBuilder exactMatchQuery(Introspector obj) { this.createKeyQuery(obj); allPropertiesQuery(obj); this.createContainerQuery(obj); - return this; + return (QueryBuilder) this; } private void allPropertiesQuery(Introspector obj) { @@ -236,7 +238,7 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { */ @Override - public QueryBuilder createContainerQuery(Introspector obj) { + public QueryBuilder createContainerQuery(Introspector obj) { String type = obj.getChildDBName(); String abstractType = obj.getMetadata(ObjectMetadata.ABSTRACT); if (abstractType != null) { @@ -247,7 +249,7 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { } stepIndex++; markContainer(); - return this; + return (QueryBuilder) this; } /** @@ -256,16 +258,16 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { * @{inheritDoc} */ @Override - public QueryBuilder createEdgeTraversal(EdgeType type, Introspector parent, Introspector child) throws AAIException, NoEdgeRuleFoundException { + public QueryBuilder createEdgeTraversal(EdgeType type, Introspector parent, Introspector child) throws AAIException, NoEdgeRuleFoundException { String isAbstractType = parent.getMetadata(ObjectMetadata.ABSTRACT); if ("true".equals(isAbstractType)) { markParentBoundary(); traversal.union(handleAbstractEdge(type, parent, child)); stepIndex += 1; } else { - this.edgeQuery(type, parent, child); + this.edgeQueryToVertex(type, parent, child); } - return this; + return (QueryBuilder) this; } @@ -302,20 +304,29 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { * @{inheritDoc} */ @Override - public QueryBuilder createEdgeTraversal(EdgeType type, Vertex parent, Introspector child) throws AAIException, NoEdgeRuleFoundException { + public QueryBuilder createEdgeTraversal(EdgeType type, Vertex parent, Introspector child) throws AAIException, NoEdgeRuleFoundException { String nodeType = parent.property(AAIProperties.NODE_TYPE).orElse(null); Introspector parentObj = loader.introspectorFromName(nodeType); - this.edgeQuery(type, parentObj, child); - return this; + this.edgeQueryToVertex(type, parentObj, child); + return (QueryBuilder) this; } + @Override + public QueryBuilder getEdgesBetween(EdgeType type, String outNodeType, String inNodeType) throws AAIException { + Introspector outObj = loader.introspectorFromName(outNodeType); + Introspector inObj = loader.introspectorFromName(inNodeType); + this.edgeQuery(type, outObj, inObj); + + return (QueryBuilder)this; + + } /** * @{inheritDoc} */ @Override - public QueryBuilder union(QueryBuilder... builder) { + public QueryBuilder union(QueryBuilder... builder) { GraphTraversal[] traversals = new GraphTraversal[builder.length]; for (int i = 0; i < builder.length; i++) { traversals[i] = (GraphTraversal)builder[i].getQuery(); @@ -330,7 +341,7 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { * @{inheritDoc} */ @Override - public QueryBuilder where(QueryBuilder... builder) { + public QueryBuilder where(QueryBuilder... builder) { GraphTraversal[] traversals = new GraphTraversal[builder.length]; for (int i = 0; i < builder.length; i++) { this.traversal.where((GraphTraversal)builder[i].getQuery()); @@ -348,7 +359,7 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { * @throws NoEdgeRuleFoundException * @throws AAIException */ - private void edgeQuery(EdgeType type, Introspector outObj, Introspector inObj) throws AAIException, NoEdgeRuleFoundException { + private void edgeQueryToVertex(EdgeType type, Introspector outObj, Introspector inObj) throws AAIException, NoEdgeRuleFoundException { String outType = outObj.getDbName(); String inType = inObj.getDbName(); @@ -367,10 +378,40 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { } stepIndex++; this.createContainerQuery(inObj); + + } + + /** + * Edge query. + * + * @param outType the out type + * @param inType the in type + * @throws NoEdgeRuleFoundException + * @throws AAIException + */ + private void edgeQuery(EdgeType type, Introspector outObj, Introspector inObj) throws AAIException, NoEdgeRuleFoundException { + String outType = outObj.getDbName(); + String inType = inObj.getDbName(); + + if (outObj.isContainer()) { + outType = outObj.getChildDBName(); + } + if (inObj.isContainer()) { + inType = inObj.getChildDBName(); + } + markParentBoundary(); + EdgeRule rule = edgeRules.getEdgeRule(type, outType, inType); + if (rule.getDirection().equals(Direction.OUT)) { + traversal.outE(rule.getLabel()); + } else { + traversal.inE(rule.getLabel()); + } + stepIndex++; + } @Override - public QueryBuilder limit(long amount) { + public QueryBuilder limit(long amount) { traversal.limit(amount); return this; } @@ -379,21 +420,21 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { * @{inheritDoc} */ @Override - public T getQuery() { - return (T)this.traversal; + public E2 getQuery() { + return (E2)this.traversal; } /** * @{inheritDoc} */ @Override - public QueryBuilder getParentQuery() { + public QueryBuilder getParentQuery() { return cloneQueryAtStep(parentStepIndex); } @Override - public QueryBuilder getContainerQuery() { + public QueryBuilder getContainerQuery() { if (this.parentStepIndex == 0) { return removeQueryStepsBetween(0, containerStepIndex); @@ -436,7 +477,7 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { return stepIndex; } - protected abstract QueryBuilder cloneQueryAtStep(int index); + protected abstract QueryBuilder cloneQueryAtStep(int index); /** * end is exclusive * @@ -444,7 +485,7 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { * @param end * @return */ - protected abstract QueryBuilder removeQueryStepsBetween(int start, int end); + protected abstract QueryBuilder removeQueryStepsBetween(int start, int end); private void executeQuery() { @@ -458,7 +499,7 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { TraversalHelper.insertTraversal(admin.getEndStep(), traversal.asAdmin(), admin); - this.completeTraversal = admin; + this.completeTraversal = (Admin) admin; } @Override @@ -471,7 +512,7 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { } @Override - public Vertex next() { + public E next() { if (this.completeTraversal == null) { executeQuery(); } @@ -480,7 +521,7 @@ public abstract class GraphTraversalBuilder extends QueryBuilder { } @Override - public List toList() { + public List toList() { if (this.completeTraversal == null) { executeQuery(); } diff --git a/aai-core/src/main/java/org/openecomp/aai/query/builder/GremlinPipelineBuilder.java b/aai-core/src/main/java/org/openecomp/aai/query/builder/GremlinPipelineBuilder.java index 1b32e736..729acbb4 100644 --- a/aai-core/src/main/java/org/openecomp/aai/query/builder/GremlinPipelineBuilder.java +++ b/aai-core/src/main/java/org/openecomp/aai/query/builder/GremlinPipelineBuilder.java @@ -26,7 +26,7 @@ import java.util.List; import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.openecomp.aai.db.props.AAIProperties; +import org.openecomp.aai.db.AAIProperties; import org.openecomp.aai.exceptions.AAIException; import org.openecomp.aai.introspection.Introspector; import org.openecomp.aai.introspection.Loader; diff --git a/aai-core/src/main/java/org/openecomp/aai/query/builder/GremlinQueryBuilder.java b/aai-core/src/main/java/org/openecomp/aai/query/builder/GremlinQueryBuilder.java index 3fa4dedb..e4e1fd5a 100644 --- a/aai-core/src/main/java/org/openecomp/aai/query/builder/GremlinQueryBuilder.java +++ b/aai-core/src/main/java/org/openecomp/aai/query/builder/GremlinQueryBuilder.java @@ -30,6 +30,7 @@ import java.util.Set; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.structure.Direction; +import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.openecomp.aai.db.props.AAIProperties; @@ -47,7 +48,7 @@ import com.google.common.base.Joiner; /** * The Class GremlinQueryBuilder. */ -public abstract class GremlinQueryBuilder extends QueryBuilder { +public abstract class GremlinQueryBuilder extends QueryBuilder { private EdgeRules edgeRules = EdgeRules.getInstance(); private GremlinGroovyShellSingleton gremlinGroovy = GremlinGroovyShellSingleton.getInstance(); @@ -83,26 +84,26 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { * @{inheritDoc} */ @Override - public QueryBuilder createDBQuery(Introspector obj) { + public QueryBuilder createDBQuery(Introspector obj) { this.createKeyQuery(obj); this.createContainerQuery(obj); - return this; + return (QueryBuilder) this; } @Override - public QueryBuilder exactMatchQuery(Introspector obj) { + public QueryBuilder exactMatchQuery(Introspector obj) { // TODO not implemented because this is implementation is no longer used this.createKeyQuery(obj); //allPropertiesQuery(obj); this.createContainerQuery(obj); - return this; + return (QueryBuilder) this; } /** * @{inheritDoc} */ @Override - public QueryBuilder getVerticesByIndexedProperty(String key, Object value) { + public QueryBuilder getVerticesByIndexedProperty(String key, Object value) { return this.getVerticesByProperty(key, value); } @@ -110,7 +111,7 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { * @{inheritDoc} */ @Override - public QueryBuilder getVerticesByIndexedProperty(String key, List values) { + public QueryBuilder getVerticesByIndexedProperty(String key, List values) { return this.getVerticesByProperty(key, values); } @@ -118,7 +119,7 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { * @{inheritDoc} */ @Override - public QueryBuilder getVerticesByProperty(String key, Object value) { + public QueryBuilder getVerticesByProperty(String key, Object value) { String term = ""; if (value != null && !value.getClass().getName().equals("java.lang.String")) { @@ -128,14 +129,14 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { } list.add(".has('" + key + "', " + term + ")"); stepIndex++; - return this; + return (QueryBuilder) this; } /** * @{inheritDoc} */ @Override - public QueryBuilder getVerticesByProperty(String key, List values) { + public QueryBuilder getVerticesByProperty(String key, List values) { String term = ""; String predicate = "P.within(#!#argument#!#)"; @@ -151,7 +152,7 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { predicate = predicate.replace("#!#argument#!#", argument); list.add(".has('" + key + "', " + predicate + ")"); stepIndex++; - return this; + return (QueryBuilder) this; } @@ -159,21 +160,21 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { * @{inheritDoc} */ @Override - public QueryBuilder getChildVerticesFromParent(String parentKey, String parentValue, String childType) { + public QueryBuilder getChildVerticesFromParent(String parentKey, String parentValue, String childType) { /* String query = ".has('aai-node-type', '" + childType + "')"; return this.processGremlinQuery(parentKey, parentValue, query); */ //TODO - return this; + return (QueryBuilder) this; } /** * @{inheritDoc} */ @Override - public QueryBuilder getTypedVerticesByMap(String type, LinkedHashMap map) { + public QueryBuilder getTypedVerticesByMap(String type, LinkedHashMap map) { for (String key : map.keySet()) { list.add(".has('" + key + "', '" + map.get(key) + "')"); @@ -181,14 +182,14 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { } list.add(".has('aai-node-type', '" + type + "')"); stepIndex++; - return this; + return (QueryBuilder) this; } /** * @{inheritDoc} */ @Override - public QueryBuilder createKeyQuery(Introspector obj) { + public QueryBuilder createKeyQuery(Introspector obj) { Set keys = obj.getKeys(); for (String key : keys) { @@ -196,7 +197,7 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { this.getVerticesByProperty(key, obj.getValue(key)); } - return this; + return (QueryBuilder) this; } /** @@ -214,7 +215,7 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { if (child.isContainer()) { childName = child.getChildDBName(); } - this.edgeQuery(type, parentName, childName); + this.edgeQueryToVertex(type, parentName, childName); return this; } @@ -225,14 +226,21 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { * @{inheritDoc} */ @Override - public QueryBuilder createEdgeTraversal(EdgeType type, Vertex parent, Introspector child) throws AAIException, NoEdgeRuleFoundException { + public QueryBuilder createEdgeTraversal(EdgeType type, Vertex parent, Introspector child) throws AAIException, NoEdgeRuleFoundException { String nodeType = parent.property(AAIProperties.NODE_TYPE).orElse(null); - this.edgeQuery(type, nodeType, child.getDbName()); + this.edgeQueryToVertex(type, nodeType, child.getDbName()); - return this; + return (QueryBuilder) this; } + @Override + public QueryBuilder getEdgesBetween(EdgeType type, String outNodeType, String inNodeType) throws AAIException { + this.edgeQuery(type, outNodeType, inNodeType); + + return (QueryBuilder)this; + + } /** * Edge query. * @@ -241,7 +249,7 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { * @throws NoEdgeRuleFoundException * @throws AAIException */ - private void edgeQuery(EdgeType type, String outType, String inType) throws AAIException, NoEdgeRuleFoundException { + private void edgeQueryToVertex(EdgeType type, String outType, String inType) throws AAIException, NoEdgeRuleFoundException { markParentBoundary(); EdgeRule rule = edgeRules.getEdgeRule(type, outType, inType); if (rule.getDirection().equals(Direction.OUT)) { @@ -249,11 +257,33 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { } else { list.add(".in('" + rule.getLabel() + "')"); } + stepIndex++; list.add(".has('" + AAIProperties.NODE_TYPE + "', '" + inType + "')"); - stepIndex += 2; + stepIndex++; + + } + + /** + * Edge query. + * + * @param outType the out type + * @param inType the in type + * @throws NoEdgeRuleFoundException + * @throws AAIException + */ + private void edgeQuery(EdgeType type, String outType, String inType) throws AAIException, NoEdgeRuleFoundException { + markParentBoundary(); + EdgeRule rule = edgeRules.getEdgeRule(type, outType, inType); + if (rule.getDirection().equals(Direction.OUT)) { + list.add(".outE('" + rule.getLabel() + "')"); + } else { + list.add(".inV('" + rule.getLabel() + "')"); + } + stepIndex++; + } @Override - public QueryBuilder limit(long amount) { + public QueryBuilder limit(long amount) { list.add(".limit(" + amount + ")"); return this; } @@ -261,7 +291,7 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { * @{inheritDoc} */ @Override - public QueryBuilder createContainerQuery(Introspector obj) { + public QueryBuilder createContainerQuery(Introspector obj) { String type = obj.getChildDBName(); String abstractType = obj.getMetadata(ObjectMetadata.ABSTRACT); if (abstractType != null) { @@ -281,11 +311,11 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { } stepIndex++; this.markContainer(); - return this; + return (QueryBuilder) this; } @Override - public QueryBuilder union(QueryBuilder... builder) { + public QueryBuilder union(QueryBuilder... builder) { markParentBoundary(); String[] traversals = new String[builder.length]; StringBuilder command = new StringBuilder(); @@ -302,7 +332,7 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { } @Override - public QueryBuilder where(QueryBuilder... builder) { + public QueryBuilder where(QueryBuilder... builder) { markParentBoundary(); List traversals = new ArrayList<>(); for (int i = 0; i < builder.length; i++) { @@ -319,12 +349,12 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { * @{inheritDoc} */ @Override - public QueryBuilder getParentQuery() { + public QueryBuilder getParentQuery() { return cloneQueryAtStep(parentStepIndex); } @Override - public QueryBuilder getContainerQuery() { + public QueryBuilder getContainerQuery() { return cloneQueryAtStep(containerStepIndex); } @@ -332,14 +362,14 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { * @{inheritDoc} */ @Override - public T getQuery() { + public T2 getQuery() { StringBuilder sb = new StringBuilder(); for (String piece : this.list) { sb.append(piece); } - return (T)sb.toString(); + return (T2)sb.toString(); } /** @@ -355,7 +385,7 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { this.containerStepIndex = stepIndex; } - protected abstract QueryBuilder cloneQueryAtStep(int index); + protected abstract QueryBuilder cloneQueryAtStep(int index); /** * @{inheritDoc} */ @@ -396,21 +426,21 @@ public abstract class GremlinQueryBuilder extends QueryBuilder { } @Override - public Vertex next() { + public E next() { if (this.completeTraversal == null) { executeQuery(); } - return (Vertex)this.completeTraversal.next(); + return (E)this.completeTraversal.next(); } @Override - public List toList() { + public List toList() { if (this.completeTraversal == null) { executeQuery(); } - return (List)this.completeTraversal.toList(); + return (List)this.completeTraversal.toList(); } } diff --git a/aai-core/src/main/java/org/openecomp/aai/query/builder/GremlinTraversal.java b/aai-core/src/main/java/org/openecomp/aai/query/builder/GremlinTraversal.java index 43ef850d..3daad5ef 100644 --- a/aai-core/src/main/java/org/openecomp/aai/query/builder/GremlinTraversal.java +++ b/aai-core/src/main/java/org/openecomp/aai/query/builder/GremlinTraversal.java @@ -39,7 +39,7 @@ import org.openecomp.aai.parsers.query.TraversalStrategy; /** * The Class GremlinTraversal. */ -public class GremlinTraversal extends GremlinQueryBuilder { +public class GremlinTraversal extends GremlinQueryBuilder { /** * Instantiates a new gremlin traversal. @@ -62,7 +62,7 @@ public class GremlinTraversal extends GremlinQueryBuilder { this.factory = new TraversalStrategy(this.loader, this); } - protected GremlinTraversal(List traversal, Loader loader, GraphTraversalSource source, GremlinQueryBuilder gtb) { + protected GremlinTraversal(List traversal, Loader loader, GraphTraversalSource source, GremlinQueryBuilder gtb) { super(loader, source); this.list = traversal; this.stepIndex = gtb.getStepIndex(); @@ -110,20 +110,20 @@ public class GremlinTraversal extends GremlinQueryBuilder { * @{inheritDoc} */ @Override - public QueryBuilder newInstance(Vertex start) { - return new GremlinTraversal(loader, source, start); + public QueryBuilder newInstance(Vertex start) { + return new GremlinTraversal<>(loader, source, start); } /** * @{inheritDoc} */ @Override - public QueryBuilder newInstance() { - return new GremlinTraversal(loader, source); + public QueryBuilder newInstance() { + return new GremlinTraversal<>(loader, source); } @Override - protected QueryBuilder cloneQueryAtStep(int index) { + protected QueryBuilder cloneQueryAtStep(int index) { if (index == 0) { index = stepIndex; } @@ -132,6 +132,6 @@ public class GremlinTraversal extends GremlinQueryBuilder { newList.add(this.list.get(i)); } - return new GremlinTraversal(newList, loader, source, this); + return new GremlinTraversal<>(newList, loader, source, this); } } diff --git a/aai-core/src/main/java/org/openecomp/aai/query/builder/GremlinUnique.java b/aai-core/src/main/java/org/openecomp/aai/query/builder/GremlinUnique.java index 50c1e402..ee2353f1 100644 --- a/aai-core/src/main/java/org/openecomp/aai/query/builder/GremlinUnique.java +++ b/aai-core/src/main/java/org/openecomp/aai/query/builder/GremlinUnique.java @@ -40,7 +40,7 @@ import org.openecomp.aai.parsers.query.UniqueStrategy; /** * The Class GremlinUnique. */ -public class GremlinUnique extends GremlinQueryBuilder { +public class GremlinUnique extends GremlinQueryBuilder { /** * Instantiates a new gremlin unique. @@ -63,7 +63,7 @@ public class GremlinUnique extends GremlinQueryBuilder { this.factory = new UniqueStrategy(this.loader, this); } - protected GremlinUnique(List traversal, Loader loader, GraphTraversalSource source, GremlinQueryBuilder gtb) { + protected GremlinUnique(List traversal, Loader loader, GraphTraversalSource source, GremlinQueryBuilder gtb) { super(loader, source); this.list = traversal; this.stepIndex = gtb.getStepIndex(); @@ -110,20 +110,20 @@ public class GremlinUnique extends GremlinQueryBuilder { * @{inheritDoc} */ @Override - public QueryBuilder newInstance() { - return new GremlinUnique(loader, source); + public QueryBuilder newInstance() { + return new GremlinUnique<>(loader, source); } /** * @{inheritDoc} */ @Override - public QueryBuilder newInstance(Vertex start) { - return new GremlinUnique(loader, source, start); + public QueryBuilder newInstance(Vertex start) { + return new GremlinUnique<>(loader, source, start); } @Override - protected QueryBuilder cloneQueryAtStep(int index) { + protected QueryBuilder cloneQueryAtStep(int index) { if (index == 0) { index = stepIndex; } @@ -132,6 +132,6 @@ public class GremlinUnique extends GremlinQueryBuilder { newList.add(this.list.get(i)); } - return new GremlinUnique(newList, loader, source, this); + return new GremlinUnique<>(newList, loader, source, this); } } diff --git a/aai-core/src/main/java/org/openecomp/aai/query/builder/QueryBuilder.java b/aai-core/src/main/java/org/openecomp/aai/query/builder/QueryBuilder.java index a9fa7cab..565e8682 100644 --- a/aai-core/src/main/java/org/openecomp/aai/query/builder/QueryBuilder.java +++ b/aai-core/src/main/java/org/openecomp/aai/query/builder/QueryBuilder.java @@ -29,6 +29,7 @@ import java.util.List; import javax.ws.rs.core.MultivaluedMap; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; +import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.openecomp.aai.exceptions.AAIException; @@ -42,7 +43,7 @@ import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException; /** * The Class QueryBuilder. */ -public abstract class QueryBuilder implements Iterator { +public abstract class QueryBuilder implements Iterator { protected QueryParserStrategy factory = null; @@ -82,7 +83,7 @@ public abstract class QueryBuilder implements Iterator { * @param value the value * @return the vertices by indexed property */ - public abstract QueryBuilder getVerticesByIndexedProperty(String key, Object value); + public abstract QueryBuilder getVerticesByIndexedProperty(String key, Object value); /** * Gets the vertices by property. @@ -91,7 +92,7 @@ public abstract class QueryBuilder implements Iterator { * @param value the value * @return the vertices by property */ - public abstract QueryBuilder getVerticesByProperty(String key, Object value); + public abstract QueryBuilder getVerticesByProperty(String key, Object value); /** * filters by all the values for this property @@ -99,7 +100,7 @@ public abstract class QueryBuilder implements Iterator { * @param values * @return vertices that match these values */ - public abstract QueryBuilder getVerticesByIndexedProperty(String key, List values); + public abstract QueryBuilder getVerticesByIndexedProperty(String key, List values); /** * filters by all the values for this property @@ -107,7 +108,7 @@ public abstract class QueryBuilder implements Iterator { * @param values * @return vertices that match these values */ - public abstract QueryBuilder getVerticesByProperty(String key, List values); + public abstract QueryBuilder getVerticesByProperty(String key, List values); /** * Gets the child vertices from parent. @@ -117,7 +118,7 @@ public abstract class QueryBuilder implements Iterator { * @param childType the child type * @return the child vertices from parent */ - public abstract QueryBuilder getChildVerticesFromParent(String parentKey, String parentValue, String childType); + public abstract QueryBuilder getChildVerticesFromParent(String parentKey, String parentValue, String childType); /** * Gets the typed vertices by map. @@ -126,7 +127,7 @@ public abstract class QueryBuilder implements Iterator { * @param map the map * @return the typed vertices by map */ - public abstract QueryBuilder getTypedVerticesByMap(String type, LinkedHashMap map); + public abstract QueryBuilder getTypedVerticesByMap(String type, LinkedHashMap map); /** * Creates the DB query. @@ -134,7 +135,7 @@ public abstract class QueryBuilder implements Iterator { * @param obj the obj * @return the query builder */ - public abstract QueryBuilder createDBQuery(Introspector obj); + public abstract QueryBuilder createDBQuery(Introspector obj); /** * Creates the key query. @@ -142,7 +143,7 @@ public abstract class QueryBuilder implements Iterator { * @param obj the obj * @return the query builder */ - public abstract QueryBuilder createKeyQuery(Introspector obj); + public abstract QueryBuilder createKeyQuery(Introspector obj); /** * Creates the container query. @@ -150,7 +151,7 @@ public abstract class QueryBuilder implements Iterator { * @param obj the obj * @return the query builder */ - public abstract QueryBuilder createContainerQuery(Introspector obj); + public abstract QueryBuilder createContainerQuery(Introspector obj); /** * Creates the edge traversal. @@ -159,7 +160,7 @@ public abstract class QueryBuilder implements Iterator { * @param child the child * @return the query builder */ - public abstract QueryBuilder createEdgeTraversal(EdgeType type, Introspector parent, Introspector child) throws AAIException; + public abstract QueryBuilder createEdgeTraversal(EdgeType type, Introspector parent, Introspector child) throws AAIException; /** * Creates the edge traversal. @@ -168,15 +169,16 @@ public abstract class QueryBuilder implements Iterator { * @param child the child * @return the query builder */ - public abstract QueryBuilder createEdgeTraversal(EdgeType type, Vertex parent, Introspector child) throws AAIException; + public abstract QueryBuilder createEdgeTraversal(EdgeType type, Vertex parent, Introspector child) throws AAIException; - public QueryBuilder createEdgeTraversal(EdgeType type, String outNodeType, String inNodeType) throws NoEdgeRuleFoundException, AAIException { + public QueryBuilder createEdgeTraversal(EdgeType type, String outNodeType, String inNodeType) throws NoEdgeRuleFoundException, AAIException { Introspector out = loader.introspectorFromName(outNodeType); Introspector in = loader.introspectorFromName(inNodeType); return createEdgeTraversal(type, out, in); } - + + public abstract QueryBuilder getEdgesBetween(EdgeType type, String outNodeType, String inNodeType) throws AAIException; /** * Creates the query from URI. * @@ -221,35 +223,35 @@ public abstract class QueryBuilder implements Iterator { * * @return the parent query */ - public abstract QueryBuilder getParentQuery(); + public abstract QueryBuilder getParentQuery(); /** * Gets the query. * * @return the query */ - public abstract T getQuery(); + public abstract E2 getQuery(); /** * Form boundary. */ public abstract void markParentBoundary(); - public abstract QueryBuilder limit(long amount); + public abstract QueryBuilder limit(long amount); /** * New instance. * * @param start the start * @return the query builder */ - public abstract QueryBuilder newInstance(Vertex start); + public abstract QueryBuilder newInstance(Vertex start); /** * New instance. * * @return the query builder */ - public abstract QueryBuilder newInstance(); + public abstract QueryBuilder newInstance(); /** * Gets the start. @@ -272,7 +274,7 @@ public abstract class QueryBuilder implements Iterator { * @param obj * @return */ - public abstract QueryBuilder exactMatchQuery(Introspector obj); + public abstract QueryBuilder exactMatchQuery(Introspector obj); /** * lets you join any number of QueryBuilders @@ -280,14 +282,14 @@ public abstract class QueryBuilder implements Iterator { * @param builder * @return */ - public abstract QueryBuilder union(QueryBuilder[] builder); + public abstract QueryBuilder union(QueryBuilder... builder); - public abstract QueryBuilder where(QueryBuilder[] builder); + public abstract QueryBuilder where(QueryBuilder... builder); public abstract void markContainer(); - public abstract QueryBuilder getContainerQuery(); + public abstract QueryBuilder getContainerQuery(); - public abstract List toList(); + public abstract List toList(); } diff --git a/aai-core/src/main/java/org/openecomp/aai/query/builder/TraversalQuery.java b/aai-core/src/main/java/org/openecomp/aai/query/builder/TraversalQuery.java index 42934023..628e055e 100644 --- a/aai-core/src/main/java/org/openecomp/aai/query/builder/TraversalQuery.java +++ b/aai-core/src/main/java/org/openecomp/aai/query/builder/TraversalQuery.java @@ -40,7 +40,7 @@ import org.openecomp.aai.parsers.query.TraversalStrategy; /** * The Class TraversalQuery. */ -public class TraversalQuery extends GraphTraversalBuilder { +public class TraversalQuery extends GraphTraversalBuilder { /** * Instantiates a new traversal query. @@ -63,7 +63,7 @@ public class TraversalQuery extends GraphTraversalBuilder { this.factory = new TraversalStrategy(this.loader, this); } - protected TraversalQuery(GraphTraversal traversal, Loader loader, GraphTraversalSource source, GraphTraversalBuilder gtb) { + protected TraversalQuery(GraphTraversal traversal, Loader loader, GraphTraversalSource source, GraphTraversalBuilder gtb) { super(loader, source); this.traversal = traversal; this.stepIndex = gtb.getStepIndex(); @@ -110,41 +110,41 @@ public class TraversalQuery extends GraphTraversalBuilder { * @{inheritDoc} */ @Override - public QueryBuilder newInstance(Vertex start) { - return new TraversalQuery(loader, source, start); + public QueryBuilder newInstance(Vertex start) { + return new TraversalQuery<>(loader, source, start); } /** * @{inheritDoc} */ @Override - public QueryBuilder newInstance() { - return new TraversalQuery(loader, source); + public QueryBuilder newInstance() { + return new TraversalQuery<>(loader, source); } @Override - protected QueryBuilder cloneQueryAtStep(int index) { + protected QueryBuilder cloneQueryAtStep(int index) { if (index == 0) { index = stepIndex; } - GraphTraversal clone = this.traversal.asAdmin().clone(); - GraphTraversal.Admin cloneAdmin = clone.asAdmin(); + GraphTraversal clone = this.traversal.asAdmin().clone(); + GraphTraversal.Admin cloneAdmin = clone.asAdmin(); List steps = cloneAdmin.getSteps(); for (int i = steps.size()-1; i >= index; i--) { cloneAdmin.removeStep(i); } - return new TraversalQuery(cloneAdmin, loader, source, this); + return new TraversalQuery<>(cloneAdmin, loader, source, this); } @Override - protected QueryBuilder removeQueryStepsBetween(int start, int end) { - GraphTraversal clone = this.traversal.asAdmin().clone(); - GraphTraversal.Admin cloneAdmin = clone.asAdmin(); + protected QueryBuilder removeQueryStepsBetween(int start, int end) { + GraphTraversal clone = this.traversal.asAdmin().clone(); + GraphTraversal.Admin cloneAdmin = clone.asAdmin(); for (int i = end-2; i >= start; i--) { cloneAdmin.removeStep(i); } - return new TraversalQuery(cloneAdmin, loader, source, this); + return new TraversalQuery<>(cloneAdmin, loader, source, this); } } diff --git a/aai-core/src/main/java/org/openecomp/aai/rest/RestTokens.java b/aai-core/src/main/java/org/openecomp/aai/rest/RestTokens.java new file mode 100644 index 00000000..13bfe650 --- /dev/null +++ b/aai-core/src/main/java/org/openecomp/aai/rest/RestTokens.java @@ -0,0 +1,36 @@ +/*- + * ============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; + +public enum RestTokens { + + COUSIN("related-to"); + private final String name; + + private RestTokens(String name) { + this.name = name; + } + + @Override + public String toString() { + return name; + } +} diff --git a/aai-core/src/main/java/org/openecomp/aai/restcore/RESTAPI.java b/aai-core/src/main/java/org/openecomp/aai/restcore/RESTAPI.java index 4f462273..e5ab80e6 100644 --- a/aai-core/src/main/java/org/openecomp/aai/restcore/RESTAPI.java +++ b/aai-core/src/main/java/org/openecomp/aai/restcore/RESTAPI.java @@ -20,31 +20,46 @@ package org.openecomp.aai.restcore; -import com.att.eelf.configuration.EELFLogger; -import com.att.eelf.configuration.EELFManager; -import com.google.common.base.Joiner; +import java.io.StringReader; +import java.io.UnsupportedEncodingException; +import java.net.URI; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.UriInfo; +import javax.xml.bind.JAXBException; +import javax.xml.transform.stream.StreamSource; + +import org.eclipse.persistence.dynamic.DynamicEntity; +import org.eclipse.persistence.jaxb.JAXBUnmarshaller; +import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext; + import org.openecomp.aai.db.props.AAIProperties; import org.openecomp.aai.dbmap.DBConnectionType; +import org.openecomp.aai.domain.model.AAIResource; import org.openecomp.aai.exceptions.AAIException; import org.openecomp.aai.introspection.Introspector; import org.openecomp.aai.introspection.Loader; -import org.openecomp.aai.introspection.tools.*; +import org.openecomp.aai.introspection.tools.CreateUUID; +import org.openecomp.aai.introspection.tools.DefaultFields; +import org.openecomp.aai.introspection.tools.InjectKeysFromURI; +import org.openecomp.aai.introspection.tools.IntrospectorValidator; +import org.openecomp.aai.introspection.tools.Issue; +import org.openecomp.aai.introspection.tools.RemoveNonVisibleProperty; import org.openecomp.aai.logging.ErrorLogHelper; +import org.openecomp.aai.logging.LoggingContext; import org.openecomp.aai.util.AAIConfig; import org.openecomp.aai.util.AAIConstants; import org.openecomp.aai.util.AAITxnLog; - -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; +import com.google.common.base.Joiner; /** @@ -79,7 +94,7 @@ public class RESTAPI { * @return the from app id * @throws AAIException the AAI exception */ - protected String getFromAppId(HttpHeaders headers) throws AAIException { + protected String getFromAppId(HttpHeaders headers) throws AAIException { String fromAppId = null; if (headers != null) { List fromAppIdHeader = headers.getRequestHeader("X-FromAppId"); @@ -93,7 +108,9 @@ public class RESTAPI { if (fromAppId == null) { throw new AAIException("AAI_4009"); } - + + LoggingContext.partnerName(fromAppId); + return fromAppId; } @@ -105,7 +122,7 @@ public class RESTAPI { * @return the trans id * @throws AAIException the AAI exception */ - protected String getTransId(HttpHeaders headers) throws AAIException { + protected String getTransId(HttpHeaders headers) throws AAIException { String transId = null; if (headers != null) { List transIdHeader = headers.getRequestHeader("X-TransactionId"); @@ -119,7 +136,9 @@ public class RESTAPI { if (transId == null) { throw new AAIException("AAI_4010"); } - + + LoggingContext.requestId(transId); + return transId; } @@ -233,7 +252,7 @@ public class RESTAPI { * @throws AAIException the AAI exception */ protected int setDepth(String depthParam) throws AAIException { - int depth = AAIProperties.MAXIMUM_DEPTH; //default + int depth = AAIProperties.MAXIMUM_DEPTH; //default if (depthParam != null && depthParam.length() > 0 && !depthParam.equals("all")){ try { depth = Integer.valueOf(depthParam); diff --git a/aai-core/src/main/java/org/openecomp/aai/restcore/search/GremlinGroovyShellSingleton.java b/aai-core/src/main/java/org/openecomp/aai/restcore/search/GremlinGroovyShellSingleton.java index e722e092..b098dcc4 100644 --- a/aai-core/src/main/java/org/openecomp/aai/restcore/search/GremlinGroovyShellSingleton.java +++ b/aai-core/src/main/java/org/openecomp/aai/restcore/search/GremlinGroovyShellSingleton.java @@ -58,7 +58,9 @@ public class GremlinGroovyShellSingleton { imports.addImports( "org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__", "org.apache.tinkerpop.gremlin.structure.T", - "org.apache.tinkerpop.gremlin.process.traversal.P"); + "org.apache.tinkerpop.gremlin.process.traversal.P", + "java.util.Map.Entry"); + imports.addStarImports("java.util"); CompilerConfiguration config = new CompilerConfiguration(); config.addCompilationCustomizers(custom, imports); diff --git a/aai-core/src/main/java/org/openecomp/aai/serialization/db/DBSerializer.java b/aai-core/src/main/java/org/openecomp/aai/serialization/db/DBSerializer.java index d5ae54d7..5f59a931 100644 --- a/aai-core/src/main/java/org/openecomp/aai/serialization/db/DBSerializer.java +++ b/aai-core/src/main/java/org/openecomp/aai/serialization/db/DBSerializer.java @@ -21,19 +21,46 @@ package org.openecomp.aai.serialization.db; -import com.att.eelf.configuration.EELFLogger; -import com.att.eelf.configuration.EELFManager; -import com.google.common.base.CaseFormat; -import com.thinkaurelius.titan.core.SchemaViolationException; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Array; +import java.lang.reflect.InvocationTargetException; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; + +import javax.ws.rs.core.UriBuilder; + import org.apache.commons.collections.IteratorUtils; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__; import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree; -import org.apache.tinkerpop.gremlin.structure.*; +import org.apache.tinkerpop.gremlin.structure.Direction; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.apache.tinkerpop.gremlin.structure.Element; +import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.apache.tinkerpop.gremlin.structure.VertexProperty; import org.javatuples.Pair; + import org.openecomp.aai.db.props.AAIProperties; import org.openecomp.aai.exceptions.AAIException; -import org.openecomp.aai.introspection.*; +import org.openecomp.aai.introspection.Introspector; +import org.openecomp.aai.introspection.IntrospectorFactory; +import org.openecomp.aai.introspection.Loader; +import org.openecomp.aai.introspection.LoaderFactory; +import org.openecomp.aai.introspection.ModelType; +import org.openecomp.aai.introspection.PropertyPredicates; +import org.openecomp.aai.introspection.Version; import org.openecomp.aai.introspection.exceptions.AAIUnknownObjectException; import org.openecomp.aai.introspection.sideeffect.DataCopy; import org.openecomp.aai.introspection.sideeffect.DataLinkReader; @@ -53,19 +80,10 @@ import org.openecomp.aai.util.AAIApiServerURLBase; import org.openecomp.aai.util.AAIConfig; import org.openecomp.aai.util.AAIConstants; import org.openecomp.aai.workarounds.NamingExceptions; - -import javax.ws.rs.core.UriBuilder; -import java.io.UnsupportedEncodingException; -import java.lang.reflect.Array; -import java.lang.reflect.InvocationTargetException; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.*; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Future; +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; +import com.google.common.base.CaseFormat; +import com.thinkaurelius.titan.core.SchemaViolationException; public class DBSerializer { @@ -88,7 +106,7 @@ public class DBSerializer { * @param introspectionType the introspection type * @param sourceOfTruth the source of truth * @param llBuilder the ll builder - * @throws AAIException + * @throws AAIException */ public DBSerializer(Version version, TransactionalGraphEngine engine, ModelType introspectionType, String sourceOfTruth) throws AAIException { this.engine = engine; @@ -179,7 +197,7 @@ public class DBSerializer { * @throws NoSuchMethodException the no such method exception * @throws AAIException the AAI exception * @throws UnsupportedEncodingException the unsupported encoding exception - * @throws AAIUnknownObjectException + * @throws AAIUnknownObjectException */ public void serializeToDb(Introspector obj, Vertex v, QueryParser uriQuery, String identifier, String requestContext) throws AAIException, UnsupportedEncodingException { @@ -240,7 +258,7 @@ public class DBSerializer { * @throws SecurityException the security exception * @throws AAIException the AAI exception * @throws UnsupportedEncodingException the unsupported encoding exception - * @throws AAIUnknownObjectException + * @throws AAIUnknownObjectException */ /* * Helper method for reflectToDb @@ -435,7 +453,7 @@ public class DBSerializer { * * @param v the v * @param obj the obj - * @throws AAIUnknownObjectException + * @throws AAIUnknownObjectException */ private void writeThroughDefaults(Vertex v, Introspector obj) throws AAIUnknownObjectException { Introspector latest = this.latestLoader.introspectorFromName(obj.getName()); @@ -472,7 +490,7 @@ public class DBSerializer { * @throws SecurityException the security exception * @throws AAIException the AAI exception * @throws UnsupportedEncodingException the unsupported encoding exception - * @throws AAIUnknownObjectException + * @throws AAIUnknownObjectException */ private Vertex reflectDependentVertex(Vertex v, Introspector dependentObj, String requestContext) throws AAIException, UnsupportedEncodingException { @@ -512,13 +530,15 @@ public class DBSerializer { * @throws SecurityException the security exception * @throws AAIException the AAI exception * @throws UnsupportedEncodingException the unsupported encoding exception - * @throws AAIUnknownObjectException + * @throws AAIUnknownObjectException */ private Vertex reflectDependentVertex(Vertex parent, Vertex child, Introspector obj, String requestContext) throws AAIException, UnsupportedEncodingException { String parentUri = parent.property(AAIProperties.AAI_URI).orElse(null); if (parentUri != null) { - child.property(AAIProperties.AAI_URI, parentUri + obj.getURI()); + String uri; + uri = obj.getURI(); + child.property(AAIProperties.AAI_URI, parentUri + uri); } processObject(obj, child, requestContext); @@ -555,7 +575,7 @@ public class DBSerializer { * @throws NoSuchMethodException the no such method exception * @throws UnsupportedEncodingException the unsupported encoding exception * @throws MalformedURLException the malformed URL exception - * @throws AAIUnknownObjectException + * @throws AAIUnknownObjectException * @throws URISyntaxException */ public Introspector dbToObject(List vertices, final Introspector obj, int depth, boolean nodeOnly, String cleanUp) throws UnsupportedEncodingException, AAIException { @@ -639,7 +659,7 @@ public class DBSerializer { * @throws UnsupportedEncodingException the unsupported encoding exception * @throws AAIException the AAI exception * @throws MalformedURLException the malformed URL exception - * @throws AAIUnknownObjectException + * @throws AAIUnknownObjectException * @throws URISyntaxException */ private Introspector dbToObject(Introspector obj, Vertex v, Set seen, int depth, boolean nodeOnly, String cleanUp) throws AAIException, UnsupportedEncodingException { @@ -696,7 +716,7 @@ public class DBSerializer { //vertices = this.queryEngine.findRelatedVertices(v, Direction.OUT, rule.getLabel(), childDbName); Direction ruleDirection = rule.getDirection(); Iterator itr = v.vertices(ruleDirection, rule.getLabel()); - List verticesList = (List) IteratorUtils.toList(itr); + List verticesList = (List)IteratorUtils.toList(itr); itr = verticesList.stream().filter(item -> { return item.property(AAIProperties.NODE_TYPE).orElse("").equals(childDbName); }).iterator(); @@ -754,7 +774,7 @@ public class DBSerializer { } - public Introspector getVertexProperties(Vertex v) throws AAIException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, SecurityException, InstantiationException, NoSuchMethodException, UnsupportedEncodingException, AAIUnknownObjectException, URISyntaxException { + public Introspector getVertexProperties(Vertex v) throws AAIException, UnsupportedEncodingException { String nodeType = v.property(AAIProperties.NODE_TYPE).orElse(null); if (nodeType == null) { throw new AAIException("AAI_6143"); @@ -769,7 +789,7 @@ public class DBSerializer { return obj; } - public Introspector getLatestVersionView(Vertex v) throws AAIException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, SecurityException, InstantiationException, NoSuchMethodException, UnsupportedEncodingException, AAIUnknownObjectException, URISyntaxException { + public Introspector getLatestVersionView(Vertex v) throws AAIException, UnsupportedEncodingException { String nodeType = v.property(AAIProperties.NODE_TYPE).orElse(null); if (nodeType == null) { throw new AAIException("AAI_6143"); @@ -892,7 +912,7 @@ public class DBSerializer { * @throws UnsupportedEncodingException the unsupported encoding exception * @throws AAIException the AAI exception * @throws MalformedURLException the malformed URL exception - * @throws AAIUnknownObjectException + * @throws AAIUnknownObjectException * @throws URISyntaxException */ private Object processEdgeRelationship(Introspector relationshipObj, Vertex cousin, String cleanUp) throws UnsupportedEncodingException, AAIUnknownObjectException { @@ -940,7 +960,7 @@ public class DBSerializer { * @throws NoSuchMethodException the no such method exception * @throws SecurityException the security exception * @throws UnsupportedEncodingException the unsupported encoding exception - * @throws AAIUnknownObjectException + * @throws AAIUnknownObjectException */ public URI getURIForVertex(Vertex v) throws UnsupportedEncodingException { @@ -992,7 +1012,7 @@ public class DBSerializer { * @throws InvocationTargetException the invocation target exception * @throws NoSuchMethodException the no such method exception * @throws SecurityException the security exception - * @throws AAIUnknownObjectException + * @throws AAIUnknownObjectException */ private Pair> getParents(Loader loader, Vertex start, boolean removeDamaged) { @@ -1069,7 +1089,7 @@ public class DBSerializer { /** * Adds the r - * @throws AAIUnknownObjectException + * @throws AAIUnknownObjectException * @throws IllegalArgumentException elated to property. * * @param relationship the relationship @@ -1154,7 +1174,7 @@ public class DBSerializer { * @param bVertex the in vertex * @return the edges between * @throws AAIException the AAI exception - * @throws NoEdgeRuleFoundException + * @throws NoEdgeRuleFoundException */ private List getEdgesBetween(EdgeType type, Vertex aVertex, Vertex bVertex) throws AAIException, NoEdgeRuleFoundException { @@ -1183,9 +1203,9 @@ public class DBSerializer { * @param bVertex the in vertex * @return the edge between * @throws AAIException the AAI exception - * @throws NoEdgeRuleFoundException + * @throws NoEdgeRuleFoundException */ - private Edge getEdgeBetween(EdgeType type, Vertex aVertex, Vertex bVertex) throws AAIException { + public Edge getEdgeBetween(EdgeType type, Vertex aVertex, Vertex bVertex) throws AAIException { @@ -1314,8 +1334,8 @@ public class DBSerializer { if (enableResourceVersion && !this.verifyResourceVersion("delete", nodeType, vertex.property(AAIProperties.RESOURCE_VERSION).orElse(null), resourceVersion, nodeType)) { } semantic = edgeRules.getDeleteSemantic(nodeType); - inEdges = (List) IteratorUtils.toList(vertex.edges(Direction.IN)); - outEdges = (List) IteratorUtils.toList(vertex.edges(Direction.OUT)); + inEdges = (List)IteratorUtils.toList(vertex.edges(Direction.IN)); + outEdges = (List)IteratorUtils.toList(vertex.edges(Direction.OUT)); if (semantic.equals(DeleteSemantic.CASCADE_TO_CHILDREN)) { result = true; } else if (semantic.equals(DeleteSemantic.ERROR_IF_ANY_EDGES)) { @@ -1380,7 +1400,7 @@ public class DBSerializer { if (!result) { - throw new AAIException(aaiExceptionCode, errorDetail); + throw new AAIException(aaiExceptionCode, errorDetail); } return result; } @@ -1426,7 +1446,7 @@ public class DBSerializer { aaiExceptionCode = "AAI_6131"; } - throw new AAIException(aaiExceptionCode, errorDetail); + throw new AAIException(aaiExceptionCode, errorDetail); } } @@ -1478,7 +1498,7 @@ public class DBSerializer { runner.execute(obj, self); } - private void enrichData(Introspector obj, Vertex self) throws AAIException { + private void enrichData(Introspector obj, Vertex self) throws AAIException { SideEffectRunner runner = new SideEffectRunner .Builder(this.engine, this).addSideEffect(DataLinkReader.class).build(); diff --git a/aai-core/src/main/java/org/openecomp/aai/serialization/db/EdgeRules.java b/aai-core/src/main/java/org/openecomp/aai/serialization/db/EdgeRules.java index 2a34262b..9e4e8396 100644 --- a/aai-core/src/main/java/org/openecomp/aai/serialization/db/EdgeRules.java +++ b/aai-core/src/main/java/org/openecomp/aai/serialization/db/EdgeRules.java @@ -25,6 +25,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Optional; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__; @@ -35,6 +36,7 @@ import org.apache.tinkerpop.gremlin.structure.Vertex; import org.openecomp.aai.db.props.AAIProperties; import org.openecomp.aai.dbmodel.DbEdgeRules; import org.openecomp.aai.exceptions.AAIException; +import org.openecomp.aai.serialization.db.exceptions.EdgeMultiplicityException; import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; @@ -82,7 +84,7 @@ public class EdgeRules { * @throws NoEdgeRuleFoundException */ public Edge addTreeEdge(GraphTraversalSource traversalSource, Vertex aVertex, Vertex bVertex) throws AAIException { - return this.addEdge(EdgeType.TREE, traversalSource, aVertex, bVertex); + return this.addEdge(EdgeType.TREE, traversalSource, aVertex, bVertex, false); } /** @@ -95,7 +97,33 @@ public class EdgeRules { * @throws NoEdgeRuleFoundException */ public Edge addEdge(GraphTraversalSource traversalSource, Vertex aVertex, Vertex bVertex) throws AAIException { - return this.addEdge(EdgeType.COUSIN, traversalSource, aVertex, bVertex); + return this.addEdge(EdgeType.COUSIN, traversalSource, aVertex, bVertex, false); + } + + /** + * Adds the tree edge. + * + * @param aVertex the out vertex + * @param bVertex the in vertex + * @return the edge + * @throws AAIException the AAI exception + * @throws NoEdgeRuleFoundException + */ + public Edge addTreeEdgeIfPossible(GraphTraversalSource traversalSource, Vertex aVertex, Vertex bVertex) throws AAIException { + return this.addEdge(EdgeType.TREE, traversalSource, aVertex, bVertex, true); + } + + /** + * Adds the edge. + * + * @param aVertex the out vertex + * @param bVertex the in vertex + * @return the edge + * @throws AAIException the AAI exception + * @throws NoEdgeRuleFoundException + */ + public Edge addEdgeIfPossible(GraphTraversalSource traversalSource, Vertex aVertex, Vertex bVertex) throws AAIException { + return this.addEdge(EdgeType.COUSIN, traversalSource, aVertex, bVertex, true); } /** @@ -108,12 +136,18 @@ public class EdgeRules { * @throws AAIException the AAI exception * @throws NoEdgeRuleFoundException */ - private Edge addEdge(EdgeType type, GraphTraversalSource traversalSource, Vertex aVertex, Vertex bVertex) throws AAIException, NoEdgeRuleFoundException { + private Edge addEdge(EdgeType type, GraphTraversalSource traversalSource, Vertex aVertex, Vertex bVertex, boolean isBestEffort) throws AAIException, NoEdgeRuleFoundException { EdgeRule rule = this.getEdgeRule(type, aVertex, bVertex); Edge e = null; - if (this.validateMultiplicity(rule, traversalSource, aVertex, bVertex)) { + + Optional message = this.validateMultiplicity(rule, traversalSource, aVertex, bVertex); + + if (message.isPresent() && !isBestEffort) { + throw new EdgeMultiplicityException(message.get()); + } + if (!message.isPresent()) { if (rule.getDirection().equals(Direction.OUT)) { e = aVertex.addEdge(rule.getLabel(), bVertex); } else if (rule.getDirection().equals(Direction.IN)) { @@ -319,7 +353,7 @@ public class EdgeRules { * @return true, if successful * @throws AAIException the AAI exception */ - private boolean validateMultiplicity(EdgeRule rule, GraphTraversalSource traversalSource, Vertex aVertex, Vertex bVertex) throws AAIException { + private Optional validateMultiplicity(EdgeRule rule, GraphTraversalSource traversalSource, Vertex aVertex, Vertex bVertex) { if (rule.getDirection().equals(Direction.OUT)) { @@ -353,11 +387,12 @@ public class EdgeRules { } if (!detail.equals("")) { - throw new AAIException("AAI_6140", detail); + return Optional.of(detail); + } else { + return Optional.empty(); } - return true; - + } public Multimap getAllRules() throws AAIException { diff --git a/aai-core/src/main/java/org/openecomp/aai/serialization/db/exceptions/EdgeMultiplicityException.java b/aai-core/src/main/java/org/openecomp/aai/serialization/db/exceptions/EdgeMultiplicityException.java new file mode 100644 index 00000000..081a2d62 --- /dev/null +++ b/aai-core/src/main/java/org/openecomp/aai/serialization/db/exceptions/EdgeMultiplicityException.java @@ -0,0 +1,40 @@ +/*- + * ============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.serialization.db.exceptions; + +import org.openecomp.aai.exceptions.AAIException; + +public class EdgeMultiplicityException extends AAIException { + + private static final long serialVersionUID = -5575661036426538012L; + + public EdgeMultiplicityException(String message) { + super("AAI_6140", message); + } + + public EdgeMultiplicityException(Throwable cause) { + super("AAI_6140",cause); + } + + public EdgeMultiplicityException(String message, Throwable cause) { + super("AAI_6140", cause, message); + } +} diff --git a/aai-core/src/main/java/org/openecomp/aai/serialization/engines/TransactionalGraphEngine.java b/aai-core/src/main/java/org/openecomp/aai/serialization/engines/TransactionalGraphEngine.java index ca12eabd..3f259aed 100644 --- a/aai-core/src/main/java/org/openecomp/aai/serialization/engines/TransactionalGraphEngine.java +++ b/aai-core/src/main/java/org/openecomp/aai/serialization/engines/TransactionalGraphEngine.java @@ -44,7 +44,7 @@ public abstract class TransactionalGraphEngine { protected GraphSingleton singleton = null; protected QueryEngine queryEngine = null; - protected QueryBuilder queryBuilder = null; + protected QueryBuilder queryBuilder = null; protected QueryStyle style = null; protected final DBConnectionType connectionType; protected final Loader loader; @@ -141,19 +141,19 @@ public abstract class TransactionalGraphEngine { * * @return the query builder */ - public QueryBuilder getQueryBuilder() { + public QueryBuilder getQueryBuilder() { return getQueryBuilder(this.loader); } - public QueryBuilder getQueryBuilder(Loader loader) { + public QueryBuilder getQueryBuilder(Loader loader) { if (style.equals(QueryStyle.GREMLIN_TRAVERSAL)) { - return new GremlinTraversal(loader, this.asAdmin().getTraversalSource()); + return new GremlinTraversal<>(loader, this.asAdmin().getTraversalSource()); } else if (style.equals(QueryStyle.GREMLIN_UNIQUE)) { - return new GremlinUnique(loader, this.asAdmin().getTraversalSource()); + return new GremlinUnique<>(loader, this.asAdmin().getTraversalSource()); } else if (style.equals(QueryStyle.GREMLINPIPELINE_TRAVERSAL)) { //return new GremlinPipelineTraversal(loader); } else if (style.equals(QueryStyle.TRAVERSAL)) { - return new TraversalQuery(loader, this.asAdmin().getTraversalSource()); + return new TraversalQuery<>(loader, this.asAdmin().getTraversalSource()); } else { throw new IllegalArgumentException("Query Builder type not recognized"); } @@ -165,19 +165,19 @@ public abstract class TransactionalGraphEngine { * @param start the start * @return the query builder */ - public QueryBuilder getQueryBuilder(Vertex start) { + public QueryBuilder getQueryBuilder(Vertex start) { return getQueryBuilder(this.loader, start); } - public QueryBuilder getQueryBuilder(Loader loader, Vertex start) { + public QueryBuilder getQueryBuilder(Loader loader, Vertex start) { if (style.equals(QueryStyle.GREMLIN_TRAVERSAL)) { - return new GremlinTraversal(loader, this.asAdmin().getTraversalSource(), start); + return new GremlinTraversal<>(loader, this.asAdmin().getTraversalSource(), start); } else if (style.equals(QueryStyle.GREMLIN_UNIQUE)) { - return new GremlinUnique(loader, this.asAdmin().getTraversalSource(), start); + return new GremlinUnique<>(loader, this.asAdmin().getTraversalSource(), start); } else if (style.equals(QueryStyle.GREMLINPIPELINE_TRAVERSAL)) { //return new GremlinPipelineTraversal(loader,start); } else if (style.equals(QueryStyle.TRAVERSAL)) { - return new TraversalQuery(loader, this.asAdmin().getTraversalSource(), start); + return new TraversalQuery<>(loader, this.asAdmin().getTraversalSource(), start); } else { throw new IllegalArgumentException("Query Builder type not recognized"); } diff --git a/aai-core/src/main/java/org/openecomp/aai/serialization/engines/query/GraphTraversalQueryEngine.java b/aai-core/src/main/java/org/openecomp/aai/serialization/engines/query/GraphTraversalQueryEngine.java index 926998f3..7144aa69 100644 --- a/aai-core/src/main/java/org/openecomp/aai/serialization/engines/query/GraphTraversalQueryEngine.java +++ b/aai-core/src/main/java/org/openecomp/aai/serialization/engines/query/GraphTraversalQueryEngine.java @@ -88,6 +88,15 @@ public class GraphTraversalQueryEngine extends QueryEngine { return pipe.toList(); } + + public List findChildren(Vertex start) { + GraphTraversal pipe = this.g.V(start).union( + __.outE().has("isParent", true), + __.inE().has("isParent-REV", true) + ).otherV().dedup(); + + return pipe.toList(); + } /** * {@inheritDoc} diff --git a/aai-core/src/main/java/org/openecomp/aai/serialization/engines/query/GremlinPipelineQueryEngine.java b/aai-core/src/main/java/org/openecomp/aai/serialization/engines/query/GremlinPipelineQueryEngine.java index 1d757428..a690ff65 100644 --- a/aai-core/src/main/java/org/openecomp/aai/serialization/engines/query/GremlinPipelineQueryEngine.java +++ b/aai-core/src/main/java/org/openecomp/aai/serialization/engines/query/GremlinPipelineQueryEngine.java @@ -25,7 +25,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import org.openecomp.aai.db.props.AAIProperties; +import org.openecomp.aai.db.AAIProperties; import org.openecomp.aai.query.builder.QueryBuilder; import org.openecomp.aai.serialization.engines.TransactionalGraphEngine; import com.tinkerpop.blueprints.Direction; diff --git a/aai-core/src/main/java/org/openecomp/aai/serialization/engines/query/QueryEngine.java b/aai-core/src/main/java/org/openecomp/aai/serialization/engines/query/QueryEngine.java index 0285fbd5..f77f726d 100644 --- a/aai-core/src/main/java/org/openecomp/aai/serialization/engines/query/QueryEngine.java +++ b/aai-core/src/main/java/org/openecomp/aai/serialization/engines/query/QueryEngine.java @@ -62,6 +62,8 @@ public abstract class QueryEngine { public abstract List findAllChildren(Vertex start); public abstract List findChildrenOfType(Vertex start, String type); + + public abstract List findChildren(Vertex start); /** * Find deletable. * diff --git a/aai-core/src/main/java/org/openecomp/aai/serialization/queryformats/Formatter.java b/aai-core/src/main/java/org/openecomp/aai/serialization/queryformats/Formatter.java index feb8893c..783d52e1 100644 --- a/aai-core/src/main/java/org/openecomp/aai/serialization/queryformats/Formatter.java +++ b/aai-core/src/main/java/org/openecomp/aai/serialization/queryformats/Formatter.java @@ -20,16 +20,16 @@ package org.openecomp.aai.serialization.queryformats; +import java.util.List; +import java.util.Optional; +import java.util.stream.Stream; + +import org.openecomp.aai.serialization.queryformats.exceptions.AAIFormatVertexException; import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.JsonParser; -import org.openecomp.aai.serialization.queryformats.exceptions.AAIFormatVertexException; - -import java.util.List; -import java.util.Optional; -import java.util.stream.Stream; public class Formatter { @@ -37,7 +37,7 @@ public class Formatter { protected JsonParser parser = new JsonParser(); protected final FormatMapper format; - public Formatter(FormatMapper format) { + public Formatter (FormatMapper format) { this.format = format; } @@ -50,7 +50,7 @@ public class Formatter { } else { stream = vertices.stream(); } - + final boolean isParallel = stream.isParallel(); stream.map(v -> { try { return Optional.of(format.formatObject(v)); @@ -61,7 +61,11 @@ public class Formatter { return Optional.empty(); }).forEach(obj -> { if (obj.isPresent()) { - synchronized (body) { + if (isParallel) { + synchronized (body) { + body.add(obj.get()); + } + } else { body.add(obj.get()); } } diff --git a/aai-core/src/main/java/org/openecomp/aai/util/AAIConfig.java b/aai-core/src/main/java/org/openecomp/aai/util/AAIConfig.java index bea50db9..9fcb521d 100644 --- a/aai-core/src/main/java/org/openecomp/aai/util/AAIConfig.java +++ b/aai-core/src/main/java/org/openecomp/aai/util/AAIConfig.java @@ -20,12 +20,6 @@ package org.openecomp.aai.util; -import com.att.eelf.configuration.EELFLogger; -import com.att.eelf.configuration.EELFManager; -import org.eclipse.jetty.util.security.Password; -import org.openecomp.aai.exceptions.AAIException; -import org.openecomp.aai.logging.ErrorLogHelper; - import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; @@ -36,6 +30,13 @@ import java.util.HashMap; import java.util.Properties; import java.util.Timer; +import org.eclipse.jetty.util.security.Password; + +import org.openecomp.aai.exceptions.AAIException; +import org.openecomp.aai.logging.ErrorLogHelper; +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; + public class AAIConfig { @@ -59,7 +60,7 @@ public class AAIConfig { * * @throws AAIException the AAI exception */ - public synchronized static void init() throws AAIException { + public synchronized static void init() throws AAIException{ LOGGER.info("Initializing AAIConfig"); ArrayList genericVnfBools = new ArrayList(); @@ -89,7 +90,7 @@ public class AAIConfig { AAIConfig.getConfigFile(); AAIConfig.reloadConfig(); - if (AAIConstants.AAI_NODENAME == null || AAIConstants.AAI_NODENAME == "") { + if (AAIConstants.AAI_NODENAME == null || AAIConstants.AAI_NODENAME == "") { ErrorLogHelper.logError("AAI_4005", " AAI_NODENAME is not defined"); } else { LOGGER.info("A&AI Server Node Name = " + AAIConstants.AAI_NODENAME); @@ -217,7 +218,7 @@ public class AAIConfig { * @return the int * @throws AAIException the AAI exception */ - public static int getInt(String key) throws AAIException { + public static int getInt(String key) throws AAIException{ return Integer.valueOf(AAIConfig.get(key)); } diff --git a/aai-core/src/main/java/org/openecomp/aai/util/AAITxnLog.java b/aai-core/src/main/java/org/openecomp/aai/util/AAITxnLog.java index eeef94e7..0da84840 100644 --- a/aai-core/src/main/java/org/openecomp/aai/util/AAITxnLog.java +++ b/aai-core/src/main/java/org/openecomp/aai/util/AAITxnLog.java @@ -20,29 +20,35 @@ package org.openecomp.aai.util; -import com.att.eelf.configuration.EELFLogger; -import com.att.eelf.configuration.EELFManager; +import java.io.IOException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + import org.apache.hadoop.hbase.HBaseConfiguration; -import org.apache.hadoop.hbase.client.*; +import org.apache.hadoop.hbase.client.Get; +import org.apache.hadoop.hbase.client.HTable; +import org.apache.hadoop.hbase.client.Put; +import org.apache.hadoop.hbase.client.Result; +import org.apache.hadoop.hbase.client.ResultScanner; +import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp; import org.apache.hadoop.hbase.filter.Filter; import org.apache.hadoop.hbase.filter.FilterList; import org.apache.hadoop.hbase.filter.RegexStringComparator; import org.apache.hadoop.hbase.filter.SingleColumnValueFilter; import org.apache.hadoop.hbase.util.Bytes; + import org.openecomp.aai.domain.notificationEvent.NotificationEvent; import org.openecomp.aai.domain.translog.TransactionLogEntries; import org.openecomp.aai.domain.translog.TransactionLogEntry; import org.openecomp.aai.exceptions.AAIException; +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; -import java.io.IOException; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class AAITxnLog { +public class AAITxnLog { private static final EELFLogger LOGGER = EELFManager.getInstance().getLogger(AAITxnLog.class); @@ -340,8 +346,8 @@ public class AAITxnLog { * @param fromAppIdFilter the from app id filter * @return the transaction log entries */ - public TransactionLogEntries scanFiltered(long startMillis, long endMillis, List methodList, - String putFilter, String getFilter, String resourceFilter, String fromAppIdFilter) { + public TransactionLogEntries scanFiltered(long startMillis, long endMillis, List methodList, + String putFilter, String getFilter, String resourceFilter, String fromAppIdFilter) { LOGGER.debug("Starting scanFiltered()"); diff --git a/aai-core/src/main/java/org/openecomp/aai/util/HttpsAuthClient.java b/aai-core/src/main/java/org/openecomp/aai/util/HttpsAuthClient.java new file mode 100644 index 00000000..85225041 --- /dev/null +++ b/aai-core/src/main/java/org/openecomp/aai/util/HttpsAuthClient.java @@ -0,0 +1,140 @@ +/*- + * ============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.util; + +import java.io.FileInputStream; +import java.security.KeyManagementException; +import java.security.KeyStore; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSession; + +import org.openecomp.aai.domain.yang.Customers; +import com.sun.jersey.api.client.Client; +import com.sun.jersey.api.client.ClientResponse; +import com.sun.jersey.api.client.config.ClientConfig; +import com.sun.jersey.api.client.config.DefaultClientConfig; +import com.sun.jersey.api.client.filter.LoggingFilter; +import com.sun.jersey.api.json.JSONConfiguration; +import com.sun.jersey.client.urlconnection.HTTPSProperties; + +public class HttpsAuthClient{ + + /** + * The main method. + * + * @param args the arguments + */ + public static void main(String[] args) { + try { + String url = AAIConfig.get(AAIConstants.AAI_SERVER_URL) + "business/customers"; + System.out.println("Making Jersey https call..."); + Client client = HttpsAuthClient.getClient(); + + ClientResponse res = client.resource(url) + .accept("application/json") + .header("X-TransactionId", "PROV001") + .header("X-FromAppId", "AAI") + .type("application/json") + .get(ClientResponse.class); + +// System.out.println("Jersey result: "); +// System.out.println(res.getEntity(String.class).toString()); + + Customers customers = res.getEntity(Customers.class); + System.out.println("Jersey result: "); + System.out.println("Number of customers: " + customers.getCustomer().size()); + + } catch (KeyManagementException e) { + e.printStackTrace(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + + /** + * Gets the client. + * + * @return the client + * @throws KeyManagementException the key management exception + */ + public static Client getClient() throws KeyManagementException { + + ClientConfig config = new DefaultClientConfig(); + config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE); + config.getClasses().add(org.openecomp.aai.restcore.CustomJacksonJaxBJsonProvider.class); + + SSLContext ctx = null; + try { + String truststore_path = AAIConstants.AAI_HOME_ETC_AUTH + AAIConfig.get(AAIConstants.AAI_TRUSTSTORE_FILENAME); + String truststore_password = AAIConfig.get(AAIConstants.AAI_TRUSTSTORE_PASSWD); + String keystore_path = AAIConstants.AAI_HOME_ETC_AUTH + AAIConfig.get(AAIConstants.AAI_KEYSTORE_FILENAME); + String keystore_password = AAIConfig.get(AAIConstants.AAI_KEYSTORE_PASSWD); + + System.setProperty("javax.net.ssl.trustStore", truststore_path); + System.setProperty("javax.net.ssl.trustStorePassword", truststore_password); + HttpsURLConnection.setDefaultHostnameVerifier( new HostnameVerifier(){ + public boolean verify(String string,SSLSession ssls) { + return true; + } + }); + + ctx = SSLContext.getInstance("TLSv1.2"); + KeyManagerFactory kmf = null; + try { + kmf = KeyManagerFactory.getInstance("SunX509"); + FileInputStream fin = new FileInputStream(keystore_path); + KeyStore ks = KeyStore.getInstance("PKCS12"); + char[] pwd = keystore_password.toCharArray(); + ks.load(fin, pwd); + kmf.init(ks, pwd); + } catch (Exception e) { + System.out.println("Error setting up kmf: exiting"); + e.printStackTrace(); + System.exit(1); + } + + ctx.init(kmf.getKeyManagers(), null, null); + config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, + new HTTPSProperties( new HostnameVerifier() { + @Override + public boolean verify( String s, SSLSession sslSession ) { + return true; + } + }, ctx)); + } catch (Exception e) { + System.out.println("Error setting up config: exiting"); + e.printStackTrace(); + System.exit(1); + } + + Client client = Client.create(config); + // uncomment this line to get more logging for the request/response + // client.addFilter(new LoggingFilter(System.out)); + + return client; + } + +} diff --git a/aai-core/src/test/java/org/openecomp/aai/exceptions/AAIExceptionTest.java b/aai-core/src/test/java/org/openecomp/aai/exceptions/AAIExceptionTest.java index 25b777d0..862f6911 100644 --- a/aai-core/src/test/java/org/openecomp/aai/exceptions/AAIExceptionTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/exceptions/AAIExceptionTest.java @@ -20,14 +20,12 @@ package org.openecomp.aai.exceptions; - import static org.junit.Assert.assertEquals; import org.junit.BeforeClass; - import org.junit.Test; - -import static org.junit.Assert.assertEquals; +import org.openecomp.aai.serialization.queryformats.QueryFormatTestHelper; +import org.openecomp.aai.util.AAIConstants; public class AAIExceptionTest { private static final String code = "4004"; @@ -36,11 +34,12 @@ public class AAIExceptionTest { private static final Throwable noMessage = new RuntimeException(); @BeforeClass - public static void configure() { - System.setProperty("AJSC_HOME", "./src/test/resources/"); - System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + public static void configure() throws NoSuchFieldException, SecurityException, Exception { + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); + QueryFormatTestHelper.setFinalStatic(AAIConstants.class.getField("AAI_HOME_ETC_OXM"), "src/test/resources/org/openecomp/aai/introspection/"); } - + /** * Test constructor with 0 params. * diff --git a/aai-core/src/test/java/org/openecomp/aai/exceptions/AAIExceptionWithInfoTest.java b/aai-core/src/test/java/org/openecomp/aai/exceptions/AAIExceptionWithInfoTest.java index 65381d64..b6357e43 100644 --- a/aai-core/src/test/java/org/openecomp/aai/exceptions/AAIExceptionWithInfoTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/exceptions/AAIExceptionWithInfoTest.java @@ -22,6 +22,8 @@ package org.openecomp.aai.exceptions; import org.junit.BeforeClass; import org.junit.Test; +import org.openecomp.aai.serialization.queryformats.QueryFormatTestHelper; +import org.openecomp.aai.util.AAIConstants; import java.util.HashMap; @@ -44,9 +46,10 @@ public class AAIExceptionWithInfoTest { private static final Throwable cause = new RuntimeException("This is a runtime exception."); @BeforeClass - public static void configure() { - System.setProperty("AJSC_HOME", "./src/test/resources/"); - System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + public static void configure() throws NoSuchFieldException, SecurityException, Exception { + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); + QueryFormatTestHelper.setFinalStatic(AAIConstants.class.getField("AAI_HOME_ETC_OXM"), "src/test/resources/org/openecomp/aai/introspection/"); } /** diff --git a/aai-core/src/test/java/org/openecomp/aai/introspection/IntrospectorTestSpec.java b/aai-core/src/test/java/org/openecomp/aai/introspection/IntrospectorTestSpec.java index 73d8101f..47fef7ee 100644 --- a/aai-core/src/test/java/org/openecomp/aai/introspection/IntrospectorTestSpec.java +++ b/aai-core/src/test/java/org/openecomp/aai/introspection/IntrospectorTestSpec.java @@ -20,12 +20,13 @@ package org.openecomp.aai.introspection; -import com.google.common.collect.Sets; -import org.openecomp.aai.introspection.exceptions.AAIUnknownObjectException; +import static org.junit.Assert.assertEquals; +import java.util.Arrays; import java.util.Set; -import static org.junit.Assert.assertEquals; +import org.openecomp.aai.introspection.exceptions.AAIUnknownObjectException; +import com.google.common.collect.Sets; public class IntrospectorTestSpec { @@ -35,7 +36,7 @@ public class IntrospectorTestSpec { * Container test set. * * @param wrappedPortGroups the wrapped port groups - * @throws AAIUnknownObjectException + * @throws AAIUnknownObjectException */ protected void containerTestSet(Introspector wrappedPortGroups) throws AAIUnknownObjectException { diff --git a/aai-core/src/test/java/org/openecomp/aai/introspection/MoxyEngineTest.java b/aai-core/src/test/java/org/openecomp/aai/introspection/MoxyEngineTest.java index 7b8f338e..9504c46b 100644 --- a/aai-core/src/test/java/org/openecomp/aai/introspection/MoxyEngineTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/introspection/MoxyEngineTest.java @@ -20,19 +20,21 @@ package org.openecomp.aai.introspection; +import java.io.StringReader; + +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; + import org.eclipse.persistence.dynamic.DynamicEntity; import org.eclipse.persistence.jaxb.UnmarshallerProperties; import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext; import org.junit.BeforeClass; import org.junit.Test; + import org.openecomp.aai.introspection.exceptions.AAIUnknownObjectException; import org.openecomp.aai.serialization.queryformats.QueryFormatTestHelper; import org.openecomp.aai.util.AAIConstants; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import java.io.StringReader; - public class MoxyEngineTest extends IntrospectorTestSpec { /** @@ -50,7 +52,7 @@ public class MoxyEngineTest extends IntrospectorTestSpec { /** * Container object. - * @throws AAIUnknownObjectException + * @throws AAIUnknownObjectException */ @Test public void containerObject() throws AAIUnknownObjectException { diff --git a/aai-core/src/test/java/org/openecomp/aai/introspection/PojoInjestorTest.java b/aai-core/src/test/java/org/openecomp/aai/introspection/PojoInjestorTest.java index 333bc9e3..34a6279b 100644 --- a/aai-core/src/test/java/org/openecomp/aai/introspection/PojoInjestorTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/introspection/PojoInjestorTest.java @@ -20,15 +20,16 @@ package org.openecomp.aai.introspection; -import org.junit.BeforeClass; -import org.junit.Test; -import org.openecomp.aai.db.props.AAIProperties; +import static org.junit.Assert.*; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; -import static org.junit.Assert.*; +import org.junit.BeforeClass; +import org.junit.Test; + +import org.openecomp.aai.db.props.AAIProperties; public class PojoInjestorTest { diff --git a/aai-core/src/test/java/org/openecomp/aai/introspection/PojoLoaderTest.java b/aai-core/src/test/java/org/openecomp/aai/introspection/PojoLoaderTest.java index d1e35a22..0eeb966b 100644 --- a/aai-core/src/test/java/org/openecomp/aai/introspection/PojoLoaderTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/introspection/PojoLoaderTest.java @@ -20,15 +20,15 @@ package org.openecomp.aai.introspection; +import static org.junit.Assert.*; + import org.junit.BeforeClass; import org.junit.Test; + import org.openecomp.aai.domain.yang.v9.VnfImage; import org.openecomp.aai.introspection.exceptions.AAIUnmarshallingException; import org.openecomp.aai.restcore.MediaType; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - public class PojoLoaderTest { diff --git a/aai-core/src/test/java/org/openecomp/aai/introspection/PojoStrategyTest.java b/aai-core/src/test/java/org/openecomp/aai/introspection/PojoStrategyTest.java index 0bd61178..4843b10d 100644 --- a/aai-core/src/test/java/org/openecomp/aai/introspection/PojoStrategyTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/introspection/PojoStrategyTest.java @@ -20,13 +20,14 @@ package org.openecomp.aai.introspection; +import static org.junit.Assert.*; + import org.junit.Test; + import org.openecomp.aai.domain.yang.CloudRegion; import org.openecomp.aai.domain.yang.VolumeGroup; import org.openecomp.aai.schema.enums.ObjectMetadata; -import static org.junit.Assert.assertEquals; - public class PojoStrategyTest { @Test diff --git a/aai-core/src/test/java/org/openecomp/aai/introspection/PropertyPredicatesTest.java b/aai-core/src/test/java/org/openecomp/aai/introspection/PropertyPredicatesTest.java index a7cde118..1f997333 100644 --- a/aai-core/src/test/java/org/openecomp/aai/introspection/PropertyPredicatesTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/introspection/PropertyPredicatesTest.java @@ -20,18 +20,17 @@ package org.openecomp.aai.introspection; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; +import java.util.Set; + import org.junit.BeforeClass; import org.junit.Test; + import org.openecomp.aai.introspection.exceptions.AAIUnknownObjectException; import org.openecomp.aai.serialization.queryformats.QueryFormatTestHelper; import org.openecomp.aai.util.AAIConstants; -import java.util.Set; - -import static org.hamcrest.Matchers.hasItems; -import static org.hamcrest.Matchers.not; -import static org.junit.Assert.assertThat; - public class PropertyPredicatesTest { diff --git a/aai-core/src/test/java/org/openecomp/aai/introspection/ReflectionEngineTest.java b/aai-core/src/test/java/org/openecomp/aai/introspection/ReflectionEngineTest.java index 52ed0d87..8781d59c 100644 --- a/aai-core/src/test/java/org/openecomp/aai/introspection/ReflectionEngineTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/introspection/ReflectionEngineTest.java @@ -20,17 +20,19 @@ package org.openecomp.aai.introspection; -import org.junit.BeforeClass; -import org.junit.Test; -import org.openecomp.aai.introspection.exceptions.AAIUnknownObjectException; -import org.openecomp.aai.restcore.CustomJacksonJaxBJsonProvider; - -import javax.xml.bind.JAXBException; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; +import javax.xml.bind.JAXBException; + +import org.junit.BeforeClass; +import org.junit.Test; + +import org.openecomp.aai.introspection.exceptions.AAIUnknownObjectException; +import org.openecomp.aai.restcore.CustomJacksonJaxBJsonProvider; + public class ReflectionEngineTest extends IntrospectorTestSpec { /** @@ -48,7 +50,7 @@ public class ReflectionEngineTest extends IntrospectorTestSpec { * @throws InstantiationException the instantiation exception * @throws IllegalAccessException the illegal access exception * @throws ClassNotFoundException the class not found exception - * @throws AAIUnknownObjectException + * @throws AAIUnknownObjectException */ @Test public void containerObject() throws InstantiationException, IllegalAccessException, ClassNotFoundException, AAIUnknownObjectException { diff --git a/aai-core/src/test/java/org/openecomp/aai/introspection/sideeffect/DataCopyTest.java b/aai-core/src/test/java/org/openecomp/aai/introspection/sideeffect/DataCopyTest.java index 70d6b123..4d18835e 100644 --- a/aai-core/src/test/java/org/openecomp/aai/introspection/sideeffect/DataCopyTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/introspection/sideeffect/DataCopyTest.java @@ -83,8 +83,8 @@ public class DataCopyTest { @BeforeClass public static void setup() throws NoSuchFieldException, SecurityException, Exception { graph = TitanFactory.build().set("storage.backend","inmemory").open(); - System.setProperty("AJSC_HOME", "./src/test/resources/"); - System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); QueryFormatTestHelper.setFinalStatic(AAIConstants.class.getField("AAI_HOME_ETC_OXM"), "src/test/resources/org/openecomp/aai/introspection/"); loader = LoaderFactory.createLoaderForVersion(introspectorFactoryType, version); dbEngine = new TitanDBEngine( diff --git a/aai-core/src/test/java/org/openecomp/aai/introspection/sideeffect/DataLinkTest.java b/aai-core/src/test/java/org/openecomp/aai/introspection/sideeffect/DataLinkTest.java index a9e707a2..595cb868 100644 --- a/aai-core/src/test/java/org/openecomp/aai/introspection/sideeffect/DataLinkTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/introspection/sideeffect/DataLinkTest.java @@ -80,8 +80,8 @@ public class DataLinkTest { @BeforeClass public static void setup() throws NoSuchFieldException, SecurityException, Exception { graph = TitanFactory.build().set("storage.backend","inmemory").open(); - System.setProperty("AJSC_HOME", "./src/test/resources/"); - System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); QueryFormatTestHelper.setFinalStatic(AAIConstants.class.getField("AAI_HOME_ETC_OXM"), "src/test/resources/org/openecomp/aai/introspection/"); loader = LoaderFactory.createLoaderForVersion(introspectorFactoryType, version); dbEngine = new TitanDBEngine( diff --git a/aai-core/src/test/java/org/openecomp/aai/introspection/validation/IntrospectorValidationTest.java b/aai-core/src/test/java/org/openecomp/aai/introspection/validation/IntrospectorValidationTest.java new file mode 100644 index 00000000..459746bc --- /dev/null +++ b/aai-core/src/test/java/org/openecomp/aai/introspection/validation/IntrospectorValidationTest.java @@ -0,0 +1,99 @@ +/*- + * ============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.introspection.validation; + +import static org.junit.Assert.assertEquals; + +import java.util.List; + +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; + +import org.openecomp.aai.exceptions.AAIException; +import org.openecomp.aai.introspection.Introspector; +import org.openecomp.aai.introspection.Loader; +import org.openecomp.aai.introspection.LoaderFactory; +import org.openecomp.aai.introspection.ModelType; +import org.openecomp.aai.introspection.Version; +import org.openecomp.aai.introspection.tools.IntrospectorValidator; +import org.openecomp.aai.introspection.tools.Issue; +import org.openecomp.aai.introspection.tools.IssueType; +import org.openecomp.aai.serialization.queryformats.QueryFormatTestHelper; +import org.openecomp.aai.util.AAIConstants; + +public class IntrospectorValidationTest { + + + private final static Version version = Version.v10; + private final static ModelType introspectorFactoryType = ModelType.MOXY; + private static Loader loader; + private IntrospectorValidator validator; + @BeforeClass + public static void setUp() throws NoSuchFieldException, SecurityException, Exception { + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + QueryFormatTestHelper.setFinalStatic(AAIConstants.class.getField("AAI_HOME_ETC_OXM"), "src/test/resources/org/openecomp/aai/introspection/"); + + loader = LoaderFactory.createLoaderForVersion(introspectorFactoryType, version); + + } + @Before + public void createValidator() { + validator = new IntrospectorValidator.Builder() + .validateRequired(false) + .restrictDepth(10000) + .build(); + } + @Test + public void verifySuccessWhenEmpty() throws AAIException { + Introspector obj = loader.introspectorFromName("test-object"); + obj.setValue("vnf-id", "key1"); + validator.validate(obj); + List issues = validator.getIssues(); + assertEquals("no issues found", true, issues.isEmpty()); + } + + @Ignore + @Test + public void verifyRequiresSingleFieldFailure() throws AAIException { + Introspector obj = loader.introspectorFromName("test-object"); + obj.setValue("vnf-id", "key1"); + obj.setValue("model-invariant-id", "id1"); + validator.validate(obj); + List issues = validator.getIssues(); + assertEquals("issues found", true, issues.size() == 1); + Issue issue = issues.get(0); + assertEquals("found expected issue", IssueType.DEPENDENT_PROP_NOT_FOUND, issue.getType()); + } + + @Test + public void verifyRequiresSuccess() throws AAIException { + Introspector obj = loader.introspectorFromName("test-object"); + obj.setValue("vnf-id", "key1"); + obj.setValue("model-invariant-id", "id1"); + obj.setValue("model-version-id", "version-id1"); + validator.validate(obj); + List issues = validator.getIssues(); + assertEquals("no issues found", true, issues.isEmpty()); + } +} diff --git a/aai-core/src/test/java/org/openecomp/aai/logging/LoggingContextTest.java b/aai-core/src/test/java/org/openecomp/aai/logging/LoggingContextTest.java new file mode 100644 index 00000000..3fe2098c --- /dev/null +++ b/aai-core/src/test/java/org/openecomp/aai/logging/LoggingContextTest.java @@ -0,0 +1,114 @@ +/*- + * ============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.logging; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.Collections; +import java.util.Deque; +import java.util.LinkedList; +import java.util.Map; +import java.util.UUID; + +import org.junit.Test; + +public class LoggingContextTest { + + private static final int MAX_STORED_CONTEXTS = 100; + + @Test + public void testStopWatch() { + try { + LoggingContext.stopWatchStop(); + throw new AssertionError("No exception thrown when LoggingContext.stopWatchStop() called without a prior LoggingContext.stopWatchStart()"); + } catch (StopWatchNotStartedException e) { + //Expected + } + + LoggingContext.stopWatchStart(); + + assertTrue(LoggingContext.stopWatchStop() >= 0); + + try { + LoggingContext.stopWatchStop(); + throw new AssertionError("No exception thrown when LoggingContext.stopWatchStop() twice in succession"); + } catch (StopWatchNotStartedException e) { + //Expected + } + } + + @Test + public void testRequestId() { //AKA Transaction ID + final String sUuid = "57d51eaa-edc6-4f50-a69d-f2d4d2445120"; + + LoggingContext.requestId(sUuid); + + assertEquals(LoggingContext.requestId(), UUID.fromString(sUuid)); + + final UUID uuid = UUID.randomUUID(); + + LoggingContext.requestId(uuid); + + assertEquals(LoggingContext.requestId(), uuid); + + LoggingContext.requestId("foo"); //Illegal - this will result in a new, randomly + //generated UUID as per the logging spec + + assertNotNull(LoggingContext.requestId()); //Make sure ANY UUID was assigned + assertNotEquals(LoggingContext.requestId(), uuid); //Make sure it actually changed from the last + //known valid UUID + } + + @Test + public void testClear() { + LoggingContext.init(); + LoggingContext.clear(); + + assertEquals(Collections.emptyMap(), LoggingContext.getCopy()); + } + + @Test + public void testSaveRestore() { + + final Deque> contexts = new LinkedList> (); + + LoggingContext.init(); + + for (int i = 0; i < MAX_STORED_CONTEXTS; i++) { + LoggingContext.customField1(String.valueOf(i)); + + assertEquals(LoggingContext.customField1(), String.valueOf(i)); + + LoggingContext.save(); + + contexts.push(LoggingContext.getCopy()); + } + + while (contexts.peek() != null) { + LoggingContext.restore(); + + assertEquals(LoggingContext.getCopy(), contexts.pop()); + } + } +} diff --git a/aai-core/src/test/java/org/openecomp/aai/parsers/query/GraphTraversalTest.java b/aai-core/src/test/java/org/openecomp/aai/parsers/query/GraphTraversalTest.java index 79f75ab9..099ea37e 100644 --- a/aai-core/src/test/java/org/openecomp/aai/parsers/query/GraphTraversalTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/parsers/query/GraphTraversalTest.java @@ -39,6 +39,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; @@ -48,6 +49,7 @@ import org.openecomp.aai.exceptions.AAIException; import org.openecomp.aai.introspection.LoaderFactory; import org.openecomp.aai.introspection.ModelType; import org.openecomp.aai.introspection.Version; +import org.openecomp.aai.rest.RestTokens; import org.openecomp.aai.serialization.engines.QueryStyle; import org.openecomp.aai.serialization.engines.TitanDBEngine; import org.openecomp.aai.serialization.engines.TransactionalGraphEngine; @@ -72,8 +74,8 @@ public class GraphTraversalTest { */ @BeforeClass public static void configure() throws NoSuchFieldException, SecurityException, Exception { - System.setProperty("AJSC_HOME", "./src/test/resources/"); - System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); QueryFormatTestHelper.setFinalStatic(AAIConstants.class.getField("AAI_HOME_ETC_OXM"), "src/test/resources/org/openecomp/aai/introspection/"); dbEngine = new TitanDBEngine(QueryStyle.TRAVERSAL, @@ -486,8 +488,7 @@ public class GraphTraversalTest { QueryParser query = dbEngine.getQueryBuilder().createQueryFromURI(uri); GraphTraversal expected = __.start() - .has("vnf-id", "key1").has( - AAIProperties.NODE_TYPE, P.within("vce" , "vpe" , "generic-vnf")); + .has("vnf-id", "key1").has(AAIProperties.NODE_TYPE, P.within("vce", "vpe", "generic-vnf")); GraphTraversal expectedParent = expected; assertEquals( @@ -534,8 +535,7 @@ public class GraphTraversalTest { GraphTraversal expected = __.start() .has("vnf-id", "key1").has(AAIProperties.NODE_TYPE, P.within("vce", "vpe", "generic-vnf")) - .union(__.out("has").has("aai-node-type", "vf-module")) - .has("vf-module-id", "key2"); + .union(__.out("has").has(AAIProperties.NODE_TYPE, "vf-module")).has("vf-module-id", "key2"); GraphTraversal expectedParent = __.start() .has("vnf-id", "key1").has(AAIProperties.NODE_TYPE, P.within("vce", "vpe", "generic-vnf")); @@ -691,7 +691,138 @@ public class GraphTraversalTest { "", query.getParentResultType()); assertEquals("dependent",true, query.isDependent()); - + } + + @Ignore + @Test + public void pluralCousin() throws UnsupportedEncodingException, AAIException { + URI uri = UriBuilder.fromPath("cloud-infrastructure/complexes/complex/key1/related-to/pservers").build(); + + QueryParser query = dbEnginev9.getQueryBuilder().createQueryFromURI(uri); + GraphTraversal expected = __.start() + .has("physical-location-id", "key1") + .has("aai-node-type", "complex") + .in("locatedIn").has("aai-node-type", "pserver"); + GraphTraversal expectedParent = __.start() + .has("physical-location-id", "key1") + .has("aai-node-type", "complex"); + + assertEquals( + "gremlin query should be " + expected.toString(), + expected.toString(), + query.getQueryBuilder().getQuery().toString()); + assertEquals( + "parent", + expectedParent.toString(), + query.getQueryBuilder().getParentQuery().getQuery().toString()); + + assertEquals( + "result type should be", + "pserver", + query.getResultType()); + assertEquals( + "result type should be", + "complex", + query.getParentResultType()); + //this is controversial but we're not allowing writes on this currently + assertEquals("dependent",true, query.isDependent()); + } + + @Ignore + @Test + public void specificCousin() throws UnsupportedEncodingException, AAIException { + URI uri = UriBuilder.fromPath("cloud-infrastructure/complexes/complex/key1/related-to/pservers/pserver/key2").build(); + + QueryParser query = dbEnginev9.getQueryBuilder().createQueryFromURI(uri); + GraphTraversal expected = __.start() + .has("physical-location-id", "key1") + .has("aai-node-type", "complex") + .in("locatedIn").has("aai-node-type", "pserver") + .has("hostname", "key2"); + GraphTraversal expectedParent = __.start() + .has("physical-location-id", "key1") + .has("aai-node-type", "complex"); + + assertEquals( + "gremlin query should be " + expected.toString(), + expected.toString(), + query.getQueryBuilder().getQuery().toString()); + assertEquals( + "parent", + expectedParent.toString(), + query.getQueryBuilder().getParentQuery().getQuery().toString()); + + assertEquals( + "result type should be", + "pserver", + query.getResultType()); + assertEquals( + "result type should be", + "complex", + query.getParentResultType()); + //this is controversial but we're not allowing writes on this currently + assertEquals("dependent",true, query.isDependent()); + } + + @Ignore + @Test + public void doubleSpecificCousin() throws UnsupportedEncodingException, AAIException { + URI uri = UriBuilder.fromPath("cloud-infrastructure/complexes/complex/key1/related-to/pservers/pserver/key2/related-to/vservers/vserver/key3").build(); + + QueryParser query = dbEnginev9.getQueryBuilder().createQueryFromURI(uri); + GraphTraversal expected = __.start() + .has("physical-location-id", "key1") + .has("aai-node-type", "complex") + .in("locatedIn").has("aai-node-type", "pserver") + .has("hostname", "key2") + .in("runsOnPserver").has("aai-node-type", "vserver") + .has("vserver-id", "key3"); + GraphTraversal expectedParent = __.start() + .has("physical-location-id", "key1") + .has("aai-node-type", "complex") + .in("locatedIn").has("aai-node-type", "pserver") + .has("hostname", "key2"); + + assertEquals( + "gremlin query should be " + expected.toString(), + expected.toString(), + query.getQueryBuilder().getQuery().toString()); + assertEquals( + "parent", + expectedParent.toString(), + query.getQueryBuilder().getParentQuery().getQuery().toString()); + + assertEquals( + "result type should be", + "vserver", + query.getResultType()); + assertEquals( + "result type should be", + "pserver", + query.getParentResultType()); + //this is controversial but we're not allowing writes on this currently + assertEquals("dependent",true, query.isDependent()); + } + + @Ignore + @Test + public void traversalEndsInRelatedTo() throws UnsupportedEncodingException, AAIException { + URI uri = UriBuilder.fromPath("cloud-infrastructure/complexes/complex/key1/related-to").build(); + + thrown.expect(AAIException.class); + thrown.expectMessage(containsString(RestTokens.COUSIN.toString())); + QueryParser query = dbEnginev9.getQueryBuilder().createQueryFromURI(uri); + + } + + @Ignore + @Test + public void pluralCousinToPluralCousin() throws UnsupportedEncodingException, AAIException { + URI uri = UriBuilder.fromPath("cloud-infrastructure/complexes/related-to/pservers").build(); + + thrown.expect(AAIException.class); + thrown.expectMessage(containsString("chain plurals")); + QueryParser query = dbEnginev9.getQueryBuilder().createQueryFromURI(uri); } } diff --git a/aai-core/src/test/java/org/openecomp/aai/parsers/query/LegacyQueryTest.java b/aai-core/src/test/java/org/openecomp/aai/parsers/query/LegacyQueryTest.java index bab74ed0..af61fcb0 100644 --- a/aai-core/src/test/java/org/openecomp/aai/parsers/query/LegacyQueryTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/parsers/query/LegacyQueryTest.java @@ -20,9 +20,19 @@ package org.openecomp.aai.parsers.query; +import static org.junit.Assert.assertEquals; + +import java.io.UnsupportedEncodingException; +import java.net.URI; + +import javax.ws.rs.core.UriBuilder; +import javax.xml.bind.JAXBException; + import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; + import org.openecomp.aai.exceptions.AAIException; import org.openecomp.aai.introspection.LoaderFactory; import org.openecomp.aai.introspection.ModelInjestor; @@ -32,13 +42,6 @@ import org.openecomp.aai.serialization.engines.QueryStyle; import org.openecomp.aai.serialization.engines.TitanDBEngine; import org.openecomp.aai.serialization.engines.TransactionalGraphEngine; -import javax.ws.rs.core.UriBuilder; -import javax.xml.bind.JAXBException; -import java.io.UnsupportedEncodingException; -import java.net.URI; - -import static org.junit.Assert.assertEquals; - public class LegacyQueryTest { private ModelInjestor injestor = ModelInjestor.getInstance(); @@ -55,8 +58,8 @@ public class LegacyQueryTest { */ @BeforeClass public static void configure() { - System.setProperty("AJSC_HOME", "./src/test/resources/"); - System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); } /** @@ -104,10 +107,14 @@ public class LegacyQueryTest { String expected = ".has('hostname', 'key1').has('aai-node-type', 'pserver')" - + ".in('tosca.relationships.BindsTo').has('aai-node-type', 'lag-interface')" + + ".out('hasLAGInterface').has('aai-node-type', 'lag-interface')" + ".has('interface-name', 'key2')"; String parentExpected = ".has('hostname', 'key1').has('aai-node-type', 'pserver')"; + assertEquals( + "gremlin query should be for node", + expected, + query.getQueryBuilder().getQuery()); assertEquals( "parent gremlin query should be for parent", parentExpected, @@ -117,5 +124,43 @@ public class LegacyQueryTest { "lag-interface", query.getResultType()); } - + + /** + * Naming exceptions. + * + * @throws JAXBException the JAXB exception + * @throws UnsupportedEncodingException the unsupported encoding exception + * @throws AAIException the AAI exception + */ + @Ignore + @Test + public void namingExceptions() throws JAXBException, UnsupportedEncodingException, AAIException { + URI uri = UriBuilder.fromPath("network/vces/vce/key1/port-groups/port-group/key2/cvlan-tags/cvlan-tag/655").build(); + + QueryParser query = dbEngine.getQueryBuilder().createQueryFromURI(uri); + String expected = + ".has('vnf-id', 'key1').has('aai-node-type', 'vce')" + + ".in('org.onap.relationships.inventory.BelongsTo').has('aai-node-type', 'port-group')" + + ".has('interface-id', 'key2')" + + ".in('org.onap.relationships.inventory.BelongsTo').has('aai-node-type', 'cvlan-tag')" + + ".has('cvlan-tag', 655)"; + String expectedParent = + ".has('vnf-id', 'key1').has('aai-node-type', 'vce')" + + ".in('org.onap.relationships.inventory.BelongsTo').has('aai-node-type', 'port-group')" + + ".has('interface-id', 'key2')"; + assertEquals( + "gremlin query should be " + expected, + expected, + query.getQueryBuilder().getQuery()); + assertEquals( + "parent gremlin query should be equal the query for port group", + expectedParent, + query.getQueryBuilder().getParentQuery().getQuery()); + assertEquals( + "result type should be cvlan-tag", + "cvlan-tag", + query.getResultType()); + + } + } diff --git a/aai-core/src/test/java/org/openecomp/aai/parsers/query/RelationshipGremlinQueryTest.java b/aai-core/src/test/java/org/openecomp/aai/parsers/query/RelationshipGremlinQueryTest.java index 12a689f4..b3385e32 100644 --- a/aai-core/src/test/java/org/openecomp/aai/parsers/query/RelationshipGremlinQueryTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/parsers/query/RelationshipGremlinQueryTest.java @@ -69,8 +69,8 @@ public class RelationshipGremlinQueryTest { */ @BeforeClass public static void configure() { - System.setProperty("AJSC_HOME", "./src/test/resources/"); - System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); } diff --git a/aai-core/src/test/java/org/openecomp/aai/parsers/query/RelationshipQueryTest.java b/aai-core/src/test/java/org/openecomp/aai/parsers/query/RelationshipQueryTest.java index 82378577..807c750f 100644 --- a/aai-core/src/test/java/org/openecomp/aai/parsers/query/RelationshipQueryTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/parsers/query/RelationshipQueryTest.java @@ -62,8 +62,8 @@ public class RelationshipQueryTest { */ @BeforeClass public static void configure() { - System.setProperty("AJSC_HOME", "./src/test/resources/"); - System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); } @@ -171,8 +171,8 @@ public class RelationshipQueryTest { * @throws UnsupportedEncodingException the unsupported encoding exception * @throws AAIException the AAI exception */ - @Test @Ignore + @Test public void namingExceptions() throws JAXBException, UnsupportedEncodingException, AAIException { String content = "{" diff --git a/aai-core/src/test/java/org/openecomp/aai/parsers/query/UniqueRelationshipQueryTest.java b/aai-core/src/test/java/org/openecomp/aai/parsers/query/UniqueRelationshipQueryTest.java index b8dbc2a9..50bbbd0e 100644 --- a/aai-core/src/test/java/org/openecomp/aai/parsers/query/UniqueRelationshipQueryTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/parsers/query/UniqueRelationshipQueryTest.java @@ -20,6 +20,15 @@ package org.openecomp.aai.parsers.query; +import static org.junit.Assert.assertEquals; + +import java.io.StringReader; +import java.io.UnsupportedEncodingException; + +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; +import javax.xml.transform.stream.StreamSource; + import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__; import org.apache.tinkerpop.gremlin.structure.Vertex; @@ -30,25 +39,22 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; + import org.openecomp.aai.exceptions.AAIException; -import org.openecomp.aai.introspection.*; +import org.openecomp.aai.introspection.Introspector; +import org.openecomp.aai.introspection.IntrospectorFactory; +import org.openecomp.aai.introspection.LoaderFactory; +import org.openecomp.aai.introspection.ModelInjestor; +import org.openecomp.aai.introspection.ModelType; +import org.openecomp.aai.introspection.Version; import org.openecomp.aai.serialization.engines.QueryStyle; import org.openecomp.aai.serialization.engines.TitanDBEngine; import org.openecomp.aai.serialization.engines.TransactionalGraphEngine; - -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import javax.xml.transform.stream.StreamSource; -import java.io.StringReader; -import java.io.UnsupportedEncodingException; - -import static org.junit.Assert.assertEquals; - @Ignore public class UniqueRelationshipQueryTest { private ModelInjestor injestor = ModelInjestor.getInstance(); - private TransactionalGraphEngine dbEngine = - new TitanDBEngine(QueryStyle.GREMLIN_UNIQUE, + private TransactionalGraphEngine dbEngine = + new TitanDBEngine(QueryStyle.GREMLIN_UNIQUE, LoaderFactory.createLoaderForVersion(ModelType.MOXY, Version.v8), false); private final Version version = Version.v8; diff --git a/aai-core/src/test/java/org/openecomp/aai/parsers/relationship/RelationshipToURITest.java b/aai-core/src/test/java/org/openecomp/aai/parsers/relationship/RelationshipToURITest.java index a676b9bd..185814b8 100644 --- a/aai-core/src/test/java/org/openecomp/aai/parsers/relationship/RelationshipToURITest.java +++ b/aai-core/src/test/java/org/openecomp/aai/parsers/relationship/RelationshipToURITest.java @@ -59,8 +59,8 @@ public class RelationshipToURITest { @BeforeClass public static void setup() throws NoSuchFieldException, SecurityException, Exception { - System.setProperty("AJSC_HOME", "./src/test/resources/"); - System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); QueryFormatTestHelper.setFinalStatic(AAIConstants.class.getField("AAI_HOME_ETC_OXM"), "src/test/resources/org/openecomp/aai/introspection/"); } diff --git a/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIParserTest.java b/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIParserTest.java index c2312b2b..899119ee 100644 --- a/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIParserTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIParserTest.java @@ -53,8 +53,8 @@ public class URIParserTest { */ @BeforeClass public static void configure() { - System.setProperty("AJSC_HOME", "./src/test/resources/"); - System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); } /** diff --git a/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToExtensionInformationTest.java b/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToExtensionInformationTest.java index 52c44c12..bc586b86 100644 --- a/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToExtensionInformationTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToExtensionInformationTest.java @@ -48,8 +48,8 @@ public class URIToExtensionInformationTest { */ @BeforeClass public static void configure() { - System.setProperty("AJSC_HOME", "./src/test/resources/"); - System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); } /** diff --git a/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToObjectTest.java b/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToObjectTest.java index 3750e473..7cdcfc56 100644 --- a/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToObjectTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToObjectTest.java @@ -61,8 +61,8 @@ public class URIToObjectTest { */ @BeforeClass public static void configure() { - System.setProperty("AJSC_HOME", "./src/test/resources/"); - System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); } diff --git a/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToRelationshipObjectTest.java b/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToRelationshipObjectTest.java index 1c945ee7..ed278243 100644 --- a/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToRelationshipObjectTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToRelationshipObjectTest.java @@ -33,6 +33,7 @@ import javax.ws.rs.core.UriBuilder; import javax.xml.bind.JAXBException; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; @@ -45,7 +46,7 @@ import org.openecomp.aai.introspection.LoaderFactory; import org.openecomp.aai.introspection.ModelType; import org.openecomp.aai.introspection.Version; - +@Ignore public class URIToRelationshipObjectTest { private Version latest = AAIProperties.LATEST; @@ -59,8 +60,8 @@ public class URIToRelationshipObjectTest { */ @BeforeClass public static void configure() { - System.setProperty("AJSC_HOME", "./src/test/resources/"); - System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); } /** diff --git a/aai-core/src/test/java/org/openecomp/aai/query/builder/TraversalQueryTest.java b/aai-core/src/test/java/org/openecomp/aai/query/builder/TraversalQueryTest.java index a9d2c001..eae1c970 100644 --- a/aai-core/src/test/java/org/openecomp/aai/query/builder/TraversalQueryTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/query/builder/TraversalQueryTest.java @@ -50,17 +50,17 @@ public class TraversalQueryTest { @BeforeClass public static void configure() throws NoSuchFieldException, SecurityException, Exception { - System.setProperty("AJSC_HOME", "./src/test/resources/"); - System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); QueryFormatTestHelper.setFinalStatic(AAIConstants.class.getField("AAI_HOME_ETC_OXM"), "src/test/resources/org/openecomp/aai/introspection/"); loader = LoaderFactory.createLoaderForVersion(ModelType.MOXY, AAIProperties.LATEST); } @Test public void unionQuery() { - TraversalQuery tQ = new TraversalQuery(loader, g); - TraversalQuery tQ2 = new TraversalQuery(loader, g); - TraversalQuery tQ3 = new TraversalQuery(loader, g); + TraversalQuery tQ = new TraversalQuery<>(loader, g); + TraversalQuery tQ2 = new TraversalQuery<>(loader, g); + TraversalQuery tQ3 = new TraversalQuery<>(loader, g); tQ.union( tQ2.getVerticesByProperty("test1", "value1"), tQ3.getVerticesByIndexedProperty("test2", "value2")); @@ -74,9 +74,8 @@ public class TraversalQueryTest { @Test public void traversalClones() throws UnsupportedEncodingException, AAIException, URISyntaxException { - TraversalQuery tQ = new TraversalQuery(loader, g); - Introspector test = loader.introspectorFromName("test-object"); - QueryBuilder builder = tQ.createQueryFromURI(new URI("network/test-objects/test-object/key1")).getQueryBuilder(); + TraversalQuery tQ = new TraversalQuery<>(loader, g); + QueryBuilder builder = tQ.createQueryFromURI(new URI("network/test-objects/test-object/key1")).getQueryBuilder(); GraphTraversal expected = __.start().has("vnf-id", "key1").has("aai-node-type", "test-object"); GraphTraversal containerExpected = __.start().has("aai-node-type", "test-object"); @@ -88,8 +87,8 @@ public class TraversalQueryTest { @Test public void nestedTraversalClones() throws UnsupportedEncodingException, AAIException, URISyntaxException { - TraversalQuery tQ = new TraversalQuery(loader, g); - QueryBuilder builder = tQ.createQueryFromURI(new URI("network/generic-vnfs/generic-vnf/key1/l-interfaces/l-interface/key2")).getQueryBuilder(); + TraversalQuery tQ = new TraversalQuery<>(loader, g); + QueryBuilder builder = tQ.createQueryFromURI(new URI("network/generic-vnfs/generic-vnf/key1/l-interfaces/l-interface/key2")).getQueryBuilder(); GraphTraversal expected = __.start().has("vnf-id", "key1").has("aai-node-type", "generic-vnf").out("hasLInterface").has(AAIProperties.NODE_TYPE, "l-interface").has("interface-name", "key2"); GraphTraversal containerExpected = __.start().has("vnf-id", "key1").has("aai-node-type", "generic-vnf").out("hasLInterface").has(AAIProperties.NODE_TYPE, "l-interface"); diff --git a/aai-core/src/test/java/org/openecomp/aai/serialization/db/DbAliasTest.java b/aai-core/src/test/java/org/openecomp/aai/serialization/db/DbAliasTest.java index 10586fb4..78e91109 100644 --- a/aai-core/src/test/java/org/openecomp/aai/serialization/db/DbAliasTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/serialization/db/DbAliasTest.java @@ -56,7 +56,7 @@ import com.thinkaurelius.titan.core.TitanTransaction; import java.util.Collections; -@Ignore("Causing problems when only parallel tests are run") +@Ignore public class DbAliasTest { @@ -71,8 +71,8 @@ public class DbAliasTest { @Before public void setup() throws NoSuchFieldException, SecurityException, Exception { graph = TitanFactory.build().set("storage.backend","inmemory").open(); - System.setProperty("AJSC_HOME", "./src/test/resources/"); - System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); loader = LoaderFactory.createLoaderForVersion(introspectorFactoryType, version); dbEngine = new TitanDBEngine( queryStyle, diff --git a/aai-core/src/test/java/org/openecomp/aai/workarounds/RemoveDME2QueryParamsTest.java b/aai-core/src/test/java/org/openecomp/aai/workarounds/RemoveDME2QueryParamsTest.java new file mode 100644 index 00000000..61ba275d --- /dev/null +++ b/aai-core/src/test/java/org/openecomp/aai/workarounds/RemoveDME2QueryParamsTest.java @@ -0,0 +1,91 @@ +/*- + * ============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.workarounds; + +import static org.junit.Assert.*; + +import javax.ws.rs.core.MultivaluedHashMap; +import javax.ws.rs.core.MultivaluedMap; + +import org.junit.Before; +import org.junit.Test; + +public class RemoveDME2QueryParamsTest { + + private MultivaluedMap hasParams; + private MultivaluedMap doesNotHaveParams; + private RemoveDME2QueryParams removeParams = new RemoveDME2QueryParams(); + + /** + * Setup. + */ + @Before + public void setup() { + hasParams = new MultivaluedHashMap<>(); + doesNotHaveParams = new MultivaluedHashMap<>(); + + hasParams.add("version", "1"); + hasParams.add("envContext", "DEV"); + hasParams.add("routeOffer", "INT1"); + hasParams.add("test1", "peppermints"); + hasParams.add("test2", "amber"); + + doesNotHaveParams.add("version", "1"); + doesNotHaveParams.add("envContext", "DEV"); + doesNotHaveParams.add("test1", "peppermints"); + doesNotHaveParams.add("test2", "amber"); + + } + + /** + * Test removal. + */ + @Test + public void testRemoval() { + + if (removeParams.shouldRemoveQueryParams(hasParams)) { + removeParams.removeQueryParams(hasParams); + } + + assertEquals("no version", false, hasParams.containsKey("version")); + assertEquals("no envContext", false, hasParams.containsKey("envContext")); + assertEquals("no routeOffer", false, hasParams.containsKey("routeOffer")); + assertEquals("has test1", true, hasParams.containsKey("test1")); + assertEquals("has test2", true, hasParams.containsKey("test2")); + + } + + /** + * Should not remove. + */ + @Test + public void shouldNotRemove() { + + if (removeParams.shouldRemoveQueryParams(doesNotHaveParams)) { + removeParams.removeQueryParams(doesNotHaveParams); + } + + assertEquals("no version", true, doesNotHaveParams.containsKey("version")); + assertEquals("no envContext", true, doesNotHaveParams.containsKey("envContext")); + assertEquals("has test1", true, doesNotHaveParams.containsKey("test1")); + assertEquals("has test2", true, doesNotHaveParams.containsKey("test2")); + } +} diff --git a/aai-core/src/test/resources/bundleconfig-local/etc/appprops/error.properties b/aai-core/src/test/resources/bundleconfig-local/etc/appprops/error.properties index 4e98d62c..11416ca4 100644 --- a/aai-core/src/test/resources/bundleconfig-local/etc/appprops/error.properties +++ b/aai-core/src/test/resources/bundleconfig-local/etc/appprops/error.properties @@ -110,6 +110,7 @@ AAI_6142=5:4:INFO:6142:400:3000:Retrying transaction AAI_6143=5:4:INFO:6143:400:3000:Ghost vertex found AAI_6144=5:4:WARN:6144:400:3000:Cycle found in graph AAI_6145=5:4:ERROR:6145:400:3000:Cannot create a nested/containment edge via relationship +AAI_6146=5:4:ERROR:6146:400:3000:Ambiguous identity map found, use a URI instead #--- aaicsvp: 7101-7199 AAI_7101=5:4:ERROR:7101:500:3002:Unexpected error in CSV file processing diff --git a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v10.xml b/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v10.xml index 9c3c5e87..af05d3d9 100644 --- a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v10.xml +++ b/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v10.xml @@ -5048,7 +5048,7 @@ - + @@ -5084,7 +5084,7 @@ - + @@ -6405,7 +6405,7 @@ - + diff --git a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v9.xml b/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v9.xml index ea77e8e5..dab82440 100644 --- a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v9.xml +++ b/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v9.xml @@ -4342,7 +4342,7 @@ - + @@ -4372,7 +4372,7 @@ - + @@ -5417,7 +5417,7 @@ - + diff --git a/aai-core/src/test/resources/bundleconfig-local/etc/scriptdata/dependencies/vRouterServiceInstanceFile.txt b/aai-core/src/test/resources/bundleconfig-local/etc/scriptdata/dependencies/vRouterServiceInstanceFile.txt new file mode 100644 index 00000000..a5be7911 --- /dev/null +++ b/aai-core/src/test/resources/bundleconfig-local/etc/scriptdata/dependencies/vRouterServiceInstanceFile.txt @@ -0,0 +1,6 @@ +vnf-id,service-instance-id,global-customer-id +vnf-id1,sample-service-instance-id,customer-id1 +vnf-id2,sample-service-instance-id-1,customer-id1 +vnf-id3,sample-service-instance-id-2,customer-id2 +vnf-id5,sample-service-instance-id-3,customer-id3 +vnf-id6,sample-service-instance-id-4,customer-id4 diff --git a/aai-core/src/test/resources/log4j.properties b/aai-core/src/test/resources/log4j.properties new file mode 100644 index 00000000..2e68f61a --- /dev/null +++ b/aai-core/src/test/resources/log4j.properties @@ -0,0 +1,3 @@ +log4j.logger.org.apache.zookeeper=WARN +log4j.logger.org.apache.hadoop.hbase.zookeeper=WARN +log4j.logger.org.apache.hadoop.hbase.client=WARN \ No newline at end of file diff --git a/aai-core/src/test/resources/logback.xml b/aai-core/src/test/resources/logback.xml new file mode 100644 index 00000000..d9627b22 --- /dev/null +++ b/aai-core/src/test/resources/logback.xml @@ -0,0 +1,292 @@ + + + + ${module.ajsc.namespace.name} + + + + + + + + ERROR + ACCEPT + DENY + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + + + + + + + INFO + ACCEPT + DENY + + ${logDirectory}/rest/metric.log + + ${logDirectory}/rest/metric.log.%d{yyyy-MM-dd} + + + + %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%m%n + + + + + + DEBUG + ACCEPT + DENY + + ${logDirectory}/rest/debug.log + + ${logDirectory}/rest/debug.log.%d{yyyy-MM-dd} + + + + %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%m%n + + + + + + WARN + ACCEPT + DENY + + ${logDirectory}/rest/error.log + + ${logDirectory}/rest/error.log.%d{yyyy-MM-dd} + + + + + %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%m%n + + + + + + + + audit + + co\=aairest + + level == INFO && audit.matches(formattedMessage) + + ACCEPT + DENY + + ${logDirectory}/rest/audit.log + + ${logDirectory}/rest/metric.log.%d{yyyy-MM-dd} + + + %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%m%n + + + + + + + ${logDirectory}/rest/audit.log + + ${logDirectory}/rest/audit-${Pid}.%d{yyyy-MM-dd}.log.zip + + + + 5MB + + + "%d [%thread] %-5level %logger{1024} - %msg%n" + + + + + + + ${logDirectory}/rest/perform.log + + ${logDirectory}/rest/perform-${Pid}.%d{yyyy-MM-dd}.log.zip + + + + + "%d [%thread] %-5level %logger{1024} - %msg%n" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${JMS_LOGGER_AUDIT_QUEUE_BINDING} + + + + + + + + ${JMS_LOGGER_PERF_QUEUE_BINDING} + + + + + + + 1000 + 0 + + + + + 1000 + 0 + + + + + + + + + + + + + + + + + + + + + diff --git a/aai-schema/.classpath b/aai-schema/.classpath index c6b9d3e7..6ff0f58b 100644 --- a/aai-schema/.classpath +++ b/aai-schema/.classpath @@ -11,12 +11,6 @@ - - - - - - diff --git a/aai-schema/src/main/java/org/openecomp/aai/schema/enums/PropertyMetadata.java b/aai-schema/src/main/java/org/openecomp/aai/schema/enums/PropertyMetadata.java index 59797cfd..4e177b2b 100644 --- a/aai-schema/src/main/java/org/openecomp/aai/schema/enums/PropertyMetadata.java +++ b/aai-schema/src/main/java/org/openecomp/aai/schema/enums/PropertyMetadata.java @@ -47,6 +47,10 @@ public enum PropertyMetadata { * controls the visibility of a field based on context */ VISIBILITY("visibility"), + /** + * specifies a field which must be populated to pass validation + */ + REQUIRES("requires"), /** * automatically creates an id for the property if not specified */ diff --git a/aai-schema/src/main/resources/aai_schema/aai_schema_v10.xsd b/aai-schema/src/main/resources/aai_schema/aai_schema_v10.xsd index bf05ced7..690352b3 100644 --- a/aai-schema/src/main/resources/aai_schema/aai_schema_v10.xsd +++ b/aai-schema/src/main/resources/aai_schema/aai_schema_v10.xsd @@ -2288,14 +2288,14 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",dbAlias="model-invariant-id-local") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",requires="model-version-id",dbAlias="model-invariant-id-local") - @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",dbAlias="model-version-id-local") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="model-invariant-id",dbAlias="model-version-id-local") @@ -2435,14 +2435,14 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",dbAlias="model-invariant-id-local") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",requires="model-version-id",dbAlias="model-invariant-id-local") - @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",dbAlias="model-version-id-local") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="model-invariant-id",dbAlias="model-version-id-local") @@ -2530,14 +2530,14 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",dbAlias="model-invariant-id-local") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",requires="model-version-id",dbAlias="model-invariant-id-local") - @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",dbAlias="model-version-id-local") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="model-invariant-id",dbAlias="model-version-id-local") @@ -3403,14 +3403,14 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",dbAlias="model-invariant-id-local") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",requires="model-version-id",dbAlias="model-invariant-id-local") - @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",dbAlias="model-version-id-local") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="model-invariant-id",dbAlias="model-version-id-local") @@ -4883,14 +4883,14 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",dbAlias="model-invariant-id-local") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",requires="model-version-id",dbAlias="model-invariant-id-local") - @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",dbAlias="model-version-id-local") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="model-invariant-id",dbAlias="model-version-id-local") @@ -5084,14 +5084,14 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",dbAlias="model-invariant-id-local") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",requires="model-version-id",dbAlias="model-invariant-id-local") - @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",dbAlias="model-version-id-local") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="model-invariant-id",dbAlias="model-version-id-local") @@ -5402,14 +5402,14 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",dbAlias="model-invariant-id-local") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",requires="model-version-id",dbAlias="model-invariant-id-local") - @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",dbAlias="model-version-id-local") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="model-invariant-id",dbAlias="model-version-id-local") @@ -6046,7 +6046,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="Encyption values like 3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc") + @org.openecomp.aai.annotations.Metadata(description="Encyption values like 3des-cbc, des-cbc, aes-128-cbc,?aes-192-cbc, aes-265-cbc") @@ -6088,7 +6088,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc") + @org.openecomp.aai.annotations.Metadata(description="3des-cbc, des-cbc, aes-128-cbc,?aes-192-cbc, aes-265-cbc") @@ -6109,7 +6109,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="user ID for xAuth, sm-user,nmteHostName") + @org.openecomp.aai.annotations.Metadata(description="user ID for xAuth, sm-user, ,nmteHostName") @@ -6282,7 +6282,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="Design of zone [Medium/Large]") + @org.openecomp.aai.annotations.Metadata(description="Design of zone [Medium/Large?]") @@ -6583,9 +6583,24 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + + + + + + + + - + + + @org.openecomp.aai.annotations.Metadata(description="Extra properties for inventory item for response list") + + + + + @@ -6626,13 +6641,6 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - - - - - - - diff --git a/aai-schema/src/main/resources/aai_schema/aai_schema_v8.xsd b/aai-schema/src/main/resources/aai_schema/aai_schema_v8.xsd index ecbbd5b0..27d18ab1 100644 --- a/aai-schema/src/main/resources/aai_schema/aai_schema_v8.xsd +++ b/aai-schema/src/main/resources/aai_schema/aai_schema_v8.xsd @@ -5,49 +5,39 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:annox="http://annox.dev.java.net" jaxb:extensionBindingPrefixes="annox"> - + - - - - @org.openecomp.aai.annotations.Metadata(description="The specific type of node in the AAI graph") - - - - - - - @org.openecomp.aai.annotations.Metadata(description="The URL to the specific resource") - - - + + - + - + + + + - + - + - + - - + - + @@ -55,58 +45,58 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - + - - + - + - - - @org.openecomp.aai.annotations.Metadata(description="Serves a PATCH like function. Does not enforce concurrency control.") - - - - - - + + + - + - - + + + + + + - + - - - - - + + + + @org.openecomp.aai.annotations.Metadata(description="The specific type of node in the A&AI graph") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="The URL to the specific resource") + + + - + - - - @org.openecomp.aai.annotations.Metadata(description="APIs that are more action related than REST (e.g., notify, update).") - - - - + @@ -116,7 +106,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="A keyword provided by AAI to indicate an attribute.") + @org.openecomp.aai.annotations.Metadata(description="A keyword provided by A&AI to indicate an attribute.") @@ -156,14 +146,14 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="A keyword provided by AAI to indicate type of node.") + @org.openecomp.aai.annotations.Metadata(description="A keyword provided by A&AI to indicate type of node.") - @org.openecomp.aai.annotations.Metadata(description="URL to the object in AAI.") + @org.openecomp.aai.annotations.Metadata(description="URL to the object in A&AI.") @@ -179,46 +169,46 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - + - @org.openecomp.aai.annotations.Metadata(description="Persistent block-level storage.",indexedProps="volume-group-name,vnf-type,heat-stack-id,volume-group-id",dependentOn="cloud-region",container="volume-groups") + @org.openecomp.aai.annotations.Metadata(description="OAM network, to be deprecated shortly. Do not use for new purposes. ",nameProps="network-name",indexedProps="cvlan-tag,network-uuid,network-name",dependentOn="cloud-region",container="oam-networks") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique ID of volume-group.") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="UUID of the network. Unique across a cloud-region") - + - @org.openecomp.aai.annotations.Metadata(description="Name of the volume group.") + @org.openecomp.aai.annotations.Metadata(description="Name of the network.") - + - @org.openecomp.aai.annotations.Metadata(description="Heat stack id corresponding to this volume-group") + @org.openecomp.aai.annotations.Metadata(description="cvlan-id") - + - @org.openecomp.aai.annotations.Metadata(description="String capturing type of vnf, that was intended to identify the SDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as SDC matures.") + @org.openecomp.aai.annotations.Metadata(description="Used for VNF firewall rule so customer cannot send customer traffic over this oam network") - + - @org.openecomp.aai.annotations.Metadata(description="Orchestration status of this volume-group") + @org.openecomp.aai.annotations.Metadata(description="Used for VNF firewall rule so customer cannot send customer traffic over this oam network") @@ -233,37 +223,37 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - + - @org.openecomp.aai.annotations.Metadata(description="Collection of persistent block-level storage.") + @org.openecomp.aai.annotations.Metadata(description="Collection of OAM networks, to be deprecated shortly. Do not use for new purposes. ") - + - + - @org.openecomp.aai.annotations.Metadata(description="Ephemeral Block storage volume.",indexedProps="volume-id",dependentOn="vserver",container="volumes") + @org.openecomp.aai.annotations.Metadata(description="Digital virtual switch metadata, used by SDN-C to configure VCEs. A&AI needs to receive this data from the PO deployment team and administer it using the provisioningTool.sh into A&AI. ",indexedProps="vcenter-url,switch-name",dependentOn="cloud-region",container="dvs-switches") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique ID of block storage volume relative to the vserver.") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="DVS switch name") - + - @org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details") + @org.openecomp.aai.annotations.Metadata(description="URL used to reach the vcenter") @@ -278,79 +268,195 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - + - @org.openecomp.aai.annotations.Metadata(description="Collection of ephemeral Block storage volumes.") + @org.openecomp.aai.annotations.Metadata(description="Collection of digital virtual switch metadata used for vmWare VCEs and VPEs.") - + - + - @org.openecomp.aai.annotations.Metadata(description="IPv4 Address Range",indexedProps="l3-interface-ipv4-address,vlan-id-inner,neutron-network-id,neutron-subnet-id",dependentOn="vlan,l-interface") + @org.openecomp.aai.annotations.Metadata(description="Availability zone, a collection of compute hosts/pservers",indexedProps="availability-zone-name",dependentOn="cloud-region",container="availability-zones") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="IP address") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Name of the availability zone. Unique across a cloud region") - + - @org.openecomp.aai.annotations.Metadata(description="Prefix length, 32 for single address") + @org.openecomp.aai.annotations.Metadata(description="Type of hypervisor. Source of truth should define valid values.") - + - @org.openecomp.aai.annotations.Metadata(description="Inner VLAN tag") + @org.openecomp.aai.annotations.Metadata(description="State that indicates whether the availability zone should be used, etc. Source of truth should define valid values.",dbAlias="operational-status") - + - @org.openecomp.aai.annotations.Metadata(description="Outer VLAN tag") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Serves a PATCH like function. Does not enforce concurrency control. Clear each usage with AAI team.") + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="APIs that are more action related than REST (e.g., notify, update).") + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="A collection of C tags (vlan tags) grouped for a specific purpose.",indexedProps="availability-zone-name",dependentOn="complex",container="ctag-pools") + + + + - @org.openecomp.aai.annotations.Metadata(description="Indicator of fixed or floating address") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="The Target provider edge router") - + - @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Name of the availability zone") - + - @org.openecomp.aai.annotations.Metadata(description="Neutron network id of the interface that address belongs to") + @org.openecomp.aai.annotations.Metadata(description="Describes what the intended purpose of this pool is.") - + - @org.openecomp.aai.annotations.Metadata(description="Neutron id of subnet that address belongs to") + @org.openecomp.aai.annotations.Metadata(description="Comma separated list of ctags") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") @@ -358,46 +464,46 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - + + + + + + + + - @org.openecomp.aai.annotations.Metadata(description="IPv6 Address Range",indexedProps="l3-interface-ipv6-address,vlan-id-inner,neutron-network-id,neutron-subnet-id",dependentOn="vlan,l-interface") + @org.openecomp.aai.annotations.Metadata(description="Collection of physical locations that can house cloud-regions.",indexedProps="identity-url,data-center-code,complex-name,physical-location-id",searchable="physical-location-id,data-center-code,complex-name,street1,street2,postal-code",uniqueProps="physical-location-id",container="complexes",namespace="cloud-infrastructure") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="IP address") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique identifier for physical location, e.g., CLLI") - + - @org.openecomp.aai.annotations.Metadata(description="Prefix length, 128 for single address") + @org.openecomp.aai.annotations.Metadata(description="Data center code which can be an alternate way to identify a complex") - + - @org.openecomp.aai.annotations.Metadata(description="Inner VLAN tag") + @org.openecomp.aai.annotations.Metadata(description="Gamma complex name for LCP instance.") - - - - @org.openecomp.aai.annotations.Metadata(description="Outer VLAN tag") - - - - + - @org.openecomp.aai.annotations.Metadata(description="Indicator of fixed or floating address") + @org.openecomp.aai.annotations.Metadata(description="URL of the keystone identity service") @@ -408,401 +514,461 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - - - - @org.openecomp.aai.annotations.Metadata(description="Neutron network id of the interface that address belongs to") - - - - + - @org.openecomp.aai.annotations.Metadata(description="Neutron id of subnet that address belongs to") + @org.openecomp.aai.annotations.Metadata(description="Type, e.g., central office, data center.") + + + + + + + + + + + + - + - @org.openecomp.aai.annotations.Metadata(description="Definition of vlan",indexedProps="vlan-interface,vlan-id-inner,vpn-id",uniqueProps="vpn-id",dependentOn="l-interface",container="vlans") + @org.openecomp.aai.annotations.Metadata(description="Collection of physical locations that can house cloud-regions.") - + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Persistent block-level storage.",indexedProps="volume-group-name,vnf-type,heat-stack-id,volume-group-id",dependentOn="cloud-region",container="volume-groups") + + + + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="String that identifies the interface") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique ID of volume-group.") - + - @org.openecomp.aai.annotations.Metadata(description="Inner VLAN tag") + @org.openecomp.aai.annotations.Metadata(description="Name of the volume group.") - + - @org.openecomp.aai.annotations.Metadata(description="Outer VLAN tag") + @org.openecomp.aai.annotations.Metadata(description="Heat stack id corresponding to this volume-group") - + - @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + @org.openecomp.aai.annotations.Metadata(description="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures.") - + - @org.openecomp.aai.annotations.Metadata(description="Captures the numeric part of the speed") + @org.openecomp.aai.annotations.Metadata(description="Orchestration status of this volume-group") - + - @org.openecomp.aai.annotations.Metadata(description="Captures the units corresponding to the speed") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of persistent block-level storage.") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Ephemeral Block storage volume.",indexedProps="volume-id",dependentOn="vserver",container="volumes") + + + + - @org.openecomp.aai.annotations.Metadata(description="Used to describe (the service associated with) the vlan") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique ID of block storage volume relative to the vserver.") - + - @org.openecomp.aai.annotations.Metadata(description="Whether customer is going to use this VLAN for backdoor connection to another customer premise device.") + @org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details") - + - @org.openecomp.aai.annotations.Metadata(description="This indicates the customers VPN ID associated with this vlan") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - - - + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of ephemeral Block storage volumes.") + + - + - + - @org.openecomp.aai.annotations.Metadata(description="Logical interfaces, e.g., a vnic.",indexedProps="macaddr,interface-id,interface-name,network-name",dependentOn="generic-vnf,p-interface,vserver,lag-interface",container="l-interfaces") + @org.openecomp.aai.annotations.Metadata(description="IPv4 Address Range",indexedProps="l3-interface-ipv4-address,vlan-id-inner,neutron-network-id,neutron-subnet-id",dependentOn="vlan,l-interface") - - - - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Name given to the interface") - - - - + - @org.openecomp.aai.annotations.Metadata(description="E.g., CUSTOMER, UPLINK, etc.") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="IP address") - + - @org.openecomp.aai.annotations.Metadata(description="Questionably placed - v6 ip addr of this interface (is in vr-lan-interface from Mary B.") + @org.openecomp.aai.annotations.Metadata(description="Prefix length, 32 for single address") - + - @org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details") + @org.openecomp.aai.annotations.Metadata(description="Inner VLAN tag") - + - @org.openecomp.aai.annotations.Metadata(description="ID of interface") + @org.openecomp.aai.annotations.Metadata(description="Outer VLAN tag") - + - @org.openecomp.aai.annotations.Metadata(description="MAC address for the interface") + @org.openecomp.aai.annotations.Metadata(description="Indicator of fixed or floating address") - + - @org.openecomp.aai.annotations.Metadata(description="Name of the network") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - + - @org.openecomp.aai.annotations.Metadata(description="Whether AAI should be managing this interface of not. Could have value like CUSTOMER") + @org.openecomp.aai.annotations.Metadata(description="Neutron network id of the interface that address belongs to") - + - @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + @org.openecomp.aai.annotations.Metadata(description="Neutron id of subnet that address belongs to") - - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Collection of logical interfaces.") - - - - - + - @org.openecomp.aai.annotations.Metadata(description="Virtual Servers, aka virtual machine or VM.",nameProps="vserver-name",indexedProps="is-closed-loop-disabled,prov-status,vserver-name,vserver-id,in-maint,vserver-name2",searchable="vserver-name,vserver-id,vserver-name2",dependentOn="tenant",container="vservers") + @org.openecomp.aai.annotations.Metadata(description="IPv6 Address Range",indexedProps="l3-interface-ipv6-address,vlan-id-inner,neutron-network-id,neutron-subnet-id",dependentOn="vlan,l-interface") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique identifier for this vserver relative to its tenant") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="IP address") - + - @org.openecomp.aai.annotations.Metadata(description="Name of vserver") + @org.openecomp.aai.annotations.Metadata(description="Prefix length, 128 for single address") - + - @org.openecomp.aai.annotations.Metadata(description="Alternative name of vserver") + @org.openecomp.aai.annotations.Metadata(description="Inner VLAN tag") - + - @org.openecomp.aai.annotations.Metadata(description="Trigger for operational monitoring of this resource by Service Assurance systems.") + @org.openecomp.aai.annotations.Metadata(description="Outer VLAN tag") - + - @org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details") + @org.openecomp.aai.annotations.Metadata(description="Indicator of fixed or floating address") - + - @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="Used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs.") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - + - @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="Used to indicate whether closed loop function is enabled on this node") + @org.openecomp.aai.annotations.Metadata(description="Neutron network id of the interface that address belongs to") - + - @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + @org.openecomp.aai.annotations.Metadata(description="Neutron id of subnet that address belongs to") - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Collection of virtual Servers, aka virtual machines or VMs.") - - - - - + - @org.openecomp.aai.annotations.Metadata(description="Openstack tenant",nameProps="tenant-name",indexedProps="tenant-name,tenant-id",dependentOn="cloud-region",container="tenants") + @org.openecomp.aai.annotations.Metadata(description="Definition of vlan",indexedProps="vlan-interface,vlan-id-inner,vpn-id",uniqueProps="vpn-id",dependentOn="l-interface",container="vlans") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique id relative to the cloud-region.") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="String that identifies the interface") - + - @org.openecomp.aai.annotations.Metadata(description="Readable name of tenant") + @org.openecomp.aai.annotations.Metadata(description="Inner VLAN tag") - + - @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + @org.openecomp.aai.annotations.Metadata(description="Outer VLAN tag") - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Collection of openstack tenants.") - - - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Openstack flavor.",nameProps="flavor-name",indexedProps="flavor-name,flavor-id",dependentOn="cloud-region",container="flavors") - - - - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Flavor id, expected to be unique across cloud-region.") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - + - @org.openecomp.aai.annotations.Metadata(description="Flavor name") + @org.openecomp.aai.annotations.Metadata(description="Captures the numeric part of the speed") - + - @org.openecomp.aai.annotations.Metadata(description="Number of CPUs") + @org.openecomp.aai.annotations.Metadata(description="Captures the units corresponding to the speed") - + - @org.openecomp.aai.annotations.Metadata(description="Amount of memory") + @org.openecomp.aai.annotations.Metadata(description="Used to describe (the service associated with) the vlan") - + - @org.openecomp.aai.annotations.Metadata(description="Disk space") + @org.openecomp.aai.annotations.Metadata(description="Whether customer is going to use this VLAN for backdoor connection to another customer premise device.") - + - @org.openecomp.aai.annotations.Metadata(description="Amount of ephemeral disk space") + @org.openecomp.aai.annotations.Metadata(description="This indicates the customers VPN ID associated with this vlan",dbAlias="vpn-id-local") - + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="SR-IOV Virtual Function (not to be confused with virtual network function)",indexedProps="pci-id,vf-vlan-filter,vf-mac-filter,vf-vlan-strip,neutron-network-id",dependentOn="l-interface",container="sriov-vfs") + + + + - @org.openecomp.aai.annotations.Metadata(description="amount of swap space allocation") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="PCI ID used to identify the sriov-vf") - + - @org.openecomp.aai.annotations.Metadata(description="whether flavor is available to all users or private to the tenant it was created in.") + @org.openecomp.aai.annotations.Metadata(description="This metadata provides option to specify list of VLAN filters applied on VF to pass the traffic to VM.") - + - @org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details") + @org.openecomp.aai.annotations.Metadata(description="When MAC filters are specified, VF-agent service configures VFs to do MAC level filtering before the traffic is passed to VM.") - + - @org.openecomp.aai.annotations.Metadata(description="Boolean as to whether this flavor is no longer enabled") + @org.openecomp.aai.annotations.Metadata(description="When this field is set to true, VF will configured to strip the outer TAG before the traffic is passed to VM.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="This option ensures anti VLAN spoof checks are done at the VF level to comply with security. The disable check will also be honored per the VNF needs for trusted VMs.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="This option ensures anti MAC spoof checks are done at the VF level to comply with security. The disable check will also be honored per the VNF needs for trusted VMs.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="This option defines the set of Mirror objects which essentially mirrors the traffic from source to set of collector VNF Ports.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="This option, if set to true, sets the VF in promiscuous mode and allows all broadcast traffic to reach the VM") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="This option, if set to true, sets the VF in promiscuous mode and allows unknown multicast traffic to reach the VM") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="This option, if set to true, sets the VF in promiscuous mode and allows unknown unicast traffic to reach the VM") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="This option, if set to true, instructs to insert outer tag after traffic comes out of VM.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="This option is used to set the link status. Valid values as of 1607 are on, off, and auto.") @@ -813,55 +979,90 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + + + + @org.openecomp.aai.annotations.Metadata(description="Neutron network id of the interface") + + + - + - @org.openecomp.aai.annotations.Metadata(description="Collection of openstack flavors.") + @org.openecomp.aai.annotations.Metadata(description="Collection of SR-IOV Virtual Functions.") - + - + - @org.openecomp.aai.annotations.Metadata(description="Openstack group-assignment used to store exclusivity groups (EG).",nameProps="group-name",indexedProps="group-id,group-type,group-name",dependentOn="cloud-region",container="group-assignments") + @org.openecomp.aai.annotations.Metadata(description="Logical interfaces, e.g., a vnic.",indexedProps="macaddr,interface-id,interface-name,network-name",dependentOn="generic-vnf,newvce,vpe,p-interface,vserver,lag-interface",container="l-interfaces") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Group id, expected to be unique across cloud-region.") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Name given to the interface") - + - @org.openecomp.aai.annotations.Metadata(description="Group type - the type of group this instance refers to") + @org.openecomp.aai.annotations.Metadata(description="E.g., CUSTOMER, UPLINK, etc.") - + - @org.openecomp.aai.annotations.Metadata(description="Group name - name assigned to the group") + @org.openecomp.aai.annotations.Metadata(description="Questionably placed - v6 ip addr of this interface (is in vr-lan-interface from Mary B.") - + - @org.openecomp.aai.annotations.Metadata(description="Group description - description of the group") + @org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="ID of interface") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="MAC address for the interface") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Name of the network") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Whether A&AI should be managing this interface of not. Could have value like CUSTOMER") @@ -872,97 +1073,80 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + + + + - + - @org.openecomp.aai.annotations.Metadata(description="Collection of openstack group assignments") + @org.openecomp.aai.annotations.Metadata(description="Collection of logical interfaces.") - + - + - @org.openecomp.aai.annotations.Metadata(description="Openstack snapshot",nameProps="snapshot-name",uniqueProps="snapshot-id",indexedProps="application,snapshot-name,application-vendor,snapshot-id,application-version,prev-snapshot-id",dependentOn="cloud-region",container="snapshots") + @org.openecomp.aai.annotations.Metadata(description="Virtual Servers, aka virtual machine or VM.",nameProps="vserver-name",indexedProps="is-closed-loop-disabled,prov-status,vserver-name,vserver-id,in-maint,vserver-name2",searchable="vserver-name,vserver-id,vserver-name2",dependentOn="tenant",container="vservers") - - - - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Snapshot id, this is the key UUID assoc associated in glance with the snapshots.") - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Snapshot name") - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Operating system architecture") - - - - + - @org.openecomp.aai.annotations.Metadata(description="The common name of the operating system distribution in lowercase") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique identifier for this vserver relative to its tenant") - + - @org.openecomp.aai.annotations.Metadata(description="The operating system version as specified by the distributor.") + @org.openecomp.aai.annotations.Metadata(description="Name of vserver") - + - @org.openecomp.aai.annotations.Metadata(description="The application that the image instantiates.") + @org.openecomp.aai.annotations.Metadata(description="Alternative name of vserver") - + - @org.openecomp.aai.annotations.Metadata(description="The vendor of the application.") + @org.openecomp.aai.annotations.Metadata(description="Trigger for operational monitoring of this resource by Service Assurance systems.") - + - @org.openecomp.aai.annotations.Metadata(description="The version of the application.") + @org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details") - + - @org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details") + @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="Used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs.") - + - @org.openecomp.aai.annotations.Metadata(description="This field contains the UUID of the previous snapshot (if any).") + @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="Used to indicate whether closed loop function is enabled on this node") @@ -973,38 +1157,46 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + + - + - @org.openecomp.aai.annotations.Metadata(description="Collection of openstack snapshots") + @org.openecomp.aai.annotations.Metadata(description="Collection of virtual Servers, aka virtual machines or VMs.") - + - + - @org.openecomp.aai.annotations.Metadata(description="Key/value pairs",indexedProps="metaname",dependentOn="tenant,image,service-instance,model",container="metadata") + @org.openecomp.aai.annotations.Metadata(description="Openstack tenant",nameProps="tenant-name",indexedProps="tenant-name,tenant-id",dependentOn="cloud-region",container="tenants") - + - @org.openecomp.aai.annotations.Metadata(isKey=true) + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique id relative to the cloud-region.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Readable name of tenant") - @@ -1012,92 +1204,101 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + + - + - @org.openecomp.aai.annotations.Metadata(description="Collection of metadatum (key/value pairs)") + @org.openecomp.aai.annotations.Metadata(description="Collection of openstack tenants.") - + - + - @org.openecomp.aai.annotations.Metadata(description="Openstack image.",nameProps="image-name",indexedProps="application,image-name,application-vendor,image-id,application-version",dependentOn="cloud-region",container="images") + @org.openecomp.aai.annotations.Metadata(description="Openstack flavor.",nameProps="flavor-name",indexedProps="flavor-name,flavor-id",dependentOn="cloud-region",container="flavors") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Image id, expected to be unique across cloud region") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Flavor id, expected to be unique across cloud-region.") - + - @org.openecomp.aai.annotations.Metadata(description="Image name") + @org.openecomp.aai.annotations.Metadata(description="Flavor name") - + - @org.openecomp.aai.annotations.Metadata(description="Operating system architecture.") + @org.openecomp.aai.annotations.Metadata(description="Number of CPUs") - + - @org.openecomp.aai.annotations.Metadata(description="The common name of the operating system distribution in lowercase") + @org.openecomp.aai.annotations.Metadata(description="Amount of memory") - + - @org.openecomp.aai.annotations.Metadata(description="The operating system version as specified by the distributor.") + @org.openecomp.aai.annotations.Metadata(description="Disk space") - + - @org.openecomp.aai.annotations.Metadata(description="The application that the image instantiates.") + @org.openecomp.aai.annotations.Metadata(description="Amount of ephemeral disk space") - + - @org.openecomp.aai.annotations.Metadata(description="The vendor of the application.") + @org.openecomp.aai.annotations.Metadata(description="amount of swap space allocation") - + - @org.openecomp.aai.annotations.Metadata(description="The version of the application.") + @org.openecomp.aai.annotations.Metadata(description="whether flavor is available to all users or private to the tenant it was created in.") - + @org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details") + + + + @org.openecomp.aai.annotations.Metadata(description="Boolean as to whether this flavor is no longer enabled") + + + @@ -1106,48 +1307,54 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - - + - @org.openecomp.aai.annotations.Metadata(description="Collectio of Openstack images.") + @org.openecomp.aai.annotations.Metadata(description="Collection of openstack flavors.") - + - + - @org.openecomp.aai.annotations.Metadata(description="Availability zone, a collection of compute hosts/pservers",indexedProps="availability-zone-name",dependentOn="cloud-region",container="availability-zones") + @org.openecomp.aai.annotations.Metadata(description="Openstack group-assignment used to store exclusivity groups (EG).",nameProps="group-name",indexedProps="group-id,group-type,group-name",dependentOn="cloud-region",container="group-assignments") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Name of the availability zone. Unique across a cloud region") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Group id, expected to be unique across cloud-region.") - + - @org.openecomp.aai.annotations.Metadata(description="Type of hypervisor. Source of truth should define valid values.") + @org.openecomp.aai.annotations.Metadata(description="Group type - the type of group this instance refers to") - + - @org.openecomp.aai.annotations.Metadata(description="State that indicates whether the availability zone should be used, etc. Source of truth should define valid values.") + @org.openecomp.aai.annotations.Metadata(description="Group name - name assigned to the group") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Group description - description of the group") @@ -1162,79 +1369,93 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - + - @org.openecomp.aai.annotations.Metadata(description="Collection of availability zones") + @org.openecomp.aai.annotations.Metadata(description="Collection of openstack group assignments") - + - + - @org.openecomp.aai.annotations.Metadata(description="cloud-region designates an installation of a cloud cluster or region or instantiation. Cloud regions are uniquely identified by a composite key, cloud-owner + cloud-region-id. The format of the cloud-owner is vendor-cloudname.",indexedProps="cloud-owner,cloud-region-id,cloud-type,owner-defined-type",nameProps="owner-defined-type",container="cloud-regions",namespace="cloud-infrastructure") + @org.openecomp.aai.annotations.Metadata(description="Openstack snapshot",nameProps="snapshot-name",uniqueProps="snapshot-id",indexedProps="application,snapshot-name,application-vendor,snapshot-id,application-version,prev-snapshot-id",dependentOn="cloud-region",container="snapshots") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Identifies the vendor and cloud name. First part of composite key should be formatted as vendor-cloudname") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Snapshot id, this is the key UUID assoc associated in glance with the snapshots.") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Identifier used by the vendor for the region. Second part of composite key") + @org.openecomp.aai.annotations.Metadata(description="Snapshot name") - + - @org.openecomp.aai.annotations.Metadata(description="Type of the cloud (e.g., openstack)") + @org.openecomp.aai.annotations.Metadata(description="Operating system architecture") - + - @org.openecomp.aai.annotations.Metadata(description="Cloud-owner defined type indicator") + @org.openecomp.aai.annotations.Metadata(description="The common name of the operating system distribution in lowercase") - + - @org.openecomp.aai.annotations.Metadata(description="Software version employed at the site") + @org.openecomp.aai.annotations.Metadata(description="The operating system version as specified by the distributor.") - + - @org.openecomp.aai.annotations.Metadata(description="URL of the keystone identity service") + @org.openecomp.aai.annotations.Metadata(description="The application that the image instantiates.") - + - @org.openecomp.aai.annotations.Metadata(description="Zone where the cloud is homed") + @org.openecomp.aai.annotations.Metadata(description="The vendor of the application.") - + - @org.openecomp.aai.annotations.Metadata(description="complex name for cloud-region instance") + @org.openecomp.aai.annotations.Metadata(description="The version of the application.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="This field contains the UUID of the previous snapshot (if any).") @@ -1245,426 +1466,547 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - - - - - - - - + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of openstack snapshots") + + - + - + - @org.openecomp.aai.annotations.Metadata(description="Physical interface (e.g., nic)",indexedProps="interface-name",dependentOn="pserver,pnf",container="p-interfaces") + @org.openecomp.aai.annotations.Metadata(description="Key/value pairs",indexedProps="metaname",dependentOn="tenant,image,service-instance,connector,model",container="metadata") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Name that identifies the physical interface") + @org.openecomp.aai.annotations.Metadata(isKey=true) - + + - @org.openecomp.aai.annotations.Metadata(description="Captures the numeric part of the speed") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of metadatum (key/value pairs)") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Openstack image.",nameProps="image-name",indexedProps="application,image-name,application-vendor,image-id,application-version",dependentOn="cloud-region",container="images") + + + + - @org.openecomp.aai.annotations.Metadata(description="Captures the units corresponding to the speed") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Image id, expected to be unique across cloud region") - + - @org.openecomp.aai.annotations.Metadata(description="Nature of the services and connectivity on this port.") + @org.openecomp.aai.annotations.Metadata(description="Image name") - + - @org.openecomp.aai.annotations.Metadata(description="CLEI or other specification for p-interface hardware.") + @org.openecomp.aai.annotations.Metadata(description="Operating system architecture.") - + - @org.openecomp.aai.annotations.Metadata(description="Role specification for p-interface hardware.") + @org.openecomp.aai.annotations.Metadata(description="The common name of the operating system distribution in lowercase") - + - @org.openecomp.aai.annotations.Metadata(description="Indicates the physical properties of the interface.") + @org.openecomp.aai.annotations.Metadata(description="The operating system version as specified by the distributor.") - + - @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + @org.openecomp.aai.annotations.Metadata(description="The application that the image instantiates.") - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Collection of physical interfaces.") - - - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Link aggregate interface",indexedProps="interface-name",dependentOn="generic-vnf,pserver,pnf",container="lag-interfaces") - - - - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Name that identifies the link aggregate interface") + @org.openecomp.aai.annotations.Metadata(description="The vendor of the application.") - + - @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + @org.openecomp.aai.annotations.Metadata(description="The version of the application.") - + - @org.openecomp.aai.annotations.Metadata(description="Captures the numeric part of the speed") + @org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details") - + - @org.openecomp.aai.annotations.Metadata(description="Captures the units corresponding to the speed") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - + - + - @org.openecomp.aai.annotations.Metadata(description="Collection of link aggregate interfaces.") + @org.openecomp.aai.annotations.Metadata(description="Collectio of Openstack images.") - + - + - @org.openecomp.aai.annotations.Metadata(description="Compute host whose hostname must be unique and must exactly match what is sent as a relationship to a vserver.",nameProps="pserver-name2",indexedProps="hostname,in-maint,pserver-id,pserver-name2",searchable="hostname,pserver-name2,pserver-id,ipv4-oam-address",container="pservers",namespace="cloud-infrastructure") + @org.openecomp.aai.annotations.Metadata(description="Collection of availability zones") - + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="cloud-region designates an installation of a cloud cluster or region or instantiation. In AT&Ts AIC cloud, this could be an LCP or DCP. Cloud regions are uniquely identified by a composite key, cloud-owner + cloud-region-id. The format of the cloud-owner is vendor-cloudname and we will use att-aic for AT&T's AIC.",indexedProps="cloud-owner,cloud-region-id,cloud-type,owner-defined-type",nameProps="owner-defined-type",container="cloud-regions",namespace="cloud-infrastructure") + + + + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Value from executing hostname on the compute node.") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Identifies the vendor and cloud name. First part of composite key should be formatted as vendor-cloudname") - + - @org.openecomp.aai.annotations.Metadata(description="PTNII name") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Identifier used by the vendor for the region. Second part of composite key") - + - @org.openecomp.aai.annotations.Metadata(description="Number of cpus") + @org.openecomp.aai.annotations.Metadata(description="Type of the cloud (e.g., openstack)") - + - @org.openecomp.aai.annotations.Metadata(description="Disk size, in GBs") + @org.openecomp.aai.annotations.Metadata(description="Cloud-owner defined type indicator (e.g., DCP, LCP)") - + - @org.openecomp.aai.annotations.Metadata(description="RAM size, in MBs") + @org.openecomp.aai.annotations.Metadata(description="Software version employed at the site") - + - @org.openecomp.aai.annotations.Metadata(description="Equipment type. Source of truth should define valid values.") + @org.openecomp.aai.annotations.Metadata(description="URL of the keystone identity service") - + - @org.openecomp.aai.annotations.Metadata(description="Equipment vendor. Source of truth should define valid values.") + @org.openecomp.aai.annotations.Metadata(description="Zone where the cloud is homed") - + - @org.openecomp.aai.annotations.Metadata(description="Equipment model. Source of truth should define valid values.") + @org.openecomp.aai.annotations.Metadata(description="complex name for cloud-region instance") - + - @org.openecomp.aai.annotations.Metadata(description="Fully-qualified domain name") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - + + + + + + + + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Network profile populated by SDN-GP for SNMP",indexedProps="nm-profile-name",container="network-profiles",namespace="cloud-infrastructure") + + + + - @org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique name of network profile.") - + - @org.openecomp.aai.annotations.Metadata(description="Used to configure device, also used for troubleshooting and is IP used for traps generated by device.") + @org.openecomp.aai.annotations.Metadata(description="Encrypted SNMP community string") - + - @org.openecomp.aai.annotations.Metadata(description="Serial number, may be queried") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of network profiles") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Physical interface (e.g., nic)",indexedProps="interface-name",dependentOn="vpls-pe,pserver,pnf",container="p-interfaces") + + + + - @org.openecomp.aai.annotations.Metadata(description="ID of Pserver") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Name that identifies the physical interface") - + - @org.openecomp.aai.annotations.Metadata(description="internet topology of Pserver") + @org.openecomp.aai.annotations.Metadata(description="Captures the numeric part of the speed") - + - @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs.") + @org.openecomp.aai.annotations.Metadata(description="Captures the units corresponding to the speed") - + - @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + @org.openecomp.aai.annotations.Metadata(description="Nature of the services and connectivity on this port.") - + - @org.openecomp.aai.annotations.Metadata(description="alternative pserver name") + @org.openecomp.aai.annotations.Metadata(description="CLEI or other specification for p-interface hardware.") - + - @org.openecomp.aai.annotations.Metadata(description="purpose of pserver") + @org.openecomp.aai.annotations.Metadata(description="Role specification for p-interface hardware.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Indicates the physical properties of the interface.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - - + - + - @org.openecomp.aai.annotations.Metadata(description="Collection of compute hosts.") + @org.openecomp.aai.annotations.Metadata(description="Collection of physical interfaces.") - + - + - @org.openecomp.aai.annotations.Metadata(description="Namespace for cloud infrastructure.") + @org.openecomp.aai.annotations.Metadata(description="Link aggregate interface",indexedProps="interface-name",dependentOn="generic-vnf,pserver,vpe,vpls-pe,pnf",container="lag-interfaces") - - + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Name that identifies the link aggregate interface") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Captures the numeric part of the speed") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Captures the units corresponding to the speed") + + + + + - + - @org.openecomp.aai.annotations.Metadata(description="Instance of a service",indexedProps="service-instance-id,persona-model-id,persona-model-version,widget-model-id,widget-model-version,service-instance-name,service-instance-location-id",nameProps="service-instance-name",searchable="service-instance-id",uniqueProps="service-instance-id",dependentOn="service-subscription",container="service-instances") + @org.openecomp.aai.annotations.Metadata(description="Collection of link aggregate interfaces.") - + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Compute host whose hostname must be unique and must exactly match what is sent as a relationship to a vserver.",nameProps="pserver-name2",indexedProps="hostname,in-maint,pserver-id,pserver-name2",searchable="hostname,pserver-name2,pserver-id,ipv4-oam-address",container="pservers",namespace="cloud-infrastructure") + + + + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Uniquely identifies this instance of a service") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Value from executing hostname on the compute node.") - + - @org.openecomp.aai.annotations.Metadata(description="This field will store a name assigned to the service-instance.") + @org.openecomp.aai.annotations.Metadata(description="PTNII name") - + - @org.openecomp.aai.annotations.Metadata(description="the SDC model id for this resource or service model.") + @org.openecomp.aai.annotations.Metadata(description="Number of cpus") - + - @org.openecomp.aai.annotations.Metadata(description="the SDC model version for this resource or service model.") + @org.openecomp.aai.annotations.Metadata(description="Disk size, in GBs") - + - @org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary widget model. This maps directly to the AAI widget.") + @org.openecomp.aai.annotations.Metadata(description="RAM size, in MBs") - + - @org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary version of the widget model.This maps directly to the AAI version of the widget.") + @org.openecomp.aai.annotations.Metadata(description="Equipment type. Source of truth should define valid values.") - + - @org.openecomp.aai.annotations.Metadata(description="Indicates the total bandwidth to be used for this service.") + @org.openecomp.aai.annotations.Metadata(description="Equipment vendor. Source of truth should define valid values.") - + - @org.openecomp.aai.annotations.Metadata(description="indicates the upstream bandwidth this service will use on the WAN1 port of the physical device.") + @org.openecomp.aai.annotations.Metadata(description="Equipment model. Source of truth should define valid values.") - + - @org.openecomp.aai.annotations.Metadata(description="indicates the downstream bandwidth this service will use on the WAN1 port of the physical device.") + @org.openecomp.aai.annotations.Metadata(description="Fully-qualified domain name") - + - @org.openecomp.aai.annotations.Metadata(description="indicates the upstream bandwidth this service will use on the WAN2 port of the physical device.") + @org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details") - + - @org.openecomp.aai.annotations.Metadata(description="indicates the downstream bandwidth this service will use on the WAN2 port of the physical device.") + @org.openecomp.aai.annotations.Metadata(description="Used to configure device, also used for troubleshooting and is IP used for traps generated by device.") - + - @org.openecomp.aai.annotations.Metadata(description="URL customers will use to access the vHN Portal.") + @org.openecomp.aai.annotations.Metadata(description="Serial number, may be queried") - + - @org.openecomp.aai.annotations.Metadata(description="Operational status of the service-instance.") + @org.openecomp.aai.annotations.Metadata(description="ID of Pserver") - + - @org.openecomp.aai.annotations.Metadata(description="An identifier that customers assign to the location where this service is being used.") + @org.openecomp.aai.annotations.Metadata(description="internet topology of Pserver") + + + + + + + @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs.") @@ -1675,42 +2017,57 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + + + + @org.openecomp.aai.annotations.Metadata(description="alternative pserver name") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="purpose of pserver") + + + - + + - + - @org.openecomp.aai.annotations.Metadata(description="Collection of service instances") + @org.openecomp.aai.annotations.Metadata(description="Collection of compute hosts.") - + - + - @org.openecomp.aai.annotations.Metadata(description="Object that group service instances.",indexedProps="service-type",dependentOn="customer",container="service-subscriptions") + @org.openecomp.aai.annotations.Metadata(description="Virtual organization of cloud infrastructure elements in a data center context",nameProps="vdc-name",indexedProps="vdc-name,vdc-id",container="virtual-data-centers",namespace="cloud-infrastructure") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Value defined by orchestration to identify this service across OpenECOMP.") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique ID of the vdc") - + - @org.openecomp.aai.annotations.Metadata(description="This property will be deleted from AAI in the near future. Only stop gap solution.") + @org.openecomp.aai.annotations.Metadata(description="Name of the virtual data center") @@ -1721,49 +2078,50 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - - + - @org.openecomp.aai.annotations.Metadata(description="Collection of objects that group service instances.") + @org.openecomp.aai.annotations.Metadata(description="Virtual organization of cloud infrastructure elements in a data center context") - + - + - @org.openecomp.aai.annotations.Metadata(description="customer identifiers to provide linkage back to BSS information.",nameProps="subscriber-name",indexedProps="subscriber-name,global-customer-id,subscriber-type",searchable="subscriber-name,global-customer-id",uniqueProps="global-customer-id,subscriber-name",alternateKeys1="subscriber-name",container="customers",namespace="business") + @org.openecomp.aai.annotations.Metadata(description="Namespace for cloud infrastructure.") - - - - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Global customer id used across OpenECOMP to uniquely identify customer.") - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Subscriber name, an alternate way to retrieve a customer.") - - - - + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of resource instances used to connect a variety of disparate inventory widgets",indexedProps="resource-instance-id,persona-model-id,persona-model-version,widget-model-id,widget-model-version",container="connectors",namespace="business") + + + + - @org.openecomp.aai.annotations.Metadata(description="Subscriber type, a way to provide VID with only the INFRA customers.",defaultValue="CUST") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique id of resource instance.") @@ -1774,301 +2132,161 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Collection of customer identifiers to provide linkage back to BSS information.") - - - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Namespace for business related constructs") - - - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Stand-in for service model definitions. Likely to be deprecated in favor of models from SDC.",indexedProps="service-description,service-id",container="services",namespace="service-design-and-creation") - - - - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="This gets defined by others to provide a unique ID for the service, we accept what is sent.") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",requires="persona-model-version",visibility="deployment") - + - @org.openecomp.aai.annotations.Metadata(description="Description of the service") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="persona-model-id") - + - @org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="internal",dbAlias="model-version-id-local",dataCopy="service-design-and-creation/models/model/{persona-model-id}/model-vers?model-version={persona-model-version}#model-version-id") - + - @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + @org.openecomp.aai.annotations.Metadata(description="the ASDC data dictionary widget model. This maps directly to the A&AI widget.") - + - @org.openecomp.aai.annotations.Metadata(description="service version") + @org.openecomp.aai.annotations.Metadata(description="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget.") + - - - - - @org.openecomp.aai.annotations.Metadata(description="Collection of service model definitions. Likely to be deprecated in favor of models from SDC.") - - - - - - - - + - @org.openecomp.aai.annotations.Metadata(description="This is how we would capture constraints defining allowed sets of elements.",uniqueProps="element-choice-set-uuid",indexedProps="element-choice-set-uuid",allowDirectRead="true",allowDirectWrite="false",container="element-choice-sets") + @org.openecomp.aai.annotations.Metadata(description="Collection of resource instances used to connect a variety of disparate inventory widgets") - - - - @org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true") - - - - - - - - - - - - - - - + - + - @org.openecomp.aai.annotations.Metadata(description="This is how we would capture constraints defining allowed sets of elements.",uniqueProps="constrained-element-set-uuid",indexedProps="constrained-element-set-uuid",allowDirectRead="true",allowDirectWrite="false",container="constrained-element-sets") + @org.openecomp.aai.annotations.Metadata(description="Instance of a service",indexedProps="service-instance-id,persona-model-id,persona-model-version,widget-model-id,widget-model-version,service-instance-name,service-instance-location-id",nameProps="service-instance-name",searchable="service-instance-id",uniqueProps="service-instance-id",dependentOn="service-subscription",container="service-instances") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Uniquely identifies this instance of a service") - - - - - - - - - - - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="This is how we would capture constraints defining allowed sets of elements.",uniqueProps="model-constraint-uuid",indexedProps="model-constraint-uuid",allowDirectRead="true",allowDirectWrite="false",container="model-constraints") - - - - + - @org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true") + @org.openecomp.aai.annotations.Metadata(description="This field will store a name assigned to the service-instance.") - - - - - - - - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Defines how other models combine to make up a higher-level model.",uniqueProps="model-element-uuid",indexedProps="model-element-uuid",allowDirectRead="true",allowDirectWrite="false",container="model-elements") - - - - + - @org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",requires="persona-model-version",visibility="deployment") - + - @org.openecomp.aai.annotations.Metadata(description="Indicates whether this element was created as part of instantiation from this model") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="persona-model-id") - + - @org.openecomp.aai.annotations.Metadata(description="How many of this type of element are required/allowed") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="internal",dbAlias="model-version-id-local",dataCopy="service-design-and-creation/models/model/{persona-model-id}/model-vers?model-version={persona-model-version}#model-version-id") - - - - - @org.openecomp.aai.annotations.Metadata(description="Defines how other models combine to make up a higher-level model.",uniqueProps="model-element-uuid",indexedProps="model-element-uuid",allowDirectRead="true",allowDirectWrite="false",container="model-elements") - - - - - - - - + - @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + @org.openecomp.aai.annotations.Metadata(description="the ASDC data dictionary widget model. This maps directly to the A&AI widget.") - + - @org.openecomp.aai.annotations.Metadata(description="Defines how other models combine to make up a higher-level model") + @org.openecomp.aai.annotations.Metadata(description="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget.") - + - @org.openecomp.aai.annotations.Metadata(description="Describes new constraints on this model element that are not part of that model's definition") + @org.openecomp.aai.annotations.Metadata(description="Indicates the total bandwidth to be used for this service.") - - - - - - - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Subgraph definition provided by SDC to describe an inventory asset and its connections related to SDC models",nameProps="model-name,model-type",indexedProps="model-name-version-id,model-type,model-name,model-id,model-version",alternateKeys1="model-id,model-version",uniqueProps="model-name-version-id",container="models",namespace="service-design-and-creation") - - - - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique identifier corresponding to one version of a model in SDC") + @org.openecomp.aai.annotations.Metadata(description="indicates the upstream bandwidth this service will use on the WAN1 port of the physical device.") - + - @org.openecomp.aai.annotations.Metadata(description="Type of the model, e.g., service, resource, widget, etc.") + @org.openecomp.aai.annotations.Metadata(description="indicates the downstream bandwidth this service will use on the WAN1 port of the physical device.") - + - @org.openecomp.aai.annotations.Metadata(description="Name of the model, which can change from version to version.") + @org.openecomp.aai.annotations.Metadata(description="indicates the upstream bandwidth this service will use on the WAN2 port of the physical device.") - + - @org.openecomp.aai.annotations.Metadata(description="Invariant unique ID which does not change from version to version") + @org.openecomp.aai.annotations.Metadata(description="indicates the downstream bandwidth this service will use on the WAN2 port of the physical device.") - + - @org.openecomp.aai.annotations.Metadata(description="Version") + @org.openecomp.aai.annotations.Metadata(description="URL customers will use to access the vHN Portal.") - + - @org.openecomp.aai.annotations.Metadata(description="Description") + @org.openecomp.aai.annotations.Metadata(description="An identifier that customers assign to the location where this service is being used.") @@ -2079,222 +2297,279 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - - + - + - @org.openecomp.aai.annotations.Metadata(description="Collection of subgraph definitions provided by SDC to describe the inventory assets and their connections related to SDC models") + @org.openecomp.aai.annotations.Metadata(description="Collection of service instances") - + - + - @org.openecomp.aai.annotations.Metadata(description="TBD",uniqueProps="related-lookup-uuid",indexedProps="related-lookup-uuid",allowDirectRead="true",allowDirectWrite="false",container="related-lookups") + @org.openecomp.aai.annotations.Metadata(description="Object that group service instances.",indexedProps="service-type",dependentOn="customer",container="service-subscriptions") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Value defined by orchestration to identify this service across ECOMP.") - - - - - - + + + + @org.openecomp.aai.annotations.Metadata(description="This property will be deleted from A&AI in the near future. Only stop gap solution.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + - + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of objects that group service instances.") + + - + - + - @org.openecomp.aai.annotations.Metadata(description="TBD",uniqueProps="property-constraint-uuid",indexedProps="property-constraint-uuid",allowDirectRead="true",allowDirectWrite="false",container="property-constraints") + @org.openecomp.aai.annotations.Metadata(description="customer identifiers to provide linkage back to BSS information.",nameProps="subscriber-name",indexedProps="subscriber-name,global-customer-id,subscriber-type",searchable="subscriber-name,global-customer-id",uniqueProps="global-customer-id",container="customers",namespace="business") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Global customer id used across ECOMP to uniquely identify customer.") - - - - - - - - - - - + + + + @org.openecomp.aai.annotations.Metadata(description="Subscriber name, an alternate way to retrieve a customer.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Subscriber type, a way to provide VID with only the INFRA customers.",defaultValue="CUST") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + - + - @org.openecomp.aai.annotations.Metadata(description="TBD",uniqueProps="named-query-element-uuid",indexedProps="named-query-element-uuid",allowDirectRead="true",allowDirectWrite="false",container="named-query-elements") + @org.openecomp.aai.annotations.Metadata(description="Collection of customer identifiers to provide linkage back to BSS information.") - - - - @org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true") - - - - - - - - - - - + - + + + + @org.openecomp.aai.annotations.Metadata(description="Namespace for business related constructs") + + - + + - + - @org.openecomp.aai.annotations.Metadata(description="TBD",nameProps="named-query-name",uniqueProps="named-query-uuid",indexedProps="named-query-uuid,named-query-name",container="named-queries",namespace="service-design-and-creation") + @org.openecomp.aai.annotations.Metadata(description="Image object that pertain to a VNF that doesn't have associated vservers. This is a kludge.",indexedProps="application,vnf-image-uuid,application-vendor,application-version",uniqueProps="vnf-image-uuid",container="vnf-images",namespace="service-design-and-creation") - + - @org.openecomp.aai.annotations.Metadata(isKey=true) + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique ID of this asset") - - - - - - - @org.openecomp.aai.annotations.Metadata(description="TBD",nameProps="named-query-name",uniqueProps="named-query-uuid",indexedProps="named-query-uuid,named-query-name",container="named-queries",namespace="service-design-and-creation") - - - - - - + + + + @org.openecomp.aai.annotations.Metadata(description="The application that the image instantiates.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="The vendor of the application.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="The version of the application.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + - - - - - - - - - - - + - @org.openecomp.aai.annotations.Metadata(description="Namespace for objects managed by SDC") + @org.openecomp.aai.annotations.Metadata(description="Collection of image objects that pertain to a VNF that doesn't have associated vservers. This is a kludge.") - - - + - + - @org.openecomp.aai.annotations.Metadata(description="Logical links generally connect l-interfaces but are used to express logical connectivity between two points",indexedProps="link-name,persona-model-id,persona-model-version,widget-model-id,widget-model-version,link-id",uniqueProps="link-id",container="logical-links",namespace="network") + @org.openecomp.aai.annotations.Metadata(description="Stand-in for service model definitions. Likely to be deprecated in favor of models from ASDC.",indexedProps="service-description,service-id",container="services",namespace="service-design-and-creation") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="e.g., evc-name, or vnf-nameA_interface-nameA_vnf-nameZ_interface-nameZ") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="This gets defined by others to provide a unique ID for the service, we accept what is sent.") - + - @org.openecomp.aai.annotations.Metadata(description="Type of logical link, e.g., evc") + @org.openecomp.aai.annotations.Metadata(description="Description of the service") - + - @org.openecomp.aai.annotations.Metadata(description="Captures the numeric part of the speed") + @org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details") - + - @org.openecomp.aai.annotations.Metadata(description="Captures the units corresponding to the speed") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - + - @org.openecomp.aai.annotations.Metadata(description="v4, v6, or ds for dual stack (should be ip-version)") + @org.openecomp.aai.annotations.Metadata(description="service version") - + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of service model definitions. Likely to be deprecated in favor of models from ASDC.") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Early definition of server/resource pairings, likely to be replaced by models. No new use should be made of this.",indexedProps="service-type,vnf-type",container="service-capabilities",namespace="service-design-and-creation") + + + + - @org.openecomp.aai.annotations.Metadata(description="For example, static or BGP") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="This gets defined by others to provide a unique ID for the service, we accept what is sent.") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures.") @@ -2305,59 +2580,1884 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of service capabilities.") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="This is how we would capture constraints defining allowed sets of elements.",uniqueProps="element-choice-set-uuid",indexedProps="element-choice-set-uuid",allowDirectRead="true",allowDirectWrite="false",container="element-choice-sets") + + + + - @org.openecomp.aai.annotations.Metadata(description="the SDC model id for this resource or service model.") + @org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true") + + + + + + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="This is how we would capture constraints defining allowed sets of elements.",uniqueProps="constrained-element-set-uuid",indexedProps="constrained-element-set-uuid",allowDirectRead="true",allowDirectWrite="false",container="constrained-element-sets") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true") + + + + + + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="This is how we would capture constraints defining allowed sets of elements.",uniqueProps="model-constraint-uuid",indexedProps="model-constraint-uuid",allowDirectRead="true",allowDirectWrite="false",container="model-constraints") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true") + + + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Defines how other models combine to make up a higher-level model.",uniqueProps="model-element-uuid",indexedProps="model-element-uuid",allowDirectRead="true",allowDirectWrite="false",container="model-elements") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Indicates whether this element was created as part of instantiation from this model") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="How many of this type of element are required/allowed") + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Defines how other models combine to make up a higher-level model") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Describes new constraints on this model element that are not part of that model's definition") + + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Subgraph definition provided by ASDC to describe an inventory asset and its connections related to ASDC models",nameProps="model-name,model-type",indexedProps="model-name-version-id,model-type,model-name,model-id,model-version",alternateKeys1="model-id,model-version",uniqueProps="model-name-version-id",container="models",namespace="service-design-and-creation") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique identifier corresponding to one version of a model in ASDC") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Type of the model, e.g., service, resource, widget, etc.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Name of the model, which can change from version to version.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Invariant unique ID which does not change from version to version") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Version") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Description") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of subgraph definitions provided by ASDC to describe the inventory assets and their connections related to ASDC models") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="TBD",uniqueProps="related-lookup-uuid",indexedProps="related-lookup-uuid",allowDirectRead="true",allowDirectWrite="false",container="related-lookups") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true") + + + + + + + + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="TBD",uniqueProps="property-constraint-uuid",indexedProps="property-constraint-uuid",allowDirectRead="true",allowDirectWrite="false",container="property-constraints") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true") + + + + + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="TBD",uniqueProps="named-query-element-uuid",indexedProps="named-query-element-uuid",allowDirectRead="true",allowDirectWrite="false",container="named-query-elements") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true") + + + + + + + + + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="TBD",nameProps="named-query-name",uniqueProps="named-query-uuid",indexedProps="named-query-uuid,named-query-name",container="named-queries",namespace="service-design-and-creation") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true) + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="TBD",nameProps="named-query-name",uniqueProps="named-query-uuid",indexedProps="named-query-uuid,named-query-name",container="named-queries",namespace="service-design-and-creation") + + + + + + + + + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Namespace for objects managed by ASDC") + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Logical links generally connect l-interfaces but are used to express logical connectivity between two points",indexedProps="link-name,persona-model-id,persona-model-version,widget-model-id,widget-model-version,link-id",uniqueProps="link-id",container="logical-links",namespace="network") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="e.g., evc-name, or vnf-nameA_interface-nameA_vnf-nameZ_interface-nameZ") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Type of logical link, e.g., evc") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Captures the numeric part of the speed") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Captures the units corresponding to the speed") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="v4, v6, or ds for dual stack") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="For example, static or BGP") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",requires="persona-model-version",visibility="deployment") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="persona-model-id") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="internal",dbAlias="model-version-id-local",dataCopy="service-design-and-creation/models/model/{persona-model-id}/model-vers?model-version={persona-model-version}#model-version-id") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="the ASDC data dictionary widget model. This maps directly to the A&AI widget.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Indication of operational status of the logical link.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Indication of the network use of the logical link.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Alias or alternate name (CLCI or D1 name).") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="UUID of the logical-link, SDNC generates this.") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of logical connections") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(indexedProps="cos",dependentOn="site-pair",container="classes-of-service") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="unique identifier of probe") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="identifier of probe") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="type of probe") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="class-of-service of probe") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(indexedProps="site-pair-id",uniqueProps="site-pair-id",dependentOn="routing-instance",container="site-pairs") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="unique identifier of probe") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Prefix address") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Prefix address") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="ip version, v4, v6") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Hostname of the destination equipment to which SLAs are measured against.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="The type of destinatination equipment. Could be Router, etc.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="probe within a set") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(indexedProps="routing-instance-id",uniqueProps="routing-instance-id",dependentOn="site-pair-set",container="routing-instances") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique id of routing instance") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="rpm owner") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="set of probes related to generic-vnf routing instance") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Set of instances for probes used to measure service level agreements",indexedProps="site-pair-set-id",uniqueProps="site-pair-set-id",container="site-pair-sets",namespace="network") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique id of site pair set.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of sets of instances for probes related to generic-vnf") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="VPN binding",nameProps="vpn-name",indexedProps="vpn-name,vpn-id,global-route-target",uniqueProps="vpn-id",container="vpn-bindings",namespace="network") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="VPN ID, globally unique within A&AI") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="VPN Name") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Number used to identify a VPN, globally unique in the network") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="the platform associated with the VPN example AVPN, Mobility") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="l3-networks relate to vpn-bindings") + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="VPLS Provider Edge routers.",indexedProps="prov-status,equipment-name",container="vpls-pes",namespace="network") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true) + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Trigger for operational monitoring of this VNF by BAU Service Assurance systems.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Address tail-f uses to configure vpe, also used for troubleshooting and is IP used for traps generated by VPE (v4-loopback0-ip-address).") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Client should send valid enumerated value, e.g., VPLS-PE.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Temporary location for stag to get to VCE") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of VPLS Provider Edge routers") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(indexedProps="multicast-configuration-id",uniqueProps="multicast-configuration-id",container="multicast-configurations",namespace="network") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique id of multicast configuration.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="protocol of multicast configuration") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="rp type of multicast configuration") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="multicast configuration of generic-vnf ip-address") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(dependentOn="port-group",indexedProps="cvlan-tag",container="cvlan-tags") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="See mis-na-virtualization-platform.yang") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used to capture the network interfaces of this VCE",nameProps="port-group-name",indexedProps="port-group-id,heat-stack-id,interface-id,interface-name,switch-name",dependentOn="vce",container="port-groups") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique ID of the interface") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Neutron network id of this Interface") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Neutron network name of this Interface") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Role assigned to this Interface, should use values as defined in ECOMP Yang models.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Unique ID for port group in vmware") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Likely to duplicate value of neutron network name") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="DVS or standard switch name (should be non-null for port groups associated with DVS)") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Orchestration status of this VNF, mastered by MSO") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Heat stack id corresponding to this instance, managed by MSO") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Corresponds to the SDN-C catalog id used to configure this VCE") + + + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Virtual Customer Edge Router, used specifically for Gamma. This object is deprecated.",nameProps="vnf-name",indexedProps="vnf-name,vnf-name2,vnf-type,heat-stack-id,vnf-id,interface-name,regional-resource-zone,vpe-id,prov-status,service-id",searchable="vnf-id,vnf-name,vnf-name2",uniqueProps="vnf-id",container="vces",namespace="network",extendsFrom="vnf") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique id of VNF. This is unique across the graph.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Name of VNF.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Alternate name of VNF.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Unique identifier of service from ASDC. Expect this to change as ASDC matures.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Regional way of organizing pservers, source of truth should define values") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Trigger for operational monitoring of this resource by Service Assurance systems.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Indicator for whether the resource is considered operational",dbAlias="operational-status") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="License key") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Network role being played by this VNF") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Orchestration status of this VNF, mastered by MSO") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Heat stack id corresponding to this instance, managed by MSO") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Corresponds to the SDN-C catalog id used to configure this VCE") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Unique ID of VPE connected to this VCE.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Valid v6 IP address for the WAN Link on this router. Implied length of /64.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Address tail-f uses to configure vce, also used for troubleshooting and is IP used for traps generated by VCE.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Loopback0 address") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Entitlement resource uuid") + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of Virtual Customer Edge Routers, used specifically for Gamma. This object is deprecated.") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Relationship-list must include related to info for complex.",nameProps="vnf-name",indexedProps="vnf-name,vnf-name2,vnf-type,heat-stack-id,vnf-id,regional-resource-zone,prov-status,service-id",searchable="vnf-id,vnf-name,vnf-name2",uniqueProps="vnf-id",container="vpes",namespace="network",extendsFrom="vnf") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique id of VNF. This is unique across the graph.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Name of VNF.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Alternate name of VNF.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Unique identifier of service from ASDC") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Regional way of organizing pservers, source of truth should define values") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Trigger for operational monitoring of this resource by Service Assurance systems.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Indicator for whether the resource is considered operational",dbAlias="operational-status") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="License key") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Client should send valid enumerated value") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Orchestration status of this VNF, mastered by MSO") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Heat stack id corresponding to this instance, managed by MSO") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Corresponds to the SDN-C catalog id used to configure this VCE") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Address tail-f uses to configure vpe, also used for troubleshooting and is IP used for traps generated by VPE (v4-loopback0-ip-address).") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Prefix length for oam-address") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Gateway address") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Loopback0 address") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Temporary location for stag to get to VCE") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="as-number of the VPE") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="details regarding the vpe operation") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="indicates whether vpe access uses SSH") + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Virtual provider edge router. In 1504, A&AI will populate this object through an M&P and tool provided to operations.") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(indexedProps="vnfc-name,prov-status,vnfc-type,vnfc-function-code,ipaddress-v4-oam-vip,in-maint,is-closed-loop-disabled,group-notation",container="vnfcs",namespace="network") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique ID of vnfc.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="function code") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="type") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="prov status of this vnfc") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Orchestration status of this VNF, mastered by APP-C") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Oam V4 vip address of this vnfc") + + + + + + + @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)") + + + + + + + @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="used to indicate whether closed loop function is enabled on this node") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Group notation of VNFC") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="virtual network components associated with a vserver from application controller.") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(indexedProps="subnet-id,subnet-name",nameProps="subnet-name",uniqueProps="subnet-id",dependentOn="l3-network",container="subnets") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Subnet ID, should be UUID.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Name associated with the subnet.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Neutron id of this subnet") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="gateway ip address") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="network start address") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="cidr mask") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="ip version") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Orchestration status of this VNF, mastered by MSO") + + + + + + + @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="dhcp enabled") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="the start address reserved for use by dhcp") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="the last address reserved for use by dhcp") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(indexedProps="vlan-id-inner",dependentOn="l3-network",container="ctag-assignments") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="id.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Openstack segmentation assignment.",indexedProps="segmentation-id",dependentOn="l3-network",container="segmentation-assignments") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Route Table Reference id, UUID assigned to this instance.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Concurrency value") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of openstack segmentation assignments") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Generic network definition",nameProps="network-name",indexedProps="heat-stack-id,network-uuid,service-id,network-id,network-name,persona-model-id,persona-model-version,widget-model-id,widget-model-version,contrail-network-fqdn",uniqueProps="network-id",container="l3-networks",namespace="network") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Network ID, should be uuid. Unique across A&AI.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Name of the network, governed by some naming convention..") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Type of the network - who defines these values?") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Role the network plans - who defines these values?") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Network technology - who defines these values?") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Neutron network id of this Interface") + + + + + + + @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="Set to true if bound to VPN") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Unique identifier of service from ASDC") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="network role instance") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Orchestration status of this VNF, mastered by MSO") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Heat stack id corresponding to this instance, managed by MSO") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Corresponds to the SDN-C catalog id used to configure this VCE") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Contrail FQDN for the network") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",requires="persona-model-version",visibility="deployment") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="persona-model-id") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="internal",dbAlias="model-version-id-local",dataCopy="service-design-and-creation/models/model/{persona-model-id}/model-vers?model-version={persona-model-version}#model-version-id") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="the ASDC data dictionary widget model. This maps directly to the A&AI widget.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Name associated with the physical network.") + + + + + + + @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="boolean indicatating whether or not network is a provider network.") - + - @org.openecomp.aai.annotations.Metadata(description="the SDC model version for this resource or service model.") + @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="boolean indicatating whether or not network is a shared network.") - + - @org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary widget model. This maps directly to the AAI widget.") + @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="boolean indicatating whether or not network is an external network.") - + + + + - @org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary version of the widget model.This maps directly to the AAI version of the widget.") + @org.openecomp.aai.annotations.Metadata(description="Relates to tenant (or is it a child of tenant), complex, service, vpn-binding") - + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(nameProps="network-policy-fqdn",indexedProps="network-policy-id,network-policy-fqdn",uniqueProps="network-policy-id",container="network-policies",namespace="network") + + + + - @org.openecomp.aai.annotations.Metadata(description="Indication of operational status of the logical link.") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="UUID representing unique key to this instance") - + - @org.openecomp.aai.annotations.Metadata(description="Indication of the network use of the logical link.") + @org.openecomp.aai.annotations.Metadata(description="Contrail FQDN for the policy") - + - @org.openecomp.aai.annotations.Metadata(description="Alias or alternate name (CLCI or D1 name).") + @org.openecomp.aai.annotations.Metadata(description="ID for the openStack Heat instance") - + - @org.openecomp.aai.annotations.Metadata(description="UUID of the logical-link, SDNC generates this.") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") @@ -2365,93 +4465,102 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - + - - - @org.openecomp.aai.annotations.Metadata(description="Collection of logical connections") - - - + - + - @org.openecomp.aai.annotations.Metadata(indexedProps="vnfc-name,prov-status,vnfc-type,vnfc-function-code,ipaddress-v4-oam-vip,in-maint,is-closed-loop-disabled,group-notation",container="vnfcs",namespace="network") + @org.openecomp.aai.annotations.Metadata(description="a deployment unit of VNFCs",indexedProps="vf-module-id,vf-module-name,heat-stack-id,persona-model-id,persona-model-version,widget-model-id,widget-model-version,contrail-service-instance-fqdn",dependentOn="generic-vnf",container="vf-modules") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique ID of vnfc.") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique ID of vf-module.") - + - @org.openecomp.aai.annotations.Metadata(description="function code") + @org.openecomp.aai.annotations.Metadata(description="Name of vf-module") - + - @org.openecomp.aai.annotations.Metadata(description="type") + @org.openecomp.aai.annotations.Metadata(description="Heat stack id corresponding to this instance.") - + - @org.openecomp.aai.annotations.Metadata(description="prov status of this vnfc") + @org.openecomp.aai.annotations.Metadata(description="orchestration status of this vf-module, mastered by MSO") - + - @org.openecomp.aai.annotations.Metadata(description="Orchestration status of this VNF, mastered by APP-C") + @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="used to indicate whether or not this object is base vf module") - + - @org.openecomp.aai.annotations.Metadata(description="Oam V4 vip address of this vnfc") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - + - @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",requires="persona-model-version",visibility="deployment") - + - @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="used to indicate whether closed loop function is enabled on this node") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="persona-model-id") - + - @org.openecomp.aai.annotations.Metadata(description="Group notation of VNFC") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="internal",dbAlias="model-version-id-local",dataCopy="service-design-and-creation/models/model/{persona-model-id}/model-vers?model-version={persona-model-version}#model-version-id") - + - @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + @org.openecomp.aai.annotations.Metadata(description="the ASDC data dictionary widget model. This maps directly to the A&AI widget.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="the Contrail unique ID for a service-instance") @@ -2459,662 +4568,636 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - + - @org.openecomp.aai.annotations.Metadata(description="virtual network components associated with a vserver from application controller.") + @org.openecomp.aai.annotations.Metadata(description="Collection of vf-modules, a deployment unit of VNFCs") - + - + - @org.openecomp.aai.annotations.Metadata(indexedProps="subnet-id,subnet-name",nameProps="subnet-name",uniqueProps="subnet-id",dependentOn="l3-network",container="subnets") + @org.openecomp.aai.annotations.Metadata(description="General purpose VNF",nameProps="vnf-name",indexedProps="is-closed-loop-disabled,vnf-name2,vnf-type,heat-stack-id,in-maint,vnf-name,vnf-id,regional-resource-zone,prov-status,service-id,persona-model-id,persona-model-version,widget-model-id,widget-model-version",searchable="vnf-id,vnf-name,vnf-name2",uniqueProps="vnf-id",container="generic-vnfs",namespace="network",extendsFrom="vnf") - - - - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Subnet ID, should be UUID.") - - - - + - @org.openecomp.aai.annotations.Metadata(description="Name associated with the subnet.") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique id of VNF. This is unique across the graph.") - + - @org.openecomp.aai.annotations.Metadata(description="Neutron id of this subnet") + @org.openecomp.aai.annotations.Metadata(description="Name of VNF.") - + - @org.openecomp.aai.annotations.Metadata(description="gateway ip address") + @org.openecomp.aai.annotations.Metadata(description="Alternate name of VNF.") - + - @org.openecomp.aai.annotations.Metadata(description="network start address") + @org.openecomp.aai.annotations.Metadata(description="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures.") - + - @org.openecomp.aai.annotations.Metadata(description="cidr mask") + @org.openecomp.aai.annotations.Metadata(description="Unique identifier of service from ASDC") - + - @org.openecomp.aai.annotations.Metadata(description="ip version") + @org.openecomp.aai.annotations.Metadata(description="Regional way of organizing pservers, source of truth should define values") - + - @org.openecomp.aai.annotations.Metadata(description="Orchestration status of this VNF, mastered by MSO") + @org.openecomp.aai.annotations.Metadata(description="Trigger for operational monitoring of this resource by Service Assurance systems.") - + - @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="dhcp enabled") + @org.openecomp.aai.annotations.Metadata(description="Indicator for whether the resource is considered operational",dbAlias="operational-status") - + - @org.openecomp.aai.annotations.Metadata(description="the start address reserved for use by dhcp") + @org.openecomp.aai.annotations.Metadata(description="License key") - + - @org.openecomp.aai.annotations.Metadata(description="the last address reserved for use by dhcp") + @org.openecomp.aai.annotations.Metadata(description="Client should send valid enumerated value") - + - @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + @org.openecomp.aai.annotations.Metadata(description="Orchestration status of this VNF, used by MSO.") - - - - - - - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(indexedProps="vlan-id-inner",dependentOn="l3-network",container="ctag-assignments") - - - - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="id.") + @org.openecomp.aai.annotations.Metadata(description="Heat stack id corresponding to this instance, managed by MSO") - + - @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + @org.openecomp.aai.annotations.Metadata(description="Corresponds to the SDN-C catalog id used to configure this VCE") - - - - - - - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Openstack segmentation assignment.",indexedProps="segmentation-id",dependentOn="l3-network",container="segmentation-assignments") - - - - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Route Table Reference id, UUID assigned to this instance.") + @org.openecomp.aai.annotations.Metadata(description="identifier of managed by company or customer") - + - @org.openecomp.aai.annotations.Metadata(description="Concurrency value") + @org.openecomp.aai.annotations.Metadata(description="Address tail-f uses to configure generic-vnf, also used for troubleshooting and is IP used for traps generated by generic-vnf.") - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Collection of openstack segmentation assignments") - - - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Generic network definition",nameProps="network-name",indexedProps="heat-stack-id,network-uuid,service-id,network-id,network-name,persona-model-id,persona-model-version,widget-model-id,widget-model-version,contrail-network-fqdn",uniqueProps="network-id",container="l3-networks",namespace="network") - - - - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Network ID, should be uuid. Unique across AAI.") + @org.openecomp.aai.annotations.Metadata(description="v4 Loopback0 address") - + - @org.openecomp.aai.annotations.Metadata(description="Name of the network, governed by some naming convention..") + @org.openecomp.aai.annotations.Metadata(description="v6 Loopback address") - + - @org.openecomp.aai.annotations.Metadata(description="Type of the network - who defines these values?") + @org.openecomp.aai.annotations.Metadata(description="v6 management address") - + - @org.openecomp.aai.annotations.Metadata(description="Role the network plans - who defines these values?") + @org.openecomp.aai.annotations.Metadata(description="number of vcpus ordered for this instance of VNF, used for VNFs with no vservers/flavors") - + - @org.openecomp.aai.annotations.Metadata(description="Network technology - who defines these values?") + @org.openecomp.aai.annotations.Metadata(description="units associated with vcpu, used for VNFs with no vservers/flavors") - + - @org.openecomp.aai.annotations.Metadata(description="Neutron network id of this Interface") + @org.openecomp.aai.annotations.Metadata(description="number of GB of memory ordered for this instance of VNF, used for VNFs with no vservers/flavors") - + - @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="Set to true if bound to VPN") + @org.openecomp.aai.annotations.Metadata(description="units associated with vmemory, used for VNFs with no vservers/flavors") - + - @org.openecomp.aai.annotations.Metadata(description="Unique identifier of service from SDC") + @org.openecomp.aai.annotations.Metadata(description="number of vdisks ordered for this instance of VNF, used for VNFs with no vservers/flavors") - + - @org.openecomp.aai.annotations.Metadata(description="network role instance") + @org.openecomp.aai.annotations.Metadata(description="units associated with vdisk, used for VNFs with no vservers/flavors") - + - @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs.") - + - @org.openecomp.aai.annotations.Metadata(description="Orchestration status of this VNF, mastered by MSO") + @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="used to indicate whether closed loop function is enabled on this node") - + - @org.openecomp.aai.annotations.Metadata(description="Heat stack id corresponding to this instance, managed by MSO") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - + - @org.openecomp.aai.annotations.Metadata(description="Corresponds to the SDN-C catalog id used to configure this VCE") + @org.openecomp.aai.annotations.Metadata(description="details regarding the generic-vnf operation") - + - @org.openecomp.aai.annotations.Metadata(description="Contrail FQDN for the network") + @org.openecomp.aai.annotations.Metadata(description="indicates whether generic-vnf access uses SSH") - @org.openecomp.aai.annotations.Metadata(description="the SDC model id for this resource or service model.") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",requires="persona-model-version",visibility="deployment") - @org.openecomp.aai.annotations.Metadata(description="the SDC model version for this resource or service model.") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="persona-model-id") - + - @org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary widget model. This maps directly to the AAI widget.") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="internal",dbAlias="model-version-id-local",dataCopy="service-design-and-creation/models/model/{persona-model-id}/model-vers?model-version={persona-model-version}#model-version-id") - + - @org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary version of the widget model.This maps directly to the AAI version of the widget.") + @org.openecomp.aai.annotations.Metadata(description="the ASDC data dictionary widget model. This maps directly to the A&AI widget.") - + - @org.openecomp.aai.annotations.Metadata(description="Name associated with the physical network.") + @org.openecomp.aai.annotations.Metadata(description="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget.") - + - @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="boolean indicatating whether or not network is a provider network.") + @org.openecomp.aai.annotations.Metadata(description="as-number of the VNF") - + - @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="boolean indicatating whether or not network is a shared network.") + @org.openecomp.aai.annotations.Metadata(description="represents sub zone of the rr plane") - + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of VNFs") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="LAG links can connect lag-interfaces",indexedProps="link-name",container="lag-links",namespace="network") + + + + - @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="boolean indicatating whether or not network is an external network.") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Alphabetical concatenation of lag-interface names") - - - - + - @org.openecomp.aai.annotations.Metadata(description="Relates to tenant (or is it a child of tenant)") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + - + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of link aggregation connections") + + - + - + - @org.openecomp.aai.annotations.Metadata(description="a deployment unit of VNFCs",indexedProps="vf-module-id,vf-module-name,heat-stack-id,persona-model-id,persona-model-version,widget-model-id,widget-model-version,contrail-service-instance-fqdn",dependentOn="generic-vnf",container="vf-modules") + @org.openecomp.aai.annotations.Metadata(description="This object fills in the gaps from vce that were incorporated into generic-vnf. This object will be retired with vce.",nameProps="vnf-name",indexedProps="vnf-name,vnf-name2,vnf-type,heat-stack-id,prov-status,vnf-id2",searchable="vnf-id2,vnf-name,vnf-name2",uniqueProps="vnf-id2",container="newvces",namespace="network") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique ID of vf-module.") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique id of VNF, can't use same attribute name right now until we promote this new object") - + - @org.openecomp.aai.annotations.Metadata(description="Name of vf-module") + @org.openecomp.aai.annotations.Metadata(description="Name of VNF.") - + - @org.openecomp.aai.annotations.Metadata(description="Heat stack id corresponding to this instance.") + @org.openecomp.aai.annotations.Metadata(description="Alternate name of VNF.") - + - @org.openecomp.aai.annotations.Metadata(description="orchestration status of this vf-module, mastered by MSO") + @org.openecomp.aai.annotations.Metadata(description="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures.") - + - @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="used to indicate whether or not this object is base vf module") + @org.openecomp.aai.annotations.Metadata(description="Trigger for operational monitoring of this VNF by BAU Service Assurance systems.") - + - @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + @org.openecomp.aai.annotations.Metadata(description="Indicator for whether the resource is considered operational",dbAlias="operational-status") - + - @org.openecomp.aai.annotations.Metadata(description="the SDC model id for this resource or service model.") + @org.openecomp.aai.annotations.Metadata(description="License key") - + - @org.openecomp.aai.annotations.Metadata(description="the SDC model version for this resource or service model.") + @org.openecomp.aai.annotations.Metadata(description="Address tail-f uses to configure vpe, also used for troubleshooting and is IP used for traps generated by VPE (v4-loopback0-ip-address).") - + - @org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary widget model. This maps directly to the AAI widget.") + @org.openecomp.aai.annotations.Metadata(description="Client should send valid enumerated value, e.g., VPE.") - + - @org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary version of the widget model.This maps directly to the AAI version of the widget.") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - + - @org.openecomp.aai.annotations.Metadata(description="the Contrail unique ID for a service-instance") + @org.openecomp.aai.annotations.Metadata(description="v4 Loopback0 address") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Orchestration status of this VNF, mastered by MSO.") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Heat stack id corresponding to this instance, managed by MSO") + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Corresponds to the SDN-C catalog id used to configure this VCE") + - + - @org.openecomp.aai.annotations.Metadata(description="Collection of vf-modules, a deployment unit of VNFCs") + @org.openecomp.aai.annotations.Metadata(description="This object fills in the gaps from vce that were incorporated into generic-vnf. This object will be retired with vce.") - + - + - @org.openecomp.aai.annotations.Metadata(description="General purpose VNF",nameProps="vnf-name",indexedProps="is-closed-loop-disabled,vnf-name2,vnf-type,heat-stack-id,in-maint,vnf-name,vnf-id,regional-resource-zone,prov-status,service-id,persona-model-id,persona-model-version,widget-model-id,widget-model-version",searchable="vnf-id,vnf-name,vnf-name2",uniqueProps="vnf-id",container="generic-vnfs",namespace="network",extendsFrom="vnf") + @org.openecomp.aai.annotations.Metadata(description="PNF represents a physical network function. typically equipment used in the D1 world.",indexedProps="pnf-name,orchestration-status",uniqueProps="pnf-name",container="pnfs",namespace="network") - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique id of VNF. This is unique across the graph.") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="unique name of Physical Network Function.") - + - @org.openecomp.aai.annotations.Metadata(description="Name of VNF.") + @org.openecomp.aai.annotations.Metadata(description="name of Physical Network Function.") - + - @org.openecomp.aai.annotations.Metadata(description="Alternate name of VNF.") + @org.openecomp.aai.annotations.Metadata(description="source of name2") - + - @org.openecomp.aai.annotations.Metadata(description="String capturing type of vnf, that was intended to identify the SDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as SDC matures.") + @org.openecomp.aai.annotations.Metadata(description="id of pnf") - + - @org.openecomp.aai.annotations.Metadata(description="Unique identifier of service from SDC") + @org.openecomp.aai.annotations.Metadata(description="Equipment type. Source of truth should define valid values.") - + - @org.openecomp.aai.annotations.Metadata(description="Regional way of organizing pservers, source of truth should define values") + @org.openecomp.aai.annotations.Metadata(description="Equipment vendor. Source of truth should define valid values.") - + - @org.openecomp.aai.annotations.Metadata(description="Trigger for operational monitoring of this resource by Service Assurance systems.") + @org.openecomp.aai.annotations.Metadata(description="Equipment model. Source of truth should define valid values.") - + - @org.openecomp.aai.annotations.Metadata(description="Indicator for whether the resource is considered operational") + @org.openecomp.aai.annotations.Metadata(description="identifier of managed by company or customer") - + - @org.openecomp.aai.annotations.Metadata(description="License key") + @org.openecomp.aai.annotations.Metadata(description="ipv4-oam-address with new naming convention for IP addresses") - + - @org.openecomp.aai.annotations.Metadata(description="Client should send valid enumerated value") + @org.openecomp.aai.annotations.Metadata(description="sw-version is the version of SW for the hosted application on the PNF.") - @org.openecomp.aai.annotations.Metadata(description="Orchestration status of this VNF, used by MSO.") - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Heat stack id corresponding to this instance, managed by MSO") - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Corresponds to the SDN-C catalog id used to configure this VCE") - - - - - - - @org.openecomp.aai.annotations.Metadata(description="identifier of managed by customer") - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Address tail-f uses to configure generic-vnf, also used for troubleshooting and is IP used for traps generated by generic-vnf.") - - - - - - - @org.openecomp.aai.annotations.Metadata(description="v4 Loopback0 address") + @org.openecomp.aai.annotations.Metadata(description="orchestration-status is the status of orchestration on the PNF.") - + - @org.openecomp.aai.annotations.Metadata(description="v6 Loopback address") + @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="Used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs.") - + - @org.openecomp.aai.annotations.Metadata(description="v6 management address") + @org.openecomp.aai.annotations.Metadata(description="ID of the physical frame (relay rack) where pnf is installed.") - + - @org.openecomp.aai.annotations.Metadata(description="number of vcpus ordered for this instance of VNF, used for VNFs with no vservers/flavors") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of Physical Network Functions.") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of physical connections, typically between p-interfaces",indexedProps="circuit-id,link-name",alternateKeys1="circuit-id",container="physical-links",namespace="network") + + + + - @org.openecomp.aai.annotations.Metadata(description="units associated with vcpu, used for VNFs with no vservers/flavors") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="e.g., hostnameA_p-connection_nameA_hostnameZ+p_connection-nameZ") - + - @org.openecomp.aai.annotations.Metadata(description="number of GB of memory ordered for this instance of VNF, used for VNFs with no vservers/flavors") + @org.openecomp.aai.annotations.Metadata(description="Captures the numeric part of the speed") - + - @org.openecomp.aai.annotations.Metadata(description="units associated with vmemory, used for VNFs with no vservers/flavors") + @org.openecomp.aai.annotations.Metadata(description="Captures the units corresponding to the speed") - + - @org.openecomp.aai.annotations.Metadata(description="number of vdisks ordered for this instance of VNF, used for VNFs with no vservers/flavors") + @org.openecomp.aai.annotations.Metadata(description="Circuit it") - + - @org.openecomp.aai.annotations.Metadata(description="units associated with vdisk, used for VNFs with no vservers/flavors") + @org.openecomp.aai.annotations.Metadata(description="Dual access mode (e.g., primary, secondary") - + - @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs.") + @org.openecomp.aai.annotations.Metadata(description="To provide information on who manages this circuit. A&AI or 3rd party transport provider") - + - @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="used to indicate whether closed loop function is enabled on this node") + @org.openecomp.aai.annotations.Metadata(description="Name of the service Provider on this link.") @@ -3125,212 +5208,221 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - - - - @org.openecomp.aai.annotations.Metadata(description="details regarding the generic-vnf operation") - - - - + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="Collection of physical connections, typically between p-interfaces") + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="vig-server contains information about a vig server used for IPSec-configuration. Populated by SDN-C from 1607",indexedProps="vig-address-type",dependentOn="ipsec-configuration",container="vig-servers") + + + + - @org.openecomp.aai.annotations.Metadata(description="indicates whether generic-vnf access uses SSH") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="indicates whether the VIG is for AVPN or INTERNET") - + - @org.openecomp.aai.annotations.Metadata(description="UUID of the Entitlement group used for licensing VNFs") + @org.openecomp.aai.annotations.Metadata(description="v4 IP of the vig server") - + - @org.openecomp.aai.annotations.Metadata(description="UUID of the specific entitlement resource") + @org.openecomp.aai.annotations.Metadata(description="v6 IP of the vig server") - + - @org.openecomp.aai.annotations.Metadata(description="UUID of the license assignment group") + @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") - + + + + + + + + + + + + + + + + @org.openecomp.aai.annotations.Metadata(description="IPSec configuration node will contain various configuration data for the NMTE VNF. This node will have an edge to the generic-vnf (vnf type = TE). Starting 1607, this data will be populated by SDN-C",indexedProps="ipsec-configuration-id",uniqueProps="ipsec-configuration-id",container="ipsec-configurations",namespace="network") + + + + - @org.openecomp.aai.annotations.Metadata(description="UUID of the actual license resource") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="UUID of this configuration") - + - @org.openecomp.aai.annotations.Metadata(description="the SDC model id for this resource or service model.") + @org.openecomp.aai.annotations.Metadata(description="Indicate the type of VIG server like AVPN, INTERNET, BOTH") - + - @org.openecomp.aai.annotations.Metadata(description="the SDC model version for this resource or service model.") + @org.openecomp.aai.annotations.Metadata(description="Encryption values like 3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc") - + - @org.openecomp.aai.annotations.Metadata(description="captures the id of all the configuration used to customize the resource for the service.") + @org.openecomp.aai.annotations.Metadata(description="can offer a shared DMZ or a DMZ specific to a customer") - + - @org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary widget model. This maps directly to the AAI widget.") + @org.openecomp.aai.annotations.Metadata(description="Network address of shared DMZ") - + - @org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary version of the widget model.This maps directly to the AAI version of the widget.") + @org.openecomp.aai.annotations.Metadata(description="If the DMZ is a custom DMZ, this field will indicate the customer information") - + - @org.openecomp.aai.annotations.Metadata(description="as-number of the VNF") + @org.openecomp.aai.annotations.Metadata(description="can be 1 or 2") - + - @org.openecomp.aai.annotations.Metadata(description="represents sub zone of the rr plane") + @org.openecomp.aai.annotations.Metadata(description="Contains values like md5, sha1, sha256, sha384") - - - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Collection of VNFs") - - - - - - - - - - - - @org.openecomp.aai.annotations.Metadata(description="PNF represents a physical network function.",indexedProps="pnf-name,orchestration-status",uniqueProps="pnf-name",container="pnfs",namespace="network") - - - - + - @org.openecomp.aai.annotations.Metadata(isKey=true,description="unique name of Physical Network Function.") + @org.openecomp.aai.annotations.Metadata(description="Encyption values like 3des-cbc, des-cbc, aes-128-cbc,?aes-192-cbc, aes-265-cbc") - + - @org.openecomp.aai.annotations.Metadata(description="name of Physical Network Function.") + @org.openecomp.aai.annotations.Metadata(description="Diffie-Hellman group like DH-GROUP2, DH-GROUP5, DH-GROUP14") - + - @org.openecomp.aai.annotations.Metadata(description="source of name2") + @org.openecomp.aai.annotations.Metadata(description="Group name defined in VIG for clients using aggressive mode") - + - @org.openecomp.aai.annotations.Metadata(description="id of pnf") + @org.openecomp.aai.annotations.Metadata(description="pre-shared key for the above group name ") - + - @org.openecomp.aai.annotations.Metadata(description="Equipment type. Source of truth should define valid values.") + @org.openecomp.aai.annotations.Metadata(description="Lifetime for IKEv1 SA") - + - @org.openecomp.aai.annotations.Metadata(description="Equipment vendor. Source of truth should define valid values.") + @org.openecomp.aai.annotations.Metadata(description="md5, sha1, sha256, sha384") - + - @org.openecomp.aai.annotations.Metadata(description="Equipment model. Source of truth should define valid values.") + @org.openecomp.aai.annotations.Metadata(description="3des-cbc, des-cbc, aes-128-cbc,?aes-192-cbc, aes-265-cbc") - + - @org.openecomp.aai.annotations.Metadata(description="identifier of managed by customer") + @org.openecomp.aai.annotations.Metadata(description="Life time for IPSec SA") - + - @org.openecomp.aai.annotations.Metadata(description="ipv4-oam-address with new naming convention for IP addresses") + @org.openecomp.aai.annotations.Metadata(description="enable PFS or not") - + - @org.openecomp.aai.annotations.Metadata(description="sw-version is the version of SW for the hosted application on the PNF.") + @org.openecomp.aai.annotations.Metadata(description="user ID for xAuth, sm-user, ,nmteHostName") - + - @org.openecomp.aai.annotations.Metadata(description="orchestration-status is the status of orchestration on the PNF.") + @org.openecomp.aai.annotations.Metadata(description="Encrypted using the Juniper $9$ algorithm") - + - @org.openecomp.aai.annotations.Metadata(defaultValue="false",description="Used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs.") + @org.openecomp.aai.annotations.Metadata(description="The time between DPD probe") - + - @org.openecomp.aai.annotations.Metadata(description="ID of the physical frame (relay rack) where pnf is installed.") + @org.openecomp.aai.annotations.Metadata(description="Maximum number of DPD before claiming the tunnel is down") @@ -3342,84 +5434,43 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - - + - + - - - @org.openecomp.aai.annotations.Metadata(description="Collection of Physical Network Functions.") - - - + - + - @org.openecomp.aai.annotations.Metadata(description="Collection of physical connections, typically between p-interfaces",indexedProps="circuit-id,link-name",alternateKeys1="circuit-id",container="physical-links",namespace="network") + @org.openecomp.aai.annotations.Metadata(description="Openstack route table reference.",nameProps="route-table-reference-fqdn",uniqueProps="route-table-reference-id",indexedProps="route-table-reference-id,route-table-reference-fqdn",container="route-table-references",namespace="network") - - - - @org.openecomp.aai.annotations.Metadata(isKey=true,description="e.g., hostnameA_p-connection_nameA_hostnameZ+p_connection-nameZ") - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Captures the numeric part of the speed") - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Captures the units corresponding to the speed") - - - - - - - @org.openecomp.aai.annotations.Metadata(description="Circuit it") - - - - + - @org.openecomp.aai.annotations.Metadata(description="Dual access mode (e.g., primary, secondary") - - - - - - - @org.openecomp.aai.annotations.Metadata(description="To provide information on who manages this circuit. AAI or 3rd party transport provider") + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Route Table Reference id, UUID assigned to this instance.") - + - @org.openecomp.aai.annotations.Metadata(description="Name of the service Provider on this link.") + @org.openecomp.aai.annotations.Metadata(description="FQDN entry in the route table.") - @org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + @org.openecomp.aai.annotations.Metadata(description="Concurrency value") @@ -3427,15 +5478,15 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - + - @org.openecomp.aai.annotations.Metadata(description="Collection of physical connections, typically between p-interfaces") + @org.openecomp.aai.annotations.Metadata(description="Collection of openstack route table references") - + @@ -3448,11 +5499,22 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + + + + + + + + + + + @@ -3487,8 +5549,8 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - - + + @@ -3513,55 +5575,6 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -3696,4 +5709,22 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + + + + + @org.openecomp.aai.annotations.Metadata(description="Abstract vnf class",indexedProps="vnf-id",uniqueProps="vnf-id",inheritors="vce,vpe,generic-vnf",isAbstract="true") + + + + + + + @org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique id of VNF. This is unique across the graph.") + + + + + + diff --git a/aai-schema/src/main/resources/aai_schema/aai_schema_v9.xsd b/aai-schema/src/main/resources/aai_schema/aai_schema_v9.xsd index 59be4f89..0b879d15 100644 --- a/aai-schema/src/main/resources/aai_schema/aai_schema_v9.xsd +++ b/aai-schema/src/main/resources/aai_schema/aai_schema_v9.xsd @@ -2252,14 +2252,14 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",visibility="deployment") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",requires="persona-model-version",visibility="deployment") - @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="persona-model-id") @@ -2399,14 +2399,14 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",visibility="deployment") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",requires="persona-model-version",visibility="deployment") - @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="persona-model-id") @@ -2473,14 +2473,14 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",visibility="deployment") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",requires="persona-model-version",visibility="deployment") - @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="persona-model-id") @@ -3346,14 +3346,14 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",visibility="deployment") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",requires="persona-model-version",visibility="deployment") - @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="persona-model-id") @@ -4794,14 +4794,14 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",visibility="deployment") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",requires="persona-model-version",visibility="deployment") - @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="persona-model-id") @@ -4988,14 +4988,14 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",visibility="deployment") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",requires="persona-model-version",visibility="deployment") - @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="persona-model-id") @@ -5278,14 +5278,14 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",visibility="deployment") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",dbAlias="model-invariant-id-local",requires="persona-model-version",visibility="deployment") - @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment") + @org.openecomp.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="persona-model-id") @@ -5894,7 +5894,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="Encyption values like 3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc") + @org.openecomp.aai.annotations.Metadata(description="Encyption values like 3des-cbc, des-cbc, aes-128-cbc,?aes-192-cbc, aes-265-cbc") @@ -5936,7 +5936,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc") + @org.openecomp.aai.annotations.Metadata(description="3des-cbc, des-cbc, aes-128-cbc,?aes-192-cbc, aes-265-cbc") @@ -5957,7 +5957,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="user ID for xAuth, sm-user, nmteHostName") + @org.openecomp.aai.annotations.Metadata(description="user ID for xAuth, sm-user, ,nmteHostName") @@ -6130,7 +6130,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - @org.openecomp.aai.annotations.Metadata(description="Design of zone [Medium/Large]") + @org.openecomp.aai.annotations.Metadata(description="Design of zone [Medium/Large?]") diff --git a/aai-schema/src/main/resources/oxm/aai_oxm_v10.xml b/aai-schema/src/main/resources/oxm/aai_oxm_v10.xml index 7eddd101..0f724cf3 100644 --- a/aai-schema/src/main/resources/oxm/aai_oxm_v10.xml +++ b/aai-schema/src/main/resources/oxm/aai_oxm_v10.xml @@ -18,5541 +18,5555 @@ --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aai-schema/src/main/resources/oxm/aai_oxm_v8.xml b/aai-schema/src/main/resources/oxm/aai_oxm_v8.xml index 3ed2ea53..3bfe59dc 100644 --- a/aai-schema/src/main/resources/oxm/aai_oxm_v8.xml +++ b/aai-schema/src/main/resources/oxm/aai_oxm_v8.xml @@ -8,9 +8,7 @@ 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 - + 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. @@ -40,10 +38,19 @@ + + + + + + + + + @@ -70,6 +77,17 @@ + + + + + + + + + + + @@ -107,7 +125,7 @@ - + @@ -118,6 +136,22 @@ + + + + + + + + + + + + + + + + @@ -131,7 +165,7 @@ - + @@ -191,8 +225,11 @@ + + + @@ -223,7 +260,7 @@ - + @@ -257,11 +294,13 @@ + + - + @@ -298,7 +337,7 @@ - + @@ -333,12 +372,12 @@ - + - + @@ -367,7 +406,7 @@ - + @@ -378,6 +417,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -537,15 +688,16 @@ - + - + + @@ -553,11 +705,103 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -659,10 +903,11 @@ - + + @@ -846,7 +1091,7 @@ - + @@ -854,9 +1099,9 @@ - + - + @@ -915,7 +1160,7 @@ - + @@ -924,9 +1169,9 @@ - + - + @@ -936,7 +1181,7 @@ - + @@ -949,7 +1194,7 @@ - + @@ -959,12 +1204,12 @@ - + - + @@ -974,7 +1219,7 @@ - + @@ -1075,11 +1320,87 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1257,7 +1578,7 @@ - + @@ -1301,11 +1622,65 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1332,6 +1707,7 @@ + @@ -1349,35 +1725,145 @@ - + - - - - - - - - - - - + - + - + - - + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1401,8 +1887,7 @@ - - + @@ -1423,14 +1908,14 @@ - + - - - - + + + + @@ -1473,22 +1958,35 @@ - + + + + - + + + + + + + + + + + - + - + @@ -1521,11 +2019,6 @@ - - - - - @@ -1552,127 +2045,983 @@ - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + - - - - - - + + + + + + + + + + + + + + + + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + @@ -1762,7 +3111,7 @@ - + @@ -1798,7 +3147,7 @@ - + @@ -1833,22 +3182,35 @@ - + + + + - + + + + + + + + + + + - + - + @@ -1879,7 +3241,7 @@ - + @@ -1892,7 +3254,45 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2034,12 +3434,12 @@ - + - + @@ -2055,6 +3455,7 @@ + @@ -2084,7 +3485,7 @@ - + @@ -2164,49 +3565,37 @@ - - - - - - - - - - - - - - - - - - - - - + + + + - + + + - + - + + + + - + - + @@ -2218,7 +3607,7 @@ - + @@ -2251,67 +3640,212 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - - + - + - + + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + - - - - + + + + + + + @@ -2365,7 +3899,7 @@ - + @@ -2404,7 +3938,7 @@ - + @@ -2452,14 +3986,14 @@ - + - + @@ -2476,6 +4010,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2502,7 +4209,6 @@ - @@ -2510,7 +4216,6 @@ - @@ -2527,7 +4232,6 @@ - @@ -2542,62 +4246,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - + @@ -2607,7 +4263,7 @@ - + @@ -2619,7 +4275,7 @@ - + @@ -2691,8 +4347,7 @@ - - + @@ -3038,39 +4693,96 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aai-schema/src/main/resources/oxm/aai_oxm_v9.xml b/aai-schema/src/main/resources/oxm/aai_oxm_v9.xml index 87a3d656..2bf5a9c6 100644 --- a/aai-schema/src/main/resources/oxm/aai_oxm_v9.xml +++ b/aai-schema/src/main/resources/oxm/aai_oxm_v9.xml @@ -18,5434 +18,5448 @@ --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.16.6