[SDNC-5] Boron port and bug fixes
[sdnc/core.git] / src / site / apt / nodes.apt
1 ~~~\r
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");\r
9 ~~ you may not use this file except in compliance with the License.\r
10 ~~ You may obtain a copy of the License at\r
11 ~~ \r
12 ~~      http://www.apache.org/licenses/LICENSE-2.0\r
13 ~~ \r
14 ~~ Unless required by applicable law or agreed to in writing, software\r
15 ~~ distributed under the License is distributed on an "AS IS" BASIS,\r
16 ~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
17 ~~ See the License for the specific language governing permissions and\r
18 ~~ limitations under the License.
19 ~~ ============LICENSE_END=========================================================\r
20 ~~~\r
21 \r
22       ---\r
23       Service Logic Interpreter\r
24       ---\r
25       Dan Timoney\r
26       ---\r
27       2014-11-12\r
28       ---\r
29 \r
30 Supported node types\r
31 \r
32    The following built-in node types are currently supported:\r
33 \r
34      *  Flow Control\r
35 \r
36         *  {{{Block node}<<block>>}}\r
37 \r
38         *  {{{Call node}<<call>>}}\r
39 \r
40         *  {{{For node}<<for>>}}\r
41 \r
42         *  {{{Return node}<<return>>}}\r
43 \r
44         *  {{{Set node}<<set>>}}\r
45 \r
46         *  {{{Switch node}<<switch>>}}\r
47 \r
48      *  Device Management\r
49 \r
50         *  {{{Configure node}<<configure>>}}\r
51 \r
52      *  Java Plugin Support\r
53 \r
54         *  {{{Execute node}<<execute>>}}\r
55 \r
56      *  Recording\r
57 \r
58         *  {{{Record node}<<record>>}}\r
59 \r
60      *  Resource Management\r
61 \r
62         *  {{{Delete node}<<delete>>}}\r
63 \r
64         *  {{{Exists node}<<exists>>}}\r
65 \r
66         *  {{{Get-resource node}<<get-resource>>}}\r
67 \r
68         *  {{{Is-available node}<<is-available>>}}\r
69 \r
70         *  {{{Notify node}<<notify>>}}\r
71 \r
72         *  {{{Release node}<<release>>}}\r
73 \r
74         *  {{{Reserve node}<<reserve>>}}\r
75 \r
76         *  {{{Save node}<<save>>}}\r
77 \r
78         *  {{{Update node}<<update>>}}\r
79 \r
80 \r
81 * Flow Control\r
82 \r
83 ** Block node\r
84 \r
85 *** Description\r
86 \r
87    A <<block>> node is used to executes a set of nodes.\r
88 \r
89 *** Attributes\r
90 \r
91 *--------------*--------------------------------------------+\r
92 | <<atomic>>   | if <true>, then if a node returns failure, subsequent nodes will not be executed and nodes already executed will be backed out.\r
93 *--------------*--------------------------------------------+\r
94 \r
95 *** Parameters\r
96 \r
97   None\r
98 \r
99 *** Outcomes\r
100 \r
101   None\r
102 \r
103 *** Example\r
104 \r
105 +-----------------+\r
106 <block>\r
107   <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">\r
108     <parameter name="file" value="/tmp/sample_r1.log" />\r
109     <parameter name="field1" value="__TIMESTAMP__"/>\r
110     <parameter name="field2" value="RESERVED"/>\r
111     <parameter name="field3" value="$asePort.uni_circuit_id"/>\r
112   </record>\r
113   <return status="success">\r
114     <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />\r
115   </return>\r
116 </block>\r
117 +-----------------+\r
118 \r
119 \r
120 \r
121 **Call node\r
122 \r
123 *** Description\r
124 \r
125   A <<call>> node is used to call another graph\r
126 \r
127 *** Attributes\r
128 \r
129 *--------------*-------+\r
130 | <<module>>   | Module of directed graph to call.  If unset, defaults to that of calling graph\r
131 *--------------*-------+\r
132 | <<rpc>>      | rpc of directed graph to call.\r
133 *--------------*-------+\r
134 | <<version>>  | version of graph to call,  If unset, uses active version.\r
135 *--------------*-------+\r
136 | <<mode>>     | mode (sync/async) of graph to call.   If unset, defaults to that of calling graph.\r
137 *--------------*-------+\r
138 \r
139 \r
140 \r
141 *** Parameters\r
142 \r
143   Not applicable\r
144 \r
145 *** Outcomes\r
146 \r
147 *----------*---------+\r
148 | <<success>> | Sub graph returned success\r
149 *----------*---------+\r
150 | <<not-found>> | Graph not found\r
151 *----------*---------+\r
152 | <<failure>> | Subgraph returned success\r
153 *----------*---------+\r
154    .\r
155 \r
156 *** Example\r
157 \r
158 +-------------------+\r
159 <call rpc="svc-topology-reserve" mode="sync" />\r
160 +-------------------+\r
161 \r
162 **For node\r
163 \r
164 *** Description\r
165 \r
166   A <<for>> node provides a fixed iteration looping mechanism, similar to the Java for loop\r
167 \r
168 *** Attributes\r
169 \r
170 *--------------*-------+\r
171 | <<index>>   | index variable\r
172 *--------------*-------+\r
173 | <<start>>    | initial value\r
174 *--------------*-------+\r
175 | <<end>>      | maximum value\r
176 *--------------*-------+\r
177 \r
178 \r
179 *** Parameters\r
180 \r
181   Not applicable.\r
182 \r
183 *** Outcomes\r
184 \r
185   Not applicable.  The <<status>> node has no outcomes.\r
186 \r
187 *** Example\r
188 \r
189 +-------------------+\r
190 <for index="i" start="0" end="`$service-data.universal-cpe-ft.l2-switch-interfaces_length`">\r
191    <record plugin="org.openecomp.sdnc.sli.recording.Slf4jRecorder">\r
192       <parameter name="logger" value="message-log"/>\r
193       <parameter name="level" value="info"/>\r
194       <parameter name="field1" value="`'current l2-switch-interface name is ' + $service-data.universal-cpe-ft.l2-switch-interfaces[$i].name`"/>\r
195    </record>\r
196 </for>\r
197 +-------------------+\r
198 \r
199 **Return node\r
200 \r
201 *** Description\r
202 \r
203   A <<return>> node is used to return a status to the invoking MD-SAL application\r
204 \r
205 *** Attributes\r
206 \r
207 *--------------*-------+\r
208 | <<status>>   | Status value to return (<success> or <failure>)\r
209 *--------------*-------+\r
210 \r
211 \r
212 *** Parameters\r
213 \r
214   The following optional parameters may be passed to convey more\r
215   detailed status information.\r
216 \r
217 *------------*-----------+\r
218 | <<error-code>> | A brief, usually numeric, code indicating the error condition\r
219 *------------*-----------+\r
220 | <<error-message>> | A more detailed error message\r
221 *------------*-----------+\r
222 \r
223 *** Outcomes\r
224 \r
225   Not applicable.  The <<status>> node has no outcomes.\r
226 \r
227 *** Example\r
228 \r
229 +-------------------+\r
230 <return status="failure">\r
231   <parameter name="error-code" value="1542" />\r
232   <parameter name="error-message" value="Activation failure" />\r
233 </return>\r
234 +-------------------+\r
235 \r
236 **Set node\r
237 \r
238 *** Description\r
239 \r
240   A <<set>> node is used to set one or more values in the execution context\r
241 \r
242 *** Attributes\r
243 \r
244 *--------------*-------+\r
245 | <<only-if-unset>>   | If true the set node will only execute if the current value of the target is null\r
246 *--------------*-------+\r
247 \r
248 *** Parameters\r
249 \r
250   Values to be set are passed as parameters\r
251 \r
252 *** Outcomes\r
253 \r
254   Not applicable.  The <<set>> node has no outcomes.\r
255 \r
256 *** Example\r
257 \r
258 +-------------------+\r
259 <set>\r
260   <parameter name="vlan" value="$network.provider-segmentation-id" />\r
261 </set>\r
262 +-------------------+\r
263 \r
264 **Switch node\r
265 \r
266 *** Description\r
267 \r
268   A <<switch>> node is used to make a decision based on its <<test>> attribute.\r
269 \r
270 *** Attributes\r
271 \r
272 *--------------*-------+\r
273 | <<test>>   | Condition to test\r
274 *--------------*-------+\r
275 \r
276 \r
277 *** Parameters\r
278 \r
279   None\r
280 \r
281 \r
282 *** Outcomes\r
283 \r
284   Depends on the <<test>> condition\r
285 \r
286 *** Example\r
287 \r
288 +-------------------+\r
289 <switch test="$uni-cir-units">\r
290   <outcome value="Mbps">\r
291     <reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
292              resource="ase-port"\r
293              key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value"\r
294              pfx="asePort">\r
295 \r
296       <outcome value="success">\r
297         <return status="success">\r
298           <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />\r
299         </return>\r
300       </outcome>\r
301       <outcome value="Other">\r
302         <return status="failure">\r
303           <parameter name="error-code" value="1010" />\r
304           <parameter name="error-message" value="No ports found that match criteria" />\r
305         </return>\r
306       </outcome>\r
307     </reserve>\r
308   </outcome>\r
309   <outcome value="Gbps">\r
310     <reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
311              resource="ase-port"\r
312              key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value*1000"\r
313              pfx="asePort">\r
314 \r
315       <outcome value="success">\r
316         <return status="success">\r
317           <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />\r
318         </return>\r
319       </outcome>\r
320       <outcome value="Other">\r
321         <return status="failure">\r
322           <parameter name="error-code" value="1010" />\r
323           <parameter name="error-message" value="No ports found that match criteria" />\r
324         </return>\r
325       </outcome>\r
326     </reserve>\r
327   </outcome>\r
328 </switch>\r
329 +-------------------+\r
330 \r
331 * Device Management\r
332 \r
333 **Configure node\r
334 \r
335 *** Description\r
336 \r
337   A <<configure>> node is used to configure a device.\r
338 \r
339 *** Attributes\r
340 \r
341 *--------------*-------+\r
342 | <<adaptor>>   | Fully qualified Java class of resource adaptor to be used\r
343 *--------------*-------+\r
344 | <<activate>> | Activate device/interface, for devices that support a separate activation step.\r
345 *--------------*-------+\r
346 | <<key>>      | SQL-like string specifying criteria for item to configure\r
347 *--------------*-------+\r
348 \r
349 *** Parameters\r
350 \r
351   Specific to device adaptor.\r
352 \r
353 *** Outcomes\r
354 \r
355 *-----------*-------+\r
356 | <<success>>  | Device successfully configured\r
357 *-----------*-------+\r
358 | <<not-found>> | Element to be configured does not exist.\r
359 *-----------*--------+\r
360 | <<not-ready>> | Element is not in a state where it can be configured/activated\r
361 *-----------*-------+\r
362 | <<already-active>> | Attempt to activate element that is already active\r
363 *-----------*-------+\r
364 | <<failure>> | Configure failed for some other reason\r
365 *-----------*-------+\r
366 \r
367 *** Example\r
368 \r
369 +-------------------+\r
370 <configure adaptor="org.openecomp.sdnc.sli.adaptor.emt.EmtAdaptor"\r
371            key="$uni-circuit-id" activate="true">\r
372   <parameter name="circuit.id" value="$uni-circuit-id" />\r
373   <parameter name="subscriber.name" value="$subscriber-name" />\r
374   <parameter name="emt.clli" value="$edge-device-clli" />\r
375   <parameter name="port.tagging" value="$port-tagging" />\r
376   <parameter name="port.mediaSpeed" value="$media-speed" />\r
377   <parameter name="location.state" value="$uni-location-state" />\r
378   <parameter name="location.city" value="$uni-location-city" />\r
379   <parameter name="cosCategory" value="$cos-category" />\r
380   <parameter name="gosProfile" value="$gos-profile" />\r
381   <parameter name="lldp" value="$asePort.resource-lldp" />\r
382   <parameter name="mtu" value="$asePort.resource-mtu" />\r
383   <outcome value="success">\r
384     <block>\r
385       <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">\r
386         <parameter name="file" value="/tmp/sample_r1.log" />\r
387         <parameter name="field1" value="__TIMESTAMP__"/>\r
388         <parameter name="field2" value="ACTIVE"/>\r
389         <parameter name="field3" value="$uni-circuit-id"/>\r
390       </record>\r
391       <return status="success">\r
392         <parameter name="edge-device-clli" value="$asePort.resource-emt-clli" />\r
393       </return>\r
394     </block>\r
395   </outcome>\r
396   <outcome value="already-active">\r
397     <return status="failure">\r
398       <parameter name="error-code" value="1590" />\r
399       <parameter name="error-message" value="Port already active" />\r
400     </return>\r
401   </outcome>\r
402   <outcome value="Other">\r
403     <return status="failure">\r
404       <parameter name="error-code" value="1542" />\r
405       <parameter name="error-message" value="Activation failure" />\r
406     </return>\r
407   </outcome>\r
408 </configure>\r
409 +-------------------+\r
410 \r
411 * Java Plugin Support\r
412 \r
413 **Execute node\r
414 \r
415 *** Description\r
416 \r
417   An <<execute>> node is used to execute Java code supplied as a plugin\r
418 \r
419 *** Attributes\r
420 \r
421 *--------------*-------+\r
422 | <<plugin>>   | Fully qualified Java class of plugin to be used\r
423 *--------------*-------+\r
424 | <<method>> | Name of method in the plugin class to execute.  Method must return void, and take 2 arguments: a Map (for parameters) and a SvcLogicContext (to allow plugin read/write access to context memory)\r
425 *--------------*-------+\r
426 \r
427 *** Parameters\r
428 \r
429   Specific to plugin / method\r
430 \r
431 *** Outcomes\r
432 \r
433 *-----------*-------+\r
434 | <<success>>  | Device successfully configured\r
435 *-----------*-------+\r
436 | <<not-found>> | Plugin class could not be loaded\r
437 *-----------*--------+\r
438 | <<unsupported-method>> | Named method taking (Map, SvcLogicContext) could not be found\r
439 *-----------*-------+\r
440 | <<failure>> | Configure failed for some other reason\r
441 *-----------*-------+\r
442 \r
443 *** Example\r
444 \r
445 +-------------------+\r
446 <execute plugin="org.openecomp.sdnc.sli.plugin.HelloWorld"\r
447            method="log">\r
448   <parameter name="message" value="Hello, world!" />\r
449   <outcome value="success">\r
450       <return status="success"/>\r
451   </outcome>\r
452   <outcome value="not-found">\r
453     <return status="failure">\r
454       <parameter name="error-code" value="1590" />\r
455       <parameter name="error-message" value="Could not locate plugin" />\r
456     </return>\r
457   </outcome>\r
458   <outcome value="Other">\r
459     <return status="failure">\r
460       <parameter name="error-code" value="1542" />\r
461       <parameter name="error-message" value="Internal error" />\r
462     </return>\r
463   </outcome>\r
464 </execute>\r
465 +-------------------+\r
466 \r
467 * Recording\r
468 \r
469 ** Record node\r
470 \r
471 *** Description\r
472 \r
473   A <<record>> node is used to record an event.  For example, this might be used\r
474   to log provisioning events.\r
475 \r
476 *** Attributes\r
477 \r
478 *--------------*-------+\r
479 | <<plugin>>   | Fully qualified Java class to handle recording.\r
480 *--------------*-------+\r
481 \r
482 \r
483 *** Parameters\r
484 \r
485  Parameters will depend on the plugin being used.  For the FileRecorder class,\r
486  the parameters are as follows\r
487 \r
488 *------------*-----------+\r
489 | <<file>> | The file to which the record should be written\r
490 *------------*-----------+\r
491 | <<field1>> | First field to write.  There will be <<field>> parameters for each field to write, from <<field1>> through <<fieldN>>.  A special value __TIMESTAMP__ may be assigned to a field to insert the current timestamp\r
492 *------------*-----------+\r
493 \r
494 \r
495 *** Outcomes\r
496 \r
497 *----------*---------+\r
498 | <<success>> | Record successfully written\r
499 *----------*---------+\r
500 | <<failure>> | Record could not be successfully written\r
501 *----------*---------+\r
502 \r
503 *** Example\r
504 \r
505 +-------------------+\r
506 <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">\r
507   <parameter name="file" value="/tmp/sample_r1.log" />\r
508   <parameter name="field1" value="__TIMESTAMP__"/>\r
509   <parameter name="field2" value="ACTIVE"/>\r
510   <parameter name="field3" value="$uni-circuit-id"/>\r
511 </record>\r
512 +-------------------+\r
513 \r
514 * Resource Management\r
515 \r
516 ** Delete node\r
517 \r
518 *** Description\r
519 \r
520   A <<delete>> node is used to delete a resource from the local resource inventory.\r
521 \r
522 *** Attributes\r
523 \r
524 *--------------*-------+\r
525 | <<plugin>>   | Fully qualified Java class of resource adaptor to be used\r
526 *--------------*-------+\r
527 | <<resource>> | Type of resource to delete\r
528 *--------------*-------+\r
529 | <<key>>      | SQL-like string specifying key to delete\r
530 *--------------*-------+\r
531 \r
532 *** Parameters\r
533 \r
534   None\r
535 \r
536 *** Outcomes\r
537 \r
538 *-----------*-------+\r
539 | <<success>>  | Resource specified deleted successfully.\r
540 *-----------*-------+\r
541 | <failure>> | Resource specified was not deleted\r
542 *-----------*-------+\r
543 \r
544 *** Example\r
545 \r
546 +-------------------+\r
547 <delete plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
548         resource="ase-port"\r
549         key="uni_circuit_id == $uni-circuit-id">\r
550   <outcome value="true">\r
551     <return status="success"/>\r
552   </outcome>\r
553   <outcome value="false">\r
554     <return status="failure"/>\r
555   </outcome>\r
556 </delete>\r
557 +-------------------+\r
558 \r
559 \r
560 ** Exists node\r
561 \r
562 *** Description\r
563 \r
564   An <<exists>> node is used to determine whether a particular\r
565   instance of a resource exists.  For example, this might be\r
566   used to test whether a particular switch CLLI is provisioned.\r
567 \r
568 *** Attributes\r
569 \r
570 *--------------*-------+\r
571 | <<plugin>>   | Fully qualified Java class of resource adaptor to be used\r
572 *--------------*-------+\r
573 | <<resource>> | Type of resource to check\r
574 *--------------*-------+\r
575 | <<key>>      | SQL-like string specifying key to check for\r
576 *--------------*-------+\r
577 \r
578 *** Parameters\r
579 \r
580   None\r
581 \r
582 *** Outcomes\r
583 \r
584 *-----------*-------+\r
585 | <<true>>  | Resource specified exists.\r
586 *-----------*-------+\r
587 | <<false>> | Resource specified is unknown\r
588 *-----------*-------+\r
589 \r
590 *** Example\r
591 \r
592 +-------------------+\r
593 <exists plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
594         resource="ase-port"\r
595         key="uni_circuit_id == $uni-circuit-id">\r
596   <outcome value="true">\r
597     <return status="success"/>\r
598   </outcome>\r
599   <outcome value="false">\r
600     <return status="failure"/>\r
601   </outcome>\r
602 </exists>\r
603 +-------------------+\r
604 \r
605 ** Get-resource node\r
606 \r
607 *** Description\r
608 \r
609   A <<get-resource>> node is used to retrieve information about a\r
610   particular resource and make it available to other nodes in the\r
611   service logic tree.  For example, this might be used to\r
612   retrieve information about a particular uni-port.\r
613 \r
614 *** Attributes\r
615 \r
616 *--------------*-------+\r
617 | <<plugin>>   | Fully qualified Java class of resource adaptor to be used\r
618 *--------------*-------+\r
619 | <<resource>> | Type of resource to retrieve\r
620 *--------------*-------+\r
621 | <<key>>      | SQL-like string specifying criteria for retrieval\r
622 *--------------*-------+\r
623 | <<pfx>>      | Prefix to add to context variable names set for data retrieved\r
624 *--------------*-------+\r
625 | <<select>>      | String to specify, if key matches multiple entries, which entry should take precedence\r
626 *--------------*-------+\r
627 | <<order-by>>      | Prefix to add to context variable names set for data retrieved\r
628 *--------------*-------+\r
629 \r
630 *** Parameters\r
631 \r
632   None\r
633 \r
634 \r
635 *** Outcomes\r
636 \r
637 *-----------*-------+\r
638 | <<success>>  | Resource successfully retrieved\r
639 *-----------*-------+\r
640 | <<not-found>> | Resource referenced does not exist\r
641 *-----------*-------+\r
642 | <<failure>> | Resource retrieve failed for some other reason\r
643 *-----------*-------+\r
644 \r
645 *** Example\r
646 \r
647 +-------------------+\r
648 <get-resource plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
649               resource="ase-port"\r
650               key="uni_circuit_id == $uni-circuit-id"\r
651               pfx="current-port">\r
652   <outcome value="success">\r
653     <return status="success"/>\r
654   </outcome>\r
655   <outcome value="not-found">\r
656     <return status="failure"/>\r
657   </outcome>\r
658   <outcome value="failure">\r
659     <return status="failure"/>\r
660   </outcome>\r
661 </get-resource>\r
662 +-------------------+\r
663 \r
664 ** Is-available node\r
665 \r
666 *** Description\r
667 \r
668   An <<is-available>> node is used to determine whether a particular\r
669   type of resource is available.  For example, this might be used to\r
670   test whether any ports are available for assignment on a particular switch.\r
671 \r
672 *** Attributes\r
673 \r
674 *--------------*-------+\r
675 | <<plugin>>   | Fully qualified Java class of resource adaptor to be used\r
676 *--------------*-------+\r
677 | <<resource>> | Type of resource to check\r
678 *--------------*-------+\r
679 | <<key>>      | SQL-like string specifying key to check for\r
680 *--------------*-------+\r
681 | <<pfx>>      | Prefix to add to context variable names set for data retrieved\r
682 *--------------*-------+\r
683 \r
684 *** Parameters\r
685 \r
686   None\r
687 \r
688 *** Outcomes\r
689 \r
690 *-----------*-------+\r
691 | <<true>>  | Resource requested is available\r
692 *-----------*-------+\r
693 | <<false>> | Resource requested is not available\r
694 *-----------*-------+\r
695 \r
696 *** Example\r
697 \r
698 +-------------------+\r
699 <is-available plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
700               resource="ase-port"\r
701               key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value">\r
702   <outcome value="true">\r
703     <return status="success"/>\r
704   </outcome>\r
705   <outcome value="false">\r
706     <return status="failure"/>\r
707   </outcome>\r
708 </is-available>\r
709 +-------------------+\r
710 \r
711 ** Notify node\r
712 \r
713 *** Description\r
714 \r
715   A <<notify>> node is used to inform an external application (e.g. A&AI) that a resource was\r
716   updated.\r
717 \r
718 *** Attributes\r
719 \r
720 *--------------*-------+\r
721 | <<plugin>>   | Fully qualified Java class of resource adaptor to be used\r
722 *--------------*-------+\r
723 | <<resource>> | Identifies resource that was updated\r
724 *--------------*-------+\r
725 | <<action>>      | Action that triggered notification to be sent (ADD/UPDATE/DELETE)\r
726 *--------------*-------+\r
727 \r
728 *** Parameters\r
729 \r
730   None\r
731 \r
732 *** Outcomes\r
733 \r
734 *-----------*-------+\r
735 | <<success>>  | Notification was successful\r
736 *-----------*-------+\r
737 | <<failure>> | Notification failed is not available\r
738 *-----------*-------+\r
739 \r
740 *** Example\r
741 \r
742 +-------------------+\r
743 <notify plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
744               resource="ase-port"\r
745               action="ADD">\r
746   <outcome value="success">\r
747     <return status="success"/>\r
748   </outcome>\r
749   <outcome value="Other">\r
750     <return status="failure"/>\r
751   </outcome>\r
752 </notify>\r
753 +-------------------+\r
754 \r
755 ** Release node\r
756 \r
757 *** Description\r
758 \r
759   A <<release>> node is used to mark a resource as no longer in use, and thus\r
760   available for assignment.\r
761 \r
762 *** Attributes\r
763 \r
764 *--------------*-------+\r
765 | <<plugin>>   | Fully qualified Java class of resource adaptor to be used\r
766 *--------------*-------+\r
767 | <<resource>> | Type of resource to release\r
768 *--------------*-------+\r
769 | <<key>>      | SQL-like string specifying key to check of resource to release\r
770 *--------------*-------+\r
771 \r
772 *** Parameters\r
773 \r
774   None\r
775 \r
776 *** Outcomes\r
777 \r
778 *-----------*-------+\r
779 | <<success>>  | Resource successfully released\r
780 *-----------*-------+\r
781 | <<not-found>> | Resource referenced does not exist\r
782 *-----------*-------+\r
783 | <<failure>> | Resource release failed for some other reason\r
784 *-----------*-------+\r
785 \r
786 *** Example\r
787 \r
788 +-------------------+\r
789 <release plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
790          resource="ase-port"\r
791          key="uni_circuit_id == $uni-circuit-id">\r
792   <outcome value="success">\r
793     <return status="success"/>\r
794   </outcome>\r
795   <outcome value="not-found">\r
796     <return status="failure"/>\r
797   </outcome>\r
798   <outcome value="failure">\r
799     <return status="failure"/>\r
800   </outcome>\r
801 </release>\r
802 +-------------------+\r
803 \r
804 \r
805 ** Reserve node\r
806 \r
807 *** Description\r
808 \r
809   A <<reserve>> node is used to reserve a particular\r
810   type of resource..  For example, this might be used to\r
811   reserve a port on a particular switch.\r
812 \r
813 *** Attributes\r
814 \r
815 *--------------*-------+\r
816 | <<plugin>>   | Fully qualified Java class of resource adaptor to be used\r
817 *--------------*-------+\r
818 | <<resource>> | Type of resource to reserve\r
819 *--------------*-------+\r
820 | <<key>>      | SQL-like string specifying criteria for reservation\r
821 *--------------*-------+\r
822 | <<select>>   | String to specify, if <<key>> matches multiple entries, which entry should take precedence\r
823 *--------------*-------+\r
824 \r
825 *** Parameters\r
826 \r
827   None\r
828 \r
829 *** Outcomes\r
830 \r
831 *-----------*-------+\r
832 | <<success>>  | Resource requested was successfully reserved\r
833 *-----------*-------+\r
834 | <<failure>> | Resource requested was not successfully reserved\r
835 *-----------*-------+\r
836 \r
837 *** Example\r
838 \r
839 +-------------------+\r
840 <reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
841          resource="ase-port"\r
842          key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value"\r
843          select="min(speed)">\r
844   <outcome value="success">\r
845     <return status="success"/>\r
846   </outcome>\r
847   <outcome value="failure">\r
848     <return status="failure"/>\r
849   </outcome>\r
850 </reserve>\r
851 +-------------------+\r
852 \r
853 ** Save node\r
854 \r
855 *** Description\r
856 \r
857   A <<save>> node is used to save information about a\r
858   particular resource to persistent storage.  For example, this might be used to\r
859   save information about a particular uni-port.\r
860 \r
861 *** Attributes\r
862 \r
863 *--------------*-------+\r
864 | <<plugin>>   | Fully qualified Java class of resource adaptor to be used\r
865 *--------------*-------+\r
866 | <<resource>> | Type of resource to save\r
867 *--------------*-------+\r
868 | <<key>>      | SQL-like string specifying criteria for retrieval\r
869 *--------------*-------+\r
870 | <<force>>    | If "true", save resource even if this resource is already stored in persistent storage\r
871 *--------------*-------+\r
872 | <<pfx>>      | Prefix to be prepended to variable names, when attributes are set in SvcLogicContext\r
873 *--------------*-------+\r
874 \r
875 *** Parameters\r
876 \r
877   Values to save (columns) are specified as parameters, with each name\r
878   corresponding to a column name and each value corresponding to the\r
879   value to set.\r
880 \r
881 *** Outcomes\r
882 \r
883 *-----------*-------+\r
884 | <<success>>  | Resource successfully saved\r
885 *-----------*-------+\r
886 | <<failure>> | Resource save failed\r
887 *-----------*-------+\r
888 \r
889 *** Example\r
890 \r
891 +-------------------+\r
892 <save plugin="`$sample-resource-plugin`" resource="vnf"\r
893     key="vnf-name = $requests.vnf.vnf-name" force="true"\r
894     pfx="requests.vnf">\r
895     <parameter name="vnf-name"\r
896         value="`$requests.cust-country-code + $requests.cust-id + $requests.cust-city + $requests.cust-state + '001VCE'`" />\r
897     <parameter name="vnf-type" value="vce" />\r
898     <parameter name="orchestration-status" value="pending-create" />\r
899     <parameter name="heat-stack-id" value="`$requests.heat-stack-id`" />\r
900     <parameter name="mso-catalog-key" value="`$requests.mso-catalog-key`" />\r
901     <parameter name="oam-ipv4-address" value="`$vce-ipv4-oam-addr.ipv4-addr`" />\r
902 </save>\r
903 +-------------------+\r
904 \r
905 ** Update node\r
906 \r
907 *** Description\r
908 \r
909   An <<update>> node is used to update information about a\r
910   particular resource to persistent storage.\r
911 \r
912 *** Attributes\r
913 \r
914 *--------------*-------+\r
915 | <<plugin>>   | Fully qualified Java class of resource adaptor to be used\r
916 *--------------*-------+\r
917 | <<resource>> | Type of resource to update\r
918 *--------------*-------+\r
919 | <<key>>      | SQL-like string specifying criteria for retrieval\r
920 *--------------*-------+\r
921 | <<pfx>>      | Prefix to be prepended to variable names, when attributes are set in SvcLogicContext\r
922 *--------------*-------+\r
923 \r
924 *** Parameters\r
925 \r
926   Values to save (columns) are specified as parameters, with each name\r
927   corresponding to a column name and each value corresponding to the\r
928   value to set.\r
929 \r
930 *** Outcomes\r
931 \r
932 *-----------*-------+\r
933 | <<success>>  | Resource successfully saved\r
934 *-----------*-------+\r
935 | <<failure>> | Resource save failed\r
936 *-----------*-------+\r
937 \r
938 *** Example\r
939 \r
940 +-------------------+\r
941 <update plugin="`$sample-resource-plugin`" resource="vnf"\r
942     key="vnf-name = $requests.vnf.vnf-name"\r
943     pfx="requests.vnf">\r
944     <parameter name="vnf-name"\r
945         value="`$requests.cust-country-code + $requests.cust-id + $requests.cust-city + $requests.cust-state + '001VCE'`" />\r
946     <parameter name="vnf-type" value="vce" />\r
947     <parameter name="orchestration-status" value="pending-create" />\r
948     <parameter name="heat-stack-id" value="`$requests.heat-stack-id`" />\r
949     <parameter name="mso-catalog-key" value="`$requests.mso-catalog-key`" />\r
950     <parameter name="oam-ipv4-address" value="`$vce-ipv4-oam-addr.ipv4-addr`" />\r
951 </update>\r
952 +-------------------+\r
953 \r