2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.vid.model.serviceInstantiation;
23 import static java.util.Collections.emptyMap;
26 import java.util.Objects;
27 import org.onap.vid.model.aaiTree.ExistingElementsCounterMaps;
29 public class ServiceInstantiationTemplate extends ServiceInstantiation implements ExistingElementsCounterMaps {
31 private final Map<String, Long> existingVNFCounterMap;
32 private final Map<String, Long> existingNetworksCounterMap;
33 private final Map<String, Long> existingVnfGroupCounterMap;
34 private final Map<String, Long> existingVRFCounterMap;
35 private final Map<String, String> existingNames = emptyMap();
37 public ServiceInstantiationTemplate(
38 ServiceInstantiation baseService,
39 Map<String, Long> vnfCounterMap,
40 Map<String, Long> networksCounterMap,
41 Map<String, Long> vnfGroupCounterMap,
42 Map<String, Long> VRFCounterMap
45 baseService.getModelInfo(), baseService.getOwningEntityId(), baseService.getOwningEntityName(),
46 baseService.getProjectName(), baseService.getGlobalSubscriberId(), baseService.getSubscriberName(),
47 baseService.getProductFamilyId(), baseService.getInstanceName(), baseService.getSubscriptionServiceType(),
48 baseService.getLcpCloudRegionId(), baseService.getLcpCloudRegionId(), baseService.getTenantId(),
49 baseService.getTenantName(), baseService.getAicZoneId(), baseService.getAicZoneName(),
50 baseService.getVnfs(), baseService.getNetworks(), baseService.getVnfGroups(), baseService.getVrfs(),
51 baseService.getInstanceParams(), baseService.isPause(), baseService.getBulkSize(),
52 baseService.isRollbackOnFailure(), baseService.isALaCarte(), baseService.getTestApi(),
53 baseService.getInstanceId(), Objects.toString(baseService.getAction(), null),
54 baseService.getTrackById(), baseService.getIsFailed(), baseService.getStatusMessage(),
55 baseService.getVidNotions(),
56 baseService.getOriginalName()
59 this.existingVNFCounterMap = vnfCounterMap;
60 this.existingNetworksCounterMap = networksCounterMap;
61 this.existingVnfGroupCounterMap = vnfGroupCounterMap;
62 this.existingVRFCounterMap = VRFCounterMap;
66 public Map<String, Long> getExistingVNFCounterMap() {
67 return existingVNFCounterMap;
71 public Map<String, Long> getExistingNetworksCounterMap() {
72 return existingNetworksCounterMap;
76 public Map<String, Long> getExistingVnfGroupCounterMap() {
77 return existingVnfGroupCounterMap;
81 public Map<String, Long> getExistingVRFCounterMap() {
82 return existingVRFCounterMap;
85 public Map<String, String> getExistingNames() {