summaryrefslogtreecommitdiffstats
path: root/aai-core/src/test/resources
diff options
context:
space:
mode:
authorMaharajh, Robby (rx2202) <rx2202@att.com>2017-12-01 10:41:41 -0500
committerMaharajh, Robby (rx2202) <rx2202@att.com>2017-12-01 10:45:31 -0500
commit2e4f21dea97049f4de34fcfd789f461882e24602 (patch)
tree72696b56796bd32990bb9b3f241036d20e6ed550 /aai-core/src/test/resources
parent8dcb9900cae95a17ca6d029a665d512b3e7b11a2 (diff)
Added support for Multiple Edges
Issue-ID: AAI-524 Change-Id: I33dd31315992e2efb2d6d390ffc523655b55a84c Signed-off-by: Maharajh, Robby (rx2202) <rx2202@att.com>
Diffstat (limited to 'aai-core/src/test/resources')
-rw-r--r--aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v12.xml5
-rw-r--r--aai-core/src/test/resources/dbedgerules/DbEdgeRules_TraversalQueryTest.json145
-rw-r--r--aai-core/src/test/resources/dbedgerules/DbEdgeRules_test.json92
3 files changed, 242 insertions, 0 deletions
diff --git a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v12.xml b/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v12.xml
index 270d96a7..30fe6b6f 100644
--- a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v12.xml
+++ b/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v12.xml
@@ -668,6 +668,11 @@
<xml-property name="description" value="A keyword provided by A&amp;AI to indicate type of node." />
</xml-properties>
</xml-element>
+ <xml-element java-attribute="relationshipLabel" name="relationship-label" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="The edge lable for this relationship." />
+ </xml-properties>
+ </xml-element>
<xml-element java-attribute="relatedLink" name="related-link" type="java.lang.String">
<xml-properties>
<xml-property name="description" value="URL to the object in A&amp;AI." />
diff --git a/aai-core/src/test/resources/dbedgerules/DbEdgeRules_TraversalQueryTest.json b/aai-core/src/test/resources/dbedgerules/DbEdgeRules_TraversalQueryTest.json
new file mode 100644
index 00000000..0b79192a
--- /dev/null
+++ b/aai-core/src/test/resources/dbedgerules/DbEdgeRules_TraversalQueryTest.json
@@ -0,0 +1,145 @@
+{
+ "rules": [
+ {
+ "from": "generic-vnf",
+ "to": "vnfc",
+ "label": "uses",
+ "direction": "OUT",
+ "multiplicity": "ONE2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "${direction}",
+ "prevent-delete": "NONE",
+ "default": "true"
+ },
+ {
+ "from": "vnfc",
+ "to": "generic-vnf",
+ "label": "re-uses",
+ "direction": "OUT",
+ "multiplicity": "ONE2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "${direction}",
+ "prevent-delete": "NONE"
+ },
+ {
+ "from": "vce",
+ "to": "vnfc",
+ "label": "vce-vnfc",
+ "direction": "OUT",
+ "multiplicity": "ONE2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "${direction}",
+ "prevent-delete": "NONE",
+ "default": "true"
+ },
+ {
+ "from": "pserver",
+ "to": "vce",
+ "label": "pserver-vce",
+ "direction": "OUT",
+ "multiplicity": "ONE2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "${direction}",
+ "prevent-delete": "NONE",
+ "default": "true"
+ },
+ {
+ "from": "generic-vnf",
+ "to": "pserver",
+ "label": "generic-vnf-pserver-A",
+ "direction": "OUT",
+ "multiplicity": "ONE2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "${direction}",
+ "prevent-delete": "NONE",
+ "default": "true"
+ },
+ {
+ "from": "generic-vnf",
+ "to": "pserver",
+ "label": "generic-vnf-pserver-B",
+ "direction": "OUT",
+ "multiplicity": "ONE2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "${direction}",
+ "prevent-delete": "NONE"
+ },
+ {
+ "from": "complex",
+ "to": "generic-vnf",
+ "label": "complex-generic-vnf-A",
+ "direction": "OUT",
+ "multiplicity": "ONE2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "${direction}",
+ "prevent-delete": "NONE",
+ "default": "true"
+ },
+ {
+ "from": "complex",
+ "to": "generic-vnf",
+ "label": "complex-generic-vnf-B",
+ "direction": "OUT",
+ "multiplicity": "ONE2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "${direction}",
+ "prevent-delete": "NONE"
+ },
+ {
+ "from": "l-interface",
+ "to": "logical-link",
+ "label": "usesLogicalLink",
+ "direction": "OUT",
+ "multiplicity": "MANY2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "${direction}",
+ "prevent-delete": "NONE",
+ "default": "true"
+ },
+ {
+ "from": "l-interface",
+ "to": "logical-link",
+ "label": "sourceLInterface",
+ "direction": "OUT",
+ "multiplicity": "MANY2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "${direction}",
+ "prevent-delete": "NONE",
+ "default": "false"
+ },
+ {
+ "from": "l-interface",
+ "to": "logical-link",
+ "label": "targetLInterface",
+ "direction": "OUT",
+ "multiplicity": "MANY2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "${direction}",
+ "prevent-delete": "NONE",
+ "default": "false"
+ },
+ {
+ "from": "pserver",
+ "to": "vnfc",
+ "label": "uses",
+ "direction": "OUT",
+ "multiplicity": "ONE2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "${direction}",
+ "prevent-delete": "NONE",
+ "default": "true"
+ }
+ ]
+}
diff --git a/aai-core/src/test/resources/dbedgerules/DbEdgeRules_test.json b/aai-core/src/test/resources/dbedgerules/DbEdgeRules_test.json
index 957129b2..76059ed6 100644
--- a/aai-core/src/test/resources/dbedgerules/DbEdgeRules_test.json
+++ b/aai-core/src/test/resources/dbedgerules/DbEdgeRules_test.json
@@ -13,6 +13,17 @@
},
{
"from": "foo",
+ "to": "bar",
+ "label": "eatz",
+ "direction": "IN",
+ "multiplicity": "One2Many",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "NONE",
+ "prevent-delete": "NONE"
+ },
+ {
+ "from": "foo",
"to": "baz",
"label": "isVeryHappyAbout",
"direction": "OUT",
@@ -65,6 +76,87 @@
"delete-other-v": "${direction}",
"SVC-INFRA": "NONE",
"prevent-delete": "NONE"
+ },
+ {
+ "from": "a",
+ "to": "b",
+ "label": "c",
+ "direction": "OUT",
+ "multiplicity": "One2Many",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "NONE",
+ "prevent-delete": "NONE",
+ "default": "false"
+ },
+ {
+ "from": "a",
+ "to": "b",
+ "label": "d",
+ "direction": "IN",
+ "multiplicity": "One2Many",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "NONE",
+ "prevent-delete": "NONE",
+ "default" : "true"
+ },
+ {
+ "from": "z",
+ "to": "y",
+ "label": "x",
+ "direction": "OUT",
+ "multiplicity": "One2Many",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "NONE",
+ "prevent-delete": "NONE"
+ },
+ {
+ "from": "y",
+ "to": "z",
+ "label": "w",
+ "direction": "IN",
+ "multiplicity": "One2Many",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "NONE",
+ "prevent-delete": "NONE",
+ "default" : "true"
+ },
+ {
+ "from": "generic-vnf",
+ "to": "vnfc",
+ "label": "uses",
+ "direction": "OUT",
+ "multiplicity": "ONE2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "${direction}",
+ "prevent-delete": "NONE",
+ "default": "true"
+ },
+ {
+ "from": "generic-vnf",
+ "to": "vnfc",
+ "label": "re-uses",
+ "direction": "OUT",
+ "multiplicity": "ONE2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "${direction}",
+ "prevent-delete": "NONE"
+ },
+ {
+ "from": "generic-vnf",
+ "to": "vnfc",
+ "label": "over-uses",
+ "direction": "OUT",
+ "multiplicity": "ONE2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "SVC-INFRA": "${direction}",
+ "prevent-delete": "NONE"
}
]
} \ No newline at end of file