2 xmlns='http://www.onap.org/sdnc/svclogic'
\r
3 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}'>
\r
4 <method rpc='sotn-vf-operation-l2vpn-create' mode='sync'>
\r
5 <block atomic="true">
\r
7 <parameter name='vnf-index' value='0' />
\r
9 <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
\r
12 <parameter name='vf-index' value='0' />
\r
15 <outcome value='Other'>
\r
18 <parameter name='vf-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />
\r
20 <for index='idx' start='0' end='`$vf-index`' >
\r
21 <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`">
\r
22 <outcome value='true'>
\r
23 <return status='failure'>
\r
24 <parameter name='ack-final' value='Y'/>
\r
25 <parameter name="error-code" value="500" />
\r
26 <parameter name="error-message" value="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id already found in service-data" />
\r
34 <for index="idx" start="0" end="`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length`">
\r
36 <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
\r
37 <parameter name="original_string" value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$idx].name`'/>
\r
38 <parameter name="regex" value="_"/>
\r
39 <parameter name="ctx_memory_result_key" value="param-prefix"/>
\r
42 <parameter name="`vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$idx].name`" value='`$param-prefix[$param-prefix_length -1]`'/>
\r
46 <for index="idx" start="0" end="`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length`">
\r
48 <switch test="`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'name'`">
\r
49 <outcome value='true'>
\r
51 <parameter name='prop.name' value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
\r
55 <switch test="`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'topology'`">
\r
56 <outcome value='true'>
\r
58 <parameter name='prop.topology' value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
\r
65 <parameter name='vf-module-request-input.' value='`$vf-module-topology-operation-input.vf-module-request-input.`' />
\r
68 <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-index + 1`' />
\r
70 <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
\r
71 <parameter name="ctx-destination" value="prop.vpn-vf-index"/>
\r
74 <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-id' value='`$prop.vpn-vf-index`' />
\r
75 <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.sdnc-request-header.' value='`$vf-module-topology-operation-input.sdnc-request-header.`' />
\r
76 <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.request-information.' value='`$vf-module-topology-operation-input.request-information.`' />
\r
77 <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.service-information.' value='`$vf-module-topology-operation-input.service-information.`' />
\r
78 <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vnf-information.' value='`$vf-module-topology-operation-input.vnf-information.`' />
\r
79 <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-information.' value='`$vf-module-topology-operation-input.vf-module-information.`' />
\r
80 <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-request-input.' value='`$vf-module-topology-operation-input.vf-module-request-input.`' />
\r
81 <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-topology.' value='`$tmp.vf-module-topology.`' />
\r
82 <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-index+1`' />
\r
83 <!--<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$vf-module-topology-operation-input.vnf-information.vnf-id`' />-->
\r
86 <parameter name='vf-module-id' value='`$prop.vpn-vf-index`' />
\r
87 <parameter name='vf-module-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
\r
88 + $vf-module-topology-operation-input.service-information.service-instance-id
\r
89 + '/service-data/vnfs/vnf/'
\r
90 + $service-data.vnfs.vnf[$vnf-index].vnf-id
\r
91 + '/vnf-data/vf-modules/vf-module/'
\r
92 + $prop.vpn-vf-index
\r
93 + '/vf-module-data/vf-module-topology/'`"/>
\r
94 <parameter name='vnf-object-path'
\r
95 value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
\r
96 + $vf-module-topology-operation-input.service-information.service-instance-id
\r
97 + '/service-data/vnfs/vnf/'
\r
98 + $service-data.vnfs.vnf[$vnf-index].vnf-id
\r
99 + '/vnf-data/vnf-topology/'`"/>
\r
100 <parameter name='service-object-path'
\r
101 value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
\r
102 + $vf-module-topology-operation-input.service-information.service-instance-id
\r
103 + '/service-data/service-topology/'`"/>
\r
106 <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-level-oper-status.order-status' value='Created' />
\r
107 <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-level-oper-status.last-rpc-action' value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
\r
108 <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-level-oper-status.last-action' value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
\r
110 <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
\r
111 key='connectivity.connectivity-id = $prop.vpn-vf-index'>
\r
112 <parameter name='connectivity-id' value='`$prop.vpn-vf-index`' />
\r
113 <parameter name='operational-status' value='Created' />
\r
114 <!--<parameter name='sdwan-vpn-id' value='`$prop.vpn-vf-index`' />-->
\r
115 <!--<parameter name='sdwan-vpn-name' value='`$prop.name`' />-->
\r
116 <!--<parameter name='topology' value='`$prop.topology`' />-->
\r
117 <!--<parameter name='model-customization-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`' />-->
\r
118 <!--<parameter name='model-invariant-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`' />-->
\r
119 <!--<parameter name='model-version-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`' />-->
\r
120 <!--<parameter name='selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vf-module-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $service-data.vnfs.vnf[$vnf-index].vnf-id + '/vnf-data/vf-modules/vf-module/' + $prop.vpn-vf-index + '/vf-module-data/'` " />-->
\r
122 <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='generic-vnf:relationship-list'
\r
123 key='generic-vnf.vnf-id = $vf-module-topology-operation-input.vnf-information.vnf-id'
\r
124 force="true" pfx="tmp.AnAI-data">
\r
125 <parameter name="relationship-list.relationship[0].related-to" value="connectivity" />
\r
126 <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.vpn-vf-index`" />
\r
127 <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.id" />
\r
128 <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.vpn-vf-index`" />
\r
129 <!--key='generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id' -->
\r
131 <return status='success'>
\r
132 <parameter name="ack-final-indicator" value="Y" />
\r
133 <parameter name="error-code" value="200" />
\r
134 <parameter name="error-message" value="`$error-message`" />
\r