aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/aai/babel/xml/generator/model/CR.java28
-rw-r--r--src/main/java/org/onap/aai/babel/xml/generator/model/CRWidget.java31
-rw-r--r--src/main/java/org/onap/aai/babel/xml/generator/model/Model.java1
-rw-r--r--src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java3
-rw-r--r--src/test/resources/artifact-generator.properties5
-rw-r--r--src/test/resources/generatedXml/AAI-SCP-Test-VSP-resource-1.0.xml4
-rw-r--r--src/test/resources/generatedXml/AAI-SD-WAN-Test-VSP-resource-1.0.xml2
-rw-r--r--src/test/resources/generatedXml/AAI-ScpTestVsp..asc_heat-int2..module-0-resource-1.xml4
-rw-r--r--src/test/resources/generatedXml/AAI-SdWanTestVsp..DUMMY..module-0-resource-2.xml2
-rw-r--r--src/test/resources/generatedXml/AAI-Tunnel_XConnTest-resource-2.0.xml2
10 files changed, 73 insertions, 9 deletions
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
index 0000000..2c50a0f
--- /dev/null
+++ b/src/main/java/org/onap/aai/babel/xml/generator/model/CR.java
@@ -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
index 0000000..f0962ad
--- /dev/null
+++ b/src/main/java/org/onap/aai/babel/xml/generator/model/CRWidget.java
@@ -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 {
+}
diff --git a/src/main/java/org/onap/aai/babel/xml/generator/model/Model.java b/src/main/java/org/onap/aai/babel/xml/generator/model/Model.java
index 956db40..8e9c062 100644
--- a/src/main/java/org/onap/aai/babel/xml/generator/model/Model.java
+++ b/src/main/java/org/onap/aai/babel/xml/generator/model/Model.java
@@ -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 {
diff --git a/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java b/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java
index 75beb4f..49e3811 100644
--- a/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java
+++ b/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java
@@ -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);
}
/**
diff --git a/src/test/resources/artifact-generator.properties b/src/test/resources/artifact-generator.properties
index 74897d6..c1bda81 100644
--- a/src/test/resources/artifact-generator.properties
+++ b/src/test/resources/artifact-generator.properties
@@ -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
diff --git a/src/test/resources/generatedXml/AAI-SCP-Test-VSP-resource-1.0.xml b/src/test/resources/generatedXml/AAI-SCP-Test-VSP-resource-1.0.xml
index 22f3ed0..18eb95c 100644
--- a/src/test/resources/generatedXml/AAI-SCP-Test-VSP-resource-1.0.xml
+++ b/src/test/resources/generatedXml/AAI-SCP-Test-VSP-resource-1.0.xml
@@ -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>
diff --git a/src/test/resources/generatedXml/AAI-SD-WAN-Test-VSP-resource-1.0.xml b/src/test/resources/generatedXml/AAI-SD-WAN-Test-VSP-resource-1.0.xml
index 43e97ff..4f78ec4 100644
--- a/src/test/resources/generatedXml/AAI-SD-WAN-Test-VSP-resource-1.0.xml
+++ b/src/test/resources/generatedXml/AAI-SD-WAN-Test-VSP-resource-1.0.xml
@@ -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>
diff --git a/src/test/resources/generatedXml/AAI-ScpTestVsp..asc_heat-int2..module-0-resource-1.xml b/src/test/resources/generatedXml/AAI-ScpTestVsp..asc_heat-int2..module-0-resource-1.xml
index 66b1d26..edcd4a5 100644
--- a/src/test/resources/generatedXml/AAI-ScpTestVsp..asc_heat-int2..module-0-resource-1.xml
+++ b/src/test/resources/generatedXml/AAI-ScpTestVsp..asc_heat-int2..module-0-resource-1.xml
@@ -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>
@@ -138,4 +138,4 @@
</model-elements>
</model-ver>
</model-vers>
-</model> \ No newline at end of file
+</model>
diff --git a/src/test/resources/generatedXml/AAI-SdWanTestVsp..DUMMY..module-0-resource-2.xml b/src/test/resources/generatedXml/AAI-SdWanTestVsp..DUMMY..module-0-resource-2.xml
index b9c0abf..d3f28e2 100644
--- a/src/test/resources/generatedXml/AAI-SdWanTestVsp..DUMMY..module-0-resource-2.xml
+++ b/src/test/resources/generatedXml/AAI-SdWanTestVsp..DUMMY..module-0-resource-2.xml
@@ -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>
diff --git a/src/test/resources/generatedXml/AAI-Tunnel_XConnTest-resource-2.0.xml b/src/test/resources/generatedXml/AAI-Tunnel_XConnTest-resource-2.0.xml
index 456ad15..3c61f97 100644
--- a/src/test/resources/generatedXml/AAI-Tunnel_XConnTest-resource-2.0.xml
+++ b/src/test/resources/generatedXml/AAI-Tunnel_XConnTest-resource-2.0.xml
@@ -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>