61b266c7a6792d8b796bc44322dbb064f3d70bfc
[sdnc/oam.git] / platform-logic / vnfapi / src / main / xml / VNF-API_vf-module-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='vf-module-topology-operation' mode='sync'>
23 <block atomic="true"><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
24 <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
25 <parameter name="field1" value="__TIMESTAMP__"/>
26 <parameter name="field2" value="vf-module-topology-operation"/>
27 <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-action`"/>
28 <parameter name="field4" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
29 <parameter name="field5" value="`$vf-module-topology-operation-input.request-information.source`"/>
30 <parameter name="field6" value="`$vf-module-topology-operation-input.request-information.request-id`"/>
31 <parameter name="field7" value="`$vf-module-topology-operation-input.request-information.request-action`"/>
32 <parameter name="field8" value="`$vf-module-topology-operation-input.service-information.service-id`"/>
33 <parameter name="field9" value="`$vf-module-topology-operation-input.service-information.service-type`"/>
34 <parameter name="field10" value="`$vf-module-topology-operation-input.service-information.subscriber-name`"/>
35 <parameter name="field11" value="`$vf-module-topology-operation-input.service-information.service-instance-id`"/>
36 <parameter name="field12" value="`$vf-module-topology-operation-input.vf-module-topology-information.vf-module-id`"/>
37 <parameter name="field13" value="`$vf-module-topology-operation-input.vf-module-topology-information.vf-module-model-id`"/>
38 <parameter name="field14" value="`$vf-module-topology-operation-input.vf-module-topology-information.vf-module-name`"/>
39 <parameter name="field15" value="`$vf-module-topology-operation-input.vf-module-topology-information.request-version`"/>
40 <parameter name="field16" value="`$vf-module-topology-operation-input.vf-module-topology-information.vnf-instance-id`"/>
41 <parameter name="field17" value="`$vf-module-topology-operation-input.vf-module-topology-information.vnf-model-id`"/>
42 <parameter name="field18" value="`$vf-module-topology-operation-input.vf-module-topology-information.vnf-instance-name`"/>
43 <parameter name="field19" value="`$vf-module-topology-operation-input.vf-module-topology-information.aic-cloud-region`"/>
44 <parameter name="field20" value="`$vf-module-topology-operation-input.vf-module-topology-information.tenant`"/></record><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-name`"><outcome value='Other'><switch test="`$vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-name`"><outcome value='Other'><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-name == $vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-name`"><outcome value='false'>
45 <return status='failure'>
46     <parameter name='error-code' value='404'/>
47     <parameter name='error-message' value='vf-module-name not found in vf-module-preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
48     <parameter name='error-code' value='400'/>
49     <parameter name='error-message' value='No preload data found to match vf-module-name'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
50     <parameter name='error-code' value='400'/>
51     <parameter name='error-message' value='vf-module-name is required'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-model-id`"><outcome value='Other'><switch test="`$vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-model-id`"><outcome value='Other'><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-model-id == $vf-module-preload-data.vf-module-topology-information.vf-module-identifiers.vf-module-model-id`"><outcome value='false'>
52 <return status='failure'>
53     <parameter name='error-code' value='404'/>
54     <parameter name='error-message' value='vf-module-model-id not found in vf-module-preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
55     <parameter name='error-code' value='400'/>
56     <parameter name='error-message' value='No preload data found to match vf-module-model-id from input'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
57     <parameter name='error-code' value='400'/>
58     <parameter name='error-message' value='vf-module-model-id is required'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vf-module-id`"><outcome value='0'><return status='failure'>
59     <parameter name='error-code' value='400'/>
60     <parameter name='error-message' value='vf-module-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
61     <parameter name='error-code' value='400'/>
62     <parameter name='error-message' value='vf-module-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`"><outcome value='0'><return status='failure'>
63     <parameter name='error-code' value='400'/>
64     <parameter name='error-message' value='vnf-instance-id cannot be NULL or 0'/></return></outcome><outcome value=''><return status='failure'>
65     <parameter name='error-code' value='400'/>
66     <parameter name='error-message' value='vnf-instance-id cannot be NULL or 0'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-instance-name`"><outcome value=''><return status='failure'>
67     <parameter name='error-code' value='400'/>
68     <parameter name='error-message' value='vnf-instance-name cannot be NULL'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.vnf-model-id`"><outcome value=''><return status='failure'>
69     <parameter name='error-code' value='400'/>
70     <parameter name='error-message' value='vnf-model-id cannot be NULL'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.vf-module-request-information.aic-cloud-region`"><outcome value=''><return status='failure'>
71     <parameter name='error-code' value='400'/>
72     <parameter name='error-message' value='aic-cloud-region cannot be NULL'/></return></outcome></switch><switch test="`$vf-module-topology-operation-input.sdnc-request-header.svc-action`">
73 <!--
74 leaf svc-action {
75     type enumeration {
76         enum "reserve";
77         enum "assign";
78         enum "activate";  // equal to commit
79         enum "delete";      // equal to commit
80         enum "changeassign";
81         enum "changedelete";
82         enum "rollback";
83     }
84 }
85 -->
86
87 <outcome value='assign'><call module='VNF-API' rpc='vf-module-topology-assign' mode='sync' ></call></outcome><outcome value='changeassign'><call module='VNF-API' rpc='vf-module-topology-changeassign' mode='sync' ></call></outcome><outcome value='activate'><call module='VNF-API' rpc='vf-module-topology-activate' mode='sync' ></call></outcome><outcome value='rollback'><call module='VNF-API' rpc='vf-module-topology-rollback' mode='sync' ></call></outcome><outcome value='delete'><call module='VNF-API' rpc='vf-module-topology-delete' mode='sync' ></call></outcome><outcome value='Other'><return status='failure'>
88     <parameter name='error-code' value='400'/>
89     <parameter name='error-message' value='svc-action not recognized'/>
90 </return></outcome></switch></block></method></service-logic>