aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorLee, Tian (tl5884) <TianL@amdocs.com>2018-06-28 17:35:04 +0100
committerLee, Tian (tl5884) <TianL@amdocs.com>2018-06-28 17:35:04 +0100
commit80a8e4b685a16ef58603fc487d7c0c2adf427b02 (patch)
tree3cc1789f15a1908b858876c440c19ea1ef02856e /src/main/java/org
parent4036c9aae1965d3fa53956085e9d6f90feb217a8 (diff)
Support Port Mirroring Configuration model
Add support for Port Mirroring Configuration XML model generation from SDC TOSCA Change-Id: I44718d20a53e343ee34ae47ef2bc35d49c862ddf Issue-ID: AAI-1345 Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/onap/aai/babel/xml/generator/model/Configuration.java28
-rw-r--r--src/main/java/org/onap/aai/babel/xml/generator/model/ConfigurationWidget.java31
-rw-r--r--src/main/java/org/onap/aai/babel/xml/generator/model/Model.java3
-rw-r--r--src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java4
4 files changed, 65 insertions, 1 deletions
diff --git a/src/main/java/org/onap/aai/babel/xml/generator/model/Configuration.java b/src/main/java/org/onap/aai/babel/xml/generator/model/Configuration.java
new file mode 100644
index 0000000..20dbea9
--- /dev/null
+++ b/src/main/java/org/onap/aai/babel/xml/generator/model/Configuration.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.CONFIGURATION, cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = true)
+public class Configuration extends Resource {
+}
diff --git a/src/main/java/org/onap/aai/babel/xml/generator/model/ConfigurationWidget.java b/src/main/java/org/onap/aai/babel/xml/generator/model/ConfigurationWidget.java
new file mode 100644
index 0000000..7822926
--- /dev/null
+++ b/src/main/java/org/onap/aai/babel/xml/generator/model/ConfigurationWidget.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.CONFIGURATION, cardinality = Cardinality.UNBOUNDED,
+ dataDeleteFlag = true)
+@ModelWidget(type = ModelType.WIDGET, name = "configuration")
+public class ConfigurationWidget 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 0ee0838..dcd5d15 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
@@ -76,6 +76,9 @@ public abstract class Model {
case "org.openecomp.resource.vfc.nodes.heat.cinder":
modelToBeReturned = new VolumeWidget();
break;
+ case "org.openecomp.nodes.PortMirroringConfiguration":
+ modelToBeReturned = new Configuration();
+ break;
default:
modelToBeReturned = null;
break;
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 be58844..7f39438 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
@@ -36,7 +36,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;
+ SERVICE, VF, VFC, VSERVER, VOLUME, FLAVOR, TENANT, VOLUME_GROUP, LINT, L3_NET, VFMODULE, IMAGE, OAM_NETWORK, ALLOTTED_RESOURCE, TUNNEL_XCONNECT, CONFIGURATION;
}
private Set<String> keys = new HashSet<>();
@@ -80,6 +80,8 @@ public abstract class Widget extends Model {
return new AllotedResourceWidget();
case TUNNEL_XCONNECT:
return new TunnelXconnectWidget();
+ case CONFIGURATION:
+ return new ConfigurationWidget();
default:
return null;
}