[Docker] Dgbuilder docker image does not build
[sdnc/oam.git] / platform-logic / vnfapi / src / main / xml / dg-preload-vnf-topology-operation.xml
1 <!--
2   ============LICENSE_START=======================================================
3   openECOMP : SDN-C
4   ================================================================================
5   Copyright (C) 2017 AT&T Intellectual Property. All rights
6                                                 reserved.
7   ================================================================================
8   Licensed under the Apache License, Version 2.0 (the "License");
9   you may not use this file except in compliance with the License.
10   You may obtain a copy of the License at
11        http://www.apache.org/licenses/LICENSE-2.0
12   Unless required by applicable law or agreed to in writing, software
13   distributed under the License is distributed on an "AS IS" BASIS,
14   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   See the License for the specific language governing permissions and
16   limitations under the License.
17   ============LICENSE_END=========================================================
18   -->
19
20 <service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
21     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22     xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module='VNF-API' version='${project.version}'><method rpc="preload-vnf-topology-operation" mode="sync"><block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
23 <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
24 <parameter name="field1" value="__TIMESTAMP__"/>
25 <parameter name="field2" value="preload-vnf-topology-operation"/>
26 <parameter name="field3" value="`$preload-vnf-topology-operation-input.sdnc-request-header.svc-action`"/>
27 <parameter name="field4" value="`$preload-vnf-topology-operation-input.sdnc-request-header.svc-request-id`"/>
28 <parameter name="field5" value="`$preload-vnf-topology-operation-input.service-information.service-instance-id`"/>
29 <parameter name="field6" value="`$preload-vnf-topology-operation-input.request-information.request-id`"/>
30 <parameter name="field7" value="`$preload-vnf-topology-operation-input.request-information.request-action`"/>
31 <parameter name="field8" value="`$preload-vnf-topology-operation-input.request-information.source`"/>
32 <parameter name="field9" value="`$preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.service-type`"/>
33 <parameter name="field10" value="`$preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-name`"/>
34 <parameter name="field11" value="`$preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-type`"/></record><switch test="`$preload-vnf-topology-operation-input.request-information.request-action`">
35 <!--
36 leaf request-action {
37                 type enumeration {
38                     enum "VNFActivateRequest";
39                     enum "ChangeVNFActivateRequest";
40                     enum "DisconnectVNFRequest";
41                     enum "PreloadVNFRequest";
42                     enum "DeletePreloadVNFRequest";
43                 }
44 }
45 -->
46
47 <outcome value='PreloadVNFRequest'><block atomic="true"><set>
48 <parameter name="ack-final" value="Y"/></set><set only-if-unset="true">
49 <parameter name="sql-resource-plugin" value="org.openecomp.sdnc.sli.resource.sql.SqlResource"/></set><get-resource plugin="`$sql-resource-plugin`" resource="vnf-profile" key="SELECT * from VNF_PROFILE WHERE vnf_type = $preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-type">
50 <outcome value='not-found'>
51 <return status='failure'>
52     <parameter name="error-code" value="404" />
53     <parameter name="error-message" value="preload vnf-type not found as valid vnf " /></return></outcome><outcome value='failure'>
54 <return status='failure'>
55     <parameter name="error-code" value="404" />
56     <parameter name="error-message" value="preload vnf-type not found as valid vnf " /></return></outcome></get-resource><set>
57 <parameter name="preload-data." value="" />
58 </set><set>
59 <parameter name="preload-data." value="preload-vnf-topology-operation-input." />
60 </set><set>
61     <parameter name="preload-data.oper-status.order-status" value="PendingAssignment"/></set><return status="success">
62     <parameter name="error-code" value="200" /></return></block></outcome><outcome value='DeletePreloadVNFRequest'><block atomic="true"><get-resource plugin="`$sql-resource-plugin`" resource="generic-vnf" key="SELECT * FROM VNF_PROFILE vnf-type = $preload-vnf-topology-operation-input.vnf-topology-information.vnf-topology-identifier.vnf-type">
63 <outcome value='success'>
64 <return status='failure'>
65     <parameter name="error-code" value="3000" />
66     <parameter name="error-message" value="preload vnf-type cannot be deleted while vnf is in use" /></return></outcome></get-resource><set>
67 <parameter name="preload-data." value="" />
68 </set><return status="success">
69     <parameter name="error-code" value="200" /></return></block></outcome><outcome value="Other">
70
71  <return status="failure">
72     <parameter name='error-code' value='2000'/>
73     <parameter name='error-message' value='Invalid Request `$preload-vnf-topology-operation-input.request-information.request-action`'/>
74
75
76 </return></outcome></switch></block></method></service-logic>