2 xmlns='http://www.onap.org/sdnc/svclogic'
3 xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>
4 <method rpc='port-mirror-topology-operation-mapping-pprobe' mode='sync'>
6 <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
7 resource="l-interfaces"
8 key="pnf.pnf-name = $tmp.dest-pnf-name AND
9 p-interface.interface-name = $tmp.dest-p-interface AND depth='all'"
10 pfx='aai.pnf.p-interface' local-only='false' >
11 <outcome value='not-found'>
12 <return status='failure'>
13 <parameter name='ack-final' value='Y'/>
14 <parameter name="error-code" value="500" />
15 <parameter name="error-message" value="Destination L-Interfaces are not set for the Destination PNF" />
18 <outcome value='failure'>
19 <return status='failure'>
20 <parameter name='ack-final' value='Y'/>
21 <parameter name="error-code" value="500" />
22 <parameter name="error-message" value="Error retrieving l-interfaces from AAI" />
26 <switch test='`$aai.pnf.p-interface.l-interface_length > 0`'>
27 <outcome value='false'>
28 <return status='failure'>
29 <parameter name='ack-final' value='Y'/>
30 <parameter name="error-code" value="500" />
31 <parameter name="error-message" value="Destination L-Interface is not set for the Destination PNF" />
36 <parameter name='tmp.found-one' value='false' />
38 <for index='idx' start='0' end='`$aai.pnf.p-interface.l-interface_length`' >
39 <switch test='`$aai.pnf.p-interface.l-interface[$idx].l3-interface-ipv4-address-list[0].l3-interface-ipv4-address`'>
41 <switch test='`$aai.pnf.p-interface.l-interface[$idx].l3-interface-ipv6-address-list[0].l3-interface-ipv6-address`'>
45 <outcome value='Other'>
48 <parameter name='tmp.found-one' value='true' />
55 <outcome value='Other'>
58 <parameter name='tmp.found-one' value='true' />
65 <switch test='`$tmp.found-one`'>
66 <outcome value='false'>
67 <return status='failure'>
68 <parameter name='error-code' value='500' />
69 <parameter name='error-message' value='Destination Port IP Address is not set for the Destination PNF' />
74 <parameter name='map-idx' value='0' />
76 <for silentFailure='true' index='vnfc-so-idx' start='0' end='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.src-vnfc-idx].vnfc-objects.vnfc-object_length`' >
77 <for silentFailure='true' index='vnic-s-idx' start='0' end='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.src-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-so-idx].vnics.vnic_length`' >
80 <parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$map-idx].source-port-id'
81 value='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.src-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-so-idx].vnics.vnic[$vnic-s-idx].vnic-port-id`' />
82 <parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$map-idx].source-port-name'
83 value='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.src-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-so-idx].vnics.vnic[$vnic-s-idx].vnic-port-name`' />
84 <parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$map-idx].source-vserver-id'
85 value='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.src-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-so-idx].vserver-id`' />
86 <parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$map-idx].dest-port-id'
87 value='`$aai.pnf.p-interface.l-interface[$idx].interface-id`' />
88 <parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$map-idx].dest-port-name'
89 value='`$aai.pnf.p-interface.l-interface[$idx].interface-name`' />
90 <parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$map-idx].dest-ip-addresses.ip-addresses.ipv4-address'
91 value='`$aai.pnf.p-interface.l-interface[$idx].l3-interface-ipv4-address-list[0].l3-interface-ipv4-address`' />
92 <parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$map-idx].dest-ip-addresses.ip-addresses.ipv6-address'
93 value='`$aai.pnf.p-interface.l-interface[$idx].l3-interface-ipv6-address-list[0].l3-interface-ipv6-address`' />
96 <parameter name='map-idx' value='`$map-idx + 1`' />
102 <parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map_length'
103 value='`$map-idx`' />
105 <return status='success'></return>