aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/optical-service/src/main/xml/optical-service_bandwidth-update-odu1.xml
blob: 5ea2571e0f340fd4103c6e88a081c252522fc13d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<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-odu1' mode='sync'>
        <block atomic="true">
            <switch test='`$optical-service-create-input.payload.service-rate`'>
                <outcome value='ODU0'>
                    <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='mul' value='`$odu-number * 1.25`' />
                                        <parameter name='sub' value='`$mul - 1.25`' />
                                        <parameter name='new-odu-number' value='`$sub / 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='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>
                </outcome>
                <outcome value='ODU1'>
                    <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 = $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='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>
                </outcome>
            </switch>
        </block>
    </method>
</service-logic>