diff options
author | 2020-02-29 00:25:00 +0000 | |
---|---|---|
committer | 2020-03-04 01:30:24 +0000 | |
commit | 58acc1cd194f7d61b22f875bccc6738e6dfb0b7c (patch) | |
tree | 81e28b23e190941c70aec08b6fc9d887bce64d67 /platform-logic/datachange/src/main/xml/DataChange_update-open-ended-links.xml | |
parent | 329b7c6477ec677507b0de33a053f887526b3d84 (diff) |
Adding support for multi-layer and multi-domain topology discovery for CCVPN
Issue-ID: SDNC-899
Change-Id: I20f9d82e2488be3f90ef2566511787c69b6f7ed0
Signed-off-by: Hesam Rahimi <hesam.rahimi@huawei.com>
Former-commit-id: e5d3e8b2548f4cfe234e7d35733964e803cc0594
Diffstat (limited to 'platform-logic/datachange/src/main/xml/DataChange_update-open-ended-links.xml')
-rw-r--r-- | platform-logic/datachange/src/main/xml/DataChange_update-open-ended-links.xml | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/platform-logic/datachange/src/main/xml/DataChange_update-open-ended-links.xml b/platform-logic/datachange/src/main/xml/DataChange_update-open-ended-links.xml new file mode 100644 index 00000000..1919ec0f --- /dev/null +++ b/platform-logic/datachange/src/main/xml/DataChange_update-open-ended-links.xml @@ -0,0 +1,101 @@ +<service-logic + xmlns='http://www.onap.org/sdnc/svclogic' + xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='DataChange' version='${project.version}'> + <method rpc='update-open-ended-links' mode='sync'> + <block atomic="true"> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="logical-links" + pfx='tmp.aai.logical-links' local-only='false' > + <outcome value='success'> + <for index='llidx' start='0' end='`$tmp.aai.logical-links.logical-link_length`' > + <block atomic="true"> + <set> + <parameter name='src-tpId' value='`$tmp.aai.logical-links.logical-link[$llidx].relationship-list.relationship[0].relationship-data[0].relationship-value`' /> + <parameter name='dst-tpId' value='`$tmp.aai.logical-links.logical-link[$llidx].relationship-list.relationship[1].relationship-data[0].relationship-value`' /> + <parameter name='ll-to-be-updated.' value='`$tmp.aai.logical-links.logical-link[$llidx].`' /> + </set> + <switch test='$dst-tpId'> + <outcome value=''> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="p-interface" + key="p-interface.interface-name = $src-ltpId + AND depth = '0'" + pfx='tmp.aai.src-tp' local-only='false' > + <outcome value='success'> + <set> + <parameter name='src-plug-id' value='`$tmp.aai.src-tp.inter-domain-plug-id`' /> + </set> + </outcome> + <outcome value='not-found'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" /> + </return> + </outcome> + </get-resource> + </outcome> + </switch> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="p-interfaces" + pfx='tmp.aai.p-interfaces' local-only='false' > + <outcome value='success'> + <for index='tpidx' start='0' end='`$tmp.aai.p-interfaces.p-interface_length`' > + <switch test='`$tmp.aai.p-interfaces.p-interface[$tpidx].inter-domain-plug-id`'> + <outcome value='`$src-plug-id`'> + <switch test='`$tmp.aai.p-interfaces.p-interface[$tpidx].interface-name != $src-tp-id `'> + <outcome value='true'> + <block atomic='true'> + <set> + <parameter name='dst-tp-new' value='`$tmp.aai.p-interfaces.p-interface[$tpidx].interface-name`' /> + </set> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link:relationship-list' + key='logical-link.link-name = $ll-to-be-updated.link-name' force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[1].related-to" value="p-interface" /> + <parameter name="relationship-list.relationship[1].related-link" value="`'/p-interfaces/p-interface/' + $dst-tp-new`" /> + <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-key" value="p-interface.interface-name" /> + <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-value" value="`$dst-tp-new`" /> + </update> + </block> + </outcome> + </switch> + </outcome> + </switch> + </for> + </outcome> + <outcome value='not-found'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" /> + </return> + </outcome> + </get-resource> + </block> + </for> + </outcome> + <outcome value='not-found'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" /> + </return> + </outcome> + </get-resource> + </block> + </method> +</service-logic>
\ No newline at end of file |