blob: 4a787cbb173fa01b2abab837fa68392408d2d32d (
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
<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='GENERIC-RESOURCE-API' version='${project.version}'><method rpc='gw-vfmodule-update' mode='sync'>
<block>
<set>
<!--
<parameter name='tmp.brg-macaddress' value='fa:16:3e:8f:ea:68' />
<parameter name='tmp.brg-mac-address-match' value="`'VGW2BRG-' + $tmp.brg-macaddress`"/>
<parameter name='tmp.consuming-service-instance-id' value='b3cb7040-f7a5-4beb-ad2f-2a893b7d374b' />
service-data.service-topology.service-topology-identifier.service-instance-id
-->
<parameter name='tmp.consuming-service-instance-id' value='`$service-data.service-topology.service-topology-identifier.service-instance-id`' />
</set><set>
<parameter name='tmp.thisIsVGW' value='false' />
</set><get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API'
key='tunnelxconn-allotted-resources/' pfx='tmp.txconns' >
<outcome value='success'>
<for index='txidx' start='0' end='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource_length`' >
<block atomic='true'><set>
<parameter name='tmp.test1' value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource[$txidx].allotted-resource-data.tunnelxconn-topology.allotted-resource-identifiers.consuming-service-instance-id`' />
<parameter name='tmp.test2' value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource-data[$txidx].tunnelxconn-topology[0].allotted-resource-identifiers[0].consuming-service-instance-id`' /></set><switch test='`$tmp.test1 == $tmp.consuming-service-instance-id`'><outcome value='true'>
<block>
<set>
<parameter name='tmp.brg-macaddress'
value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource.allotted-resource-data.allotted-resource-operation-information.tunnelxconn-request-input.brg-wan-mac-address`' />
</set><set>
<parameter name='tmp.brg-macaddress' value='fa:16:3e:8f:ea:68' />
<parameter name='tmp.brg-mac-address-match' value="`'VGW2BRG-' + $tmp.brg-macaddress`"/>
<!--
<parameter name='tmp.consuming-service-instance-id' value='b3cb7040-f7a5-4beb-ad2f-2a893b7d374b' />
service-data.service-topology.service-topology-identifier.service-instance-id
-->
<parameter name='tmp.consuming-service-instance-id' value='`$service-data.service-topology.service-topology-identifier.service-instance-id`' />
</set><set>
<parameter name='tmp.thisIsVGW' value='true' />
</set></block></outcome></switch></block></for></outcome></get-resource><switch test='`$tmp.thisIsVGW`'>
<outcome value='true'>
<block>
<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='VNF-API' key='preload-vnfs' pfx='tmp.preloadvnfdata' >
</get-resource><for index='vnfidx' start='0' end='`$tmp.preloadvnfdata.preload-vnfs.vnf-preload-list_length`' >
<block atomic='true'><set>
<parameter name='tmp.test3' value='`$tmp.preloadvnfdata.preload-vnfs.vnf-preload-list[$vnfidx].vnf-name`' />
<parameter name='tmp.test4' value='`$tmp.brg-mac-address-match`'/>
</set><switch test='`$tmp.preloadvnfdata.preload-vnfs.vnf-preload-list[$vnfidx].vnf-name == $tmp.brg-mac-address-match`'>
<outcome value='true'>
<block>
<set>
<parameter name='tmp.endLoop1' value='`$tmp.preloadvnfdata.preload-vnfs.vnf-preload-list[$vnfidx].preload-data.vnf-topology-information.vnf-parameters_length`' /></set><for index='preloadIdx' start='0' end='`$tmp.endLoop1`'>
<!--
"preload-data": {
"vnf-topology-information": {
"vnf-parameters": [
-->
<block atomic='true'><set>
<parameter name='tmp.vfmodule.param[$preloadIdx].name' value='`$tmp.preloadvnfdata.preload-vnfs.vnf-preload-list[$vnfidx].preload-data.vnf-topology-information.vnf-parameters[$preloadIdx].vnf-parameter-name`' />
<parameter name='tmp.vfmodule.param[$preloadIdx].value' value='`$tmp.preloadvnfdata.preload-vnfs.vnf-preload-list[$vnfidx].preload-data.vnf-topology-information.vnf-parameters[$preloadIdx].vnf-parameter-value`' /></set></block></for><set>
<parameter name='tmp.vfmodule.param_length' value='`$tmp.endLoop1`' />
</set><execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
<parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
<parameter name='contextPrefix' value='prop' />
</execute><set>
<parameter name='tmp.restapi.service.vnf.vfmodule-resource' value='`$prop.restapi.service.vnf.vfmodule-resource`' />
</set><set>
<parameter name='tmp.vf-module-object-path'
value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ $service-data.service-topology.service-topology-identifier.service-instance-id
+ '/service-data/vnfs/vnf/'
+ $service-data.vnfs.vnf[$vnf-index].vnf-id
+ '/vnf-data/vf-modules/vf-module/'
+ $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
+ '/'`"/>
</set><set>
<!--
<parameter name='tmp.service.vnf.vf-module.vg-mux-tunnel-vni' value='`$input.vni`' />
-->
<parameter name='tmp.service.vnf.vf-module.vg-mux-tunnel-vni' value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource[0].allotted-resource-data[0].tunnelxconn-topology[0].tunnelxconn-assignments[0].vni`' />
<parameter name='tmp.service.vnf.vf-module.vg-lan-ip' value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource[0].allotted-resource-data[0].tunnelxconn-topology[0].tunnelxconn-assignments[0].vg-ip`' />
</set><set>
<!--
<parameter name='tmp.service.vnf.vf-module.vg-mux-tunnel-vni' value='`$input.vni`' />
-->
<parameter name='tmp.vg-mux-tunnel-vni-match' value='vg_vgmux_tunnel_vni' />
<parameter name='tmp.vg-lan-ip-match' value='vgw_private_ip_0' />
</set><for index='paramIdx' start='0' end='`$tmp.vfmodule.param_length`' >
<block>
<switch test='`$tmp.vfmodule.param[$paramIdx].name == $tmp.vg-mux-tunnel-vni-match`'><outcome value='true'>
<set>
<parameter name='$tmp.vfmodule.param[$paramIdx].value' value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource.allotted-resource-data.tunnelxconn-topology.tunnelxconn-assignments.vni`' />
</set></outcome></switch><switch test='`$tmp.vfmodule.param[$paramIdx].name == $tmp.vg-lan-ip-match`'><outcome value='true'>
<set>
<parameter name='$tmp.vfmodule.param[$paramIdx].value' value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource.allotted-resource-data.tunnelxconn-topology.tunnelxconn-assignments.vg-ip`' />
</set></outcome></switch></block></for><set>
<!--
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param.'
service-data.vnfs.vnf\[0\]. vnf-data.vf-modules.vf-module\[0\] .vf-module-data.vf-module-topology.vf-module-parameters.param.
value='$tmp.vfmodule.' />
-->
<parameter name='service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameters.'
value='$tmp.vfmodule.' /></set></block></outcome></switch></block></for></block></outcome><outcome value='Other'>
<block>
<return status='failure'>
<parameter name='error-code' value='500' />
<parameter name='error-message' value='Did not find vGW Preload' />
</return></block></outcome></switch></block></method></service-logic>
|