aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib/src
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src')
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/extend/ToscaAnnotationType.java34
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ConfigConstants.java15
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java25
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/resources/config.properties1
4 files changed, 57 insertions, 18 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/extend/ToscaAnnotationType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/extend/ToscaAnnotationType.java
new file mode 100644
index 0000000000..5fc5c1f710
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/extend/ToscaAnnotationType.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright © 2016-2017 European Support Limited
+ *
+ * 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.openecomp.sdc.tosca.datatypes.extend;
+
+import org.openecomp.config.api.Configuration;
+import org.openecomp.config.api.ConfigurationManager;
+import org.openecomp.sdc.tosca.services.ConfigConstants;
+
+
+public class ToscaAnnotationType {
+
+ private static Configuration config = ConfigurationManager.lookup();
+ public static final String ANNOTATION_TYPE_PREFIX =
+ config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_ANNOTATION_TYPE);
+
+ public static final String SOURCE =
+ ANNOTATION_TYPE_PREFIX + "Source";
+
+}
+
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ConfigConstants.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ConfigConstants.java
index 91103c55df..8666da9833 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ConfigConstants.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ConfigConstants.java
@@ -1,21 +1,17 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2016-2017 European Support Limited
+ *
* 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.openecomp.sdc.tosca.services;
@@ -32,6 +28,7 @@ public class ConfigConstants {
public static final String PREFIX_POLICY_TYPE = PREFIX + ".policyType";
public static final String PREFIX_ARTIFACT_TYPE = PREFIX + ".artifactType";
public static final String PREFIX_RELATIONSHIP_TYPE = PREFIX + ".relationshipType";
+ public static final String PREFIX_ANNOTATION_TYPE = PREFIX + ".annotationType";
public static final String PREFIX_NODE_TYPE_VFC = PREFIX + ".nodeType.vfc";
public static final String PREFIX_NODE_TYPE_NETWORK = PREFIX + ".nodeType.network";
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java
index 4d45e8fbf1..1aa171961f 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java
@@ -1,21 +1,17 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2016-2017 European Support Limited
+ *
* 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.openecomp.sdc.tosca.services;
@@ -42,6 +38,9 @@ public class ToscaConstants {
public static final String FEATURE_CAPABILITY_ID = "feature";
public static final String PORT_MIRRORING_CAPABILITY_ID = "port_mirroring";
+ //TOSCA Annotation Ids
+ public static final String SOURCE_ANNOTATION_ID = "source";
+
//General
public static final String TOSCA_DEFINITIONS_VERSION = "tosca_simple_yaml_1_0_0";
public static final String MODELABLE_ENTITY_NAME_SELF = "SELF";
@@ -70,5 +69,13 @@ public class ToscaConstants {
public static final String COMPUTE_IMAGE = "image";
public static final String COMPUTE_FLAVOR = "flavor";
+ public static final String SOURCE_TYPE_PROPERTY_NAME = "source_type";
+ public static final String VF_MODULE_LABEL_PROPERTY_NAME = "vf_module_label";
+ public static final String PARAM_NAME_PROPERTY_NAME = "param_name";
+
+ // propertiies valid values
+ public static final String HEAT_SOURCE_TYPE = "HEAT";
+ public static final String GENERIC_SOURCE_TYPE = "Generic";
+
}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/resources/config.properties b/openecomp-be/lib/openecomp-tosca-lib/src/main/resources/config.properties
index 3b90c809fa..02428bb822 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/resources/config.properties
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/resources/config.properties
@@ -5,6 +5,7 @@ tosca.entity.namespace.prefix.groupType=${tosca.entity.namespace.prefix}groups.
tosca.entity.namespace.prefix.policyType=${tosca.entity.namespace.prefix}policies.
tosca.entity.namespace.prefix.relationshipType=${tosca.entity.namespace.prefix}relationships.
tosca.entity.namespace.prefix.monitoringUploadType=${tosca.entity.namespace.prefix}artifacts.
+tosca.entity.namespace.prefix.annotationType=${tosca.entity.namespace.prefix}annotations.
tosca.entity.namespace.prefix.nodeType.vfc=${tosca.entity.namespace.prefix}resource.vfc.nodes.
tosca.entity.namespace.prefix.nodeType.network=${tosca.entity.namespace.prefix}resource.vl.nodes.