Add support for the CR Widget 49/59249/1
authormark.j.leonard <mark.j.leonard@gmail.com>
Mon, 6 Aug 2018 17:04:09 +0000 (18:04 +0100)
committermark.j.leonard <mark.j.leonard@gmail.com>
Mon, 6 Aug 2018 17:04:27 +0000 (18:04 +0100)
Issue-ID: AAI-1444
Change-Id: If25a2ea001fe7b43dbd14eed008a14e5dd8b3579
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
src/main/java/org/onap/aai/babel/xml/generator/model/CR.java [new file with mode: 0644]
src/main/java/org/onap/aai/babel/xml/generator/model/CRWidget.java [new file with mode: 0644]
src/main/java/org/onap/aai/babel/xml/generator/model/Model.java
src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java
src/test/resources/artifact-generator.properties
src/test/resources/generatedXml/AAI-SCP-Test-VSP-resource-1.0.xml
src/test/resources/generatedXml/AAI-SD-WAN-Test-VSP-resource-1.0.xml
src/test/resources/generatedXml/AAI-ScpTestVsp..asc_heat-int2..module-0-resource-1.xml
src/test/resources/generatedXml/AAI-SdWanTestVsp..DUMMY..module-0-resource-2.xml
src/test/resources/generatedXml/AAI-Tunnel_XConnTest-resource-2.0.xml

