From e2cc2530fc6d54ebc975c01a4ff887ce12f0a736 Mon Sep 17 00:00:00 2001 From: Pavel Aharoni Date: Wed, 29 Mar 2017 13:35:45 +0300 Subject: [SDC-6] sdc-distribution-client 1707 rebasing Change-Id: I322a05fd79beb6ba4fee4d32afffecf531b86e98 Signed-off-by: Pavel Aharoni --- .../sdc/tosca/parser/api/ISdcCsarHelper.java | 240 +++++++++++++++++++++ .../parser/exceptions/SdcToscaParserException.java | 9 + .../sdc/tosca/parser/impl/SdcCsarHelperImpl.java | 193 +++++++++++++++++ .../sdc/tosca/parser/impl/SdcPropertyNames.java | 109 ++++++++++ .../org/openecomp/sdc/tosca/parser/impl/Types.java | 32 +++ 5 files changed, 583 insertions(+) create mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/api/ISdcCsarHelper.java create mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/exceptions/SdcToscaParserException.java create mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcCsarHelperImpl.java create mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcPropertyNames.java create mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/Types.java (limited to 'sdc-tosca-parser/src') diff --git a/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/api/ISdcCsarHelper.java b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/api/ISdcCsarHelper.java new file mode 100644 index 0000000..916953c --- /dev/null +++ b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/api/ISdcCsarHelper.java @@ -0,0 +1,240 @@ +/*- + * ============LICENSE_START======================================================= + * sdc-distribution-client + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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.parser.api; + + +import java.util.List; + +import org.apache.commons.lang3.tuple.Pair; +import org.openecomp.sdc.toscaparser.api.Group; +import org.openecomp.sdc.toscaparser.api.NodeTemplate; + + +public interface ISdcCsarHelper { + + /** + * Get all node templates by node_type for this CSAR service. + * + * @param nodeType - the TOSCA type of the node. + * @return service node templates of this type. + */ + public List getServiceNodeTemplatesByType(String nodeType); + + /** + * Get groups of a VF with type "org.openecomp.groups.VfModule". + * + * @param vfCustomizationUuid - customizationUuid of VF instance. + * @return list of vfModule groups. + */ + public List getVfModulesByVf(String vfCustomizationUuid); + + + /** + * Get any property leaf value for node template by full path separated by #.
+ * For example, for node template with this property:

+ * network_assignments:
+   ecomp_generated_network_assignment: true
+   is_shared_network: false
+   is_external_network: false
+   ipv4_subnet_default_assignments:
+     use_ipv4: true
+     ip_network_address_plan: 1.2.3.4
+     dhcp_enabled: true
+     ip_version: 4
+     cidr_mask: 24
+     min_subnets_count: 1
+   ipv6_subnet_default_assignments:
+     use_ipv6: false

+ + * calling
+ * getNodeTemplatePropertyLeafValue(nodeTemplate, "network_assignments#ipv6_subnet_default_assignments#use_ipv6")
+ * will return "false". + * @param nodeTemplate - nodeTemplate where the property should be looked up. + * @param pathToPropertyLeafValue - the full path of the required property. + * @return the leaf value as String, or null if there's no such property, or it's not a leaf. + */ + public String getNodeTemplatePropertyLeafValue(NodeTemplate nodeTemplate, String pathToPropertyLeafValue); + + /** + * Get any property leaf value for a group definition by full path separated by #. + * Same logic as in {@link #getNodeTemplatePropertyLeafValue(NodeTemplate, String) getNodeTemplatePropertyLeafValue}, only for a group. + * @param group - group where the property should be looked up. + * @param propertyName - the name of the required property. + * @return the leaf value as String, or null if there's no such property, or it's not a leaf. + */ + public String getGroupPropertyLeafValue(Group group, String propertyName); + + + /** + * Get all VL node templates of the CSAR service. + * @return - all VL node templates. + */ + public List getServiceVlList(); + + /** + * Get all VF node templates of the CSAR service. + * @return - all VF node templates. + */ + public List getServiceVfList(); + + + /** + * + * Get a property from a metadata object.
+ * This is just sugaring method, same as calling metadata.getMetadataPropertyValue(metadataPropertyName).
+ * + * For metadata object representing the below:

+ * + * metadata:
+   invariantUUID: 4598a404-00e1-42a6-8767-0bda343e2066
+   UUID: e17940d6-42f8-4989-bad0-31de5addc619
+   customizationUUID: 83d086b2-a861-4d3b-aa84-3bfbb9b2ec20
+   version: '0.1'
+   name: vIPR_ATM
+   description: vIPR_ATM
+   type: VF
+   category: category1
+   subcategory: subCategory1

+ + calling
+ getMetadataPropertyValue(metadata,"invariantUUID")
+ will return "4598a404-00e1-42a6-8767-0bda343e2066". + + * @param metadata - metadata object. + * @param metadataPropertyName - the name of the metadata property. + * @return metadata property value + */ + //public String getMetadataPropertyValue(Metadata metadata, String metadataPropertyName); + + + /** + * Get input leaf value for the CSAR service, by full path separated by #.
+ * Same logic as in {@link #getNodeTemplatePropertyLeafValue(NodeTemplate, String) getNodeTemplatePropertyLeafValue}, only for an input full path. + * @param inputLeafValuePath by full path separated by #. + * @return input leaf value for the service. + */ + public String getServiceInputLeafValue(String inputLeafValuePath); + + /** + * Get the type name of the CSAR service's substitution mappings element.
+ * + * For the below:

+ * + * substitution_mappings:
+   type: org.openecomp.services.ViprATM
+ + calling
+ getServiceSubstitutionMappingsTypeName()
+ will return "org.openecomp.services.ViprATM" + * @return - the type name of the CSAR service's substitution mappings element + */ + public String getServiceSubstitutionMappingsTypeName(); + + /** + * Get the CSAR service metadata + * @return - the service metadata object. + */ + //public Metadata getServiceMetadata(); + + /** + * Get all VFC node templates from a specified VF. + * @param vfCustomizationId - customizationUuid of the VF node template. + * @return all VFC node templates from a specified VF + */ + public List getVfcListByVf(String vfCustomizationId); + + /** + * Get all CP node templates from a specified VF. + * @param vfCustomizationId - customizationUuid of the VF node template. + * @return all CP node templates from a specified VF + */ + public List getCpListByVf(String vfCustomizationId); + + /** + * Get all members of this group definition.
+ * + * For example, for this group definition:

+ * + * ViprAtm..vIPR-ATM-Base..module-0:
+   type: org.openecomp.groups.VfModule
+   .................
+   members: [vIPR_ATM_Ha_Two, vIPR_ATM_Ha_One, vIPR_ATM_OAM_SG, vIPR_ATM_HA_TWO_SG, vIPR_ATM_HA_ONE_SG]

+ + calling
+ getMembersOfGroup(group)
+ will return List of the following Strings: "vIPR_ATM_Ha_Two, vIPR_ATM_Ha_One, vIPR_ATM_OAM_SG, vIPR_ATM_HA_TWO_SG, vIPR_ATM_HA_ONE_SG"
+ * @param group - group to return the members. + * @return names of all group members. + * + */ + public List getMembersOfGroup(Group group); + + + /** + * Get list of node template pairs, where for each pair,
+ * the left node template in pair has requirement with name reqName,
+ * which should be satisfied with respective capability by the right node template in pair.
+ * + * For example, if we have the below two node templates in the vIPR VF:

+ * + * oam_extCP:
+   type: org.openecomp.resources.cp.extCP
+   requirements:
+     - virtualBinding: vipr_atm_firewall

+ * + * vipr_atm_firewall:
+   type: org.openecomp.resources.vfc.ViprAtm.abstract.nodes.heat.vipr_atm
+ ........

+ * + + * calling
+ * getNodeTemplatePairsByReqName(getCpListByVf(viprCustomUuid), getVfcListByVf(viprCustomUuid), "virtualBinding")
+ * will return a list with one Pair - where left element of pair will be "oam_extCP" node template,
+ * and right element will be "vipr_atm_firewall" node template.
+ * + * @param listOfReqNodeTemplates - list of node templates in which the "reqName" requirement should be looked. + * @param listOfCapNodeTemplates - list of node templates in which the capability matching the "reqName" requirement should be looked. + * @param reqName - the name of a requirement definition to match by. + * @return + */ + public List> getNodeTemplatePairsByReqName(List listOfReqNodeTemplates, List listOfCapNodeTemplates, String reqName); + + /** + * Get all allotted node templates from this service. + * @return all allotted node templates from this service. + */ + public List getAllottedResources(); + + /** + * Get node_type of a node template.
+ * + * For this node template:
+ * + * vipr_atm_firewall:
+   type: org.openecomp.resources.vfc.ViprAtm.abstract.nodes.heat.vipr_atm
+ ........

+ * + * the function will return "org.openecomp.resources.vfc.ViprAtm.abstract.nodes.heat.vipr_atm" + * + * @param nodeTemplate - node template object + * @return - node type string. + */ + public String getTypeOfNodeTemplate(NodeTemplate nodeTemplate); + +} diff --git a/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/exceptions/SdcToscaParserException.java b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/exceptions/SdcToscaParserException.java new file mode 100644 index 0000000..5d57fc9 --- /dev/null +++ b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/exceptions/SdcToscaParserException.java @@ -0,0 +1,9 @@ +package org.openecomp.sdc.tosca.parser.exceptions; + +public class SdcToscaParserException extends Exception{ + /** + * + */ + private static final long serialVersionUID = 626014844866501196L; + +} diff --git a/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcCsarHelperImpl.java b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcCsarHelperImpl.java new file mode 100644 index 0000000..0d59a4d --- /dev/null +++ b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcCsarHelperImpl.java @@ -0,0 +1,193 @@ +/*- + * ============LICENSE_START======================================================= + * sdc-distribution-client + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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.parser.impl; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.tuple.Pair; +import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; +import org.openecomp.sdc.toscaparser.api.Group; +import org.openecomp.sdc.toscaparser.api.NodeTemplate; +import org.openecomp.sdc.toscaparser.api.TopologyTemplate; +import org.openecomp.sdc.toscaparser.api.ToscaTemplate; +import org.openecomp.sdc.tosca.parser.impl.Types; + +public class SdcCsarHelperImpl implements ISdcCsarHelper { + + private ToscaTemplate toscaTemplate; + + public SdcCsarHelperImpl(ToscaTemplate toscaTemplate) { + this.toscaTemplate = toscaTemplate; + } + + @Override + public String getNodeTemplatePropertyLeafValue(NodeTemplate nodeTemplate, String leafValuePath) { + //TODO + return null;/*getLeafPropertyValue(nodeTemplate, leafValuePath);*/ + } + + @Override + public List getServiceVlList() { + return getNodeTemplateBySdcType(toscaTemplate.getTopologyTemplate(), Types.TYPE_VL); + + } + + @Override + public List getServiceVfList() { + return getNodeTemplateBySdcType(toscaTemplate.getTopologyTemplate(), Types.TYPE_VF); + } + + @Override + public List getServiceNodeTemplatesByType(String nodeType) { + List res = new ArrayList<>(); + List nodeTemplates = toscaTemplate.getNodeTemplates(); + for (NodeTemplate nodeTemplate : nodeTemplates){ + if (nodeTemplate.getTypeDefinition().getType().equals(nodeType)){ + res.add(nodeTemplate); + } + } + return res; + } + + @Override + public List getVfcListByVf(String vfCustomizationId) { + List serviceVfList = getServiceVfList(); + NodeTemplate vfInstance = getNodeTemplateByCustomizationUuid(serviceVfList, vfCustomizationId); + return getNodeTemplateBySdcType(vfInstance, Types.TYPE_VFC); + } + + //Assumed to be unique property for the list + private NodeTemplate getNodeTemplateByCustomizationUuid(List nodeTemplates, String customizationId){ + //TODO Metadata is missing + /*for (NodeTemplate nodeTemplate : nodeTemplates){ + if (nodeTemplate.getMetadata().getMetadataPropertyValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID).equals(customizationId)){ + return nodeTemplate; + } + }*/ + return null; + } + + @Override + public List getVfModulesByVf(String vfCustomizationUuid) { + List serviceVfList = getServiceVfList(); + List res = new ArrayList<>(); + NodeTemplate nodeTemplateByCustomizationUuid = getNodeTemplateByCustomizationUuid(serviceVfList, vfCustomizationUuid); + //Asked Yaniv about getGroups from NodeTemplate + /* + List groups = nodeTemplateByCustomizationUuid.; + for (Group group : groups){ + if (Types.TYPE_VFMODULE.equals(group.getType())){ + res.add(group); + } + }*/ + return res; + } + + //Metadata question + /*@Override + public String getMetadataPropertyValue(Metadata metadata, String metadataPropertyName) { + return metadata.getMetadataPropertyValue(metadataPropertyName); + }*/ + + @Override + public String getServiceInputLeafValue(String inputLeafValuePath) { + toscaTemplate.getTopologyTemplate().getNodeTemplates().get(0).getTypeDefinition().getType(); + return null;//getLeafPropertyValue(toscaTemplate, inputLeafValuePath); + } + + @Override + public String getServiceSubstitutionMappingsTypeName() { + return toscaTemplate.getTopologyTemplate().getSubstitutionMappings().getNodeDefinition().getType(); + } + + //Metadata question + /*@Override + public Metadata getServiceMetadata() { + return toscaTemplate.getMetadata(); + }*/ + + //Get property from group + @Override + public String getGroupPropertyLeafValue(Group group, String propertyName) { + return null;//getLeafPropertyValue(group, propertyName); + } + + private List getNodeTemplateBySdcType(NodeTemplate nodeTemplate, String sdcType){ + //Need metadata to fetch by type + + /*List nodeTemplates = nodeTemplate.getNestedNodeTemplates(); + List res = new ArrayList<>(); + for (NodeTemplate nodeTemplateEntry : nodeTemplates){ + if (nodeTemplateEntry.getMetadata().getMetadataPropertyValue(SdcPropertyNames.PROPERTY_NAME_TYPE).equals(sdcType)){ + res.add(nodeTemplateEntry); + } + }*/ + return null; + } + + private List getNodeTemplateBySdcType(TopologyTemplate topologyTemplate, String sdcType){ + //Need metadata to fetch by type + +/* List nodeTemplates = topologyTemplate.getNodeTemplates(); + List res = new ArrayList<>(); + for (NodeTemplate nodeTemplateEntry : nodeTemplates){ + if (nodeTemplateEntry.getMetadata().getMetadataPropertyValue(SdcPropertyNames.PROPERTY_NAME_TYPE).equals(sdcType)){ + res.add(nodeTemplateEntry); + } + } +*/ return null; + } + + @Override + public List getCpListByVf(String vfCustomizationId) { + List serviceVfList = getServiceVfList(); + NodeTemplate vfInstance = getNodeTemplateByCustomizationUuid(serviceVfList, vfCustomizationId); + return getNodeTemplateBySdcType(vfInstance, Types.TYPE_CP); + } + + @Override + public List getMembersOfGroup(Group group) { + //Can be done + return null;//toscaTemplate.getTopologyTemplate().getSubstitutionMappings().getNodeTemplates().get(0).get + } + + @Override + public List> getNodeTemplatePairsByReqName( + List listOfReqNodeTemplates, List listOfCapNodeTemplates, String reqName) { + //TODO - Can be done + return new ArrayList<>(); + } + + @Override + public List getAllottedResources() { + //TODO - Need metadata + return new ArrayList<>(); + } + + @Override + public String getTypeOfNodeTemplate(NodeTemplate nodeTemplate) { + //Can be done + return nodeTemplate.getTypeDefinition().getType(); + } + + +} diff --git a/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcPropertyNames.java b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcPropertyNames.java new file mode 100644 index 0000000..7d34c6f --- /dev/null +++ b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcPropertyNames.java @@ -0,0 +1,109 @@ +/*- + * ============LICENSE_START======================================================= + * sdc-distribution-client + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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.parser.impl; + +public class SdcPropertyNames { + public static String PROPERTY_NAME_INVARIANTUUID = "invariantUUID"; + public static String PROPERTY_NAME_UUID = "UUID"; + public static String PROPERTY_NAME_CUSTOMIZATIONUUID = "customizationUUID"; + public static String PROPERTY_NAME_VERSION = "version"; + + //Groups metadata + public static String PROPERTY_NAME_VFMODULEMODELINVARIANTUUID = "vfModuleModelInvariantUUID"; + public static String PROPERTY_NAME_VFMODULEMODELUUID = "vfModuleModelUUID"; + public static String PROPERTY_NAME_VFMODULECUSTOMIZATIONUUID = "vfModuleCustomizationUUID"; + public static String PROPERTY_NAME_VFMODULEMODELVERSION = "vfModuleModelVersion"; + public static String PROPERTY_NAME_VFMODULEMODELNAME = "vfModuleModelName"; + + //Groups properties + public static String PROPERTY_NAME_VFMODULETYPE = "vf_module_type"; + public static String PROPERTY_NAME_VFMODULELABEL = "vf_module_label"; + public static String PROPERTY_NAME_MINVFMODULEINSTANCES = "min_vf_module_instances"; + public static String PROPERTY_NAME_MAXVFMODULEINSTANCES = "max_vf_module_instances"; + public static String PROPERTY_NAME_INITIALCOUNT = "initial_count"; + + + public static String PROPERTY_NAME_DESCRIPTION = "description"; + public static String PROPERTY_NAME_TYPE = "type"; + public static String PROPERTY_NAME_CATEGORY = "category"; + public static String PROPERTY_NAME_SUBCATEGORY = "subcategory"; + public static String PROPERTY_NAME_RESOURCEVENDOR = "resourceVendor"; + public static String PROPERTY_NAME_RESOURCEVENDORRELEASE = "resourceVendorRelease"; + //VFC + public static String PROPERTY_NAME_NFCCODE = "nfc_code"; + public static String PROPERTY_NAME_VMTYPETAG = "vm_type_tag"; + public static String PROPERTY_NAME_VMTYPE = "vm_type"; + public static String PROPERTY_NAME_VFCNAMING_ECOMPGENERATEDNAMING="vfc_naming#ecomp_generated_naming"; + public static String PROPERTY_NAME_VFCNAMING_NAMINGPOLICY="vfc_naming#naming_policy"; + //VF + public static String PROPERTY_NAME_NFTYPE = "nf_type"; + public static String PROPERTY_NAME_NFROLE = "nf_role"; + public static String PROPERTY_NAME_NFFUNCTION = "nf_function"; + public static String PROPERTY_NAME_NFCODE = "nf_code"; + public static String PROPERTY_NAME_MININSTANCES = "min_instances"; + public static String PROPERTY_NAME_MAXINSTANCES = "max_instances"; + public static String PROPERTY_NAME_AVAILABILITYZONEMAXCOUNT = "availability_zone_max_count"; + public static String PROPERTY_NAME_AVAILABILITYZONECOUNT = "availability_zone_count"; + public static String PROPERTY_NAME_NAME = "name"; + public static String PROPERTY_NAME_VNFECOMPNAMING_ECOMPGENERATEDNAMING="vnf_ecomp_naming#ecomp_generated_naming"; + public static String PROPERTY_NAME_VNFECOMPNAMING_NAMINGPOLICY="vnf_ecomp_naming#naming_policy"; + public static String PROPERTY_NAME_ECOMPGENERATEDVMASSIGNMENTS = "ecomp_generated_vm_assignments"; + //Service + public static String PROPERTY_NAME_SERVICENAMING_DEFAULT_ECOMPGENERATEDNAMING="service_naming#default#ecomp_generated_naming"; + public static String PROPERTY_NAME_SERVICENAMING_DEFAULT_NAMINGPOLICY="service_naming#default#naming_policy"; + //VL + public static String PROPERTY_NAME_NETWORKTYPE="network_type"; + public static String PROPERTY_NAME_NETWORKROLE="network_role"; + public static String PROPERTY_NAME_NETWORKROLETAG="network_role_tag"; + public static String PROPERTY_NAME_NETWORKTECHNOLOGY="network_technology"; + public static String PROPERTY_NAME_NETWORKSCOPE="network_scope"; + public static String PROPERTY_NAME_NETWORKECOMPNAMING_ECOMPGENERATEDNAMING="network_ecomp_naming#ecomp_generated_naming"; + public static String PROPERTY_NAME_NETWORKECOMPNAMING_NAMINGPOLICY="network_ecomp_naming#naming_policy"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_ISSHAREDNETWORK="network_assignments#is_shared_network"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_ISEXTERNALNETWORK="network_assignments#is_external_network"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_ECOMPGENERATEDNETWORKASSIGNMENT="network_assignments#ecomp_generated_network_assignment"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_USEIPV4="network_assignments#ipv4_subnet_default_assignments#use_ipv4"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_IPNETWORKADDRESSPLAN="network_assignments#ipv4_subnet_default_assignments#ip_network_address_plan"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_DHCPENABLED="network_assignments#ipv4_subnet_default_assignments#dhcp_enabled"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_IPVERSION="network_assignments#ipv4_subnet_default_assignments#ip_version"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_CIDRMASK="network_assignments#ipv4_subnet_default_assignments#cidr_mask"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_MINSUBNETSCOUNT="network_assignments#ipv4_subnet_default_assignments#min_subnets_count"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_IPV6SUBNETDEFAULTASSIGNMENTS_USEIPV6="network_assignments#ipv6_subnet_default_assignments#use_ipv6"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_IPV6SUBNETDEFAULTASSIGNMENTS_IPNETWORKADDRESSPLAN="network_assignments#ipv6_subnet_default_assignments#ip_network_address_plan"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_IPV6SUBNETDEFAULTASSIGNMENTS_DHCPENABLED="network_assignments#ipv6_subnet_default_assignments#dhcp_enabled"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_IPV6SUBNETDEFAULTASSIGNMENTS_IPVERSION="network_assignments#ipv6_subnet_default_assignments#ip_version"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_IPV6SUBNETDEFAULTASSIGNMENTS_CIDRMASK="network_assignments#ipv6_subnet_default_assignments#cidr_mask"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_IPV6SUBNETDEFAULTASSIGNMENTS_MINSUBNETSCOUNT="network_assignments#ipv6_subnet_default_assignments#min_subnets_count"; + + /*public static String PROPERTY_NAME_NETWORKASSIGNMENTS_PROVIDERNETWORK_ISPROVIDERNETWORK="network_assignments#provider_network#is_provider_network"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_PROVIDERNETWORK_PHYSICALNETWORKNAME="network_assignments#provider_network#physical_network_name"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_PROVIDERNETWORK_NUMA="network_assignments#provider_network#numa"; + public static String PROPERTY_NAME_NETWORKASSIGNMENTS_PROVIDERNETWORK_PNICINSTANCE="network_assignments#provider_network#pnic_instance"; + */ + + public static String PROPERTY_NAME_PROVIDERNETWORK_ISPROVIDERNETWORK="provider_network#is_provider_network"; + public static String PROPERTY_NAME_PROVIDERNETWORK_PHYSICALNETWORKNAME="provider_network#physical_network_name"; + public static String PROPERTY_NAME_PROVIDERNETWORK_NUMA="provider_network#numa"; + public static String PROPERTY_NAME_PROVIDERNETWORK_PNICINSTANCE="provider_network#pnic_instance"; + + public static String PROPERTY_NAME_NETWORKFLOWS_ISBOUNDTOVPN="network_flows#is_bound_to_vpn"; + public static String PROPERTY_NAME_NETWORKFLOWS_VPNBINDING="network_flows#vpn_binding"; +} diff --git a/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/Types.java b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/Types.java new file mode 100644 index 0000000..9e71476 --- /dev/null +++ b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/Types.java @@ -0,0 +1,32 @@ +/*- + * ============LICENSE_START======================================================= + * sdc-distribution-client + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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.parser.impl; + +public class Types { + public static String TYPE_VFMODULE = "org.openecomp.groups.VfModule"; + + // types found under metadata, type property + public static String TYPE_CP = "CP"; + public static String TYPE_VL = "VL"; + public static String TYPE_VF = "VF"; + public static String TYPE_VFC = "VFC"; + public static String TYPE_SERVICE = "Service"; +} -- cgit 1.2.3-korg