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