From 3d47956ae10c6ec710edaa8fb86479605f40c982 Mon Sep 17 00:00:00 2001 From: Venkata Harish K Kajur Date: Mon, 4 Dec 2017 13:52:34 -0500 Subject: [PATCH 1/1] 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 ++++++++++ .../main/resources/aai_schema/aai_schema_v12.xsd | 155 +++++++++++++++++++++ aai-schema/src/main/resources/oxm/aai_oxm_v12.xml | 136 ++++++++++++++++++ 4 files changed, 365 insertions(+), 8 deletions(-) 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" } ] } diff --git a/aai-schema/src/main/resources/aai_schema/aai_schema_v12.xsd b/aai-schema/src/main/resources/aai_schema/aai_schema_v12.xsd index 9d25a6f6..78f918e5 100644 --- a/aai-schema/src/main/resources/aai_schema/aai_schema_v12.xsd +++ b/aai-schema/src/main/resources/aai_schema/aai_schema_v12.xsd @@ -7292,6 +7292,87 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + + + + + @org.onap.aai.annotations.Metadata(indexedProps="sequence",description="Entity describing a sequenced segment of forwarding path",container="forwarders",dependentOn="forwarding-path") + + + + + + + @org.onap.aai.annotations.Metadata(isKey=true,description="Unique ID of this segmentation") + + + + + + + + @org.onap.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + + + + + + + + + + + + @org.onap.aai.annotations.Metadata(namespace="network",indexedProps="forwarding-path-id,forwarding-path-name",description="Entity that describes the sequenced forwarding path between interfaces of services or resources",container="forwarding-paths",nameProps="forwarding-path-name",uniqueProps="forwarding-path-id") + + + + + + + @org.onap.aai.annotations.Metadata(isKey=true,description="Unique ID of this FP") + + + + + + + @org.onap.aai.annotations.Metadata(description="Name of the FP") + + + + + + + + @org.onap.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + @org.onap.aai.annotations.Metadata(description="the self link for this FP") + + + + + + + + + + + + + + @@ -7319,6 +7400,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + @@ -7628,4 +7710,77 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + + + + + @org.onap.aai.annotations.Metadata(description="It is a logical partition of the cloud which allows to have multiple environments in the production AIC.",indexedProps="operational-environment-id",uniqueProps="operational-environment-id",container="operational-environments",namespace="cloud-infrastructure") + + + + + + + @org.onap.aai.annotations.Metadata(isKey=true,description="UUID of an operational environment") + + + + + + + @org.onap.aai.annotations.Metadata(description="Operational Environment name") + + + + + + + @org.onap.aai.annotations.Metadata(description="Operational Environment Type.") + + + + + + + @org.onap.aai.annotations.Metadata(description="Status") + + + + + + + @org.onap.aai.annotations.Metadata(description="Tenant Context.") + + + + + + + @org.onap.aai.annotations.Metadata(description="Workload Context.") + + + + + + + @org.onap.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.") + + + + + + + + + + + + @org.onap.aai.annotations.Metadata(description="a logical partition of the cloud which allows to have multiple environments in the production AIC.") + + + + + + + diff --git a/aai-schema/src/main/resources/oxm/aai_oxm_v12.xml b/aai-schema/src/main/resources/oxm/aai_oxm_v12.xml index 008e7f9b..79bbdf8b 100644 --- a/aai-schema/src/main/resources/oxm/aai_oxm_v12.xml +++ b/aai-schema/src/main/resources/oxm/aai_oxm_v12.xml @@ -2872,6 +2872,7 @@ + @@ -6356,5 +6357,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.16.6