summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCoreBPMN/src/main
diff options
context:
space:
mode:
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>2019-04-26 17:08:40 +0530
committersubhash kumar singh <subhash.kumar.singh@huawei.com>2019-04-27 12:51:43 +0530
commite98c9cbc978ceb3bcb4a8f946bfec4cbd7b22511 (patch)
tree5a35261434240d6ea24a48d7230496408b3ea20f /bpmn/MSOCoreBPMN/src/main
parent80462c509ef9ce3241b4cdf3e7f8fe5f6ab74974 (diff)
Enhanced Service decomposition to handle gruop
Enhanced Service decomposition to handle gruop and vnfcs Issue-ID: SO-1393 Change-Id: If28416e4776f2ff645abdd0d1059d28c9ca6e52f Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
Diffstat (limited to 'bpmn/MSOCoreBPMN/src/main')
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/GroupResource.java44
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ResourceType.java2
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfResource.java12
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfcResource.java31
4 files changed, 88 insertions, 1 deletions
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/GroupResource.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/GroupResource.java
new file mode 100644
index 0000000000..d194f2750a
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/GroupResource.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 Huawei 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.so.bpmn.core.domain;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.UUID;
+
+public class GroupResource extends Resource {
+ private static final long serialVersionUID = 1L;
+
+ @JsonProperty("vnfcs")
+ private List<VnfcResource> vnfcs;
+
+ public GroupResource() {
+ resourceType = ResourceType.GROUP;
+ setResourceId(UUID.randomUUID().toString());
+ }
+
+ public List<VnfcResource> getVnfcs() {
+ return vnfcs;
+ }
+
+ public void setVnfcs(List<VnfcResource> vnfcs) {
+ this.vnfcs = vnfcs;
+ }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ResourceType.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ResourceType.java
index a30d0df825..0e17d4c826 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ResourceType.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ResourceType.java
@@ -22,5 +22,5 @@ package org.onap.so.bpmn.core.domain;
public enum ResourceType {
- VNF, NETWORK, MODULE, ALLOTTED_RESOURCE, CONFIGURATION // etc.
+ VNF, NETWORK, MODULE, ALLOTTED_RESOURCE, CONFIGURATION, GROUP, VNFC // etc.
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfResource.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfResource.java
index a69a49b89a..0804cbb11b 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfResource.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfResource.java
@@ -51,6 +51,10 @@ public class VnfResource extends Resource {
*/
@JsonProperty("vfModules")
private List<ModuleResource> vfModules;
+
+ @JsonProperty("groups")
+ private List<GroupResource> groups;
+
private String vnfHostname;
private String vnfType;
private String nfFunction;
@@ -151,6 +155,14 @@ public class VnfResource extends Resource {
this.resourceInput = resourceInput;
}
+ public List<GroupResource> getGroups() {
+ return groups;
+ }
+
+ public void setGroups(List<GroupResource> groups) {
+ this.groups = groups;
+ }
+
/**
* Returns a list of all VfModule objects. Base module is first entry in the list
*
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfcResource.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfcResource.java
new file mode 100644
index 0000000000..5fced9a8ab
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfcResource.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 Huawei 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.so.bpmn.core.domain;
+
+import java.util.UUID;
+
+public class VnfcResource extends Resource {
+ private static final long serialVersionUID = 1L;
+
+ public VnfcResource() {
+ resourceType = ResourceType.VNFC;
+ setResourceId(UUID.randomUUID().toString());
+ }
+}