diff options
author | eleonorali <eleonoral@amdocs.com> | 2018-02-11 12:15:48 +0200 |
---|---|---|
committer | eleonorali <eleonoral@amdocs.com> | 2018-02-11 12:16:01 +0200 |
commit | d5b4901c6a1ae136138c1300d377447e26bac4ef (patch) | |
tree | e25360262affbacfdf1bcaeb1e8976e6d8ebae58 /common | |
parent | eae2ba3f5ccfb20a899262562bd91129b6d53423 (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 'common')
6 files changed, 174 insertions, 24 deletions
diff --git a/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ServiceTemplate.java b/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ServiceTemplate.java index aecb9315e3..297a2498bb 100644 --- a/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ServiceTemplate.java +++ b/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ServiceTemplate.java @@ -1,25 +1,22 @@ -/*- - * ============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.datatypes.model; +import org.openecomp.sdc.tosca.datatypes.model.heatextend.AnnotationType; import java.util.List; import java.util.Map; @@ -39,6 +36,7 @@ public class ServiceTemplate implements Template { private Map<String, NodeType> node_types; private Map<String, GroupType> group_types; private Map<String, PolicyType> policy_types; + private Map<String, AnnotationType> annotation_types; private TopologyTemplate topology_template; public String getTosca_definitions_version() { @@ -145,4 +143,13 @@ public class ServiceTemplate implements Template { public void setTopology_template(TopologyTemplate topology_template) { this.topology_template = topology_template; } + + public Map<String, AnnotationType> getAnnotation_types() { + return annotation_types; + } + + public void setAnnotation_types(Map<String, AnnotationType> annotation_types) { + this.annotation_types = annotation_types; + } + } diff --git a/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/AnnotationDefinition.java b/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/AnnotationDefinition.java new file mode 100644 index 0000000000..24b5dec416 --- /dev/null +++ b/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/AnnotationDefinition.java @@ -0,0 +1,42 @@ +/* + * 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.model.heatextend; + +import java.util.Map; + +public class AnnotationDefinition { + + private String type; + private Map<String, Object> properties; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Map<String, Object> getProperties() { + return properties; + } + + public void setProperties(Map<String, Object> properties) { + this.properties = properties; + } + +} diff --git a/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/AnnotationType.java b/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/AnnotationType.java new file mode 100644 index 0000000000..b76966e1f8 --- /dev/null +++ b/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/AnnotationType.java @@ -0,0 +1,53 @@ +/* + * Copyright © 2018 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.model.heatextend; + + import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition; + + import java.util.Map; + + public class AnnotationType { + + private String version; + private String description; + private Map<String, PropertyDefinition> properties; + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Map<String, PropertyDefinition> getProperties() { + return properties; + } + + public void setProperties(Map<String, PropertyDefinition> properties) { + this.properties = properties; + } + + }
\ No newline at end of file diff --git a/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/ParameterDefinitionExt.java b/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/ParameterDefinitionExt.java index 5442db244f..58ee1cadd0 100644 --- a/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/ParameterDefinitionExt.java +++ b/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/ParameterDefinitionExt.java @@ -1,35 +1,30 @@ -/*- - * ============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.datatypes.model.heatextend; - import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition; - - +import java.util.Map; public class ParameterDefinitionExt extends ParameterDefinition { - String label; - Boolean hidden; - Boolean immutable; + private String label; + private Boolean hidden; + private Boolean immutable; + private Map<String, AnnotationDefinition> annotations; public String getLabel() { return label; @@ -54,4 +49,13 @@ public class ParameterDefinitionExt extends ParameterDefinition { public void setImmutable(Boolean immutable) { this.immutable = immutable; } + + public Map<String, AnnotationDefinition> getAnnotations() { + return annotations; + } + + public void setAnnotations(Map<String, AnnotationDefinition> annotations) { + this.annotations = annotations; + } + } diff --git a/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/_index.yml b/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/_index.yml index 5c4cefb6ff..8f6d419536 100644 --- a/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/_index.yml +++ b/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/_index.yml @@ -32,4 +32,6 @@ imports: file: groups.yml - data: file: data.yml +- annotations: + file: annotations.yml diff --git a/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/annotations.yml b/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/annotations.yml new file mode 100644 index 0000000000..bfbf1c2d32 --- /dev/null +++ b/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/annotations.yml @@ -0,0 +1,42 @@ +# +# 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. +# + +tosca_definitions_version: tosca_simple_yaml_1_1 + +metadata: + filename: openecomp/annotations.yml + version: '1.0' + +imports: +- openecomp_index: + file: _index.yml + +annotation_types: + + org.openecomp.annotations.Source: + description: Indicates the origin source of an input + properties: + source_type: + type: string + required: true + vf_module_label: + description: List of HEAT file name this input was originated from + type: list + required: true + entry_schema: + type: string + param_name: + type: string + required: false + description: Source parameter name
\ No newline at end of file |