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