aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/optical-service/src/main/xml/optical-service_bandwidth-update.xml
blob: d46ca2ef0e10d6d522f6f94fffc8e5ac05826388 (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
<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' mode='sync'>
        <block atomic="true">
            <switch test='`$pin.speed-value`'>
                <outcome value='ODU0'>
                    <block atomic="true">
                        <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
                            <parameter name="file" value="/opt/opendaylight/current/data/log/service-create-tapi.log" />
                            <parameter name="level" value="info" />
                            <parameter name="field1" value="Inside bandwidth odu0 calculation"/>
                        </record>
                        <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' >
                                    <block>
                                        <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>
                                        </switch>
                                    </block>
                                </for>
                            </outcome>
                        </switch>
                    </block>
                </outcome>
                <outcome value='ODU1'>
                    <block atomic="true">
                        <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
                            <parameter name="file" value="/opt/opendaylight/current/data/log/service-create-tapi.log" />
                            <parameter name="level" value="info" />
                            <parameter name="field1" value="Inside bandwidth odu1 calculation"/>
                        </record>
                        <call module='optical-service' rpc='bandwidth-update-odu1' mode='sync' ></call>
                    </block>
                </outcome>
                <outcome value='ODU2'>
                    <block atomic="true">
                        <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
                            <parameter name="file" value="/opt/opendaylight/current/data/log/service-create-tapi.log" />
                            <parameter name="level" value="info" />
                            <parameter name="field1" value="Inside bandwidth odu2 calculation"/>
                        </record>
                        <call module='optical-service' rpc='bandwidth-update-odu2' mode='sync' ></call>
                    </block>
                </outcome>
                <outcome value='ODU3'>
                    <block atomic="true">
                        <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
                            <parameter name="file" value="/opt/opendaylight/current/data/log/service-create-tapi.log" />
                            <parameter name="level" value="info" />
                            <parameter name="field1" value="Inside bandwidth odu3 calculation"/>
                        </record>
                        <call module='optical-service' rpc='bandwidth-update-odu3' mode='sync' ></call>
                    </block>
                </outcome>
                <outcome value='ODU4'>
                    <block atomic="true">
                        <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
                            <parameter name="file" value="/opt/opendaylight/current/data/log/service-create-tapi.log" />
                            <parameter name="level" value="info" />
                            <parameter name="field1" value="Inside bandwidth odu4 calculation"/>
                        </record>
                        <call module='optical-service' rpc='bandwidth-update-odu4' mode='sync' ></call>
                    </block>
                </outcome>
            </switch>
        </block>
    </method>
</service-logic>