Gizmo to load multiple Db Edge Rules files 41/54641/1
authorShwetank Dave <shwetank.dave@amdocs.com>
Wed, 13 Jun 2018 12:40:26 +0000 (08:40 -0400)
committerShwetank Dave <shwetank.dave@amdocs.com>
Wed, 13 Jun 2018 12:54:06 +0000 (08:54 -0400)
There is an Edge Rule file for each OXM file.
For every OXM version that is loaded, an edge rule file
should also be loaded.

Issue-ID: AAI-1201
Change-Id: I728e577ea8152623d3c5e2f0e8edf677f0eb9ef4
Signed-off-by: Shwetank Dave <shwetank.dave@amdocs.com>
25 files changed:
pom.xml
src/main/java/org/onap/crud/logging/CrudServiceMsgs.java
src/main/java/org/onap/crud/parser/CrudResponseBuilder.java
src/main/java/org/onap/crud/service/AaiResourceService.java
src/main/java/org/onap/crud/util/CrudServiceUtil.java
src/main/java/org/onap/schema/EdgeRulesLoader.java [new file with mode: 0644]
src/main/java/org/onap/schema/OxmModelLoader.java
src/main/java/org/onap/schema/RelationshipSchema.java
src/main/java/org/onap/schema/RelationshipSchemaLoader.java [deleted file]
src/main/java/org/onap/schema/RelationshipSchemaValidator.java
src/main/java/org/onap/schema/util/SchemaIngestPropertyReader.java
src/main/resources/logging/CrudServiceMsgs.properties
src/test/java/org/onap/crud/service/CrudRestServiceTest.java
src/test/java/org/onap/schema/EdgeRulesLoaderTest.java [new file with mode: 0644]
src/test/java/org/onap/schema/RelationshipSchemaLoaderTest.java [deleted file]
src/test/java/org/onap/schema/RelationshipSchemaTest.java
src/test/resources/edgeProps/edge_properties_v11.json [new file with mode: 0644]
src/test/resources/edgeProps/edge_properties_v13.json [new file with mode: 0644]
src/test/resources/rules/DbEdgeRules_test_one_v11.json [new file with mode: 0644]
src/test/resources/rules/DbEdgeRules_test_one_v13.json [new file with mode: 0644]
src/test/resources/rules/DbEdgeRules_test_two_v11.json [new file with mode: 0644]
src/test/resources/rules/DbEdgeRules_test_two_v13.json [new file with mode: 0644]
src/test/resources/rules/DbEdgeRules_v11.json [new file with mode: 0644]
src/test/resources/rules/DbEdgeRules_v13.json [new file with mode: 0644]
src/test/resources/schemaIngest.properties

diff --git a/pom.xml b/pom.xml
index 2276939..50c6c88 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -461,6 +461,15 @@ limitations under the License.
                                     <includes>oxm/</includes>
                                     <outputDirectory>${project.build.directory}/bundleconfig-local/etc</outputDirectory>
                                 </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.onap.aai.aai-common</groupId>
+                                    <artifactId>aai-core</artifactId>
+                                    <version>1.2.1</version>
+                                    <type>jar</type>
+                                    <includes>dbedgerules/</includes>
+                                    <excludes>**/*.ftlh</excludes>
+                                    <outputDirectory>${project.build.directory}/bundleconfig-local/etc</outputDirectory>
+                                </artifactItem>
                             </artifactItems>
                         </configuration>
                     </execution>
index 72883a9..2b669ae 100644 (file)
@@ -45,6 +45,14 @@ public enum CrudServiceMsgs implements LogMessageEnum {
    */
   LOADED_OXM_FILE,
 
