<switch test='`$tmp.aai.cross-link.link-role`'>\r
<outcome value='cross-domain'>\r
<block atomic="true">\r
- <set>\r
- <parameter name='tmp.cross-link.src-ltpId' value="`$tmp.aai.cross-link.relationship-list.relationship[0].relationship-data[1].relationship-value`" />\r
- <parameter name='tmp.cross-link.dst-ltpId' value="`$tmp.aai.cross-link.relationship-list.relationship[1].relationship-data[1].relationship-value`" />\r
- <parameter name='tmp.src-pnf-name' value="`$tmp.aai.cross-link.relationship-list.relationship[0].relationship-data[0].relationship-value`" />\r
- <parameter name='tmp.dst-pnf-name' value="`$tmp.aai.cross-link.relationship-list.relationship[1].relationship-data[0].relationship-value`" />\r
- </set>\r
+ <for index='lridx' start='0' end='`$tmp.aai.cross-link.relationship-list.relationship_length`' >\r
+ <switch test='`$tmp.aai.cross-link.relationship-list.relationship[$lridx].related-to`'>\r
+ <outcome value='p-interface'>\r
+ <block>\r
+ <set>\r
+ <parameter name='tmp.cross-link.src-ltpId' value="`$tmp.aai.cross-link.relationship-list.relationship[$lridx].relationship-data[1].relationship-value`" />\r
+ <parameter name='tmp.cross-link.dst-ltpId' value="`$tmp.aai.cross-link.relationship-list.relationship[$lridx + 1].relationship-data[1].relationship-value`" />\r
+ <parameter name='tmp.src-pnf-name' value="`$tmp.aai.cross-link.relationship-list.relationship[$lridx].relationship-data[0].relationship-value`" />\r
+ <parameter name='tmp.dst-pnf-name' value="`$tmp.aai.cross-link.relationship-list.relationship[$lridx + 1].relationship-data[0].relationship-value`" />\r
+ </set>\r
+ <break/>\r
+ </block>\r
+ </outcome>\r
+ </switch>\r
+ </for>\r
<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" \r
resource="p-interface" \r
key="pnf.pnf-name = $tmp.src-pnf-name\r
AND depth = '0'"\r
pfx='tmp.aai.src-ttp' local-only='false' >\r
<outcome value='success'>\r
- <set>\r
- <parameter name='domain-A.ttp-id' value="`$tmp.aai.src-ttp.ttp-id`" />\r
- </set>\r
+ <block atomic="true">\r
+ <switch test='`$tmp.aai.src-ttp.relationship-list.relationship_length`'>\r
+ <outcome value=''>\r
+ <block></block>\r
+ </outcome>\r
+ <outcome value='0'>\r
+ <block></block>\r
+ </outcome>\r
+ <outcome value='Other'>\r
+ <for silentFailure='true' index='vidx' start='0' end='`$tmp.aai.src-ttp.relationship-list.relationship_length`' >\r
+ <switch test='`$tmp.aai.src-ttp.relationship-list.relationship[$vidx].related-to`'>\r
+ <outcome value='p-interface'>\r
+ <block atomic="true">\r
+ <set>\r
+ <parameter name='domain-A.ttp-id' value="`$tmp.aai.src-ttp.tunnel-tp-id`" />\r
+ </set>\r
+ </block>\r
+ </outcome>\r
+ </switch>\r
+ </for>\r
+ </outcome>\r
+ </switch>\r
+ </block>\r
</outcome>\r
</get-resource>\r
</block>\r
</get-resource>\r
<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" \r
resource="p-interface" \r
- key="pnf.pnf-name = $tmp.src-pnf-name\r
- AND p-interface.interface-name = $tmp.cross-link.src-ltpId"\r
+ key="pnf.pnf-name = $tmp.dst-pnf-name\r
+ AND p-interface.interface-name = $tmp.cross-link.dst-ltpId"\r
pfx='tmp.aai.dst-tp' local-only='false' >\r
<!--AND depth = '0'"-->\r
<outcome value='success'>\r
AND depth = '0'"\r
pfx='tmp.aai.dst-ttp' local-only='false' >\r
<outcome value='success'>\r
- <set>\r
- <parameter name='domain-B.ttp-id' value="`$tmp.aai.dst-ttp.ttp-id`" />\r
- </set>\r
+ <block atomic="true">\r
+ <switch test='`$tmp.aai.dst-ttp.relationship-list.relationship_length`'>\r
+ <outcome value=''>\r
+ <block></block>\r
+ </outcome>\r
+ <outcome value='0'>\r
+ <block></block>\r
+ </outcome>\r
+ <outcome value='Other'>\r
+ <for silentFailure='true' index='vidx' start='0' end='`$tmp.aai.dst-ttp.relationship-list.relationship_length`' >\r
+ <switch test='`$tmp.aai.dst-ttp.relationship-list.relationship[$vidx].related-to`'>\r
+ <outcome value='p-interface'>\r
+ <block atomic="true">\r
+ <set>\r
+ <parameter name='domain-B.ttp-id' value="`$tmp.aai.dst-ttp.tunnel-tp-id`" />\r
+ </set>\r
+ </block>\r
+ </outcome>\r
+ </switch>\r
+ </for>\r
+ </outcome>\r
+ </switch>\r
+ </block>\r
</outcome>\r
</get-resource>\r
</block>\r
</block>\r
</outcome>\r
</switch>\r
- <switch test='`$vidx`'>\r
- <outcome value='0'>\r
- <set>\r
- <parameter name='tmp.oofsolutions-first-src-pnf-name' value="`$tmp.aai.cross-link.relationship-list.relationship[0].relationship-data[0].relationship-value`" />\r
- <parameter name='tmp.oofsolutions-first-src-ltpId' value="`$tmp.aai.cross-link.relationship-list.relationship[0].relationship-data[1].relationship-value`" />\r
- </set>\r
- </outcome>\r
- <outcome value='`$otn-oof.solutions_length - 1`'>\r
- <set>\r
- <parameter name='tmp.oofsolutions-last-dst-pnf-name' value="`$tmp.aai.cross-link.relationship-list.relationship[1].relationship-data[0].relationship-value`" />\r
- <parameter name='tmp.oofsolutions-last-dst-ltpId' value="`$tmp.aai.cross-link.relationship-list.relationship[1].relationship-data[1].relationship-value`" />\r
- </set>\r
+ <switch test='`length($tmp.aai.cross-link.relationship-list.relationship) == 0`'>\r
+ <outcome value='true'></outcome>\r
+ <outcome value='false'>\r
+ <switch test='`$vidx`'>\r
+ <outcome value='0'>\r
+ <for index='lridx' start='0' end='`$tmp.aai.cross-link.relationship-list.relationship_length`' >\r
+ <switch test='`$tmp.aai.cross-link.relationship-list.relationship[$lridx].related-to`'>\r
+ <outcome value='p-interface'>\r
+ <block>\r
+ <set>\r
+ <parameter name='tmp.oofsolutions-first-src-pnf-name' value="`$tmp.aai.cross-link.relationship-list.relationship[$lridx].relationship-data[0].relationship-value`" />\r
+ <parameter name='tmp.oofsolutions-first-src-ltpId' value="`$tmp.aai.cross-link.relationship-list.relationship[$lridx].relationship-data[1].relationship-value`" />\r
+ </set>\r
+ <break/>\r
+ </block>\r
+ </outcome>\r
+ </switch>\r
+ </for>\r
+ </outcome>\r
+ <outcome value='`$otn-oof.solutions_length - 1`'>\r
+ <for index='lridx' start='0' end='`$tmp.aai.cross-link.relationship-list.relationship_length`' >\r
+ <switch test='`$tmp.aai.cross-link.relationship-list.relationship[$lridx].related-to`'>\r
+ <outcome value='p-interface'>\r
+ <block>\r
+ <set>\r
+ <parameter name='tmp.oofsolutions-last-dst-pnf-name' value="`$tmp.aai.cross-link.relationship-list.relationship[$lridx + 1].relationship-data[0].relationship-value`" />\r
+ <parameter name='tmp.oofsolutions-last-dst-ltpId' value="`$tmp.aai.cross-link.relationship-list.relationship[$lridx + 1].relationship-data[1].relationship-value`" />\r
+ </set>\r
+ <break/>\r
+ </block>\r
+ </outcome>\r
+ </switch>\r
+ </for>\r
+ </outcome>\r
+ </switch>\r
</outcome>\r
</switch>\r
</block>\r