2 ============LICENSE_START=======================================================
4 ================================================================================
5 Copyright (C) 2017 AT&T Intellectual Property. All rights
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=========================================================
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="network-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="network-topology-operation"/>
26 <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-action`"/>
27 <parameter name="field4" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
28 <parameter name="field5" value="`$network-topology-operation-input.service-information.service-id`"/>
29 <parameter name="field6" value="`$network-topology-operation-input.service-information.service-type`"/>
30 <parameter name="field7" value="`$network-topology-operation-input.service-information.subscriber-name`"/>
31 <parameter name="field8" value="`$network-topology-operation-input.service-information.service-instance-id`"/>
32 <parameter name="field9" value="`$network-topology-operation-input.request-information.request-id`"/>
33 <parameter name="field10" value="`$network-topology-operation-input.request-information.request-action`"/>
34 <parameter name="field11" value="`$network-topology-operation-input.request-information.source`"/>
35 <parameter name="field12" value="`$network-topology-operation-input.network-request-information.network-name`"/>
36 <parameter name="field13" value="`$network-topology-operation-input.network-request-information.network-type`"/>
37 <parameter name="field14" value="`$network-topology-operation-input.network-request-information.tenant`"/>
38 <parameter name="field15" value="`$network-topology-operation-input.network-request-information.aic-cloud-region`"/>
39 <parameter name="field16" value="`$network-topology-operation-input.network-request-information.aic-clli`"/>
40 <parameter name="field17" value="`$network-topology-operation-input.network-request-information.network-id`"/></record><switch test="`$network-topology-operation-input.request-information.request-action`">
41 <outcome value='NetworkActivateRequest'><block atomic="true">
42 <switch test="`$network-topology-operation-input.network-request-information.network-name`"><outcome value='Other'><switch test="`$preload-data.network-topology-information.network-topology-identifier.network-name`"><outcome value='Other'><switch test="`$network-topology-operation-input.network-request-information.network-name == $preload-data.network-topology-information.network-topology-identifier.network-name`"><outcome value='false'>
43 <return status='failure'>
44 <parameter name='error-code' value='400'/>
45 <parameter name='error-message' value="`'No preload-data found to match input network-name = ' + $network-topology-operation-input.network-request-information.network-name`"/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
46 <parameter name='error-code' value='400'/>
47 <parameter name='error-message' value='network-name not found from preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
48 <parameter name='error-code' value='400'/>
49 <parameter name='error-message' value='network-name is required from input'/></return></outcome></switch><switch test="`$network-topology-operation-input.network-request-information.network-type`"><outcome value='Other'><switch test="`$preload-data.network-topology-information.network-topology-identifier.network-type`"><outcome value='Other'><switch test="`$network-topology-operation-input.network-request-information.network-type == $preload-data.network-topology-information.network-topology-identifier.network-type`"><outcome value='false'>
50 <return status='failure'>
51 <parameter name='error-code' value='400'/>
52 <parameter name='error-message' value="`'No preload-data found to match input network-type = ' + $network-topology-operation-input.network-request-information.network-type`"/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
53 <parameter name='error-code' value='400'/>
54 <parameter name='error-message' value='network-type not found from preload-data'/></return></outcome></switch></outcome><outcome value=''><return status='failure'>
55 <parameter name='error-code' value='400'/>
56 <parameter name='error-message' value='network-type is required from input'/></return></outcome></switch><switch test="`$network-topology-operation-input.service-information.service-instance-id`"><outcome value=''><return status='failure'>
57 <parameter name='error-code' value='500'/>
58 <parameter name='error-message' value='service-instance-id is required.'/></return></outcome></switch><switch test="`$network-topology-operation-input.network-request-information.aic-cloud-region`"><outcome value=''><return status='failure'>
59 <parameter name='error-code' value='500'/>
60 <parameter name='error-message' value='aic-cloud-region is required.'/></return></outcome></switch><switch test="`$network-topology-operation-input.network-request-information.tenant`"><outcome value=''><return status='failure'>
61 <parameter name='error-code' value='500'/>
62 <parameter name='error-message' value='tenant is required.'/></return></outcome></switch><switch test="`$network-topology-operation-input.service-information.service-id`"><outcome value=''><return status='failure'>
63 <parameter name='error-code' value='500'/>
64 <parameter name='error-message' value='service-id is required.'/></return></outcome></switch><switch test="`$network-topology-operation-input.sdnc-request-header.svc-action`">
70 enum "activate"; // equal to commit
71 enum "delete"; // equal to commit
79 <outcome value='Other'>
80 <return status='failure'>
81 <parameter name='error-code' value='400'/>
82 <parameter name='error-message' value='svc-action is not found'/></return></outcome><outcome value='assign'><call module="VNF-API" rpc="network-topology-assign" mode="sync" >
83 </call></outcome><outcome value='changeassign'><call module="VNF-API" rpc="network-topology-changeassign" mode="sync" >
84 </call></outcome><outcome value='rollback'><call module="VNF-API" rpc="network-topology-rollback" mode="sync" >
85 </call></outcome></switch></block></outcome><outcome value='DisconnectNetworkRequest'><switch test="`$network-topology-operation-input.sdnc-request-header.svc-action`">
91 enum "activate"; // equal to commit
92 enum "delete"; // equal to commit
100 <outcome value='rollback'><call module="VNF-API" rpc="network-topology-rollback" mode="sync" >
101 </call></outcome><outcome value='delete'><call module="VNF-API" rpc="network-topology-delete" mode="sync" >
102 </call></outcome><outcome value='Other'>
103 <return status='failure'>
104 <parameter name='error-code' value='400'/>
105 <parameter name='error-message' value='svc-action is not found'/></return></outcome></switch></outcome><outcome value="Other">
107 <return status='failure'>
108 <parameter name='error-code' value='400'/>
109 <parameter name='error-message' value='request-action is not found'/></return></outcome></switch></block></method></service-logic>