+  /**
+   * Successfully loaded Edge Properties Files: {0}
+   *
+   * <p>
+   * Arguments: {0} = oxm filename
+   */
+  LOADED_DB_RULE_FILE,
+
   /**
    * Unable to load OXM schema: {0}
    *
index e28f7a7..0c66d81 100644 (file)
@@ -34,7 +34,7 @@ import org.onap.crud.exception.CrudException;
 import org.onap.crud.service.BulkPayload;
 import org.onap.crud.service.EdgePayload;
 import org.onap.crud.service.VertexPayload;
-import org.onap.schema.RelationshipSchemaLoader;
+import org.onap.schema.EdgeRulesLoader;
 
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
@@ -120,7 +120,7 @@ public class CrudResponseBuilder {
         EdgePayload inEdge = new EdgePayload();
         inEdge.setId(e.getId().get());
         inEdge.setType(e.getType());
-        inEdge.setUrl(URL_BASE + "relationships/" + RelationshipSchemaLoader.getLatestSchemaVersion() + "/"
+        inEdge.setUrl(URL_BASE + "relationships/" + EdgeRulesLoader.getLatestSchemaVersion() + "/"
             + e.getType() + "/" + e.getId().get());
         inEdge.setSource(URL_BASE + version + "/" + e.getSource().getType() + "/" + e.getSource().getId().get());
 
@@ -129,7 +129,7 @@ public class CrudResponseBuilder {
         EdgePayload outEdge = new EdgePayload();
         outEdge.setId(e.getId().get());
         outEdge.setType(e.getType());
-        outEdge.setUrl(URL_BASE + "relationships/" + RelationshipSchemaLoader.getLatestSchemaVersion() + "/"
+        outEdge.setUrl(URL_BASE + "relationships/" + EdgeRulesLoader.getLatestSchemaVersion() + "/"
             + e.getType() + "/" + e.getId().get());
         outEdge.setTarget(URL_BASE + version + "/" + e.getTarget().getType() + "/" + e.getTarget().getId().get());
         outEdges.add(outEdge);
index 6dfbab7..c9a5805 100644 (file)
@@ -56,7 +56,7 @@ import org.onap.crud.logging.CrudServiceMsgs;
 import org.onap.crud.logging.LoggingUtil;\r
 import org.onap.crud.service.CrudRestService.Action;\r
 import org.onap.crud.util.CrudServiceConstants;\r
-import org.onap.schema.RelationshipSchemaLoader;\r
+import org.onap.schema.EdgeRulesLoader;\r
 import org.onap.schema.RelationshipSchemaValidator;\r
 import org.slf4j.MDC;\r
 \r
@@ -161,11 +161,11 @@ public class AaiResourceService {
         payload = applyEdgeRulesToPayload(payload);\r
         \r
         if(logger.isDebugEnabled()) {\r
-          logger.debug("Creating AAI edge using version " + RelationshipSchemaLoader.getLatestSchemaVersion() );\r
+          logger.debug("Creating AAI edge using version " + EdgeRulesLoader.getLatestSchemaVersion() );\r
         }\r
         \r
         // Now, create our edge in the graph store.\r
-        String result = graphDataService.addEdge(RelationshipSchemaLoader.getLatestSchemaVersion(), type, payload);\r
+        String result = graphDataService.addEdge(EdgeRulesLoader.getLatestSchemaVersion(), type, payload);\r
         response = Response.status(Status.CREATED).entity(result).type(mediaType).build();\r
         \r
       } catch (CrudException e) {\r
@@ -229,7 +229,7 @@ public class AaiResourceService {
         payload = applyEdgeRulesToPayload(payload);\r
         \r
         // Now, create our edge in the graph store.\r
-        String result = graphDataService.addEdge(RelationshipSchemaLoader.getLatestSchemaVersion(), payload.getType(), payload);\r
+        String result = graphDataService.addEdge(EdgeRulesLoader.getLatestSchemaVersion(), payload.getType(), payload);\r
         response = Response.status(Status.CREATED).entity(result).type(mediaType).build();\r
       \r
       } catch (CrudException ce) {\r
@@ -304,10 +304,10 @@ public class AaiResourceService {
         String result;\r
         if (headers.getRequestHeaders().getFirst(HTTP_PATCH_METHOD_OVERRIDE) != null &&\r
             headers.getRequestHeaders().getFirst(HTTP_PATCH_METHOD_OVERRIDE).equalsIgnoreCase("PATCH")) {\r
-          result = graphDataService.patchEdge(RelationshipSchemaLoader.getLatestSchemaVersion(), id, type, payload);\r
+          result = graphDataService.patchEdge(EdgeRulesLoader.getLatestSchemaVersion(), id, type, payload);\r
         } else {\r
 \r
-          result = graphDataService.updateEdge(RelationshipSchemaLoader.getLatestSchemaVersion(), id, type, payload);\r
+          result = graphDataService.updateEdge(EdgeRulesLoader.getLatestSchemaVersion(), id, type, payload);\r
         }\r
 \r
         response = Response.status(Status.OK).entity(result).type(mediaType).build();\r
index 4d108f2..6c251bc 100644 (file)
@@ -23,7 +23,7 @@ package org.onap.crud.util;
 import org.onap.aai.db.props.AAIProperties;
 import org.onap.crud.exception.CrudException;
 import org.onap.schema.OxmModelLoader;
-import org.onap.schema.RelationshipSchemaLoader;
+import org.onap.schema.EdgeRulesLoader;
 
 import com.google.gson.Gson;
 import com.google.gson.JsonElement;
@@ -77,10 +77,10 @@ public class CrudServiceUtil {
     // load the schemas
     try {
       OxmModelLoader.loadModels();
+      EdgeRulesLoader.loadModels ();
     } catch (Exception e) {
       throw new CrudException(e);
     }
-    RelationshipSchemaLoader.loadModels();
   }
   
   /**
diff --git a/src/main/java/org/onap/schema/EdgeRulesLoader.java b/src/main/java/org/onap/schema/EdgeRulesLoader.java
new file mode 100644 (file)
index 0000000..a990ae5
--- /dev/null
@@ -0,0 +1,231 @@
+/**\r
+ * ============LICENSE_START=======================================================\r
+ * org.onap.aai\r
+ * ================================================================================\r
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.\r
+ * Copyright © 2017-2018 Amdocs\r
+ * ================================================================================\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * ============LICENSE_END=========================================================\r
+ */\r
+package org.onap.schema;\r
+\r
+import com.google.common.collect.Multimap;\r
+import org.apache.commons.io.IOUtils;\r
+import org.onap.aai.cl.eelf.LoggerFactory;\r
+import org.onap.aai.edges.EdgeRule;\r
+import org.onap.aai.edges.exceptions.EdgeRuleNotFoundException;\r
+import org.onap.aai.edges.EdgeIngestor;\r
+import org.onap.aai.setup.ConfigTranslator;\r
+import org.onap.aai.setup.SchemaLocationsBean;\r
+import org.onap.aai.setup.Version;\r
+import org.onap.crud.exception.CrudException;\r
+import org.onap.crud.logging.CrudServiceMsgs;\r
+import org.onap.schema.util.SchemaIngestPropertyReader;\r
+import org.springframework.core.io.UrlResource;\r
+\r
+import javax.ws.rs.core.Response.Status;\r
+import java.io.*;\r
+import java.util.Arrays;\r
+import java.util.Map;\r
+import java.util.concurrent.ConcurrentHashMap;\r
+import java.util.function.Function;\r
+import java.util.regex.Matcher;\r
+import java.util.regex.Pattern;\r
+import java.util.stream.Collectors;\r
+\r
+public class EdgeRulesLoader {\r
+\r
+    private static Map<String, RelationshipSchema> versionContextMap =\r
+            new ConcurrentHashMap<> ();\r
+\r
+    static final Pattern versionPattern = Pattern.compile ( "V(\\d*)" );\r
+    static final String propsPrefix = "edge_properties_";\r
+    static final String propsSuffix = ".json";\r
+    final static Pattern propsFilePattern = Pattern.compile ( propsPrefix + "(.*)" + propsSuffix );\r
+    final static Pattern propsVersionPattern = Pattern.compile ( "v\\d*" );\r
+\r
+    private static org.onap.aai.cl.api.Logger logger =\r
+            LoggerFactory.getInstance ().getLogger ( EdgeRulesLoader.class.getName () );\r
+\r
+    private EdgeRulesLoader () {\r
+    }\r
+\r
+    /**\r
+     * Finds all DB Edge Rules and Edge Properties files for all OXM models.\r
+     *\r
+     * @throws CrudException\r
+     */\r
+    public static synchronized void loadModels () throws CrudException {\r
+        SchemaIngestPropertyReader schemaIngestPropertyReader = new SchemaIngestPropertyReader ();\r
+        SchemaLocationsBean schemaLocationsBean = new SchemaLocationsBean ();\r
+        schemaLocationsBean.setEdgeDirectory ( schemaIngestPropertyReader.getEdgeDir () );\r
+        ConfigTranslator configTranslator = new OxmModelConfigTranslator ( schemaLocationsBean );\r
+        EdgeIngestor edgeIngestor = new EdgeIngestor ( configTranslator );\r
+        Map<String, File> propFiles = edgePropertyFiles(schemaIngestPropertyReader);\r
+\r
+        if (logger.isDebugEnabled ()) {\r
+            logger.debug ( "Loading DB Edge Rules" );\r
+        }\r
+\r
+        for (String version : OxmModelLoader.getLoadedOXMVersions ()) {\r
+            try {\r
+                loadModel ( Version.valueOf ( version ), edgeIngestor, propFiles );\r
+            } catch (IOException | EdgeRuleNotFoundException e) {\r
+                throw new CrudException(e.getMessage (), e);\r
+            }\r
+        }\r
+    }\r
+\r
+    /**\r
+     * Loads DB Edge Rules and Edge Properties for a given version.\r
+     *\r
+     * @throws CrudException\r
+     */\r
+\r
+    public static synchronized void loadModels ( String v ) throws CrudException {\r
+        SchemaIngestPropertyReader schemaIngestPropertyReader = new SchemaIngestPropertyReader ();\r
+        SchemaLocationsBean schemaLocationsBean = new SchemaLocationsBean ();\r
+        schemaLocationsBean.setEdgeDirectory ( schemaIngestPropertyReader.getEdgeDir () );\r
+        ConfigTranslator configTranslator = new OxmModelConfigTranslator ( schemaLocationsBean );\r
+        EdgeIngestor edgeIngestor = new EdgeIngestor ( configTranslator );\r
+        String version = v.toUpperCase ();\r
+        Map<String, File> propFiles = edgePropertyFiles(schemaIngestPropertyReader);\r
+\r
+        if (logger.isDebugEnabled ()) {\r
+            logger.debug ( "Loading DB Edge Rules " );\r
+        }\r
+\r
+        try {\r
+            loadModel ( Version.valueOf ( version ), edgeIngestor, propFiles );\r
+        } catch (IOException | EdgeRuleNotFoundException e) {\r
+            throw new CrudException(e.getMessage (), Status.INTERNAL_SERVER_ERROR);\r
+        }\r
+    }\r
+\r
+    /**\r
+     * Retrieves the DB Edge Rule relationship schema for a given version.\r
+     *\r
+     * @param version - The OXM version that we want the DB Edge Rule for.\r
+     * @return - A RelationshipSchema of the DB Edge Rule for the OXM version.\r
+     * @throws CrudException\r
+     */\r
+    public static RelationshipSchema getSchemaForVersion ( String version ) throws CrudException {\r
+\r
+        // If we haven't already loaded in the available OXM models, then do so now.\r
+        if (versionContextMap == null || versionContextMap.isEmpty ()) {\r
+            loadModels ();\r
+        } else if (!versionContextMap.containsKey ( version )) {\r
+            logger.error ( CrudServiceMsgs.OXM_LOAD_ERROR, "Error loading DB Edge Rules for: " + version );\r
+            throw new CrudException ( "Error loading DB Edge Rules for: " + version, Status.NOT_FOUND );\r
+        }\r
+\r
+        return versionContextMap.get ( version );\r
+    }\r
+\r
+    /**\r
+     * Retrieves the DB Edge Rule relationship schema for all loaded OXM versions.\r
+     *\r
+     * @return - A Map of the OXM version and it's corresponding RelationshipSchema of the DB Edge Rule.\r
+     * @throws CrudException\r
+     */\r
+    public static Map<String, RelationshipSchema> getSchemas () throws CrudException {\r
+\r
+        // If we haven't already loaded in the available OXM models, then do so now.\r
+        if (versionContextMap == null || versionContextMap.isEmpty ()) {\r
+            loadModels ();\r
+        }\r
+        return versionContextMap;\r
+    }\r
+\r
+    /**\r
+     * Returns the latest available DB Edge Rule version.\r
+     *\r
+     * @return - A Map of the OXM version and it's corresponding RelationshipSchema of the DB Edge Rule.\r
+     * @throws CrudException\r
+     */\r
+    public static String getLatestSchemaVersion () throws CrudException {\r
+\r
+        // If we haven't already loaded in the available OXM models, then do so now.\r
+        if (versionContextMap == null || versionContextMap.isEmpty ()) {\r
+            loadModels ();\r
+        }\r
+\r
+        // If there are still no models available, then there's not much we can do...\r
+        if (versionContextMap.isEmpty ()) {\r
+            logger.error ( CrudServiceMsgs.OXM_LOAD_ERROR, "No available DB Edge Rules to get latest version for." );\r
+            throw new CrudException ( "No available DB Edge Rules to get latest version for.",\r
+                    Status.INTERNAL_SERVER_ERROR );\r
+        }\r
+\r
+        // Iterate over the available model versions to determine which is the most\r
+        // recent.\r
+        Integer latestVersion = null;\r
+        String latestVersionStr = null;\r
+        for (String versionKey : versionContextMap.keySet ()) {\r
+\r
+            Matcher matcher = versionPattern.matcher ( versionKey.toUpperCase () );\r
+            if (matcher.find ()) {\r
+\r
+                int currentVersion = Integer.parseInt ( matcher.group ( 1 ) );\r
+\r
+                if ((latestVersion == null) || (currentVersion > latestVersion)) {\r
+                    latestVersion = currentVersion;\r
+                    latestVersionStr = versionKey;\r
+                }\r
+            }\r
+        }\r
+\r
+        return latestVersionStr;\r
+    }\r
+\r
+    /**\r
+     * Reset the loaded DB Edge Rule schemas\r
+     *\r
+     */\r
+\r
+    public static void resetSchemaVersionContext () {\r
+        versionContextMap = new ConcurrentHashMap<> ();\r
+    }\r
+\r
+    private static synchronized void loadModel ( Version version, EdgeIngestor edgeIngestor, Map<String, File> props)\r
+            throws IOException, CrudException, EdgeRuleNotFoundException {\r
+\r
+        Multimap<String, EdgeRule> edges = edgeIngestor.getAllRules ( version );\r
+        String edgeProps;\r
+        if (props.get ( version.toString().toLowerCase () ) != null) {\r
+            edgeProps = IOUtils.toString ( new FileInputStream ( props.get ( version.toString().toLowerCase () ) ), "UTF-8" );\r
+        } else {\r
+            throw new FileNotFoundException ( "The Edge Properties file for OXM version " + version + "was not found." );\r
+        }\r
+        if (edges != null) {\r
+            RelationshipSchema rs = new RelationshipSchema ( edges, edgeProps );\r
+            versionContextMap.put ( version.toString ().toLowerCase (), rs );\r
+            logger.info ( CrudServiceMsgs.LOADED_DB_RULE_FILE, version.toString () );\r
+        }\r
+    }\r
+\r
+    private static Map<String, File> edgePropertyFiles ( SchemaIngestPropertyReader dir ) throws CrudException {\r
+        Map<String, File> propsFiles = Arrays.stream ( new File ( dir.getEdgePropsDir () )\r
+                .listFiles ( ( d, name ) -> propsFilePattern.matcher ( name ).matches () ) )\r
+                .collect ( Collectors.toMap ( new Function<File, String> () {\r
+                    public String apply ( File f ) {\r
+                        Matcher m1 = propsVersionPattern.matcher ( f.getName () );\r
+                        m1.find ();\r
+                        return m1.group ( 0 );\r
+                    }\r
+                }, f -> f ) );\r
+        return  propsFiles;\r
+    }\r
+\r
+}\r
index 869df8f..8f55602 100644 (file)
@@ -21,6 +21,8 @@
 package org.onap.schema;
 
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.regex.Matcher;
@@ -140,6 +142,38 @@ public class OxmModelLoader {
         return latestVersionStr;
     }
 
+    /**
+     * Retrieves the list of all Loaded OXM versions.
+     *
+     * @return - A List of Strings of all loaded OXM versions.
+     *
+     * @throws CrudException
+     */
+    public static List<String> getLoadedOXMVersions() throws CrudException {
+
+        // If we haven't already loaded in the available OXM models, then do so now.
+        if (versionContextMap == null || versionContextMap.isEmpty()) {
+            loadModels();
+        }
+
+        // If there are still no models available, then there's not much we can do...
+        if (versionContextMap.isEmpty()) {
+            logger.error(CrudServiceMsgs.OXM_LOAD_ERROR, "No available OXM schemas to get versions for.");
+            throw new CrudException("No available OXM schemas to get versions for.",
+                    Status.INTERNAL_SERVER_ERROR);
+        }
+
+        List<String> versions = new ArrayList<String> ();
+        for (String versionKey : versionContextMap.keySet()) {
+
+            Matcher matcher = versionPattern.matcher(versionKey.toUpperCase());
+            if (matcher.find()) {
+                versions.add ( "V" + matcher.group ( 1 ) );
+            }
+        }
+        return versions;
+    }
+
     /**
      * Retrieves the map of all JAXB context objects that have been created by importing the
      * available OXM model schemas.
index 557c374..fc91662 100644 (file)
  */
 package org.onap.schema;
 
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-
+import com.google.common.collect.Multimap;
 import org.codehaus.jackson.map.ObjectMapper;
