aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorpprakhar <Prakhar.Pandey@amdocs.com>2017-10-04 16:40:34 +0530
committerpprakhar <Prakhar.Pandey@amdocs.com>2017-10-04 16:40:34 +0530
commit14e1daaddad9320927890bdee4c6d2853a12c67d (patch)
tree355ef0e2cc3dadad15c9d6deab0827b9baee4269 /common
parent33e00cd1d7d580a2fdafad771d54e29bb455cb5d (diff)
Solution for Artifact Generation for PNF Resource
Fix done in artifact generator to enable it to generate for resource type PNF. Change-Id: I114fc1ee022c0e4ec00d90eae55f5bf5f50a4d02 Issue-ID: SDC-431 Signed-off-by: pprakhar <Prakhar.Pandey@amdocs.com>
Diffstat (limited to 'common')
-rw-r--r--common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/Model.java3
-rw-r--r--common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/PnfResource.java9
-rw-r--r--common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/PnfWidget.java11
-rw-r--r--common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/Widget.java4
4 files changed, 26 insertions, 1 deletions
diff --git a/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/Model.java b/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/Model.java
index c55abb36c2..6668836518 100644
--- a/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/Model.java
+++ b/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/Model.java
@@ -80,6 +80,9 @@ public abstract class Model {
case "org.openecomp.resource.vfc.nodes.heat.cinder":
modelToBeReturned = new VolumeWidget();
break;
+ case "org.openecomp.resource.pnf":
+ modelToBeReturned = new PnfResource();
+ break;
default:
modelToBeReturned = null;
break;
diff --git a/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/PnfResource.java b/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/PnfResource.java
new file mode 100644
index 0000000000..67e19392ba
--- /dev/null
+++ b/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/PnfResource.java
@@ -0,0 +1,9 @@
+package org.openecomp.sdc.generator.aai.model;
+
+import org.openecomp.sdc.generator.aai.types.Cardinality;
+
+@org.openecomp.sdc.generator.aai.types.Model(widget = Widget.Type.PNF, cardinality = Cardinality
+ .UNBOUNDED,
+ dataDeleteFlag = true)
+public class PnfResource extends Resource {
+}
diff --git a/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/PnfWidget.java b/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/PnfWidget.java
new file mode 100644
index 0000000000..2aa03b38bd
--- /dev/null
+++ b/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/PnfWidget.java
@@ -0,0 +1,11 @@
+package org.openecomp.sdc.generator.aai.model;
+
+import org.openecomp.sdc.generator.aai.types.Cardinality;
+import org.openecomp.sdc.generator.aai.types.ModelType;
+import org.openecomp.sdc.generator.aai.types.ModelWidget;
+
+@org.openecomp.sdc.generator.aai.types.Model(widget = Widget.Type.PNF, cardinality
+ = Cardinality.UNBOUNDED, dataDeleteFlag = true)
+@ModelWidget(type = ModelType.WIDGET, name = "pnf")
+public class PnfWidget extends ResourceWidget {
+}
diff --git a/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/Widget.java b/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/Widget.java
index 6220519a3f..ce1ef703d9 100644
--- a/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/Widget.java
+++ b/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-api/src/main/java/org/openecomp/sdc/generator/aai/model/Widget.java
@@ -78,6 +78,8 @@ public abstract class Widget extends Model {
return new AllotedResourceWidget();
case TUNNEL_XCONNECT:
return new TunnelXconnectWidget();
+ case PNF:
+ return new PnfWidget();
default:
return null;
}
@@ -191,6 +193,6 @@ public abstract class Widget extends Model {
public enum Type {
SERVICE, VF, VFC, VSERVER, VOLUME, FLAVOR, TENANT, VOLUME_GROUP, LINT, L3_NET, VFMODULE, IMAGE,
- OAM_NETWORK,ALLOTTED_RESOURCE,TUNNEL_XCONNECT
+ OAM_NETWORK,ALLOTTED_RESOURCE,TUNNEL_XCONNECT, PNF
}
}