From 3d47956ae10c6ec710edaa8fb86479605f40c982 Mon Sep 17 00:00:00 2001 From: Venkata Harish K Kajur Date: Mon, 4 Dec 2017 13:52:34 -0500 Subject: Add edge rules oxm changes for complex services Issue-ID: AAI-530 Change-Id: Ib9b91a638e72da76ece9d9e34d6e62354601492a Signed-off-by: Venkata Harish K Kajur --- .../org/onap/aai/introspection/MoxyStrategy.java | 10 +-- .../resources/dbedgerules/DbEdgeRules_v12.json | 72 ++++++++++++++++++++++ 2 files changed, 74 insertions(+), 8 deletions(-) (limited to 'aai-core/src/main') diff --git a/aai-core/src/main/java/org/onap/aai/introspection/MoxyStrategy.java b/aai-core/src/main/java/org/onap/aai/introspection/MoxyStrategy.java index ce04fb7f..c5f4570d 100644 --- a/aai-core/src/main/java/org/onap/aai/introspection/MoxyStrategy.java +++ b/aai-core/src/main/java/org/onap/aai/introspection/MoxyStrategy.java @@ -292,14 +292,8 @@ public class MoxyStrategy extends Introspector { keys = this.getKeys(); List results = new ArrayList<>(); for (String key : keys) { - if (this.getType(key).toLowerCase().contains("long")) { - key = ((Long)this.getValue(key)).toString(); - } else { - key = (String)this.getValue(key); - } - key = UriUtils.encode(key, "UTF-8"); - - results.add(key); + String value = UriUtils.encode(this.getValue(key).toString(), "UTF-8"); + results.add(value); } return Joiner.on("/").join(results); diff --git a/aai-core/src/main/resources/dbedgerules/DbEdgeRules_v12.json b/aai-core/src/main/resources/dbedgerules/DbEdgeRules_v12.json index 4c721566..770124dc 100644 --- a/aai-core/src/main/resources/dbedgerules/DbEdgeRules_v12.json +++ b/aai-core/src/main/resources/dbedgerules/DbEdgeRules_v12.json @@ -2459,6 +2459,78 @@ "SVC-INFRA": "${direction}", "prevent-delete": "NONE", "default": "true" + }, + { + "from": "configuration", + "to": "l-interface", + "label": "has", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true" + }, + { + "from": "configuration", + "to": "pnf", + "label": "uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true" + }, + { + "from": "forwarder", + "to": "p-interface", + "label": "forwardsTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true" + }, + { + "from": "forwarder", + "to": "l-interface", + "label": "forwardsTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true" + }, + { + "from": "forwarder", + "to": "forwarding-path", + "label": "belongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true" + }, + { + "from": "forwarding-path", + "to": "service-instance", + "label": "implements", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true" } ] } -- cgit 1.2.3-korg