+import org.onap.aai.edges.EdgeRule;
 import org.onap.crud.exception.CrudException;
 
 import java.io.IOException;
@@ -33,12 +32,8 @@ import javax.ws.rs.core.Response.Status;
 
 
 public class RelationshipSchema {
-  private static final Gson gson = new GsonBuilder().create();
 
-  public static final String SCHEMA_SOURCE_NODE_TYPE = "from";
-  public static final String SCHEMA_TARGET_NODE_TYPE = "to";
   public static final String SCHEMA_RELATIONSHIP_TYPE = "label";
-  public static final String SCHEMA_RULES_ARRAY = "rules";
 
 
   private Map<String, Map<String, Class<?>>> relations = new HashMap<>();
@@ -47,12 +42,7 @@ public class RelationshipSchema {
    */
   private Map<String, Map<String, Class<?>>> relationTypes  = new HashMap<>();
 
-
-  public RelationshipSchema(List<String> jsonStrings) throws CrudException, IOException {
-    String edgeRules = jsonStrings.get(0);
-    String props = jsonStrings.get(1);
-
-    HashMap<String, ArrayList<LinkedHashMap<String, String>>> rules = new ObjectMapper().readValue(edgeRules, HashMap.class);
+  public RelationshipSchema( Multimap<String, EdgeRule> rules, String props) throws CrudException, IOException {
     HashMap<String, String> properties = new ObjectMapper().readValue(props, HashMap.class);
     Map<String, Class<?>> edgeProps = properties.entrySet().stream().collect(Collectors.toMap(p -> p.getKey(), p -> {
       try {
@@ -63,14 +53,12 @@ public class RelationshipSchema {
       return null;
     }));
 
-    rules.get(SCHEMA_RULES_ARRAY).forEach(l -> {
-      relationTypes.put(l.get(SCHEMA_RELATIONSHIP_TYPE), edgeProps);
-      relations.put(buildRelation(l.get(SCHEMA_SOURCE_NODE_TYPE), l.get(SCHEMA_TARGET_NODE_TYPE), l.get(SCHEMA_RELATIONSHIP_TYPE)), edgeProps);
+    rules.entries ().forEach ( (kv) -> {
+      relationTypes.put(kv.getValue ().getLabel (), edgeProps);
+      relations.put (buildRelation ( kv.getValue ().getFrom (), kv.getValue ().getTo (), kv.getValue ().getLabel ()), edgeProps);
     });
   }
 
-
-
   public Map<String, Class<?>> lookupRelation(String key) {
     return this.relations.get(key);
   }
diff --git a/src/main/java/org/onap/schema/RelationshipSchemaLoader.java b/src/main/java/org/onap/schema/RelationshipSchemaLoader.java
deleted file mode 100644 (file)
index 9a9a37c..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-/**
- * ============LICENSE_START=======================================================
- * org.onap.aai
- * ================================================================================
- * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
- * Copyright © 2017-2018 Amdocs
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.schema;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.TreeSet;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.stream.Collectors;
-import javax.ws.rs.core.Response.Status;
-import org.apache.commons.io.IOUtils;
-import org.onap.aai.cl.eelf.LoggerFactory;
-import org.onap.crud.exception.CrudException;
-import org.onap.crud.logging.CrudServiceMsgs;
-import org.onap.crud.util.CrudServiceConstants;
-import org.onap.crud.util.FileWatcher;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.UrlResource;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-import org.springframework.core.io.support.ResourcePatternResolver;
-
-public class RelationshipSchemaLoader {
-
-  private static Map<String, RelationshipSchema> versionContextMap = new ConcurrentHashMap<>();
-  private static SortedSet<Integer> versions = new TreeSet<Integer>();
-  private static Map<String, Timer> timers = new ConcurrentHashMap<String, Timer>();
-  final static String edgePropsFiles = "edge_properties_";
-  final static String fileExt = ".json";
-  final static Pattern rulesFilePattern = Pattern.compile("DbEdgeRules(.*)" + fileExt);
-  final static Pattern propsFilePattern = Pattern.compile(edgePropsFiles + "(.*)" + fileExt);
-  final static Pattern versionPattern = Pattern.compile(".*(v\\d+)" + fileExt);
-
-  private static org.onap.aai.cl.api.Logger logger = LoggerFactory.getInstance()
-      .getLogger(RelationshipSchemaLoader.class.getName());
-
-  public synchronized static void loadModels() throws CrudException {
-    load(rulesFilePattern, propsFilePattern);
-  }
-
-  public synchronized static void loadModels(String version) throws CrudException {
-    String pattern = String.format("DbEdgeRules.*(%s)" + fileExt, version);
-    load(Pattern.compile(pattern), Pattern.compile(edgePropsFiles + version + fileExt));
-  }
-
-  public static RelationshipSchema getSchemaForVersion(String version) throws CrudException {
-    if (versionContextMap == null || versionContextMap.isEmpty()) {
-      loadModels();
-    } else if (!versionContextMap.containsKey(version)) {
-      try {
-        loadModels(version);
-      } catch (Exception e) {
-        throw new CrudException("", Status.NOT_FOUND);
-      }
-    }
-    RelationshipSchema schema = versionContextMap.get(version);
-    if (schema == null) {
-      throw new CrudException("", Status.NOT_FOUND);
-    } else
-      return schema;
-  }
-
-  public static String getLatestSchemaVersion() throws CrudException {
-    return "v" + versions.last();
-  }
-
-  public static Map<String, RelationshipSchema> getVersionContextMap() {
-    return versionContextMap;
-  }
-
-  public static void setVersionContextMap(Map<String, RelationshipSchema> versionContextMap) {
-    RelationshipSchemaLoader.versionContextMap = versionContextMap;
-  }
-
-  public static void resetVersionContextMap() {
-    RelationshipSchemaLoader.versionContextMap = new ConcurrentHashMap<>();
-  }
-
-  private static void load(Pattern rulesPattern, Pattern edgePropsPattern) throws CrudException {
-    ClassLoader cl = RelationshipSchemaLoader.class.getClassLoader();
-    ResourcePatternResolver rulesResolver = new PathMatchingResourcePatternResolver(cl);
-    List<Object> rulesFiles = new ArrayList<Object>();
-    Set<String> existingFiles = new HashSet<String>();
-    String rulesDir = CrudServiceConstants.CRD_HOME_MODEL;
-    try {
-
-      // Allow additional DBEdgeRule files to be dropped in manually (in addition to those found on the classpath)
-      File[] edgeRuleFileList = new File(rulesDir).listFiles((d, name) -> rulesPattern.matcher(name).matches());
-      for (File file : edgeRuleFileList) {
-        rulesFiles.add(file);
-        existingFiles.add(filename(file));
-      }
-
-      // Get DBEdgeRules from the jar on the classpath.  Don't include any that conflict with files which
-      // were dropped manually.
-      Resource[] rawResourceList = rulesResolver.getResources("classpath*:/dbedgerules/DbEdgeRules*" + fileExt);
-      List<Resource> prunedResourceList = new ArrayList<Resource>();
-      for (Resource resource : rawResourceList) {
-        if (!existingFiles.contains(filename(resource))) {
-          prunedResourceList.add(resource);
-        }
-      }
-
-      rulesFiles.addAll(Arrays.stream(prunedResourceList.toArray(new Resource[prunedResourceList.size()]))
-          .filter(r -> !myMatcher(rulesPattern, r.getFilename()).isEmpty()).collect(Collectors.toList()));
-
-      // This gets all the objects of type "File" from external directory (not
-      // on the classpath)
-      // 1. From an external directory (one not on the classpath) we get all the
-      // objects of type "File"
-      // 2. We only return the files whose names matched the supplied pattern
-      // "p2".
-      // 3. We then collect all the objects in a list and add the contents of
-      // this list
-      // to the previous collection (rulesFiles)
-      rulesFiles
-          .addAll(Arrays.stream(new File(rulesDir).listFiles( (d, name) -> edgePropsPattern.matcher(name).matches()  ))
-              .collect(Collectors.toList()));
-
-      if (rulesFiles.isEmpty()) {
-        logger.error(CrudServiceMsgs.INVALID_OXM_DIR, rulesDir);
-        throw new FileNotFoundException("DbEdgeRules and edge_properties files were not found.");
-      }
-
-      // Sort and then group the files with their versions, convert them to the
-      // schema, and add them to versionContextMap
-      // 1. Sort the files. We need the DbEdgeRules files to be before the
-      // edgeProperties files.
-      // 2. Group the files with their versions. ie. v11 ->
-      // ["DbEdgeRule_v11.json", "edgeProperties_v11.json"].
-      // The "group method" returns a HashMap whose key is the version and the
-      // value is a list of objects.
-      // 3. Go through each version and map the files into one schema using the
-      // "jsonFilesLoader" method.
-      // Also update the "versionContextMap" with the version and it's schema.
-      rulesFiles.stream().sorted(Comparator.comparing(RelationshipSchemaLoader::filename))
-          .collect(Collectors.groupingBy(f -> myMatcher(versionPattern, filename(f))))
-          .forEach((version, resourceAndFile) -> {
-            if (resourceAndFile.size() == 2) {
-              versionContextMap.put(version, jsonFilesLoader(version, resourceAndFile));
-            } else {
-              String filenames = resourceAndFile.stream().map(f -> filename(f)).collect(Collectors.toList()).toString();
-              String errorMsg = "Expecting a rules and a edge_properties files for " + version + ". Found: "
-                  + filenames;
-              logger.warn(CrudServiceMsgs.INVALID_OXM_FILE, errorMsg);
-            }
-          });
-      logger.info(CrudServiceMsgs.LOADED_OXM_FILE, "Relationship Schema and Properties files: "
-          + rulesFiles.stream().map(f -> filename(f)).collect(Collectors.toList()));
-    } catch (IOException e) {
-      logger.error(CrudServiceMsgs.INVALID_OXM_DIR, rulesDir);
-      throw new CrudException("DbEdgeRules or edge_properties files were not found.", new FileNotFoundException());
-    }
-  }
-
-  private static String filename(Object k) throws ClassCastException {
-    if (k instanceof UrlResource) {
-      return ((UrlResource) k).getFilename();
-    } else if (k instanceof File) {
-      return ((File) k).getName();
-    } else {
-      throw new ClassCastException();
-    }
-  }
-
-  private static RelationshipSchema jsonFilesLoader(String version, List<Object> files) {
-    List<String> fileContents = new ArrayList<>();
-    RelationshipSchema rsSchema = null;
-    if (files.size() == 2) {
-      for (Object file : files) {
-        fileContents.add(jsonToRelationSchema(version, file));
-        versions.add(Integer.parseInt(version.substring(1)));
-      }
-
-      try {
-        rsSchema = new RelationshipSchema(fileContents);
-      } catch (CrudException | IOException e) {
-        e.printStackTrace();
-        logger.error(CrudServiceMsgs.INVALID_OXM_FILE,
-            files.stream().map(f -> filename(f)).collect(Collectors.toList()).toString(), e.getMessage());
-      }
-      return rsSchema;
-    }
-    return rsSchema;
-  }
-
-  private synchronized static void updateVersionContext(String version, RelationshipSchema rs) {
-    versionContextMap.put(version, rs);
-  }
-
-  private synchronized static String jsonToRelationSchema(String version, Object file) {
-    InputStream inputStream = null;
-    String content = null;
-
-    try {
-      if (file instanceof UrlResource) {
-        inputStream = ((UrlResource) file).getInputStream();
-      } else {
-        inputStream = new FileInputStream((File) file);
-        addtimer(version, file);
-      }
-      content = IOUtils.toString(inputStream, "UTF-8");
-    } catch (IOException e) {
-      e.printStackTrace();
-    }
-    return content;
-  }
-
-  private static void addtimer(String version, Object file) {
-    TimerTask task = null;
-    task = new FileWatcher((File) file) {
-      protected void onChange(File file) {
-        // here we implement the onChange
-        logger.info(CrudServiceMsgs.OXM_FILE_CHANGED, file.getName());
-
-        try {
-          // Cannot use the file object here because we also have to get the
-          // edge properties associated with that version.
-          // The properties are stored in a different file.
-          RelationshipSchemaLoader.loadModels(version);
-        } catch (Exception e) {
-          e.printStackTrace();
-        }
-      }
-    };
-
-    if (!timers.containsKey(version)) {
-      Timer timer = new Timer("db_edge_rules_" + version);
-      timer.schedule(task, new Date(), 10000);
-      timers.put(version, timer);
-
-    }
-  }
-
-  private static String myMatcher(Pattern p, String s) {
-    Matcher m = p.matcher(s);
-    return m.matches() ? m.group(1) : "";
-  }
-}
\ No newline at end of file
index 4b05c6f..15b1762 100644 (file)
@@ -49,7 +49,7 @@ public class RelationshipSchemaValidator {
                                                             Map<String, String> filter)
       throws CrudException {
 
-    RelationshipSchema schema = RelationshipSchemaLoader.getSchemaForVersion(version);
+    RelationshipSchema schema = EdgeRulesLoader.getSchemaForVersion(version);
     if (schema == null) {
       throw new CrudException("", Status.NOT_FOUND);
     }
@@ -77,7 +77,7 @@ public class RelationshipSchemaValidator {
 
   public static void validateType(String version, String type) throws CrudException {
 
-    RelationshipSchema schema = RelationshipSchemaLoader.getSchemaForVersion(version);
+    RelationshipSchema schema = EdgeRulesLoader.getSchemaForVersion(version);
     if (!schema.isValidType(type)) {
       throw new CrudException("Invalid " + RelationshipSchema.SCHEMA_RELATIONSHIP_TYPE
           + ": " + type,
@@ -101,7 +101,7 @@ public class RelationshipSchemaValidator {
 
   public static Edge validateIncomingAddPayload(String version, String type, EdgePayload payload)
       throws CrudException {
-    RelationshipSchema schema = RelationshipSchemaLoader.getSchemaForVersion(version);
+    RelationshipSchema schema = EdgeRulesLoader.getSchemaForVersion(version);
 
     try {
 
@@ -151,7 +151,7 @@ public class RelationshipSchemaValidator {
 
   public static Edge validateIncomingPatchPayload(Edge edge, String version, EdgePayload payload)
       throws CrudException {
-    RelationshipSchema schema = RelationshipSchemaLoader.getSchemaForVersion(version);
+    RelationshipSchema schema = EdgeRulesLoader.getSchemaForVersion(version);
 
     try {
       if (payload.getSource() != null) {
@@ -243,7 +243,7 @@ public class RelationshipSchemaValidator {
 
   public static Edge validateIncomingUpdatePayload(Edge edge, String version, EdgePayload payload)
       throws CrudException {
-    RelationshipSchema schema = RelationshipSchemaLoader.getSchemaForVersion(version);
+    RelationshipSchema schema = EdgeRulesLoader.getSchemaForVersion(version);
 
     try {
 
@@ -328,7 +328,7 @@ public class RelationshipSchemaValidator {
         .get()).source(edge.getSource())
         .target(edge.getTarget());
 
-    RelationshipSchema schema = RelationshipSchemaLoader.getSchemaForVersion(version);
+    RelationshipSchema schema = EdgeRulesLoader.getSchemaForVersion(version);
 
     String key = edge.getSource().getType() + ":" + edge.getTarget().getType()
         + ":" + edge.getType();
index 71ea47e..ca5fa6b 100644 (file)
@@ -46,11 +46,37 @@ public class SchemaIngestPropertyReader {
      * Gets the location of the OXM
      *
      * @return
-     * @throws SpikeException
-     * @throws IOException
+     * @throws CrudException
      */
     public String getNodeDir() throws CrudException {
 
+        return getProps ().getProperty("nodeDir");
+    }
+
+    /**
+     * Gets the location of the Edge Rules
+     *
+     * @return
+     * @throws CrudException
+     */
+    public String getEdgeDir() throws CrudException {
+
+        return getProps ().getProperty("edgeDir");
+    }
+
+    /**
+     * Gets the location of the Edge Properties
+     *
+     * @return
+     * @throws CrudException
+     */
+    public String getEdgePropsDir() throws CrudException {
+
+        return getProps ().getProperty("edgePropsDir");
+    }
+
+    private Properties getProps() throws CrudException {
+
         Properties prop = new Properties();
         try {
             prop = loadFromFile(SCHEMA_INGEST_PROPERTIES_LOCATION);
@@ -66,7 +92,7 @@ public class SchemaIngestPropertyReader {
             logger.error(CrudServiceMsgs.SCHEMA_INGEST_LOAD_ERROR, e.getMessage());
             throw new CrudException("Failed to load schemaIngest.properties", e);
         }
-        return prop.getProperty("nodeDir");
+        return prop;
     }
 
     private Properties loadFromFile(String filename) throws IOException {
index 5ae6ca6..3d81571 100644 (file)
@@ -46,6 +46,10 @@ LOADED_OXM_FILE=\
             CRD0007I|\
             Successfully loaded schema: {0}
 
+LOADED_DB_RULE_FILE=\
+            CRD00014I|\
+            Successfully loaded DB Edge Rule and Edge Properties for: {0}
+
 EXCEPTION_DURING_METHOD_CALL=\
             CRD0502E|\
             Failed to {0} request for {1} due to: {2}|\
index a4b4305..13cba11 100644 (file)
@@ -42,8 +42,7 @@ import org.onap.crud.exception.CrudException;
 import org.onap.crud.service.util.TestHeaders;
 import org.onap.crud.service.util.TestRequest;
 import org.onap.crud.service.util.TestUriInfo;
-import org.onap.schema.RelationshipSchemaLoader;
-
+import org.onap.schema.EdgeRulesLoader;
 
 
 public class CrudRestServiceTest {
@@ -85,8 +84,7 @@ public class CrudRestServiceTest {
       Path parentPath = resourcePath.getParent();
 
       System.setProperty("CONFIG_HOME", parentPath.toString());
-      RelationshipSchemaLoader.resetVersionContextMap();
-      
+    EdgeRulesLoader.resetSchemaVersionContext ();
       CrudGraphDataService service = new CrudGraphDataService(new TestDao());
       CrudRestService restService = new CrudRestService(service, null);
       mockService = Mockito.spy(restService);
diff --git a/src/test/java/org/onap/schema/EdgeRulesLoaderTest.java b/src/test/java/org/onap/schema/EdgeRulesLoaderTest.java
new file mode 100644 (file)
index 0000000..073e1d3
--- /dev/null
@@ -0,0 +1,69 @@
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.schema;
+
+import org.junit.Test;
+import org.onap.crud.exception.CrudException;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.junit.Assert.*;
+
+public class EdgeRulesLoaderTest {
+
+    @Test
+    public void loadModels() throws Exception {
+        EdgeRulesLoader.loadModels();
+        assertTrue(EdgeRulesLoader.getSchemaForVersion ( "v11" ).isValidType ( "org.onap.relationships.inventory.groupsResourcesIn" ));
+    }
+
+    @Test
+    public void loadModelsWithAVersion() throws Exception {
+        EdgeRulesLoader.resetSchemaVersionContext ();
+        EdgeRulesLoader.loadModels("V11");
+        assertEquals(1, EdgeRulesLoader.getSchemas ().size ());
+        assertEquals("v11", EdgeRulesLoader.getLatestSchemaVersion ());
+    }
+
+    @Test
+    public void getSchemaForVersion() throws Exception {
+        EdgeRulesLoader.resetSchemaVersionContext ();
+        EdgeRulesLoader.loadModels("v11");
+        String version = EdgeRulesLoader.getLatestSchemaVersion();
+        RelationshipSchema g = EdgeRulesLoader.getSchemaForVersion(version);
+        assertNotNull(g.lookupRelationType("org.onap.relationships.inventory.groupsResourcesIn"));
+        assertNotNull(g.lookupRelation("U:V:org.onap.relationships.inventory.groupsResourcesIn"));
+        assertNull(g.lookupRelation("U:W:org.onap.relationships.inventory.groupsResourcesIn"));
+    }
+
+
+    @Test
+    public void getSchemaForVersionFail() throws Exception {
+        EdgeRulesLoader.loadModels();
+        try {
+            EdgeRulesLoader.getSchemaForVersion("v1");
+        } catch (CrudException e) {
+            assertEquals(404, e.getHttpStatus().getStatusCode());
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/test/java/org/onap/schema/RelationshipSchemaLoaderTest.java b/src/test/java/org/onap/schema/RelationshipSchemaLoaderTest.java
deleted file mode 100644 (file)
index feeb1c4..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * ============LICENSE_START=======================================================
- * org.onap.aai
- * ================================================================================
- * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
- * Copyright © 2017-2018 Amdocs
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.schema;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.crud.exception.CrudException;
-
-public class RelationshipSchemaLoaderTest {
-
-    @Before
-    public void init() throws Exception {
-        Path resourcePath = Paths.get(ClassLoader.getSystemResource("model").toURI());
-        Path parentPath = resourcePath.getParent();
-        System.setProperty("CONFIG_HOME", parentPath.toString());
-        RelationshipSchemaLoader.resetVersionContextMap();
-    }
-
-    @Test
-    public void loadModels() throws Exception {
-        RelationshipSchemaLoader.resetVersionContextMap();
-        RelationshipSchemaLoader.loadModels();
-        assertFalse( RelationshipSchemaLoader.getVersionContextMap().keySet().isEmpty());
-    }
-
-    @Test
-    public void loadModelsWithAVersion() throws Exception {
-        RelationshipSchemaLoader.resetVersionContextMap();
-        RelationshipSchemaLoader.loadModels("v11");
-        assertEquals(1, RelationshipSchemaLoader.getVersionContextMap().keySet().size());
-        assertEquals("v11",  RelationshipSchemaLoader.getLatestSchemaVersion());
-    }
-
-    @Test
-    public void getSchemaForVersion() throws Exception {
-        RelationshipSchemaLoader.resetVersionContextMap();
-        RelationshipSchemaLoader.loadModels("v11");
-        String version = RelationshipSchemaLoader.getLatestSchemaVersion();
-        RelationshipSchema g = RelationshipSchemaLoader.getSchemaForVersion(version);
-        assertNotNull(g.lookupRelationType("org.onap.relationships.inventory.BelongsTo"));
-    }
-
-    public void getSchemaForVersionManualFile() throws Exception {
-      RelationshipSchemaLoader.resetVersionContextMap();
-      RelationshipSchemaLoader.loadModels("v10");
-      String version = RelationshipSchemaLoader.getLatestSchemaVersion();
-      RelationshipSchema g = RelationshipSchemaLoader.getSchemaForVersion(version);
-      assertNotNull(g.lookupRelationType("locatedIn"));
-    }
-
-
-    @Test
-    public void getSchemaForVersionFail() throws Exception {
-        RelationshipSchemaLoader.resetVersionContextMap();
-        RelationshipSchemaLoader.loadModels();
-        try {
-            RelationshipSchemaLoader.getSchemaForVersion("v1");
-        } catch (CrudException e) {
-            assertEquals(404, e.getHttpStatus().getStatusCode());
-        }
-    }
-
-    @Test
-    public void setVersionContextMap() throws Exception {
-        RelationshipSchemaLoader.resetVersionContextMap();
-        ArrayList<String> jsonString = new ArrayList<String>();
-        String rules = "{" +
-                "\"rules\": [" +
-                "{" +
-                "\"from\": \"availability-zone\"," +
-                "\"to\": \"complex\"," +
-                "\"label\": \"groupsResourcesIn\"," +
-                "\"direction\": \"OUT\"," +
-                "\"multiplicity\": \"Many2Many\"," +
-                "\"contains-other-v\": \"NONE\"," +
-                "\"delete-other-v\": \"NONE\"," +
-                "\"SVC-INFRA\": \"NONE\"," +
-                "\"prevent-delete\": \"!${direction}\"" +
-                "}]}";
-        String props = "{" +
-                "  \"isParent\":\"java.lang.Boolean\"," +
-                "  \"isParent-REV\":\"java.lang.Boolean\"," +
-                "  \"usesResource\":\"java.lang.Boolean\"," +
-                "  \"usesResource-REV\":\"java.lang.Boolean\"," +
-                "  \"SVC-INFRA\":\"java.lang.Boolean\"," +
-                "  \"SVC-INFRA-REV\":\"java.lang.Boolean\"," +
-                "  \"hasDelTarget\":\"java.lang.Boolean\"," +
-                "  \"hasDelTarget-REV\":\"java.lang.Boolean\"" +
-                "}";
-        jsonString.add(rules);
-        jsonString.add(props);
-        RelationshipSchema nRs = new RelationshipSchema(jsonString);
-        Map<String, RelationshipSchema> versionMap = new HashMap<>();
-        versionMap.put("v1", nRs);
-        RelationshipSchemaLoader.setVersionContextMap(versionMap);
-        assertNotNull(RelationshipSchemaLoader.getSchemaForVersion("v1").lookupRelationType("groupsResourcesIn"));
-    }
-}
index ce8559a..9467f41 100644 (file)
  */
 package org.onap.schema;
 
-import org.apache.commons.io.IOUtils;
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.Multimap;
 import org.junit.Test;
+import org.onap.aai.edges.EdgeRule;
+import org.onap.aai.edges.exceptions.EdgeRuleNotFoundException;
 import org.onap.crud.exception.CrudException;
 
-import com.att.aft.dme2.internal.apache.commons.lang.ArrayUtils;
-
-import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
-import java.io.InputStream;
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.Comparator;
-import java.util.concurrent.ConcurrentHashMap;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.stream.Collectors;
 
 import static org.junit.Assert.*;
 
 public class RelationshipSchemaTest {
 
-    final static Pattern rulesFilePattern = Pattern.compile("DbEdgeRules(.*).json");
-    final static Pattern propsFilePattern = Pattern.compile("edge_properties_(.*).json");
-    final static Pattern versionPattern = Pattern.compile(".*(v\\d+).json");
-
-
     @Test
     public void shouldLoadAllTheVersionsInDirectory() throws Exception {
-        Map<String, RelationshipSchema> versionContextMap = new ConcurrentHashMap<>();
-        loadRelations(versionContextMap);
-        assertTrue(versionContextMap.keySet().size() >= 0);
+        RelationshipSchema rs = loadRelations();
+        assertTrue(!rs.lookupRelationType ("org.onap.some-relation"  ).isEmpty ());
     }
 
     @Test
     public void shouldContainValidTypes() throws Exception {
-        Map<String, RelationshipSchema> versionContextMap = new ConcurrentHashMap<>();
-        loadRelations(versionContextMap);
-        assertTrue(versionContextMap.get("v10").isValidType("groupsResourcesIn"));
-        assertTrue(versionContextMap.get("v10").isValidType("uses"));
-        assertFalse(versionContextMap.get("v10").isValidType("notValidType"));
+        RelationshipSchema rs = loadRelations();
+        assertTrue(rs.lookupRelationType ("org.onap.some-relation") != null);
+        assertTrue(rs.lookupRelationType("notValidType") == null);
     }
 
     @Test
     public void shouldLookUpByRelation() throws Exception {
-        Map<String, RelationshipSchema> versionContextMap = new ConcurrentHashMap<>();
-        loadRelations(versionContextMap);
-        assertNotNull(versionContextMap.get("v10").lookupRelation("availability-zone:complex:groupsResourcesIn"));
-        assertTrue(versionContextMap.get("v10")
-                .lookupRelation("availability-zone:complex:groupsResourcesIn").containsKey("prevent-delete"));
+        RelationshipSchema rs = loadRelations();
+        assertNotNull(rs.lookupRelation("service-instance:customer:org.onap.some-relation"));
     }
 
     @Test
     public void shouldLookUpByRelationType() throws Exception {
-        Map<String, RelationshipSchema> versionContextMap = new ConcurrentHashMap<>();
-        loadRelations(versionContextMap);
-        assertNotNull(versionContextMap.get("v10").lookupRelationType("groupsResourcesIn"));
-        assertTrue(versionContextMap.get("v10")
-                .lookupRelation("availability-zone:complex:groupsResourcesIn").containsKey("prevent-delete"));
-    }
-
-    private void loadRelations(Map<String, RelationshipSchema> map){
-        ClassLoader classLoader = getClass().getClassLoader();
-        File dir = new File(classLoader.getResource("model").getFile());
-        File[] allFiles = dir.listFiles((d, name) ->
-                (propsFilePattern.matcher(name).matches() || rulesFilePattern.matcher(name).matches()));
-        
-        // Special handling for the v12 file, as it is used for a special test
-        for (File f : allFiles) {
-          if (f.getName().equals("edge_properties_v11.json")) {
-            allFiles = (File[]) ArrayUtils.removeElement(allFiles, f);
-          }
-        }
-        
-        Arrays.stream(allFiles).sorted(Comparator.comparing(File::getName))
-                .collect(Collectors.groupingBy(f -> myMatcher(versionPattern, f.getName())))
-                .forEach((e, f) -> map.put(e, jsonFilesLoader(f)));
-
-    }
-
-
-    private RelationshipSchema jsonFilesLoader (List<File> files) {
-        List<String> fileContents = new ArrayList<>();
-        RelationshipSchema rsSchema = null;
-        for (File f : files) {
-            fileContents.add(jsonToString(f));
-        }
-
-        try {
-            if (fileContents.size() == 2) {
-                rsSchema = new RelationshipSchema(fileContents);
-            }
-        } catch (CrudException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-
-        return rsSchema;
+        RelationshipSchema rs = loadRelations();
+        assertNotNull(rs.lookupRelationType("org.onap.groupsResourcesIn"));
+        assertTrue(rs.lookupRelation("availability-zone:complex:org.onap.groupsResourcesIn").containsKey("prevent-delete"));
     }
 
-    private String jsonToString (File file) {
-        InputStream inputStream = null;
-        String content = null;
-        HashMap<String,Object> result = null;
-
-        try {
-            inputStream = new FileInputStream(file);
-            content =  IOUtils.toString(inputStream, "UTF-8");
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-
-        return content;
-    }
+    private RelationshipSchema loadRelations() throws CrudException, EdgeRuleNotFoundException, IOException {
+        String defaultEdgeProps = "{" +
+                "\"contains-other-v\": \"java.lang.String\"," +
+                "\"delete-other-v\": \"java.lang.String\"," +
+                "\"SVC-INFRA\": \"java.lang.String\"," +
+                "\"prevent-delete\": \"java.lang.String\"" +
+                "}";
+
+        Map<String, String> ruleOne = new HashMap<> (  );
+        Map<String, String> ruleTwo = new HashMap<> (  );
+
+        ruleOne.put("label", "org.onap.some-relation");
+        ruleOne.put("direction", "OUT");
+        ruleOne.put("contains-other-v", "NONE");
+        ruleOne.put("delete-other-v", "NONE");
+        ruleOne.put("prevent-delete", "NONE");
+        ruleOne.put("from", "service-instance");
+        ruleOne.put("to", "customer");
+        ruleOne.put("multiplicity", "MANY2MANY");
+        ruleOne.put("default", "true");
+        ruleOne.put("description", "");
+
+        ruleTwo.put("label", "org.onap.groupsResourcesIn");
+        ruleTwo.put("direction", "OUT");
+        ruleTwo.put("contains-other-v", "NONE");
+        ruleTwo.put("delete-other-v", "NONE");
+        ruleTwo.put("prevent-delete", "NONE");
+        ruleTwo.put("from", "availability-zone");
+        ruleTwo.put("to", "complex");
+        ruleTwo.put("multiplicity", "MANY2MANY");
+        ruleTwo.put("default", "true");
+        ruleTwo.put("description", "");
+
+        EdgeRule erOne = new EdgeRule ( ruleOne );
+        EdgeRule erTwo = new EdgeRule ( ruleTwo );
+        Multimap<String, EdgeRule> relationship = ArrayListMultimap.create();
+        relationship.put ( "customer|service-instane", erOne );
+        relationship.put ( "availability-zone|complex", erTwo );
+        return new RelationshipSchema ( relationship, defaultEdgeProps );
 
-    private String myMatcher (Pattern p, String s) {
-        Matcher m = p.matcher(s);
-        return m.matches() ? m.group(1) : "";
     }
 }
\ No newline at end of file
diff --git a/src/test/resources/edgeProps/edge_properties_v11.json b/src/test/resources/edgeProps/edge_properties_v11.json
new file mode 100644 (file)
index 0000000..8d00636
--- /dev/null
@@ -0,0 +1,6 @@
+{
+        "contains-other-v": "java.lang.String",
+        "delete-other-v": "java.lang.String",
+        "SVC-INFRA": "java.lang.String",
+        "prevent-delete": "java.lang.String"
+}
\ No newline at end of file
diff --git a/src/test/resources/edgeProps/edge_properties_v13.json b/src/test/resources/edgeProps/edge_properties_v13.json
new file mode 100644 (file)
index 0000000..8d00636
--- /dev/null
@@ -0,0 +1,6 @@
+{
+        "contains-other-v": "java.lang.String",
+        "delete-other-v": "java.lang.String",
+        "SVC-INFRA": "java.lang.String",
+        "prevent-delete": "java.lang.String"
+}
\ No newline at end of file
diff --git a/src/test/resources/rules/DbEdgeRules_test_one_v11.json b/src/test/resources/rules/DbEdgeRules_test_one_v11.json
new file mode 100644 (file)
index 0000000..61eed72
--- /dev/null
@@ -0,0 +1,26 @@
+{
+       "rules": [
+               {
+                       "from": "U",
+                       "to": "V",
+                       "label": "org.onap.relationships.inventory.groupsResourcesIn",
+                       "direction": "IN",
+                       "multiplicity": "Many2Many",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}"
+               },
+               {
+                       "from": "W",
+                       "to": "X",
+                       "label": "org.onap.relationships.inventory.groupsResourcesIn",
+                       "direction": "OUT",
+                       "multiplicity": "Many2Many",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}"
+               }
+       ]
+}
diff --git a/src/test/resources/rules/DbEdgeRules_test_one_v13.json b/src/test/resources/rules/DbEdgeRules_test_one_v13.json
new file mode 100644 (file)
index 0000000..6611750
--- /dev/null
@@ -0,0 +1,26 @@
+{
+       "rules": [
+               {
+                       "from": “A”,
+                       "to": “B”,
+                       "label": “A-To-B”,
+                       "direction": "OUT",
+                       "multiplicity": "Many2Many",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}"
+               },
+               {
+                       "from": “B”,
+                       "to": “c”,
+                       "label": “B-To-C”,
+                       "direction": "OUT",
+                       "multiplicity": "Many2Many",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}"
+               }
+                       ]
+}
diff --git a/src/test/resources/rules/DbEdgeRules_test_two_v11.json b/src/test/resources/rules/DbEdgeRules_test_two_v11.json
new file mode 100644 (file)
index 0000000..f38bd2c
--- /dev/null
@@ -0,0 +1,26 @@
+{
+       "rules": [
+               {
+                       "from": "U",
+                       "to": "V",
+                       "label": "org.onap.relationships.inventory.groupsResourcesIn",
+                       "direction": "BOTH",
+                       "multiplicity": "Many2Many",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}"
+               },
+               {
+                       "from": "Y",
+                       "to": "X",
+                       "label": "org.onap.relationships.inventory.groupsResourcesIn",
+                       "direction": "OUT",
+                       "multiplicity": "Many2Many",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}"
+               }
+       ]
+}
diff --git a/src/test/resources/rules/DbEdgeRules_test_two_v13.json b/src/test/resources/rules/DbEdgeRules_test_two_v13.json
new file mode 100644 (file)
index 0000000..d1995d2
--- /dev/null
@@ -0,0 +1,26 @@
+{
+       "rules": [
+               {
+                       "from": “C”,
+                       "to": “D”,
+                       "label": “C-To-D”,
+                       "direction": "OUT",
+                       "multiplicity": "Many2Many",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}"
+               },
+               {
+                       "from": “D”,
+                       "to": “E”,
+                       "label": “D-To-E”,
+                       "direction": "OUT",
+                       "multiplicity": "Many2Many",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}"
+               }
+                       ]
+}
diff --git a/src/test/resources/rules/DbEdgeRules_v11.json b/src/test/resources/rules/DbEdgeRules_v11.json
new file mode 100644 (file)
index 0000000..a32ba86
--- /dev/null
@@ -0,0 +1,2416 @@
+{
+       "rules": [
+               {
+                       "from": "esr-ems",
+                       "to": "esr-system-info",
+                       "label": "has",
+                       "direction": "OUT",
+                       "multiplicity": "One2Many",
+                       "contains-other-v": "${direction}",
+                       "delete-other-v": "${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "esr-vnfm",
+                       "to": "esr-system-info",
+                       "label": "has",
+                       "direction": "OUT",
+                       "multiplicity": "One2One",
+                       "contains-other-v": "${direction}",
+                       "delete-other-v": "${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "esr-thirdparty-sdnc",
+                       "to": "esr-system-info",
+                       "label": "has",
+                       "direction": "OUT",
+                       "multiplicity": "One2One",
+                       "contains-other-v": "${direction}",
+                       "delete-other-v": "${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "esr-thirdparty-sdnc",
+                       "to": "pnf",
+                       "label": "has",
+                       "direction": "OUT",
+                       "multiplicity": "One2Many",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "cloud-region",
+                       "to": "esr-system-info",
+                       "label": "has",
+                       "direction": "OUT",
+                       "multiplicity": "One2Many",
+                       "contains-other-v": "${direction}",
+                       "delete-other-v": "${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "allotted-resource",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.PartOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.PartOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "l-interface",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "network-policy",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "vlan",
+                       "label": "org.onap.relationships.inventory.PartOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "vpn-binding",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "tunnel-xconnect",
+                       "to": "allotted-resource",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "availability-zone",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "availability-zone",
+                       "to": "service-capability",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "availability-zone",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "cloud-region",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "cloud-region",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "cloud-region",
+                       "to": "zone",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "dvs-switch",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "flavor",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "group-assignment",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "image",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "oam-network",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "snapshot",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "tenant",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "vip-ipv4-address-list",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "vip-ipv6-address-list",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "volume-group",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "complex",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "ctag-pool",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "configuration",
+                       "to": "allotted-resource",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "configuration",
+                       "to": "logical-link",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "metadatum",
+                       "to": "configuration",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "connector",
+                       "to": "virtual-data-center",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "metadatum",
+                       "to": "connector",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "element-choice-set",
+                       "to": "constrained-element-set",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "ctag-pool",
+                       "to": "availability-zone",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "service-subscription",
+                       "to": "customer",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "dvs-switch",
+                       "to": "availability-zone",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "model-element",
+                       "to": "element-choice-set",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "entitlement",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "availability-zone",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "configuration",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "ctag-pool",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "ipsec-configuration",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "license-key-resource",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "pnf",
+                       "label": "tosca.relationships.HostedOn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "pserver",
+                       "label": "tosca.relationships.HostedOn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "vnfc",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "vnf-image",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "volume-group",
+                       "label": "org.onap.relationships.inventory.DependsOn",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "vserver",
+                       "label": "tosca.relationships.HostedOn",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "lag-interface",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "license",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l-interface",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "network-profile",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "service-instance",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.ComposedOf",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "site-pair-set",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vf-module",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "pserver",
+                       "to": "group-assignment",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "tenant",
+                       "to": "group-assignment",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "metadatum",
+                       "to": "image",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "instance-group",
+                       "to": "model",
+                       "label": "org.onap.relationships.inventory.Targets",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "vig-server",
+                       "to": "ipsec-configuration",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l3-interface-ipv4-address-list",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.network.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l3-interface-ipv4-address-list",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.network.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l3-interface-ipv4-address-list",
+                       "to": "subnet",
+                       "label": "org.onap.relationships.inventory.network.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "l3-interface-ipv6-address-list",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.network.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l3-interface-ipv6-address-list",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.network.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l3-interface-ipv6-address-list",
+                       "to": "subnet",
+                       "label": "org.onap.relationships.inventory.network.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "ctag-assignment",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l3-network",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l3-network",
+                       "to": "network-policy",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l3-network",
+                       "to": "route-table-reference",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l3-network",
+                       "to": "vpn-binding",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "segmentation-assignment",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "service-instance",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.ComposedOf",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "subnet",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "lag-interface",
+                       "to": "lag-link",
+                       "label": "tosca.relationships.network.LinksTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "lag-interface",
+                       "to": "logical-link",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "lag-interface",
+                       "to": "p-interface",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l-interface",
+                       "to": "lag-interface",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "line-of-business",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l3-interface-ipv4-address-list",
+                       "to": "l-interface",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l3-interface-ipv6-address-list",
+                       "to": "l-interface",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l-interface",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l-interface",
+                       "to": "l-interface",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l-interface",
+                       "to": "logical-link",
+                       "label": "tosca.relationships.network.LinksTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "sriov-vf",
+                       "to": "l-interface",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vlan",
+                       "to": "l-interface",
+                       "label": "tosca.relationships.network.LinksTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "logical-link",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "logical-link",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.BridgedTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "logical-link",
+                       "to": "lag-link",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "logical-link",
+                       "to": "logical-link",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "logical-link",
+                       "to": "pnf",
+                       "label": "org.onap.relationships.inventory.BridgedTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "logical-link",
+                       "to": "pserver",
+                       "label": "org.onap.relationships.inventory.BridgedTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "logical-link",
+                       "to": "vpn-binding",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "model-ver",
+                       "to": "model",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "constrained-element-set",
+                       "to": "model-constraint",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "constrained-element-set",
+                       "to": "model-element",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "model-constraint",
+                       "to": "model-element",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "model-element",
+                       "to": "model-element",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "model-element",
+                       "to": "model-ver",
+                       "label": "org.onap.relationships.inventory.IsA",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "model-element",
+                       "to": "model-ver",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "named-query",
+                       "to": "model",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "named-query-element",
+                       "to": "named-query",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "named-query-element",
+                       "to": "model",
+                       "label": "org.onap.relationships.inventory.IsA",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "named-query-element",
+                       "to": "named-query-element",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "property-constraint",
+                       "to": "named-query-element",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "related-lookup",
+                       "to": "named-query-element",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l-interface",
+                       "to": "newvce",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "oam-network",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "oam-network",
+                       "to": "service-capability",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "service-instance",
+                       "to": "owning-entity",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l-interface",
+                       "to": "p-interface",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "p-interface",
+                       "to": "logical-link",
+                       "label": "tosca.relationships.network.LinksTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "p-interface",
+                       "to": "physical-link",
+                       "label": "tosca.relationships.network.LinksTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "sriov-pf",
+                       "to": "p-interface",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "platform",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "lag-interface",
+                       "to": "pnf",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "p-interface",
+                       "to": "pnf",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "pnf",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "pnf",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "pnf",
+                       "to": "zone",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "cvlan-tag",
+                       "to": "port-group",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "project",
+                       "to": "service-instance",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "lag-interface",
+                       "to": "pserver",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "p-interface",
+                       "to": "pserver",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "pserver",
+                       "to": "availability-zone",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "pserver",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "pserver",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "pserver",
+                       "to": "zone",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "site-pair",
+                       "to": "routing-instance",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "service-instance",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "metadatum",
+                       "to": "service-instance",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "service-instance",
+                       "to": "allotted-resource",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "service-instance",
+                       "to": "configuration",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "service-instance",
+                       "to": "connector",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "service-instance",
+                       "to": "ctag-assignment",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "service-instance",
+                       "to": "cvlan-tag",
+                       "label": "org.onap.relationships.inventory.ComposedOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "service-instance",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "service-instance",
+                       "to": "logical-link",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "service-instance",
+                       "to": "pnf",
+                       "label": "org.onap.relationships.inventory.ComposedOf",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "service-instance",
+                       "to": "service-instance",
+                       "label": "org.onap.relationships.inventory.ComposedOf",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "service-instance",
+                       "to": "vlan",
+                       "label": "org.onap.relationships.inventory.ComposedOf",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "service-instance",
+                       "to": "zone",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "service-instance",
+                       "to": "service-subscription",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "class-of-service",
+                       "to": "site-pair",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "routing-instance",
+                       "to": "site-pair-set",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "sriov-vf",
+                       "to": "sriov-pf",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "host-route",
+                       "to": "subnet",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "service-subscription",
+                       "to": "tenant",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "tenant",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vserver",
+                       "to": "tenant",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "entitlement",
+                       "to": "vce",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "license",
+                       "to": "vce",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "port-group",
+                       "to": "vce",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "service-instance",
+                       "to": "vce",
+                       "label": "org.onap.relationships.inventory.ComposedOf",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vce",
+                       "to": "availability-zone",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "vce",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "vce",
+                       "to": "vserver",
+                       "label": "tosca.relationships.HostedOn",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vf-module",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.DependsOn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vf-module",
+                       "to": "vnfc",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "vf-module",
+                       "to": "volume-group",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vip-ipv4-address-list",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vip-ipv4-address-list",
+                       "to": "subnet",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "vip-ipv6-address-list",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vip-ipv6-address-list",
+                       "to": "subnet",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "virtual-data-center",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "logical-link",
+                       "to": "virtual-data-center",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l3-interface-ipv4-address-list",
+                       "to": "vlan",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l3-interface-ipv6-address-list",
+                       "to": "vlan",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vlan",
+                       "to": "logical-link",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vlan",
+                       "to": "multicast-configuration",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l3-interface-ipv4-address-list",
+                       "to": "vnfc",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l3-interface-ipv6-address-list",
+                       "to": "vnfc",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vnfc",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vnfc",
+                       "to": "vip-ipv4-address-list",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vnfc",
+                       "to": "vip-ipv6-address-list",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "tenant",
+                       "to": "volume-group",
+                       "label": "org.onap.relationships.inventory.DependsOn",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "volume-group",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "lag-interface",
+                       "to": "vpls-pe",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "p-interface",
+                       "to": "vpls-pe",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vpls-pe",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "vpls-pe",
+                       "to": "ctag-pool",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "route-target",
+                       "to": "vpn-binding",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "l-interface",
+                       "to": "vserver",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vf-module",
+                       "to": "vserver",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vnfc",
+                       "to": "vserver",
+                       "label": "tosca.relationships.HostedOn",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vserver",
+                       "to": "flavor",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "vserver",
+                       "to": "image",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "vserver",
+                       "to": "pserver",
+                       "label": "tosca.relationships.HostedOn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               },
+               {
+                       "from": "vserver",
+                       "to": "snapshot",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "vserver",
+                       "to": "volume",
+                       "label": "tosca.relationships.AttachesTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "${direction}",
+                       "delete-other-v": "${direction}",
+                       "SVC-INFRA": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "metadatum",
+                       "to": "model-ver",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true"
+               },
+               {
+                       "from": "zone",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "SVC-INFRA": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true"
+               }
+       ]
+}
diff --git a/src/test/resources/rules/DbEdgeRules_v13.json b/src/test/resources/rules/DbEdgeRules_v13.json
new file mode 100644 (file)
index 0000000..fd45c9b
--- /dev/null
@@ -0,0 +1,2836 @@
+{
+       "rules": [
+       {
+                        "from": "service-instance",
+                        "to": "customer",
+                        "label": "ncso.related-to",
+                        "direction": "OUT",
+                        "multiplicity": "MANY2MANY",
+                        "contains-other-v": "NONE",
+                        "delete-other-v": "NONE",
+                        "prevent-delete": "NONE",
+                        "default": "true",
+                        "description":""
+},
+{
+                        "from": "generic-vnf",
+                        "to": "vnfc",
+                        "label": "ncso.related-to",
+                        "direction": "OUT",
+                        "multiplicity": "MANY2MANY",
+                        "contains-other-v": "NONE",
+                        "delete-other-v": "NONE",
+                        "prevent-delete": "NONE",
+                        "default": "true",
+                        "description":""
+},
+{
+                        "from": "vnfc",
+                        "to": "vnfc",
+                        "label": "ncso.related-to",
+                        "direction": "OUT",
+                        "multiplicity": "MANY2MANY",
+                        "contains-other-v": "NONE",
+                        "delete-other-v": "NONE",
+                        "prevent-delete": "NONE",
+                        "default": "true",
+                        "description":""
+},
+{
+                        "from": "vnfc",
+                        "to": "vserver",
+                        "label": "ncso.related-to",
+                        "direction": "OUT",
+                        "multiplicity": "MANY2MANY",
+                        "contains-other-v": "NONE",
+                        "delete-other-v": "NONE",
+                        "prevent-delete": "NONE",
+                        "default": "true",
+                        "description":""
+},
+{
+                        "from": "generic-vnf",
+                        "to": "service-instance",
+                        "label": "ncso.related-to",
+                        "direction": "OUT",
+                        "multiplicity": "MANY2MANY",
+                        "contains-other-v": "NONE",
+                        "delete-other-v": "NONE",
+                        "prevent-delete": "NONE",
+                        "default": "true",
+                        "description":""
+},
+{
+                        "from": "generic-vnf",
+                        "to": "generic-vnf",
+                        "label": "ncso.related-to",
+                        "direction": "OUT",
+                        "multiplicity": "MANY2MANY",
+                        "contains-other-v": "NONE",
+                        "delete-other-v": "NONE",
+                        "prevent-delete": "NONE",
+                        "default": "true",
+                        "description":""
+                       },
+{
+                       "from": "service-instance",
+                       "to": "generic-vnf",
+                       "label": "ncso.related-to",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+},
+{
+                       "from": "generic-vnf",
+                       "to": "vserver",
+                       "label": "ncso.related-to",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+},
+               {
+                       "from": "allotted-resource",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.PartOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.PartOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "l-interface",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "network-policy",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "vlan",
+                       "label": "org.onap.relationships.inventory.PartOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "vpn-binding",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "tunnel-xconnect",
+                       "to": "allotted-resource",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "availability-zone",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "availability-zone",
+                       "to": "service-capability",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "availability-zone",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "cloud-region",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "cloud-region",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "cloud-region",
+                       "to": "zone",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "dvs-switch",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "flavor",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "group-assignment",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "image",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "oam-network",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "snapshot",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "tenant",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vip-ipv4-address-list",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vip-ipv6-address-list",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "volume-group",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "complex",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "ctag-pool",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "configuration",
+                       "to": "allotted-resource",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "configuration",
+                       "to": "logical-link",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "metadatum",
+                       "to": "configuration",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "connector",
+                       "to": "virtual-data-center",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "metadatum",
+                       "to": "connector",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "element-choice-set",
+                       "to": "constrained-element-set",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "ctag-pool",
+                       "to": "availability-zone",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-subscription",
+                       "to": "customer",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "dvs-switch",
+                       "to": "availability-zone",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "model-element",
+                       "to": "element-choice-set",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "entitlement",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "availability-zone",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "configuration",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "ctag-pool",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "ipsec-configuration",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "pnf",
+                       "label": "tosca.relationships.HostedOn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "pserver",
+                       "label": "tosca.relationships.HostedOn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vnfc",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "vnf-image",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "volume-group",
+                       "label": "org.onap.relationships.inventory.DependsOn",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "vserver",
+                       "label": "tosca.relationships.HostedOn",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "lag-interface",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "license",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l-interface",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "network-profile",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.ComposedOf",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "site-pair-set",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vf-module",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "pserver",
+                       "to": "group-assignment",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "tenant",
+                       "to": "group-assignment",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "metadatum",
+                       "to": "image",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "instance-group",
+                       "to": "model",
+                       "label": "org.onap.relationships.inventory.Targets",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vig-server",
+                       "to": "ipsec-configuration",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-interface-ipv4-address-list",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.network.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-interface-ipv4-address-list",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.network.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-interface-ipv4-address-list",
+                       "to": "subnet",
+                       "label": "org.onap.relationships.inventory.network.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-interface-ipv6-address-list",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.network.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-interface-ipv6-address-list",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.network.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-interface-ipv6-address-list",
+                       "to": "subnet",
+                       "label": "org.onap.relationships.inventory.network.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "ctag-assignment",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-network",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-network",
+                       "to": "network-policy",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-network",
+                       "to": "route-table-reference",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-network",
+                       "to": "vpn-binding",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "segmentation-assignment",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.ComposedOf",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "subnet",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "lag-interface",
+                       "to": "lag-link",
+                       "label": "tosca.relationships.network.LinksTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "lag-interface",
+                       "to": "logical-link",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "lag-interface",
+                       "to": "p-interface",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l-interface",
+                       "to": "lag-interface",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "lag-interface",
+                       "to": "l-interface",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "false",
+                       "description":""
+               },
+               {
+                       "from": "line-of-business",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-interface-ipv4-address-list",
+                       "to": "l-interface",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-interface-ipv6-address-list",
+                       "to": "l-interface",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l-interface",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l-interface",
+                       "to": "l-interface",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l-interface",
+                       "to": "logical-link",
+                       "label": "tosca.relationships.network.LinksTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "logical-link",
+                       "to": "l-interface",
+                       "label": "org.onap.relationships.inventory.Source",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "false",
+                       "description":""
+               },
+               {
+                       "from": "logical-link",
+                       "to": "l-interface",
+                       "label": "org.onap.relationships.inventory.Destination",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "false",
+                       "description":""
+               },
+               {
+                       "from": "sriov-vf",
+                       "to": "l-interface",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vlan",
+                       "to": "l-interface",
+                       "label": "tosca.relationships.network.LinksTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "logical-link",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "logical-link",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.BridgedTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "logical-link",
+                       "to": "lag-link",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "logical-link",
+                       "to": "logical-link",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "logical-link",
+                       "to": "pnf",
+                       "label": "org.onap.relationships.inventory.BridgedTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "logical-link",
+                       "to": "pserver",
+                       "label": "org.onap.relationships.inventory.BridgedTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "logical-link",
+                       "to": "vpn-binding",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "model-ver",
+                       "to": "model",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "constrained-element-set",
+                       "to": "model-constraint",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "constrained-element-set",
+                       "to": "model-element",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "model-constraint",
+                       "to": "model-element",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "model-element",
+                       "to": "model-element",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "model-element",
+                       "to": "model-ver",
+                       "label": "org.onap.relationships.inventory.IsA",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "metadatum",
+                       "to": "model-ver",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "model-element",
+                       "to": "model-ver",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "named-query",
+                       "to": "model",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "named-query-element",
+                       "to": "named-query",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "named-query-element",
+                       "to": "model",
+                       "label": "org.onap.relationships.inventory.IsA",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "named-query-element",
+                       "to": "named-query-element",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "property-constraint",
+                       "to": "named-query-element",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "related-lookup",
+                       "to": "named-query-element",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l-interface",
+                       "to": "newvce",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "oam-network",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "oam-network",
+                       "to": "service-capability",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "operational-environment",
+                       "to": "operational-environment",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "owning-entity",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l-interface",
+                       "to": "p-interface",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "p-interface",
+                       "to": "logical-link",
+                       "label": "tosca.relationships.network.LinksTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "p-interface",
+                       "to": "physical-link",
+                       "label": "tosca.relationships.network.LinksTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "sriov-pf",
+                       "to": "p-interface",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "platform",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "lag-interface",
+                       "to": "pnf",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "p-interface",
+                       "to": "pnf",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "pnf",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "pnf",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "pnf",
+                       "to": "zone",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "cvlan-tag",
+                       "to": "port-group",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "project",
+                       "to": "service-instance",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "lag-interface",
+                       "to": "pserver",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "p-interface",
+                       "to": "pserver",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "pserver",
+                       "to": "availability-zone",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "pserver",
+                       "to": "cloud-region",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "pserver",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "pserver",
+                       "to": "zone",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "site-pair",
+                       "to": "routing-instance",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "service-instance",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "metadatum",
+                       "to": "service-instance",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "allotted-resource",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "configuration",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "connector",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "ctag-assignment",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "cvlan-tag",
+                       "label": "org.onap.relationships.inventory.ComposedOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "logical-link",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "pnf",
+                       "label": "org.onap.relationships.inventory.ComposedOf",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "service-instance",
+                       "label": "org.onap.relationships.inventory.ComposedOf",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "vlan",
+                       "label": "org.onap.relationships.inventory.ComposedOf",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "zone",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "service-subscription",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "class-of-service",
+                       "to": "site-pair",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "routing-instance",
+                       "to": "site-pair-set",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "sriov-vf",
+                       "to": "sriov-pf",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "host-route",
+                       "to": "subnet",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-subscription",
+                       "to": "tenant",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "tenant",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vserver",
+                       "to": "tenant",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "entitlement",
+                       "to": "vce",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "license",
+                       "to": "vce",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "port-group",
+                       "to": "vce",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "vce",
+                       "label": "org.onap.relationships.inventory.ComposedOf",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vce",
+                       "to": "availability-zone",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vce",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vce",
+                       "to": "vserver",
+                       "label": "tosca.relationships.HostedOn",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vf-module",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.DependsOn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vf-module",
+                       "to": "vnfc",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vf-module",
+                       "to": "volume-group",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vip-ipv4-address-list",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vip-ipv4-address-list",
+                       "to": "subnet",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vip-ipv6-address-list",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vip-ipv6-address-list",
+                       "to": "subnet",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "virtual-data-center",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "logical-link",
+                       "to": "virtual-data-center",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-interface-ipv4-address-list",
+                       "to": "vlan",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-interface-ipv6-address-list",
+                       "to": "vlan",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vlan",
+                       "to": "logical-link",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vlan",
+                       "to": "multicast-configuration",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-interface-ipv4-address-list",
+                       "to": "vnfc",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-interface-ipv6-address-list",
+                       "to": "vnfc",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vnfc",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vnfc",
+                       "to": "vip-ipv4-address-list",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vnfc",
+                       "to": "vip-ipv6-address-list",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "tenant",
+                       "to": "volume-group",
+                       "label": "org.onap.relationships.inventory.DependsOn",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "volume-group",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "lag-interface",
+                       "to": "vpls-pe",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "p-interface",
+                       "to": "vpls-pe",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vpls-pe",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vpls-pe",
+                       "to": "ctag-pool",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "route-target",
+                       "to": "vpn-binding",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l-interface",
+                       "to": "vserver",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vf-module",
+                       "to": "vserver",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vnfc",
+                       "to": "vserver",
+                       "label": "tosca.relationships.HostedOn",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vserver",
+                       "to": "flavor",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vserver",
+                       "to": "image",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vserver",
+                       "to": "pserver",
+                       "label": "tosca.relationships.HostedOn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vserver",
+                       "to": "snapshot",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vserver",
+                       "to": "volume",
+                       "label": "tosca.relationships.AttachesTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "${direction}",
+                       "delete-other-v": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "zone",
+                       "to": "complex",
+                       "label": "org.onap.relationships.inventory.LocatedIn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "allotted-resource",
+                       "to": "model-ver",
+                       "label": "org.onap.relationships.inventory.IsA",
+                       "direction": "OUT",
+                       "multiplicity": "Many2One",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "model-ver",
+                       "label": "org.onap.relationships.inventory.IsA",
+                       "direction": "OUT",
+                       "multiplicity": "Many2One",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "l3-network",
+                       "to": "model-ver",
+                       "label": "org.onap.relationships.inventory.IsA",
+                       "direction": "OUT",
+                       "multiplicity": "Many2One",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "logical-link",
+                       "to": "model-ver",
+                       "label": "org.onap.relationships.inventory.IsA",
+                       "direction": "OUT",
+                       "multiplicity": "Many2One",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "model-ver",
+                       "label": "org.onap.relationships.inventory.IsA",
+                       "direction": "OUT",
+                       "multiplicity": "Many2One",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vf-module",
+                       "to": "model-ver",
+                       "label": "org.onap.relationships.inventory.IsA",
+                       "direction": "OUT",
+                       "multiplicity": "Many2One",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "configuration",
+                       "to": "l-interface",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "configuration",
+                       "to": "pnf",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "forwarder",
+                       "to": "forwarding-path",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "forwarding-path",
+                       "to": "service-instance",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "forwarder",
+                       "to": "l-interface",
+                       "label": "org.onap.relationships.inventory.ForwardsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "forwarder",
+                       "to": "configuration",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "forwarding-path",
+                       "to": "configuration",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "forwarder",
+                       "to": "lag-interface",
+                       "label": "org.onap.relationships.inventory.ForwardsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "evc",
+                       "to": "configuration",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "forwarder-evc",
+                       "to": "configuration",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "forwarder",
+                       "to": "p-interface",
+                       "label": "org.onap.relationships.inventory.ForwardsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "generic-vnf",
+                       "to": "nos-server",
+                       "label": "tosca.relationships.HostedOn",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "nos-server",
+                       "to": "pserver",
+                       "label": "tosca.relationships.HostedOn",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "nos-server",
+                       "to": "tenant",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "!${direction}",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "configuration",
+                       "to": "configuration",
+                       "label": "tosca.relationships.network.BindsTo",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "configuration",
+                       "to": "vpn-binding",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "configuration",
+                       "to": "l3-network",
+                       "label": "org.onap.relationships.inventory.PartOf",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "vpn-binding",
+                       "to": "customer",
+                       "label": "org.onap.relationships.inventory.Uses",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description":""
+               },
+               {
+                       "from": "service-instance",
+                       "to": "configuration",
+                       "label": "org.onap.relationships.inventory.ComposedOf",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "false",
+                       "description":""
+               },
+               {
+                       "from": "forwarder",
+                       "to": "generic-vnf",
+                       "label": "org.onap.relationships.inventory.AppliesTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2MANY",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description": "Points to the generic-vnf(s) involved in this forwarding step."
+               },
+        {
+            "from": "cloud-region",
+            "to": "instance-group",
+            "label": "org.onap.relationships.inventory.Uses",
+            "direction": "OUT",
+            "multiplicity": "ONE2MANY",
+            "contains-other-v": "NONE",
+            "delete-other-v": "NONE",
+            "prevent-delete": "NONE",
+            "default": "true",
+            "description": ""
+         },
+                {
+                       "from": "collection",
+                       "to": "instance-group",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description": ""
+                },
+                {
+                       "from": "service-instance",
+                       "to": "collection",
+                       "label": "org.onap.relationships.inventory.MemberOf",
+                       "direction": "OUT",
+                       "multiplicity": "ONE2ONE",
+                       "contains-other-v": "NONE",
+                       "delete-other-v": "NONE",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description": ""
+                },
+                {
+                       "from": "vlan-mapping",
+                       "to": "forwarder-evc",
+                       "label": "org.onap.relationships.inventory.BelongsTo",
+                       "direction": "OUT",
+                       "multiplicity": "MANY2ONE",
+                       "contains-other-v": "!${direction}",
+                       "delete-other-v": "!${direction}",
+                       "prevent-delete": "NONE",
+                       "default": "true",
+                       "description": ""
+                }
+       ]
+}
\ No newline at end of file
index 2aa388e..2fa77aa 100644 (file)
@@ -1,4 +1,5 @@
 # Properties for the SchemaLocationsBean
 schemaConfig=NA
 nodeDir=src/test/resources/oxm/
-edgeDir=
\ No newline at end of file
+edgeDir=src/test/resources/rules/
+edgePropsDir=src/test/resources/edgeProps/
\ No newline at end of file