1 <?xml version="1.0" encoding="UTF-8"?>
3 ============LICENSE_START=======================================================
5 ================================================================================
6 Copyright (C) 2017 AT&T Intellectual Property. All rights
8 ================================================================================
9 Licensed under the Apache License, Version 2.0 (the "License");
10 you may not use this file except in compliance with the License.
11 You may obtain a copy of the License at
12 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ============LICENSE_END=========================================================
22 <service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
23 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24 xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd"
25 module="ase" version="1.0.0">
27 <!-- Reserve a port. Returns uni-circuit-id of reserved ase-port -->
28 <method rpc="ase-port-reserve" mode="sync">
29 <switch test="$uni-cir-units">
30 <outcome value="Mbps">
31 <reserve plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
33 key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value"
37 <outcome value="success">
39 <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
40 <parameter name="file" value="/tmp/sample_r1.log" />
41 <parameter name="field1" value="__TIMESTAMP__"/>
42 <parameter name="field2" value="RESERVED"/>
43 <parameter name="field3" value="$asePort.uni_circuit_id"/>
45 <return status="success">
46 <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />
52 <outcome value="not-found">
53 <return status="failure">
54 <parameter name="error-code" value="1010" />
55 <parameter name="error-message" value="No ports found that match criteria" />
59 <outcome value="Other">
60 <return status="failure">
61 <parameter name="error-code" value="1010" />
62 <parameter name="error-message"
63 value="Error encountered trying to reserve port" />
69 <outcome value="Gbps">
70 <reserve plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
72 key="resource-emt-clli == $edge-device-clli and speed >= 1000 * $uni-cir-value"
76 <outcome value="success">
78 <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
79 <parameter name="file" value="/tmp/sample_r1.log" />
80 <parameter name="field1" value="__TIMESTAMP__"/>
81 <parameter name="field2" value="RESERVED"/>
82 <parameter name="field3" value="$asePort.uni_circuit_id"/>
84 <return status="success">
85 <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />
90 <outcome value="not-found">
91 <return status="failure">
92 <parameter name="error-code" value="1010" />
93 <parameter name="error-message" value="No ports found that match criteria" />
97 <return status="failure">
98 <parameter name="error-code" value="1012" />
99 <parameter name="error-message"
100 value="Error encountered trying to reserve port" />
103 <outcome value="Other">
104 <return status="failure">
105 <parameter name="error-code" value="1010" />
106 <parameter name="error-message"
107 value="Error encountered trying to reserve port" />
115 <!-- One step provisioning/activation command. Allocates a local resource,
116 then configures it on device -->
117 <method rpc="ase-port-activate-request" mode="sync">
119 <allocate plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
120 resource="ase-port" key="uni-circuit-id == $uni-circuit-id" pfx="asePort">
122 <outcome value="success">
123 <configure adaptor="org.openecomp.sdnc.sli.adaptor.emt.EmtAdaptor"
124 key="$uni-circuit-id" activate="true">
125 <parameter name="circuit.id" value="$uni-circuit-id" />
126 <parameter name="subscriber.name" value="$subscriber-name" />
127 <parameter name="emt.clli" value="$edge-device-clli" />
128 <parameter name="port.tagging" value="$port-tagging" />
129 <parameter name="port.mediaSpeed" value="$media-speed" />
130 <parameter name="location.state" value="$uni-location-state" />
131 <parameter name="location.city" value="$uni-location-city" />
132 <parameter name="cosCategory" value="$cos-category" />
133 <parameter name="gosProfile" value="$gos-profile" />
134 <parameter name="lldp" value="$asePort.resource-lldp" />
135 <parameter name="mtu" value="$asePort.resource-mtu" />
136 <outcome value="success">
138 <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
139 <parameter name="file" value="/tmp/sample_r1.log" />
140 <parameter name="field1" value="__TIMESTAMP__"/>
141 <parameter name="field2" value="ACTIVE"/>
142 <parameter name="field3" value="$uni-circuit-id"/>
144 <return status="success">
145 <parameter name="edge-device-clli" value="$asePort.resource-emt-clli" />
150 <outcome value="already-active">
151 <return status="failure">
152 <parameter name="error-code" value="1590" />
153 <parameter name="error-message" value="Port already active" />
156 <outcome value="Other">
157 <return status="failure">
158 <parameter name="error-code" value="1542" />
159 <parameter name="error-message" value="Activation failure" />
165 <outcome value="not-found">
167 <return status="failure">
168 <parameter name="error-code" value="1220" />
169 <parameter name="error-message" value="Circuit not found" />
174 <outcome value="Other">
175 <return status="failure">
176 <parameter name="error-code" value="1230" />
177 <parameter name="error-message" value="Error occurred trying to find circuit" />
185 <!-- Change provisioning w/o activation -->
186 <method rpc="ase-change-port-prov-request" mode="sync">
187 <allocate plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
188 resource="ase-port" key="uni-circuit-id == $uni-circuit-id" pfx="asePort">
190 <outcome value="success">
191 <return status="success">
192 <parameter name="edge-device-clli" value="$asePort.resource-emt-clli" />
196 <outcome value="not-found">
197 <return status="failure">
198 <parameter name="error-code" value="1220" />
199 <parameter name="error-message" value="Circuit not found" />
203 <outcome value="Other">
204 <return status="failure">
205 <parameter name="error-code" value="1230" />
206 <parameter name="error-message" value="Error occurred trying to find circuit" />
215 <!-- Release port -->
217 <method rpc="ase-release-port-request" mode="sync">
218 <exists plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
219 resource="ase-evc" key="uni-circuit-id == $uni-circuit-id">
221 <outcome value="true">
222 <return status="failure">
223 <parameter name="error-code" value="1130" />
224 <parameter name="error-message"
225 value="Cannot release port - used in existing EVC" />
228 <outcome value="false">
229 <release plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
230 resource="ase-port" key="uni-circuit-id == $uni-circuit-id">
231 <outcome value="success">
233 <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
234 <parameter name="file" value="/tmp/sample_r1.log" />
235 <parameter name="field1" value="__TIMESTAMP__"/>
236 <parameter name="field2" value="RELEASED"/>
237 <parameter name="field3" value="$uni-circuit-id"/>
239 <return status="success"/>
243 <outcome value="not-found">
244 <return status="failure">
245 <parameter name="error-code" value="1110" />
246 <parameter name="error-message" value="No port found for this uni-circuit-id" />
250 <outcome value="Other">
251 <return status="failure">
252 <parameter name="error-code" value="1130" />
253 <parameter name="error-message"
254 value="Error encountered trying to release port" />