aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-mdsal-put.xml
blob: a35b4c1b3e04b0a89c7886e3159243663fdd642e (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
<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='self-serve-vnf-mdsal-put' mode='sync'>
        <block atomic='true'>
            <set>
                <parameter name='vf.vnf-id'
    value='`$service-data.vnfs.vnf[$vnf-index].vnf-id`' />
                <parameter name='vf.vnf-data.sdnc-request-header.'
  value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.`' />
                <parameter name='vf.vnf-data.request-information.'
  value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.`' />
                <parameter name='vf.vnf-data.service-information.'
  value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.`' />
                <parameter name='vf.vnf-data.vnf-information.'
  value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.`' />
                <parameter name='vf.vnf-data.vnf-topology.'
  value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.`' />
                <parameter name='vf.vnf-data.vnf-level-oper-status.'
  value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.`' />
                <parameter name='vf.vnf-data.vnf-request-input.vnf-input-parameters.'
  value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.`' />
                <parameter name='vf.vnf-data.vnf-request-input.request-version'
  value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.request-version`' />
                <parameter name='vf.vnf-data.vnf-request-input.vnf-name'
  value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-name`' />
                <parameter name='vf.vnf-data.vnf-request-input.tenant'
  value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.tenant`' />
                <parameter name='vf.vnf-data.vnf-request-input.aic-cloud-region'
  value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.aic-cloud-region`' />
                <parameter name='vf.vnf-data.vnf-request-input.aic-clli'
  value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.aic-clli`' />
            </set>
            <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
                <parameter name="source" value="`$prop.restapi.ss-vnf-assignments`"/>
                <parameter name="outputPath" value="tmp.ss-vnf-url"/>
                <parameter name="target" value="{service-instance-id}"/>
                <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.service-instance-id`"/>
            </execute>
            <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
                <parameter name="source" value="`$tmp.ss-vnf-url`"/>
                <parameter name="outputPath" value="tmp.ss-vnf-url"/>
                <parameter name="target" value="{vnf-id}"/>
                <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-id`"/>
            </execute>
            <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
                <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.ss.vnf.templatefile`" />
                <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ss-vnf-url`' />
                <parameter name='restapiUser' value='`$prop.controller.user`' />
                <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
                <parameter name='format' value='json' />
                <parameter name='httpMethod' value='PUT' />
                <parameter name="responsePrefix" value="mdsal-ss-vnf" />
                <outcome value='failure'>
                    <set>
                        <parameter name="error-message" value="`'Failed to persist self-serve vnf assignments during assign in MD-SAL. ' + $error-message`" />
                    </set>
                </outcome>
                <outcome value='not-found'>
                    <set>
                        <parameter name="error-message" value="`'Failed to persist self-serve vnf assignments during assign in MD-SAL. ' + $error-message`" />
                    </set>
                </outcome>
            </execute>
        </block>
    </method>
</service-logic>