From e98c9cbc978ceb3bcb4a8f946bfec4cbd7b22511 Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Fri, 26 Apr 2019 17:08:40 +0530 Subject: 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 --- .../onap/so/bpmn/core/domain/GroupResource.java | 44 ++++++++++++++++++++++ .../org/onap/so/bpmn/core/domain/ResourceType.java | 2 +- .../org/onap/so/bpmn/core/domain/VnfResource.java | 12 ++++++ .../org/onap/so/bpmn/core/domain/VnfcResource.java | 31 +++++++++++++++ 4 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/GroupResource.java create mode 100644 bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfcResource.java (limited to 'bpmn/MSOCoreBPMN/src/main/java') 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 vnfcs; + + public GroupResource() { + resourceType = ResourceType.GROUP; + setResourceId(UUID.randomUUID().toString()); + } + + public List getVnfcs() { + return vnfcs; + } + + public void setVnfcs(List 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 vfModules; + + @JsonProperty("groups") + private List groups; + private String vnfHostname; private String vnfType; private String nfFunction; @@ -151,6 +155,14 @@ public class VnfResource extends Resource { this.resourceInput = resourceInput; } + public List getGroups() { + return groups; + } + + public void setGroups(List 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()); + } +} -- cgit 1.2.3-korg