1 <?xml version="1.0" encoding="UTF-8"?>
3 ============LICENSE_START=======================================================
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=========================================================
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="ase" version="1.0.0">
26 <!-- Reserve a port. Returns uni-circuit-id of reserved ase-port -->
27 <method rpc="ase-port-reserve" mode="sync">
28 <switch test="$uni-cir-units">
29 <outcome value="Mbps">
30 <reserve plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
32 key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value"
36 <outcome value="success">
38 <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
39 <parameter name="file" value="/tmp/sample_r1.log" />
40 <parameter name="field1" value="__TIMESTAMP__"/>
41 <parameter name="field2" value="RESERVED"/>
42 <parameter name="field3" value="$asePort.uni_circuit_id"/>
44 <return status="success">
45 <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />
51 <outcome value="not-found">
52 <return status="failure">
53 <parameter name="error-code" value="1010" />
54 <parameter name="error-message" value="No ports found that match criteria" />
58 <outcome value="Other">
59 <return status="failure">
60 <parameter name="error-code" value="1010" />
61 <parameter name="error-message"
62 value="Error encountered trying to reserve port" />
68 <outcome value="Gbps">
69 <reserve plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
71 key="resource-emt-clli == $edge-device-clli and speed >= 1000 * $uni-cir-value"
75 <outcome value="success">
77 <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
78 <parameter name="file" value="/tmp/sample_r1.log" />
79 <parameter name="field1" value="__TIMESTAMP__"/>
80 <parameter name="field2" value="RESERVED"/>
81 <parameter name="field3" value="$asePort.uni_circuit_id"/>
83 <return status="success">
84 <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />
89 <outcome value="not-found">
90 <return status="failure">
91 <parameter name="error-code" value="1010" />
92 <parameter name="error-message" value="No ports found that match criteria" />
96 <return status="failure">
97 <parameter name="error-code" value="1012" />
98 <parameter name="error-message"
99 value="Error encountered trying to reserve port" />
102 <outcome value="Other">
103 <return status="failure">
104 <parameter name="error-code" value="1010" />
105 <parameter name="error-message"
106 value="Error encountered trying to reserve port" />
114 <!-- One step provisioning/activation command. Allocates a local resource,
115 then configures it on device -->
116 <method rpc="ase-port-activate-request" mode="sync">
118 <allocate plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
119 resource="ase-port" key="uni-circuit-id == $uni-circuit-id" pfx="asePort">
121 <outcome value="success">
122 <configure adaptor="org.openecomp.sdnc.sli.adaptor.emt.EmtAdaptor"
123 key="$uni-circuit-id" activate="true">
124 <parameter name="circuit.id" value="$uni-circuit-id" />
125 <parameter name="subscriber.name" value="$subscriber-name" />
126 <parameter name="emt.clli" value="$edge-device-clli" />
127 <parameter name="port.tagging" value="$port-tagging" />
128 <parameter name="port.mediaSpeed" value="$media-speed" />
129 <parameter name="location.state" value="$uni-location-state" />
130 <parameter name="location.city" value="$uni-location-city" />
131 <parameter name="cosCategory" value="$cos-category" />
132 <parameter name="gosProfile" value="$gos-profile" />
133 <parameter name="lldp" value="$asePort.resource-lldp" />
134 <parameter name="mtu" value="$asePort.resource-mtu" />
135 <outcome value="success">
137 <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
138 <parameter name="file" value="/tmp/sample_r1.log" />
139 <parameter name="field1" value="__TIMESTAMP__"/>
140 <parameter name="field2" value="ACTIVE"/>
141 <parameter name="field3" value="$uni-circuit-id"/>
143 <return status="success">
144 <parameter name="edge-device-clli" value="$asePort.resource-emt-clli" />
149 <outcome value="already-active">
150 <return status="failure">
151 <parameter name="error-code" value="1590" />
152 <parameter name="error-message" value="Port already active" />
155 <outcome value="Other">
156 <return status="failure">
157 <parameter name="error-code" value="1542" />
158 <parameter name="error-message" value="Activation failure" />
164 <outcome value="not-found">
166 <return status="failure">
167 <parameter name="error-code" value="1220" />
168 <parameter name="error-message" value="Circuit not found" />
173 <outcome value="Other">
174 <return status="failure">
175 <parameter name="error-code" value="1230" />
176 <parameter name="error-message" value="Error occurred trying to find circuit" />
184 <!-- Change provisioning w/o activation -->
185 <method rpc="ase-change-port-prov-request" mode="sync">
186 <allocate plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
187 resource="ase-port" key="uni-circuit-id == $uni-circuit-id" pfx="asePort">
189 <outcome value="success">
190 <return status="success">
191 <parameter name="edge-device-clli" value="$asePort.resource-emt-clli" />
195 <outcome value="not-found">
196 <return status="failure">
197 <parameter name="error-code" value="1220" />
198 <parameter name="error-message" value="Circuit not found" />
202 <outcome value="Other">
203 <return status="failure">
204 <parameter name="error-code" value="1230" />
205 <parameter name="error-message" value="Error occurred trying to find circuit" />
214 <!-- Release port -->
216 <method rpc="ase-release-port-request" mode="sync">
217 <exists plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
218 resource="ase-evc" key="uni-circuit-id == $uni-circuit-id">
220 <outcome value="true">
221 <return status="failure">
222 <parameter name="error-code" value="1130" />
223 <parameter name="error-message"
224 value="Cannot release port - used in existing EVC" />
227 <outcome value="false">
228 <release plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
229 resource="ase-port" key="uni-circuit-id == $uni-circuit-id">
230 <outcome value="success">
232 <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
233 <parameter name="file" value="/tmp/sample_r1.log" />
234 <parameter name="field1" value="__TIMESTAMP__"/>
235 <parameter name="field2" value="RELEASED"/>
236 <parameter name="field3" value="$uni-circuit-id"/>
238 <return status="success"/>
242 <outcome value="not-found">
243 <return status="failure">
244 <parameter name="error-code" value="1110" />
245 <parameter name="error-message" value="No port found for this uni-circuit-id" />
249 <outcome value="Other">
250 <return status="failure">
251 <parameter name="error-code" value="1130" />
252 <parameter name="error-message"
253 value="Error encountered trying to release port" />