aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/EnumToscaNodeTypeDefinition.java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/EnumToscaNodeTypeDefinition.java')
-rw-r--r--catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/EnumToscaNodeTypeDefinition.java60
1 files changed, 60 insertions, 0 deletions
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/EnumToscaNodeTypeDefinition.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/EnumToscaNodeTypeDefinition.java
new file mode 100644
index 00000000..0627d743
--- /dev/null
+++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/EnumToscaNodeTypeDefinition.java
@@ -0,0 +1,60 @@
+/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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.
+ */
+package org.openo.commontosca.catalog.model.common;
+
+public enum EnumToscaNodeTypeDefinition {
+ VNF{
+ @Override
+ public String getName(){
+ return "tosca.nodes.nfv.VNF";
+ }
+ },
+ VDU{
+ @Override
+ public String getName(){
+ return "tosca.nodes.nfv.VDU";
+ }
+ },
+ VNFC{
+ @Override
+ public String getName(){
+ return "tosca.nodes.nfv.VNFC";
+ }
+ },
+ VL{
+ @Override
+ public String getName(){
+ return "tosca.nodes.nfv.VL";
+ }
+ },
+ CP{
+ @Override
+ public String getName(){
+ return "tosca.nodes.nfv.CP";
+ }
+ };
+
+ public abstract String getName();
+
+ public static boolean isToscaNodeTypeDef(String type){
+ for(EnumToscaNodeTypeDefinition enumDef : EnumToscaNodeTypeDefinition.values()){
+ if(type.indexOf(enumDef.getName()) != -1){
+ return true;
+ }
+ }
+ return false;
+ }
+}