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.aaiTree;
23 public enum NodeType {
24 SERVICE_INSTANCE("service-instance", "service-instance-id", "service-instance-name", "service"),
25 GENERIC_VNF ("generic-vnf", "vnf-id", "vnf-name", "vnf"),
26 NETWORK ("l3-network", "network-id", "network-name", "network"),
27 FAILURE ("failure_node", NodeType.NONE, NodeType.NONE, NodeType.NONE),
28 COLLECTION_RESOURCE ("collection", "collection-id", "collection-name", "collection"),
29 CONFIGURATION ("configuration", "configuration-id", "configuration-name", "configuration"),
30 PNF ("pnf", "pnf-id", "pnf-name", "pnf"),
31 VF_MODULE ("vf-module", "vf-module-id", "vf-module-name", "vfModule"),
32 INSTANCE_GROUP ("instance-group", "id", "instance-group-name", "instanceGroup"),
33 PORT ("l-interface", "interface-id", "interface-name", "connectionPoint"),
34 VOLUME_GROUP ("volume-group", "volume-group-id", "volume-group-name", "volumeGroup"),
35 VLAN_TAG("vlan-tag", "vlan-tag-id", NodeType.NONE, NodeType.NONE),
36 VPN_BINDING("vpn-binding", "vpn-id", "vpn-name", "vpnBinding"),
42 private String modelType;
44 public static final String NONE = "";
46 NodeType(String type, String id, String name, String modelType) {
50 this.modelType = modelType;
53 public String getType() {
57 public String getId() {
61 public String getName() {
65 public String getModelType() {
69 public static NodeType fromString(String type) {
70 for (NodeType nodeType : NodeType.values()) {
71 if (nodeType.type.equalsIgnoreCase(type)) {
79 public String toString() {