Interfaces support in SDC Parser
[sdc/sdc-tosca.git] / src / main / java / org / onap / sdc / tosca / parser / api / ISdcCsarHelper.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * sdc-distribution-client
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  * ============LICENSE_END=========================================================
18  */
19 package org.onap.sdc.tosca.parser.api;
20
21
22 import java.util.ArrayList;
23 import java.util.List;
24 import java.util.Map;
25
26 import org.apache.commons.lang3.tuple.Pair;
27 import org.onap.sdc.tosca.parser.impl.SdcTypes;
28 import org.onap.sdc.tosca.parser.impl.FilterType;
29 import org.onap.sdc.toscaparser.api.*;
30 import org.onap.sdc.toscaparser.api.elements.InterfacesDef;
31 import org.onap.sdc.toscaparser.api.elements.Metadata;
32 import org.onap.sdc.toscaparser.api.parameters.Input;
33
34
35 public interface ISdcCsarHelper {
36
37         /**
38          * Get all node templates by node_type for this CSAR service.
39          *  
40          * @param nodeType - the TOSCA type of the node.
41          * @return service node templates of this type.
42          */
43         public List<NodeTemplate> getServiceNodeTemplatesByType(String nodeType);
44
45         /**
46          * Get all node templates for this CSAR service.
47          *
48          * @return service node templates.
49          */
50         public List<NodeTemplate> getServiceNodeTemplates();
51
52         /**
53          * Get groups of a VF with type "org.onap.groups.VfModule".
54          * 
55          * @param vfCustomizationUuid - customizationUuid of VF instance.
56          * @return list of vfModule groups.
57          */
58         public List<Group> getVfModulesByVf(String vfCustomizationUuid);
59
60
61         /**
62          * Get any property leaf value for node template by full path separated by #.<br>
63          * For example, for node template with this property:<br><br>
64          *   network_assignments:<br>
65           &nbsp;&nbsp;ecomp_generated_network_assignment: true<br>
66           &nbsp;&nbsp;is_shared_network: false<br>
67           &nbsp;&nbsp;is_external_network: false<br>
68           &nbsp;&nbsp;ipv4_subnet_default_assignments:<br>
69             &nbsp;&nbsp;&nbsp;&nbsp;use_ipv4: true<br>
70             &nbsp;&nbsp;&nbsp;&nbsp;ip_network_address_plan: 1.2.3.4<br>
71             &nbsp;&nbsp;&nbsp;&nbsp;dhcp_enabled: true<br>
72             &nbsp;&nbsp;&nbsp;&nbsp;ip_version: 4<br>
73             &nbsp;&nbsp;&nbsp;&nbsp;cidr_mask: 24<br>
74             &nbsp;&nbsp;&nbsp;&nbsp;min_subnets_count: 1<br>
75           &nbsp;&nbsp;ipv6_subnet_default_assignments:<br>
76             &nbsp;&nbsp;&nbsp;&nbsp;use_ipv6: false<br><br>
77             
78          * calling<br> 
79          * getNodeTemplatePropertyLeafValue(nodeTemplate, "network_assignments#ipv6_subnet_default_assignments#use_ipv6")<br> 
80          * will return "false".
81          * @param nodeTemplate - nodeTemplate where the property should be looked up.
82          * @param pathToPropertyLeafValue - the full path of the required property.
83          * @return the leaf value as String, or null if there's no such property, or it's not a leaf.
84          */
85         public String getNodeTemplatePropertyLeafValue(NodeTemplate nodeTemplate, String pathToPropertyLeafValue);
86
87         /**
88          * Get any property leaf value for node template by full path separated by #.<br>
89          * For example, for node template with this property:<br><br>
90          *   network_assignments:<br>
91          &nbsp;&nbsp;ecomp_generated_network_assignment: true<br>
92          &nbsp;&nbsp;is_shared_network: false<br>
93          &nbsp;&nbsp;is_external_network: false<br>
94          &nbsp;&nbsp;ipv4_subnet_default_assignments:<br>
95          &nbsp;&nbsp;&nbsp;&nbsp;use_ipv4: true<br>
96          &nbsp;&nbsp;&nbsp;&nbsp;ip_network_address_plan: 1.2.3.4<br>
97          &nbsp;&nbsp;&nbsp;&nbsp;dhcp_enabled: true<br>
98          &nbsp;&nbsp;&nbsp;&nbsp;ip_version: 4<br>
99          &nbsp;&nbsp;&nbsp;&nbsp;cidr_mask: 24<br>
100          &nbsp;&nbsp;&nbsp;&nbsp;min_subnets_count: 1<br>
101          &nbsp;&nbsp;ipv6_subnet_default_assignments:<br>
102          &nbsp;&nbsp;&nbsp;&nbsp;use_ipv6: false<br><br>
103
104          * calling<br>
105          * getNodeTemplatePropertyLeafValue(nodeTemplate, "network_assignments#ipv6_subnet_default_assignments#use_ipv6")<br>
106          * will return "false".
107          * @param nodeTemplate - nodeTemplate where the property should be looked up.
108          * @param pathToPropertyLeafValue - the full path of the required property.
109          * @return the leaf value as Object, or null if there's no such property. It's up to the caller to cast it to a proper type.
110          */
111         public Object getNodeTemplatePropertyAsObject(NodeTemplate nodeTemplate, String pathToPropertyLeafValue);
112
113         /**
114          * Get any property leaf value for a group definition by full path separated by #.
115          * Same logic as in {@link #getNodeTemplatePropertyLeafValue(NodeTemplate, String) getNodeTemplatePropertyLeafValue}, only for a group.
116          * @param group - group where the property should be looked up.
117          * @param propertyName - the name of the required property.
118          * @return the leaf value as String, or null if there's no such property, or it's not a leaf.
119          */
120         public String getGroupPropertyLeafValue(Group group, String propertyName);
121
122         /**
123          * Get any property value for a group definition by full path separated by #.
124          * Same logic as in {@link #getNodeTemplatePropertyLeafValue(NodeTemplate, String) getNodeTemplatePropertyLeafValue}, only for a group.
125          * @param group - group where the property should be looked up.
126          * @param propertyName - the name of the required property.
127          * @return the leaf value as Object, or null if there's no such property. It's up to the caller to cast it to a proper type.
128          */
129         public Object getGroupPropertyAsObject(Group group, String propertyName);
130
131         /**
132          * Get all VL node templates of the CSAR service.
133          * @return - all VL node templates.
134          */
135         public List<NodeTemplate> getServiceVlList();
136
137         /**
138          * Get all VF node templates of the CSAR service.
139          * @return - all VF node templates.
140          */
141         public List<NodeTemplate> getServiceVfList();
142
143
144         /**
145          * 
146          * Get a property from a metadata object.<br>
147          * This is just sugaring method, same as calling metadata.getMetadataPropertyValue(metadataPropertyName).<br>
148          * 
149          * For metadata object representing the below: <br><br>
150          * 
151          *  metadata:<br>
152         &nbsp;&nbsp;invariantUUID: 4598a404-00e1-42a6-8767-0bda343e2066<br>
153         &nbsp;&nbsp;UUID: e17940d6-42f8-4989-bad0-31de5addc619<br>
154         &nbsp;&nbsp;customizationUUID: 83d086b2-a861-4d3b-aa84-3bfbb9b2ec20<br>
155         &nbsp;&nbsp;version: '0.1'<br>
156         &nbsp;&nbsp;name: vIPR_ATM<br>
157         &nbsp;&nbsp;description: vIPR_ATM<br>
158         &nbsp;&nbsp;type: VF<br>
159         &nbsp;&nbsp;category: category1<br>
160         &nbsp;&nbsp;subcategory: subCategory1<br><br>
161         
162         calling<br> 
163         getMetadataPropertyValue(metadata,"invariantUUID")<br>
164         will return "4598a404-00e1-42a6-8767-0bda343e2066".
165         
166          * @param metadata - metadata object.
167          * @param metadataPropertyName - the name of the metadata property.
168          * @return metadata property value
169          */
170         public String getMetadataPropertyValue(Metadata metadata, String metadataPropertyName);
171         
172         
173         /**
174          * Get input leaf value for the CSAR service, by full path separated by #.<br>
175          * Same logic as in {@link #getNodeTemplatePropertyLeafValue(NodeTemplate, String) getNodeTemplatePropertyLeafValue}, only for an input full path.
176          * The expected format is "input_name#default[optionally #rest_of_path]"
177          * @param inputLeafValuePath by full path separated by #.
178          * @return input leaf value for the service.
179          */
180         public String getServiceInputLeafValueOfDefault(String inputLeafValuePath);
181
182         /**
183          * Get input leaf value for the CSAR service, by full path separated by #.<br>
184          * Same logic as in {@link #getNodeTemplatePropertyLeafValue(NodeTemplate, String) getNodeTemplatePropertyLeafValue}, only for an input full path.
185          * The expected format is "input_name#default[optionally #rest_of_path]"
186          * @param inputLeafValuePath by full path separated by #.
187          * @return input value for the service as Object. It's up to the caller to cast it to a proper type.
188          */
189         public Object getServiceInputLeafValueOfDefaultAsObject(String inputLeafValuePath);
190
191         /**
192          * Get the type name of the CSAR service's substitution mappings element.<br> 
193          * 
194          * For the below:<br><br>
195          * 
196          * substitution_mappings:<br>
197        &nbsp;&nbsp;type: org.onap.services.ViprATM<br>
198
199         calling<br> 
200         getServiceSubstitutionMappingsTypeName()<br>
201          will return "org.onap.services.ViprATM"
202          * @return - the type name of the CSAR service's substitution mappings element
203          */
204         public String getServiceSubstitutionMappingsTypeName();
205         
206         /**
207          * Get service Metadata object.<br>
208          * This object represents the "metadata" section of a CSAR service.
209          * @return - the service Metadata object.
210          */
211         public Metadata getServiceMetadata();
212
213         /**
214          * Get the CSAR service metadata as map.
215          * @return - the service metadata object as Map.
216          * @deprecated This function is deprecated since its not tosca compliant. <br>
217          * Tosca defines the Metadata section as map of string (not map of object).<br>
218          *  This function is targeted to be removed as part of 1802.<br>
219          * Please use {@link #getServiceMetadataAllProperties() getServiceMetadataAllProperties()}.
220          */
221         @Deprecated
222         public Map<String, Object> getServiceMetadataProperties();
223
224         /**
225          * Get the CSAR service metadata as map
226          * @return - the service metadata object as Map
227          */
228         public Map<String, String> getServiceMetadataAllProperties();
229
230         /**
231          * Get all VFC node templates from a specified VF.
232          * @param vfCustomizationId - customizationUuid of the VF node template.
233          * @return all VFC node templates from a specified VF
234          */
235         public List<NodeTemplate> getVfcListByVf(String vfCustomizationId);
236         
237         /**
238          * Get all CP node templates from a specified VF.
239          * @param vfCustomizationId - customizationUuid of the VF node template.
240          * @return all CP node templates from a specified VF
241          */
242         public List<NodeTemplate> getCpListByVf(String vfCustomizationId);
243         
244         /**
245          * Get all members of this group definition.<br>
246          * 
247          * For example, for this group definition:<br><br>
248          * 
249          *   ViprAtm..vIPR-ATM-Base..module-0:<br>   
250       &nbsp;&nbsp;type: org.onap.groups.VfModule<br>      
251       &nbsp;&nbsp;.................<br>
252       &nbsp;&nbsp;members: [vIPR_ATM_Ha_Two, vIPR_ATM_Ha_One, vIPR_ATM_OAM_SG, vIPR_ATM_HA_TWO_SG, vIPR_ATM_HA_ONE_SG]<br><br>
253       
254       calling<br> 
255       getMembersOfVfModule(NoteTemplate vfNodeTemplate, Group group)<br>
256       will return List of the following Node templates in the vfNodeTemplate: "vIPR_ATM_Ha_Two, vIPR_ATM_Ha_One, vIPR_ATM_OAM_SG, vIPR_ATM_HA_TWO_SG, vIPR_ATM_HA_ONE_SG"<br>
257          * @param vf - VF to return the node templates from.
258          * @param vfModule - group to return the members from.
259          * @return node templates from vf with the names as in members section.
260      * 
261          */
262         public List<NodeTemplate> getMembersOfVfModule(NodeTemplate vf, Group vfModule);
263         
264         
265         /**
266          * Get list of node template pairs, where for each pair,<br> 
267          * the left node template in pair has requirement with name reqName, <br>
268          * which should be satisfied with respective capability by the right node template in pair.<br>
269          * 
270          * For example, if we have the below two node templates in the vIPR VF:<br><br>
271          * 
272          * oam_extCP:<br>
273       &nbsp;&nbsp;type: org.onap.resources.cp.extCP<br> 
274       &nbsp;&nbsp;requirements:<br>
275         &nbsp;&nbsp;&nbsp;&nbsp;- virtualBinding: vipr_atm_firewall<br><br>
276          * 
277          * vipr_atm_firewall: <br>
278       &nbsp;&nbsp;type: org.onap.resources.vfc.ViprAtm.abstract.nodes.heat.vipr_atm<br>
279       ........<br><br>
280          * 
281         
282      * calling<br>
283      * getNodeTemplatePairsByReqName(getCpListByVf(viprCustomUuid), getVfcListByVf(viprCustomUuid), "virtualBinding")<br>
284      * will return a list with one Pair - where left element of pair will be "oam_extCP" node template,<br>
285      * and right element will be "vipr_atm_firewall" node template.<br>
286      * 
287          * @param listOfReqNodeTemplates - list of node templates in which the "reqName" requirement should be looked.
288          * @param listOfCapNodeTemplates - list of node templates in which the capability matching the "reqName" requirement should be looked.
289          * @param reqName - the name of a requirement definition to match by.
290          * @return pairs of node templates according to described above.
291          */
292         public List<Pair<NodeTemplate,NodeTemplate>> getNodeTemplatePairsByReqName(List<NodeTemplate> listOfReqNodeTemplates, List<NodeTemplate> listOfCapNodeTemplates, String reqName);
293         
294         /**
295          * Get all allotted node templates from this service.
296          * @return all allotted node templates from this service.
297          */
298         public List<NodeTemplate> getAllottedResources();
299         
300         /**
301          * Get node_type of a node template.<br>
302          * 
303          * For this node template:<br>
304          * 
305          * vipr_atm_firewall: <br>
306       &nbsp;&nbsp;type: org.onap.resources.vfc.ViprAtm.abstract.nodes.heat.vipr_atm<br>
307       ........<br><br>
308      * 
309      * the function will return "org.onap.resources.vfc.ViprAtm.abstract.nodes.heat.vipr_atm"
310      *  
311          * @param nodeTemplate - node template object
312          * @return - node type string.
313          */
314         public String getTypeOfNodeTemplate(NodeTemplate nodeTemplate);
315
316         /**
317          * Get the CSAR service inputs list.
318          * @return - the service inputs list.
319          */
320         public List<Input> getServiceInputs();
321
322         
323         /**
324          * Get the conformance level of this CSAR. <br>
325          * The conformance level value of the CSAR is located in csar.meta file at the top level of the CSAR file.<br>
326          * For 1707 CSARs, the conformance level is 3.0.
327          * @return the conformance level of the CSAR. 
328          */
329         public String getConformanceLevel();
330         
331         
332         /**
333          * Get the map of CP-related props from a VFC node template. <br>
334          * Let's say there are 5 CPs related to this VFC. Then the output will look like this: <br><br>
335          * {port_fe1_sigtran={ip_requirements#ip_count_required#count=1, ip_requirements#dhcp_enabled=true, ip_requirements#ip_version=4, subnetpoolid="subnet_1", network_role_tag="SIGNET_vrf_B1_direct"},<br> 
336          *  port_fe_cluster={ip_requirements#ip_count_required#count=2, ip_requirements#dhcp_enabled=true, ip_requirements#ip_version=4},<br>
337          *  port_fe_slan={ip_requirements#ip_count_required#count=1, ip_requirements#dhcp_enabled=true, ip_requirements#ip_version=4},<br> 
338          *  port_fe_interce={ip_requirements#ip_count_required#count=1, ip_requirements#dhcp_enabled=true, ip_requirements#ip_version=4},<br> 
339          *  port_fe_oam={ip_requirements#ip_count_required#count=2, ip_requirements#dhcp_enabled=true, ip_requirements#ip_version=4, subnetpoolid="subnet_2", network_role_tag="Mobility_OAM_protected"}}<br><br>
340          * @param vfc - VFC node template to look for CP-related props.
341          * @return map <b>CP node template name</b>  to a map of <b>full path to a property on this CP</b> - <b> value of this property on this CP</b>.
342          * @deprecated This function is deprecated since its flattened form doesn't provide solution for cp properties of type List.
343          * Will be removed in 1802.
344          */
345         @Deprecated 
346         public Map<String, Map<String, Object>> getCpPropertiesFromVfc(NodeTemplate vfc);
347         
348     /**
349     * Get the map of CP-related props from a VFC node template. <br>
350     * Let's say there are 2 CPs (ports) related to this VFC. Then the output will look like this: <br><br>
351     * {port_fe_sigtran={ip_requirements={ip_count_required: {count: 1}, dhcp_enabled: true, ip_version: 4}, subnetpoolid: "subnet_1", network_role_tag: "SIGNET_vrf_B1_direct"}<br>
352     *  port_fe_cluster={ip_requirements={ip_count_required: {count: 2}, dhcp_enabled: true, ip_version: 4}}<br>
353     * @param vfc - VFC node template to look for CP-related props.
354     * @return map <b>CP node template name</b>  to a map of <b>property name</b> - <b> property value as object</b>.
355     */
356     public Map<String, Map<String, Object>> getCpPropertiesFromVfcAsObject(NodeTemplate vfc);
357         
358         /**
359          * Get customization UUID of a node template
360          * @param nt - node template
361          * @return customization UUID of a node template.
362          */
363         public String getNodeTemplateCustomizationUuid(NodeTemplate nt);
364
365     /**
366      * Filter Node Template property values by equals/contains operator and a pattern
367      * @param nodeTemplate Node Template to filter its properties
368      * @param filterType filter type - equals or contains
369      * @param pattern value to filter with it
370      * @return Map <b>full path to a property</b> mapped to <b>property value</b> filtered by type and pattern
371      */
372     public Map<String, String> filterNodeTemplatePropertiesByValue(NodeTemplate nodeTemplate, FilterType filterType, String pattern);
373     
374         /**
375          * Get all node templates by sdcType for parent Node Template.
376          *
377          * @param parentNodeTemplate - parent node template
378          * @param sdcType - the SDC type of the node.
379          * @return node templates of this SDC type.
380          */
381         public List<NodeTemplate> getNodeTemplateBySdcType(NodeTemplate parentNodeTemplate, SdcTypes sdcType);
382
383         /**
384          * Get all node templates by SDC type enum for this CSAR service.
385          *
386          * @param sdcType - the SDC type of the node (for example, CP, VF...).
387          * @return service node templates of this SDC type.
388          */
389         public List<NodeTemplate> getServiceNodeTemplateBySdcType(SdcTypes sdcType);
390         
391         /**
392          * Get all node templates  for this CSAR service.
393          * @param vfCustomizationUuid - the Customization UUID of the node.
394          * @return VNF Configuration Node Template.
395          */
396         public NodeTemplate getVnfConfig(String vfCustomizationUuid);
397
398         /**
399          * Check if Node Template has Topology Template
400          * @param nodeTemplate - Node Template to check
401          * @return true if node template has topology template, false if not.
402          */
403         public boolean hasTopology(NodeTemplate nodeTemplate);
404
405         /**
406          * Get children node templates for node template.
407          * @param nodeTemplate - Node Template to get its children
408          * @return return list of children node templates for node template.
409          */
410         public List<NodeTemplate> getNodeTemplateChildren(NodeTemplate nodeTemplate);
411
412         /**
413          * Get node template on service level by node template name.
414          * @param nodeName - the name of the node template.
415          * @return service-level node template with this name, or null if no such node template was found.
416          */
417         public NodeTemplate getServiceNodeTemplateByNodeName(String nodeName);
418
419         /**
420          * Get node template Metadata object.<br>
421          * This object represents the "metadata" section of node template.
422          * @param nt - Node template to get its Metadata object.
423          * @return Metadata for this node template, or null if not found.
424          */
425         public Metadata getNodeTemplateMetadata(NodeTemplate nt);
426
427         /**
428          * Get CapabilityAssignments object for this node template.<br>
429          * This should be an entry point function for working with capability assignments of node template.<br>
430          * This object allows filtering capability assignments objects.<br>
431          * @param nt - Node Template to get its capability assignments.
432          * @return CapabilitiesAssignments that contains list of capability assignments for the node template.<br>
433          * If none found, an empty list will be returned.
434          */
435         public CapabilityAssignments getCapabilitiesOf(NodeTemplate nt);
436
437         /**
438          * Get RequirementAssignments object for this node template.<br>
439          * This should be an entry point function for working with requirement assignments of node template.<br>
440          * This object allows filtering requirement assignments objects.<br>
441          * @param nt - Node Template to get its requirement assignments.
442          * @return RequirementAssignments that contains list of requirement assignments for the node template.
443          * If none found, an empty list will be returned.
444          */
445         public RequirementAssignments getRequirementsOf(NodeTemplate nt);
446
447         /**
448          * Get any property leaf value for capability by full path separated by #.
449          * Same logic as in {@link #getNodeTemplatePropertyLeafValue(NodeTemplate, String) getNodeTemplatePropertyLeafValue}, only for a capability assignment.
450          * @param capability - capability assignment where the property should be looked up.
451          * @param pathToPropertyLeafValue - the full path of the required property.
452          * @return the leaf value as String, or null if there's no such property, or it's not a leaf.
453          */
454         public String getCapabilityPropertyLeafValue(CapabilityAssignment capability, String pathToPropertyLeafValue);
455         
456         /**
457          * Get all the policies of the main topology template (either VF or service)
458          * @return      the list of the policies
459          */
460         public List<Policy> getPoliciesOfTopologyTemplate();
461         
462         /**
463          * Get all the policies of the main topology template (either VF or service) specified by policy type
464          * @param policyTypeName        the name of the policy type
465          * @return                                      the list of the policies                                                
466          */
467         public List<Policy> getPoliciesOfTopologyTemplateByToscaPolicyType(String policyTypeName);
468         
469         /**
470          * Get all the policies of the origin component (nested topology template) of the node template
471          * @param nodeTemplate  the node template
472          * @return                              the list of the policies
473          */
474         public List<Policy> getPoliciesOfOriginOfNodeTemplate(NodeTemplate nodeTemplate);
475         
476         /**
477          * Get all the policies of the origin component (nested topology template) of the node template specified by policy type
478          * @param nodeTemplate          the node template
479          * @param policyTypeName        the name of the policy type
480          * @return                                      the list of the policies
481          */
482         public List<Policy> getPoliciesOfOriginOfNodeTemplateByToscaPolicyType(NodeTemplate nodeTemplate, String policyTypeName);
483         
484         /**
485          * Get all the node templates of the topology template, which are the targets of the policy specified by name
486          * @param policyName    the name of the policy
487          * @return                              the list of the node templates
488          */
489         public List<NodeTemplate> getPolicyTargetsFromTopologyTemplate(String policyName);
490         
491         /**
492          * Get all the node templates of the origin component (nested topology template) of node template, which are the targets of the policy specified by name
493          * @param nodeTemplate  the node template
494          * @param policyName    the name of the policy
495          * @return                              the list of the node templates
496          */
497         public List<NodeTemplate> getPolicyTargetsFromOrigin(NodeTemplate nodeTemplate, String policyName);
498         
499         /**
500          * Get the node template of the topology template specified by name
501          * @param nodeTemplateName      the name of the node template
502          * @return                                      the node template
503          */
504         public NodeTemplate getNodeTemplateByName(String nodeTemplateName);
505     
506     /**
507      * Get all the policies, which contain the specified node template as a target
508      * @param targetNode        the node template
509      * @return                          the list of the policies
510      */
511         public List<Policy> getPoliciesOfTarget(NodeTemplate targetNode);
512         
513         /**
514          * Get all the policies of the specified type, which contain the specified node template as a target
515          * @param nodeTemplate          the node template
516          * @param policyTypeName        the name of the policy type
517          * @return                                      the list of the policies
518          */
519     public List<Policy> getPoliciesOfTargetByToscaPolicyType(NodeTemplate nodeTemplate, String policyTypeName);
520
521     /**
522      * Get all the groups of the origin component (nested topology template) of the node template
523      * @param               nodeTemplate  the node template
524      * @return              the list of the groups
525      */
526     public ArrayList<Group> getGroupsOfOriginOfNodeTemplate(NodeTemplate nodeTemplate);
527     
528     /**
529      * Get all groups of this of the main topology template (either VF or service) by specified tosca group type
530      * @param groupType     the group type
531      * @return              the list of the groups
532      */
533     public ArrayList<Group> getGroupsOfTopologyTemplateByToscaGroupType(String groupType);
534     
535     /**
536      * Get all groups of this of the main topology template (either VF or service)
537      * @return              the list of the groups
538      */
539     public ArrayList<Group> getGroupsOfTopologyTemplate();
540     
541     /**
542      * Get all groups of this of the origin component (nested topology template) of the node template by specified tosca group type
543      * @param nodeTemplate  the node template
544      * @param groupType     the group type
545      * @return              the list of the groups
546      */
547      public ArrayList<Group> getGroupsOfOriginOfNodeTemplateByToscaGroupType(NodeTemplate nodeTemplate, String groupType);
548     
549     /**
550      * Get members of the group belongs to the main topology template (either VF or service) by group name
551      * @param groupName     the name of the group
552      * @return              the list of the node templates
553      */
554     public List<NodeTemplate> getGroupMembersFromTopologyTemplate(String groupName);
555     
556     /**
557      * Get members of the group belongs to the origin component (nested topology template) of the node template by group name
558      * @param nodeTemplate  the node template
559      * @param groupName     the name of the group
560      * @return              the list of the node templates
561      */
562     public List<NodeTemplate> getGroupMembersOfOriginOfNodeTemplate(NodeTemplate nodeTemplate, String groupName);
563
564         /**
565          * Get all interface details for given node template.<br>
566          * @return Map that contains the list of all interfaces and their definitions.
567          * If none found, an empty map will be returned.
568          */
569         public Map<String, List<InterfacesDef>> getInterfacesOf(NodeTemplate nt);
570
571         /**
572          * Get all interface names for given node template.<br>
573          * @return List that contains the name of all interfaces.
574          * If none found, an empty list will be returned.
575          */
576         public List<String> getInterfaces(NodeTemplate nt);
577
578         /**
579          * Get all details for given node template and interface name.<br>
580          * @return List that contains the definitions of given interface name.
581          * If none found, an empty list will be returned.
582          */
583         public List<InterfacesDef> getInterfaceDetails(NodeTemplate nt, String interfaceName);
584
585         /**
586          * Get all operation names for given node template and interface name.<br>
587          * @return List that contains the name of all operations for a given node template and interface name.
588          * If none found, an empty list will be returned.
589          */
590         public List<String> getAllInterfaceOperations(NodeTemplate nt, String interfaceName);
591
592         /**
593          * Get interface details for a given node template, interface name and operation name.<br>
594          * @return InterfaceDef representing the operation details.
595          * If none found, null will be returned.
596          */
597         public InterfacesDef getInterfaceOperationDetails(NodeTemplate nt, String interfaceName, String operationName);
598
599 }