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;
23 import java.util.HashMap;
25 import java.util.regex.Pattern;
27 public class NewVNF extends NewNode {
29 /** The pattern used to normalize VNF names */
30 static final Pattern COMPONENT_INSTANCE_NAME_DELIMETER_PATTERN = Pattern.compile("[\\.\\-]+");
32 /** The model customization name. */
33 private String modelCustomizationName;
35 /** The vf modules. */
36 private Map<String, VfModule> vfModules = new HashMap<>();
38 /** The volume groups. */
39 private Map<String, VolumeGroup> volumeGroups = new HashMap<>();
42 * Instantiates a newvnf.
49 * Gets the model customization name.
51 * @return the model customization name
53 public String getModelCustomizationName() {
54 return modelCustomizationName;
58 * Gets the vf modules.
60 * @return the vf modules
62 public Map<String, VfModule> getVfModules() {
67 * Sets the vf modules.
69 * @param vfModules the vf modules
71 public void setVfModules(Map<String, VfModule> vfModules) {
72 this.vfModules = vfModules;
76 * Gets the volume groups.
78 * @return the volume groups
80 public Map<String, VolumeGroup> getVolumeGroups() {
85 * Sets the volume groups.
87 * @param volumeGroups the volume groups
89 public void setVolumeGroups(Map<String, VolumeGroup> volumeGroups) {
90 this.volumeGroups = volumeGroups;
95 * Sets the model customization name.
97 * @param modelCustomizationName the new model customization name
99 public void setModelCustomizationName(String modelCustomizationName) {
100 this.modelCustomizationName = modelCustomizationName;
103 * Normalize the VNF name
104 * @param originalName
105 * @return the normalized name
107 public static String normalizeName (String originalName) {
108 return VNF.normalizeName(originalName);