aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/optical-service/src/main/xml/optical-service_bandwidth-update-odu3.xml
diff options
context:
space:
mode:
Diffstat (limited to 'platform-logic/optical-service/src/main/xml/optical-service_bandwidth-update-odu3.xml')
-rw-r--r--platform-logic/optical-service/src/main/xml/optical-service_bandwidth-update-odu3.xml340
1 files changed, 340 insertions, 0 deletions
diff --git a/platform-logic/optical-service/src/main/xml/optical-service_bandwidth-update-odu3.xml b/platform-logic/optical-service/src/main/xml/optical-service_bandwidth-update-odu3.xml
new file mode 100644
index 00000000..b527056c
--- /dev/null
+++ b/platform-logic/optical-service/src/main/xml/optical-service_bandwidth-update-odu3.xml
@@ -0,0 +1,340 @@
+<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='optical-service' version='${project.version}'>
+ <method rpc='bandwidth-update-odu3' mode='sync'>
+ <block atomic="true">
+ <switch test='`$optical-service-create-input.payload.service-rate`'>
+ <outcome value='ODU0'>
+ <block>
+ <set>
+ <parameter name='new-rate' value='' />
+ </set>
+ <for index='idx' start='0' end='pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth_length' >
+ <set>
+ <parameter name='odu-name' value='`$pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[$idx].odu-type`' />
+ <parameter name='odu-number' value='`$pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[$idx].number`' />
+ </set>
+ <switch test='`$odu-name`'>
+ <outcome value='ODU0'>
+ <block>
+ <set>
+ <parameter name='new-rate' value='`$new-rate + $odu-number * 1.25 - 1.25 `' />
+ <parameter name='new-odu-number' value='`$new-rate / 1.25`' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='available-bandwidth'
+ key='pnf.pnf-name = $pnf-name AND
+ p-interface.interface-name = $pinterface-name AND
+ bandwidth-attribute.id = $pin.bandwidth-attributes.bandwidth-attribute[0].id AND
+ available-bandwidth.id = $pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[0].id'
+ local-only='false'>
+ <parameter name='number' value='`$new-odu-number`' />
+ </update>
+ </block>
+ </outcome>
+ <outcome value='ODU1'>
+ <block>
+ <set>
+ <parameter name='new-odu-number' value='`$new-rate / 2.5`' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='available-bandwidth'
+ key='pnf.pnf-name = $pnf-name AND
+ p-interface.interface-name = $pinterface-name AND
+ bandwidth-attribute.id = $pin.bandwidth-attributes.bandwidth-attribute[0].id AND
+ available-bandwidth.id = $pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[0].id'
+ local-only='false'>
+ <parameter name='number' value='`$new-odu-number`' />
+ </update>
+ </block>
+ </outcome>
+ <outcome value='ODU2'>
+ <block>
+ <set>
+ <parameter name='new-odu-number' value='`$new-rate / 10`' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='available-bandwidth'
+ key='pnf.pnf-name = $pnf-name AND
+ p-interface.interface-name = $pinterface-name AND
+ bandwidth-attribute.id = $pin.bandwidth-attributes.bandwidth-attribute[0].id AND
+ available-bandwidth.id = $pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[0].id'
+ local-only='false'>
+ <parameter name='number' value='`$new-odu-number`' />
+ </update>
+ </block>
+ </outcome>
+ <outcome value='ODU3'>
+ <block>
+ <set>
+ <parameter name='new-odu-number' value='0' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='available-bandwidth'
+ key='pnf.pnf-name = $pnf-name AND
+ p-interface.interface-name = $pinterface-name AND
+ bandwidth-attribute.id = $pin.bandwidth-attributes.bandwidth-attribute[0].id AND
+ available-bandwidth.id = $pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[0].id'
+ local-only='false'>
+ <parameter name='number' value='`$new-odu-number`' />
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ <outcome value='ODU1'>
+ <block>
+ <set>
+ <parameter name='new-rate' value='' />
+ </set>
+ <for index='idx' start='0' end='pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth_length' >
+ <set>
+ <parameter name='odu-name' value='`$pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[$idx].odu-type`' />
+ <parameter name='odu-number' value='`$pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[$idx].number`' />
+ </set>
+ <switch test='`$odu-name`'>
+ <outcome value='ODU0'>
+ <block>
+ <set>
+ <parameter name='new-rate' value='`$new-rate + $odu-number * 1.25 - 2.25 `' />
+ <parameter name='new-odu-number' value='`$new-rate / 1.25`' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='available-bandwidth'
+ key='pnf.pnf-name = $pnf-name AND
+ p-interface.interface-name = $pinterface-name AND
+ bandwidth-attribute.id = $pin.bandwidth-attributes.bandwidth-attribute[0].id AND
+ available-bandwidth.id = $pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[0].id'
+ local-only='false'>
+ <parameter name='number' value='`$new-odu-number`' />
+ </update>
+ </block>
+ </outcome>
+ <outcome value='ODU1'>
+ <block>
+ <set>
+ <parameter name='new-odu-number' value='`$new-rate / 2.5`' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='available-bandwidth'
+ key='pnf.pnf-name = $pnf-name AND
+ p-interface.interface-name = $pinterface-name AND
+ bandwidth-attribute.id = $pin.bandwidth-attributes.bandwidth-attribute[0].id AND
+ available-bandwidth.id = $pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[0].id'
+ local-only='false'>
+ <parameter name='number' value='`$new-odu-number`' />
+ </update>
+ </block>
+ </outcome>
+ <outcome value='ODU2'>
+ <block>
+ <set>
+ <parameter name='new-odu-number' value='`$new-rate / 10`' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='available-bandwidth'
+ key='pnf.pnf-name = $pnf-name AND
+ p-interface.interface-name = $pinterface-name AND
+ bandwidth-attribute.id = $pin.bandwidth-attributes.bandwidth-attribute[0].id AND
+ available-bandwidth.id = $pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[0].id'
+ local-only='false'>
+ <parameter name='number' value='`$new-odu-number`' />
+ </update>
+ </block>
+ </outcome>
+ <outcome value='ODU3'>
+ <block>
+ <set>
+ <parameter name='new-odu-number' value='0' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='available-bandwidth'
+ key='pnf.pnf-name = $pnf-name AND
+ p-interface.interface-name = $pinterface-name AND
+ bandwidth-attribute.id = $pin.bandwidth-attributes.bandwidth-attribute[0].id AND
+ available-bandwidth.id = $pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[0].id'
+ local-only='false'>
+ <parameter name='number' value='`$new-odu-number`' />
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ <outcome value='ODU2'>
+ <block>
+ <set>
+ <parameter name='new-rate' value='' />
+ </set>
+ <for index='idx' start='0' end='pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth_length' >
+ <set>
+ <parameter name='odu-name' value='`$pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[$idx].odu-type`' />
+ <parameter name='odu-number' value='`$pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[$idx].number`' />
+ </set>
+ <switch test='`$odu-name`'>
+ <outcome value='ODU0'>
+ <block>
+ <set>
+ <parameter name='new-rate' value='`$new-rate + $odu-number * 1.25 - 2.25 `' />
+ <parameter name='new-odu-number' value='`$new-rate / 1.25`' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='available-bandwidth'
+ key='pnf.pnf-name = $pnf-name AND
+ p-interface.interface-name = $pinterface-name AND
+ bandwidth-attribute.id = $pin.bandwidth-attributes.bandwidth-attribute[0].id AND
+ available-bandwidth.id = $pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[0].id'
+ local-only='false'>
+ <parameter name='number' value='`$new-odu-number`' />
+ </update>
+ </block>
+ </outcome>
+ <outcome value='ODU1'>
+ <block>
+ <set>
+ <parameter name='new-odu-number' value='`$new-rate / 2.5`' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='available-bandwidth'
+ key='pnf.pnf-name = $pnf-name AND
+ p-interface.interface-name = $pinterface-name AND
+ bandwidth-attribute.id = $pin.bandwidth-attributes.bandwidth-attribute[0].id AND
+ available-bandwidth.id = $pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[0].id'
+ local-only='false'>
+ <parameter name='number' value='`$new-odu-number`' />
+ </update>
+ </block>
+ </outcome>
+ <outcome value='ODU2'>
+ <block>
+ <set>
+ <parameter name='new-odu-number' value='`$new-rate / 10`' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='available-bandwidth'
+ key='pnf.pnf-name = $pnf-name AND
+ p-interface.interface-name = $pinterface-name AND
+ bandwidth-attribute.id = $pin.bandwidth-attributes.bandwidth-attribute[0].id AND
+ available-bandwidth.id = $pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[0].id'
+ local-only='false'>
+ <parameter name='number' value='`$new-odu-number`' />
+ </update>
+ </block>
+ </outcome>
+ <outcome value='ODU3'>
+ <block>
+ <set>
+ <parameter name='new-odu-number' value='0' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='available-bandwidth'
+ key='pnf.pnf-name = $pnf-name AND
+ p-interface.interface-name = $pinterface-name AND
+ bandwidth-attribute.id = $pin.bandwidth-attributes.bandwidth-attribute[0].id AND
+ available-bandwidth.id = $pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[0].id'
+ local-only='false'>
+ <parameter name='number' value='`$new-odu-number`' />
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ <outcome value='ODU3'>
+ <for index='idx' start='0' end='pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth_length' >
+ <set>
+ <parameter name='odu-name' value='`$pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[$idx].odu-type`' />
+ <parameter name='odu-number' value='`$pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[$idx].number`' />
+ </set>
+ <switch test='`$odu-name`'>
+ <outcome value='ODU0'>
+ <block>
+ <set>
+ <parameter name='new-odu-number' value='0' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='available-bandwidth'
+ key='pnf.pnf-name = $aend-pnf-name AND
+ p-interface.interface-name = $aend-nep AND
+ bandwidth-attribute.id = $pin.bandwidth-attributes.bandwidth-attribute[0].id AND
+ available-bandwidth.id = $pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[0].id'
+ local-only='false'>
+ <parameter name='number' value='`$new-odu-number`' />
+ </update>
+ </block>
+ </outcome>
+ <outcome value='ODU1'>
+ <block>
+ <set>
+ <parameter name='new-odu-number' value='0' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='available-bandwidth'
+ key='pnf.pnf-name = $aend-pnf-name AND
+ p-interface.interface-name = $aend-nep AND
+ bandwidth-attribute.id = $pin.bandwidth-attributes.bandwidth-attribute[0].id AND
+ available-bandwidth.id = $pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[0].id'
+ local-only='false'>
+ <parameter name='number' value='`$new-odu-number`' />
+ </update>
+ </block>
+ </outcome>
+ <outcome value='ODU2'>
+ <block>
+ <set>
+ <parameter name='new-odu-number' value='0' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='available-bandwidth'
+ key='pnf.pnf-name = $aend-pnf-name AND
+ p-interface.interface-name = $aend-nep AND
+ bandwidth-attribute.id = $pin.bandwidth-attributes.bandwidth-attribute[0].id AND
+ available-bandwidth.id = $pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[0].id'
+ local-only='false'>
+ <parameter name='number' value='`$new-odu-number`' />
+ </update>
+ </block>
+ </outcome>
+ <outcome value='ODU3'>
+ <block>
+ <set>
+ <parameter name='new-odu-number' value='0' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='available-bandwidth'
+ key='pnf.pnf-name = $aend-pnf-name AND
+ p-interface.interface-name = $aend-nep AND
+ bandwidth-attribute.id = $pin.bandwidth-attributes.bandwidth-attribute[0].id AND
+ available-bandwidth.id = $pin.bandwidth-attributes.bandwidth-attribute[0].available-bandwidth-map.available-bandwidth[0].id'
+ local-only='false'>
+ <parameter name='number' value='`$new-odu-number`' />
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file