summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org
diff options
context:
space:
mode:
authoreleonorali <eleonoral@amdocs.com>2018-02-11 12:15:48 +0200
committereleonorali <eleonoral@amdocs.com>2018-02-11 12:16:01 +0200
commitd5b4901c6a1ae136138c1300d377447e26bac4ef (patch)
treee25360262affbacfdf1bcaeb1e8976e6d8ebae58 /openecomp-be/lib/openecomp-tosca-lib/src/main/java/org
parenteae2ba3f5ccfb20a899262562bd91129b6d53423 (diff)
SRIOV - add annotations
SRIOV - add annotations to input TOSCA parameter converted from HEAT file (2) Change-Id: Id0b0156730ae64093df42d09e2873de047c13ac9 Issue-ID: SDC-996 Signed-off-by: eleonorali <eleonoral@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/main/java/org')
-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
3 files changed, 56 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";
+
}