diff --git a/src/main/java/org/onap/aai/babel/xml/generator/model/CR.java b/src/main/java/org/onap/aai/babel/xml/generator/model/CR.java
new file mode 100644 (file)
index 0000000..2c50a0f
--- /dev/null
@@ -0,0 +1,28 @@
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 European Software Marketing Ltd.
+ * ================================================================================
+ * 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.aai.babel.xml.generator.model;
+
+import org.onap.aai.babel.xml.generator.types.Cardinality;
+import org.onap.aai.babel.xml.generator.types.Model;
+
+@Model(widget = Widget.Type.CR, cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = true)
+public class CR extends Resource {
+}
\ No newline at end of file
diff --git a/src/main/java/org/onap/aai/babel/xml/generator/model/CRWidget.java b/src/main/java/org/onap/aai/babel/xml/generator/model/CRWidget.java
new file mode 100644 (file)
index 0000000..f0962ad
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 European Software Marketing Ltd.
+ * ================================================================================
+ * 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.aai.babel.xml.generator.model;
+
+import org.onap.aai.babel.xml.generator.types.Cardinality;
+import org.onap.aai.babel.xml.generator.types.ModelType;
+import org.onap.aai.babel.xml.generator.types.ModelWidget;
+
+@org.onap.aai.babel.xml.generator.types.Model(widget = Widget.Type.CR, cardinality = Cardinality.UNBOUNDED,
+        dataDeleteFlag = true)
+@ModelWidget(type = ModelType.WIDGET, name = "cr")
+public class CRWidget extends ResourceWidget {
+}
index 956db40..8e9c062 100644 (file)
@@ -54,6 +54,7 @@ public abstract class Model {
         typeToModel.put("org.openecomp.groups.VfModule", VfModule.class);
         typeToModel.put("org.openecomp.resource.vfc.nodes.heat.cinder", VolumeWidget.class);
         typeToModel.put("org.openecomp.nodes.PortMirroringConfiguration", Configuration.class);
+        typeToModel.put("org.openecomp.resource.cr.Kk1806Cr1", CR.class);
     }
 
     private enum ModelIdentification {
index 75beb4f..49e3811 100644 (file)
@@ -41,7 +41,7 @@ public abstract class Widget extends Model {
     public static final String GENERATOR_AAI_CONFIGLPROP_NOT_FOUND = "Cannot generate artifacts. Widget configuration not found for %s";
 
     public enum Type {
-        SERVICE, VF, VFC, VSERVER, VOLUME, FLAVOR, TENANT, VOLUME_GROUP, LINT, L3_NET, VFMODULE, IMAGE, OAM_NETWORK, ALLOTTED_RESOURCE, TUNNEL_XCONNECT, CONFIGURATION;
+        SERVICE, VF, VFC, VSERVER, VOLUME, FLAVOR, TENANT, VOLUME_GROUP, LINT, L3_NET, VFMODULE, IMAGE, OAM_NETWORK, ALLOTTED_RESOURCE, TUNNEL_XCONNECT, CONFIGURATION, CR;
     }
 
     private static Logger log = LogHelper.INSTANCE;
@@ -66,6 +66,7 @@ public abstract class Widget extends Model {
         typeToWidget.put(Type.ALLOTTED_RESOURCE, AllotedResourceWidget.class);
         typeToWidget.put(Type.TUNNEL_XCONNECT, TunnelXconnectWidget.class);
         typeToWidget.put(Type.CONFIGURATION, ConfigurationWidget.class);
+        typeToWidget.put(Type.CR, CRWidget.class);
     }
 
     /**
index 74897d6..c1bda81 100644 (file)
@@ -264,4 +264,7 @@ AAI.model-invariant-id.vpn-binding=9e23b675-db2b-488b-b459-57aa9857baa0
 AAI.model-version-id.vpn-binding=21a146e5-9901-448c-9197-723076770119
 #vserver widget details
 AAI.model-invariant-id.vserver=ff69d4e0-a8e8-4108-bdb0-dd63217e63c7
-AAI.model-version-id.vserver=8ecb2c5d-7176-4317-a255-26274edfdd53
\ No newline at end of file
+AAI.model-version-id.vserver=8ecb2c5d-7176-4317-a255-26274edfdd53
+#cr widget details
+AAI.model-invariant-id.cr=425b2158-e51d-4509-9945-dad4556474a3
+AAI.model-version-id.cr=2a160989-b202-47dd-874b-4a0f275998f7
index 22f3ed0..18eb95c 100644 (file)
@@ -1,4 +1,4 @@
-<model xmlns="http://org.onap.aai.inventory/v12">
+<model xmlns="http://org.onap.aai.inventory/v14">
     <model-invariant-id>b2b88a73-5c55-4984-99dd-a35c55935d14</model-invariant-id>
     <model-type>resource</model-type>
     <model-vers>
@@ -48,4 +48,4 @@
             </model-elements>
         </model-ver>
     </model-vers>
-</model>
\ No newline at end of file
+</model>
index 43e97ff..4f78ec4 100644 (file)
@@ -1,4 +1,4 @@
-<model xmlns="http://org.onap.aai.inventory/v12">
+<model xmlns="http://org.onap.aai.inventory/v14">
     <model-invariant-id>1a111111-1111-1111-1111-111111111111</model-invariant-id>
     <model-type>resource</model-type>
     <model-vers>
index 66b1d26..edcd4a5 100644 (file)
@@ -1,4 +1,4 @@
-<model xmlns="http://org.onap.aai.inventory/v12">
+<model xmlns="http://org.onap.aai.inventory/v14">
     <model-invariant-id>6f288081-b321-47c9-b038-6de70079a3bf</model-invariant-id>
     <model-type>resource</model-type>
     <model-vers>
             </model-elements>
         </model-ver>
     </model-vers>
-</model>
\ No newline at end of file
+</model>
index b9c0abf..d3f28e2 100644 (file)
@@ -1,4 +1,4 @@
-<model xmlns="http://org.onap.aai.inventory/v12">
+<model xmlns="http://org.onap.aai.inventory/v14">
     <model-invariant-id>6a111111-1111-1111-1111-111111111111</model-invariant-id>
     <model-type>resource</model-type>
     <model-vers>
index 456ad15..3c61f97 100644 (file)
@@ -1,4 +1,4 @@
-<model xmlns="http://org.onap.aai.inventory/v12">
+<model xmlns="http://org.onap.aai.inventory/v14">
     <model-invariant-id>1b111111-1111-1111-1111-111111111111</model-invariant-id>
     <model-type>resource</model-type>
     <model-vers>