From 399b9ed2f91c99107e0f357719452cacca3a2ad5 Mon Sep 17 00:00:00 2001 From: lizi00164331 Date: Wed, 6 Sep 2017 17:27:19 +0800 Subject: [PATCH] Merge the schema of external-system. Add the schema of external-system, delete the auth-info-item which will not in use. Locally test passed. Change-Id: I9d65201cd8b222421c8f15fcb9eb421636588b33 Issue-ID: AAI-204 Signed-off-by: lizi00164331 --- .../openecomp/aai/annotations/AnnotationsTest.java | 19 ++ .../java/org/openecomp/aai/util/GenerateXsd.java | 1 + .../resources/dbedgerules/DbEdgeRules_v11.json | 66 ++++- .../aai/query/builder/SimplePathTest.java | 19 ++ .../org/openecomp/aai/query/builder/UntilTest.java | 19 ++ aai-schema/src/main/resources/oxm/aai_oxm_v11.xml | 319 +++++++++++++++++---- .../org/onap/aaiutils/oxm/OxmModelLoaderTest.java | 19 ++ 7 files changed, 390 insertions(+), 72 deletions(-) diff --git a/aai-annotations/src/test/java/org/openecomp/aai/annotations/AnnotationsTest.java b/aai-annotations/src/test/java/org/openecomp/aai/annotations/AnnotationsTest.java index 9efc38a6..848d8b08 100644 --- a/aai-annotations/src/test/java/org/openecomp/aai/annotations/AnnotationsTest.java +++ b/aai-annotations/src/test/java/org/openecomp/aai/annotations/AnnotationsTest.java @@ -1,3 +1,22 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ package org.openecomp.aai.annotations; import org.openecomp.aai.annotations.Metadata; diff --git a/aai-core/src/main/java/org/openecomp/aai/util/GenerateXsd.java b/aai-core/src/main/java/org/openecomp/aai/util/GenerateXsd.java index 99a06f49..b3c78410 100644 --- a/aai-core/src/main/java/org/openecomp/aai/util/GenerateXsd.java +++ b/aai-core/src/main/java/org/openecomp/aai/util/GenerateXsd.java @@ -945,6 +945,7 @@ public class GenerateXsd { case "Business": case "LicenseManagement": case "CloudInfrastructure": + case "ExternalSystem": break; default: return null; diff --git a/aai-core/src/main/resources/dbedgerules/DbEdgeRules_v11.json b/aai-core/src/main/resources/dbedgerules/DbEdgeRules_v11.json index 7b973150..8f44ebc4 100644 --- a/aai-core/src/main/resources/dbedgerules/DbEdgeRules_v11.json +++ b/aai-core/src/main/resources/dbedgerules/DbEdgeRules_v11.json @@ -11,17 +11,6 @@ "SVC-INFRA": "NONE", "prevent-delete": "!${direction}" }, - { - "from" : "auth-info-item", - "to" : "tenant", - "label" : "defaultTenant", - "direction" : "OUT", - "multiplicity" : "One2One", - "isParent" : "false", - "usesResource" : "false", - "hasDelTarget" : "false", - "SVC-INFRA" : "false" - }, { "from": "generic-vnf", "to": "license-key-resource", @@ -44,6 +33,61 @@ "SVC-INFRA": "NONE", "prevent-delete": "!${direction}" }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, { "from": "cloud-region", "to": "complex", diff --git a/aai-core/src/test/java/org/openecomp/aai/query/builder/SimplePathTest.java b/aai-core/src/test/java/org/openecomp/aai/query/builder/SimplePathTest.java index e6e510c6..072ba694 100644 --- a/aai-core/src/test/java/org/openecomp/aai/query/builder/SimplePathTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/query/builder/SimplePathTest.java @@ -1,3 +1,22 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ package org.openecomp.aai.query.builder; import static org.junit.Assert.*; diff --git a/aai-core/src/test/java/org/openecomp/aai/query/builder/UntilTest.java b/aai-core/src/test/java/org/openecomp/aai/query/builder/UntilTest.java index 9da2c0e0..fa434b44 100644 --- a/aai-core/src/test/java/org/openecomp/aai/query/builder/UntilTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/query/builder/UntilTest.java @@ -1,3 +1,22 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ package org.openecomp.aai.query.builder; import static org.junit.Assert.assertTrue; diff --git a/aai-schema/src/main/resources/oxm/aai_oxm_v11.xml b/aai-schema/src/main/resources/oxm/aai_oxm_v11.xml index 0434bd0f..2e309ae2 100644 --- a/aai-schema/src/main/resources/oxm/aai_oxm_v11.xml +++ b/aai-schema/src/main/resources/oxm/aai_oxm_v11.xml @@ -30,6 +30,7 @@ + @@ -225,6 +226,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -323,7 +580,7 @@ - + @@ -396,66 +653,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/aai-utils/src/test/java/org/onap/aaiutils/oxm/OxmModelLoaderTest.java b/aai-utils/src/test/java/org/onap/aaiutils/oxm/OxmModelLoaderTest.java index 81e50729..190d8ee0 100644 --- a/aai-utils/src/test/java/org/onap/aaiutils/oxm/OxmModelLoaderTest.java +++ b/aai-utils/src/test/java/org/onap/aaiutils/oxm/OxmModelLoaderTest.java @@ -1,3 +1,22 @@ +/*- + * ============LICENSE_START======================================================= + * org.openecomp.aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ package org.onap.aaiutils.oxm; import org.junit.Test; -- 2.16.6