Refactor dblib
[ccsdk/sli/core.git] / sli / common / src / test / resources / neutron_logic_v10.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ============LICENSE_START=======================================================
4   ONAP : CCSDK
5   ================================================================================
6   Copyright (C) 2017 ONAP
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
21 <service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
22     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23     xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd"
24     module="neutron" version="1.0.0">
25
26     <method rpc="canCreateNetwork" mode="sync">
27         <return status="success">
28             <parameter name="error-code" value="200" />
29         </return>
30     </method>
31
32     <method rpc="networkCreated" mode="sync">
33         <switch test="`(length($network.segment[0].provider-physical-network) >= 5) and (substr($network.segment[0].provider-physical-network,0,5) == 'dvspg')`">
34             <outcome value="true">
35                 <block>
36                 <set>
37                   <parameter name="vlanlist" value="`$network.segment[0].provider-segmentation-id`"/>
38                 </set>
39                 <for index="i" start="1" end="`$network.num-segments`">
40                   <set>
41                     <parameter name="vlanlist" value="`$vlanlist+','+$network.segment[$i].provider-segmentation-id`"/>
42                   </set>
43                 </for>
44
45                 </block>
46             </outcome>
47             <outcome value="Other">
48                 <return status="success">
49                     <parameter name="error-code" value="200"/>
50                 </return>
51             </outcome>
52         </switch>
53     </method>
54
55 </service-logic>