diff options
author | 2018-02-11 12:15:48 +0200 | |
---|---|---|
committer | 2018-02-11 12:16:01 +0200 | |
commit | d5b4901c6a1ae136138c1300d377447e26bac4ef (patch) | |
tree | e25360262affbacfdf1bcaeb1e8976e6d8ebae58 /common/openecomp-tosca-datatype/src/main/java/org | |
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/openecomp-tosca-datatype/src/main/java/org')
4 files changed, 130 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; + } + } |