-~~~\r
+~~~
~~ ============LICENSE_START=======================================================
~~ openECOMP : SDN-C
~~ ================================================================================
~~ Copyright (C) 2017 AT&T Intellectual Property. All rights
~~ reserved.
~~ ================================================================================
-~~ Licensed under the Apache License, Version 2.0 (the "License");\r
-~~ you may not use this file except in compliance with the License.\r
-~~ You may obtain a copy of the License at\r
-~~ \r
-~~ http://www.apache.org/licenses/LICENSE-2.0\r
-~~ \r
-~~ Unless required by applicable law or agreed to in writing, software\r
-~~ distributed under the License is distributed on an "AS IS" BASIS,\r
-~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-~~ See the License for the specific language governing permissions and\r
+~~ Licensed under the Apache License, Version 2.0 (the "License");
+~~ you may not use this file except in compliance with the License.
+~~ You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
~~ limitations under the License.
-~~ ============LICENSE_END=========================================================\r
-~~~\r
-\r
- ---\r
- Service Logic Interpreter\r
- ---\r
- Dan Timoney\r
- ---\r
- 2014-11-12\r
- ---\r
-\r
-Supported node types\r
-\r
- The following built-in node types are currently supported:\r
-\r
- * Flow Control\r
-\r
- * {{{Block node}<<block>>}}\r
-\r
- * {{{Call node}<<call>>}}\r
-\r
- * {{{For node}<<for>>}}\r
-\r
- * {{{Return node}<<return>>}}\r
-\r
- * {{{Set node}<<set>>}}\r
-\r
- * {{{Switch node}<<switch>>}}\r
-\r
- * Device Management\r
-\r
- * {{{Configure node}<<configure>>}}\r
-\r
- * Java Plugin Support\r
-\r
- * {{{Execute node}<<execute>>}}\r
-\r
- * Recording\r
-\r
- * {{{Record node}<<record>>}}\r
-\r
- * Resource Management\r
-\r
- * {{{Delete node}<<delete>>}}\r
-\r
- * {{{Exists node}<<exists>>}}\r
-\r
- * {{{Get-resource node}<<get-resource>>}}\r
-\r
- * {{{Is-available node}<<is-available>>}}\r
-\r
- * {{{Notify node}<<notify>>}}\r
-\r
- * {{{Release node}<<release>>}}\r
-\r
- * {{{Reserve node}<<reserve>>}}\r
-\r
- * {{{Save node}<<save>>}}\r
-\r
- * {{{Update node}<<update>>}}\r
-\r
-\r
-* Flow Control\r
-\r
-** Block node\r
-\r
-*** Description\r
-\r
- A <<block>> node is used to executes a set of nodes.\r
-\r
-*** Attributes\r
-\r
-*--------------*--------------------------------------------+\r
-| <<atomic>> | if <true>, then if a node returns failure, subsequent nodes will not be executed and nodes already executed will be backed out.\r
-*--------------*--------------------------------------------+\r
-\r
-*** Parameters\r
-\r
- None\r
-\r
-*** Outcomes\r
-\r
- None\r
-\r
-*** Example\r
-\r
-+-----------------+\r
-<block>\r
- <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">\r
- <parameter name="file" value="/tmp/sample_r1.log" />\r
- <parameter name="field1" value="__TIMESTAMP__"/>\r
- <parameter name="field2" value="RESERVED"/>\r
- <parameter name="field3" value="$asePort.uni_circuit_id"/>\r
- </record>\r
- <return status="success">\r
- <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />\r
- </return>\r
-</block>\r
-+-----------------+\r
-\r
-\r
-\r
-**Call node\r
-\r
-*** Description\r
-\r
- A <<call>> node is used to call another graph\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<module>> | Module of directed graph to call. If unset, defaults to that of calling graph\r
-*--------------*-------+\r
-| <<rpc>> | rpc of directed graph to call.\r
-*--------------*-------+\r
-| <<version>> | version of graph to call, If unset, uses active version.\r
-*--------------*-------+\r
-| <<mode>> | mode (sync/async) of graph to call. If unset, defaults to that of calling graph.\r
-*--------------*-------+\r
-\r
-\r
-\r
-*** Parameters\r
-\r
- Not applicable\r
-\r
-*** Outcomes\r
-\r
-*----------*---------+\r
-| <<success>> | Sub graph returned success\r
-*----------*---------+\r
-| <<not-found>> | Graph not found\r
-*----------*---------+\r
-| <<failure>> | Subgraph returned success\r
-*----------*---------+\r
- .\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<call rpc="svc-topology-reserve" mode="sync" />\r
-+-------------------+\r
-\r
-**For node\r
-\r
-*** Description\r
-\r
- A <<for>> node provides a fixed iteration looping mechanism, similar to the Java for loop\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<index>> | index variable\r
-*--------------*-------+\r
-| <<start>> | initial value\r
-*--------------*-------+\r
-| <<end>> | maximum value\r
-*--------------*-------+\r
-\r
-\r
-*** Parameters\r
-\r
- Not applicable.\r
-\r
-*** Outcomes\r
-\r
- Not applicable. The <<status>> node has no outcomes.\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<for index="i" start="0" end="`$service-data.universal-cpe-ft.l2-switch-interfaces_length`">\r
- <record plugin="org.openecomp.sdnc.sli.recording.Slf4jRecorder">\r
- <parameter name="logger" value="message-log"/>\r
- <parameter name="level" value="info"/>\r
- <parameter name="field1" value="`'current l2-switch-interface name is ' + $service-data.universal-cpe-ft.l2-switch-interfaces[$i].name`"/>\r
- </record>\r
-</for>\r
-+-------------------+\r
-\r
-**Return node\r
-\r
-*** Description\r
-\r
- A <<return>> node is used to return a status to the invoking MD-SAL application\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<status>> | Status value to return (<success> or <failure>)\r
-*--------------*-------+\r
-\r
-\r
-*** Parameters\r
-\r
- The following optional parameters may be passed to convey more\r
- detailed status information.\r
-\r
-*------------*-----------+\r
-| <<error-code>> | A brief, usually numeric, code indicating the error condition\r
-*------------*-----------+\r
-| <<error-message>> | A more detailed error message\r
-*------------*-----------+\r
-\r
-*** Outcomes\r
-\r
- Not applicable. The <<status>> node has no outcomes.\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<return status="failure">\r
- <parameter name="error-code" value="1542" />\r
- <parameter name="error-message" value="Activation failure" />\r
-</return>\r
-+-------------------+\r
-\r
-**Set node\r
-\r
-*** Description\r
-\r
- A <<set>> node is used to set one or more values in the execution context\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<only-if-unset>> | If true the set node will only execute if the current value of the target is null\r
-*--------------*-------+\r
-\r
-*** Parameters\r
-\r
- Values to be set are passed as parameters\r
-\r
-*** Outcomes\r
-\r
- Not applicable. The <<set>> node has no outcomes.\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<set>\r
- <parameter name="vlan" value="$network.provider-segmentation-id" />\r
-</set>\r
-+-------------------+\r
-\r
-**Switch node\r
-\r
-*** Description\r
-\r
- A <<switch>> node is used to make a decision based on its <<test>> attribute.\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<test>> | Condition to test\r
-*--------------*-------+\r
-\r
-\r
-*** Parameters\r
-\r
- None\r
-\r
-\r
-*** Outcomes\r
-\r
- Depends on the <<test>> condition\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<switch test="$uni-cir-units">\r
- <outcome value="Mbps">\r
- <reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
- resource="ase-port"\r
- key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value"\r
- pfx="asePort">\r
-\r
- <outcome value="success">\r
- <return status="success">\r
- <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />\r
- </return>\r
- </outcome>\r
- <outcome value="Other">\r
- <return status="failure">\r
- <parameter name="error-code" value="1010" />\r
- <parameter name="error-message" value="No ports found that match criteria" />\r
- </return>\r
- </outcome>\r
- </reserve>\r
- </outcome>\r
- <outcome value="Gbps">\r
- <reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
- resource="ase-port"\r
- key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value*1000"\r
- pfx="asePort">\r
-\r
- <outcome value="success">\r
- <return status="success">\r
- <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />\r
- </return>\r
- </outcome>\r
- <outcome value="Other">\r
- <return status="failure">\r
- <parameter name="error-code" value="1010" />\r
- <parameter name="error-message" value="No ports found that match criteria" />\r
- </return>\r
- </outcome>\r
- </reserve>\r
- </outcome>\r
-</switch>\r
-+-------------------+\r
-\r
-* Device Management\r
-\r
-**Configure node\r
-\r
-*** Description\r
-\r
- A <<configure>> node is used to configure a device.\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<adaptor>> | Fully qualified Java class of resource adaptor to be used\r
-*--------------*-------+\r
-| <<activate>> | Activate device/interface, for devices that support a separate activation step.\r
-*--------------*-------+\r
-| <<key>> | SQL-like string specifying criteria for item to configure\r
-*--------------*-------+\r
-\r
-*** Parameters\r
-\r
- Specific to device adaptor.\r
-\r
-*** Outcomes\r
-\r
-*-----------*-------+\r
-| <<success>> | Device successfully configured\r
-*-----------*-------+\r
-| <<not-found>> | Element to be configured does not exist.\r
-*-----------*--------+\r
-| <<not-ready>> | Element is not in a state where it can be configured/activated\r
-*-----------*-------+\r
-| <<already-active>> | Attempt to activate element that is already active\r
-*-----------*-------+\r
-| <<failure>> | Configure failed for some other reason\r
-*-----------*-------+\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<configure adaptor="org.openecomp.sdnc.sli.adaptor.emt.EmtAdaptor"\r
- key="$uni-circuit-id" activate="true">\r
- <parameter name="circuit.id" value="$uni-circuit-id" />\r
- <parameter name="subscriber.name" value="$subscriber-name" />\r
- <parameter name="emt.clli" value="$edge-device-clli" />\r
- <parameter name="port.tagging" value="$port-tagging" />\r
- <parameter name="port.mediaSpeed" value="$media-speed" />\r
- <parameter name="location.state" value="$uni-location-state" />\r
- <parameter name="location.city" value="$uni-location-city" />\r
- <parameter name="cosCategory" value="$cos-category" />\r
- <parameter name="gosProfile" value="$gos-profile" />\r
- <parameter name="lldp" value="$asePort.resource-lldp" />\r
- <parameter name="mtu" value="$asePort.resource-mtu" />\r
- <outcome value="success">\r
- <block>\r
- <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">\r
- <parameter name="file" value="/tmp/sample_r1.log" />\r
- <parameter name="field1" value="__TIMESTAMP__"/>\r
- <parameter name="field2" value="ACTIVE"/>\r
- <parameter name="field3" value="$uni-circuit-id"/>\r
- </record>\r
- <return status="success">\r
- <parameter name="edge-device-clli" value="$asePort.resource-emt-clli" />\r
- </return>\r
- </block>\r
- </outcome>\r
- <outcome value="already-active">\r
- <return status="failure">\r
- <parameter name="error-code" value="1590" />\r
- <parameter name="error-message" value="Port already active" />\r
- </return>\r
- </outcome>\r
- <outcome value="Other">\r
- <return status="failure">\r
- <parameter name="error-code" value="1542" />\r
- <parameter name="error-message" value="Activation failure" />\r
- </return>\r
- </outcome>\r
-</configure>\r
-+-------------------+\r
-\r
-* Java Plugin Support\r
-\r
-**Execute node\r
-\r
-*** Description\r
-\r
- An <<execute>> node is used to execute Java code supplied as a plugin\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<plugin>> | Fully qualified Java class of plugin to be used\r
-*--------------*-------+\r
-| <<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
-*--------------*-------+\r
-\r
-*** Parameters\r
-\r
- Specific to plugin / method\r
-\r
-*** Outcomes\r
-\r
-*-----------*-------+\r
-| <<success>> | Device successfully configured\r
-*-----------*-------+\r
-| <<not-found>> | Plugin class could not be loaded\r
-*-----------*--------+\r
-| <<unsupported-method>> | Named method taking (Map, SvcLogicContext) could not be found\r
-*-----------*-------+\r
-| <<failure>> | Configure failed for some other reason\r
-*-----------*-------+\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<execute plugin="org.openecomp.sdnc.sli.plugin.HelloWorld"\r
- method="log">\r
- <parameter name="message" value="Hello, world!" />\r
- <outcome value="success">\r
- <return status="success"/>\r
- </outcome>\r
- <outcome value="not-found">\r
- <return status="failure">\r
- <parameter name="error-code" value="1590" />\r
- <parameter name="error-message" value="Could not locate plugin" />\r
- </return>\r
- </outcome>\r
- <outcome value="Other">\r
- <return status="failure">\r
- <parameter name="error-code" value="1542" />\r
- <parameter name="error-message" value="Internal error" />\r
- </return>\r
- </outcome>\r
-</execute>\r
-+-------------------+\r
-\r
-* Recording\r
-\r
-** Record node\r
-\r
-*** Description\r
-\r
- A <<record>> node is used to record an event. For example, this might be used\r
- to log provisioning events.\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<plugin>> | Fully qualified Java class to handle recording.\r
-*--------------*-------+\r
-\r
-\r
-*** Parameters\r
-\r
- Parameters will depend on the plugin being used. For the FileRecorder class,\r
- the parameters are as follows\r
-\r
-*------------*-----------+\r
-| <<file>> | The file to which the record should be written\r
-*------------*-----------+\r
-| <<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
-*------------*-----------+\r
-\r
-\r
-*** Outcomes\r
-\r
-*----------*---------+\r
-| <<success>> | Record successfully written\r
-*----------*---------+\r
-| <<failure>> | Record could not be successfully written\r
-*----------*---------+\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">\r
- <parameter name="file" value="/tmp/sample_r1.log" />\r
- <parameter name="field1" value="__TIMESTAMP__"/>\r
- <parameter name="field2" value="ACTIVE"/>\r
- <parameter name="field3" value="$uni-circuit-id"/>\r
-</record>\r
-+-------------------+\r
-\r
-* Resource Management\r
-\r
-** Delete node\r
-\r
-*** Description\r
-\r
- A <<delete>> node is used to delete a resource from the local resource inventory.\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<plugin>> | Fully qualified Java class of resource adaptor to be used\r
-*--------------*-------+\r
-| <<resource>> | Type of resource to delete\r
-*--------------*-------+\r
-| <<key>> | SQL-like string specifying key to delete\r
-*--------------*-------+\r
-\r
-*** Parameters\r
-\r
- None\r
-\r
-*** Outcomes\r
-\r
-*-----------*-------+\r
-| <<success>> | Resource specified deleted successfully.\r
-*-----------*-------+\r
-| <failure>> | Resource specified was not deleted\r
-*-----------*-------+\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<delete plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
- resource="ase-port"\r
- key="uni_circuit_id == $uni-circuit-id">\r
- <outcome value="true">\r
- <return status="success"/>\r
- </outcome>\r
- <outcome value="false">\r
- <return status="failure"/>\r
- </outcome>\r
-</delete>\r
-+-------------------+\r
-\r
-\r
-** Exists node\r
-\r
-*** Description\r
-\r
- An <<exists>> node is used to determine whether a particular\r
- instance of a resource exists. For example, this might be\r
- used to test whether a particular switch CLLI is provisioned.\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<plugin>> | Fully qualified Java class of resource adaptor to be used\r
-*--------------*-------+\r
-| <<resource>> | Type of resource to check\r
-*--------------*-------+\r
-| <<key>> | SQL-like string specifying key to check for\r
-*--------------*-------+\r
-\r
-*** Parameters\r
-\r
- None\r
-\r
-*** Outcomes\r
-\r
-*-----------*-------+\r
-| <<true>> | Resource specified exists.\r
-*-----------*-------+\r
-| <<false>> | Resource specified is unknown\r
-*-----------*-------+\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<exists plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
- resource="ase-port"\r
- key="uni_circuit_id == $uni-circuit-id">\r
- <outcome value="true">\r
- <return status="success"/>\r
- </outcome>\r
- <outcome value="false">\r
- <return status="failure"/>\r
- </outcome>\r
-</exists>\r
-+-------------------+\r
-\r
-** Get-resource node\r
-\r
-*** Description\r
-\r
- A <<get-resource>> node is used to retrieve information about a\r
- particular resource and make it available to other nodes in the\r
- service logic tree. For example, this might be used to\r
- retrieve information about a particular uni-port.\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<plugin>> | Fully qualified Java class of resource adaptor to be used\r
-*--------------*-------+\r
-| <<resource>> | Type of resource to retrieve\r
-*--------------*-------+\r
-| <<key>> | SQL-like string specifying criteria for retrieval\r
-*--------------*-------+\r
-| <<pfx>> | Prefix to add to context variable names set for data retrieved\r
-*--------------*-------+\r
-| <<select>> | String to specify, if key matches multiple entries, which entry should take precedence\r
-*--------------*-------+\r
-| <<order-by>> | Prefix to add to context variable names set for data retrieved\r
-*--------------*-------+\r
-\r
-*** Parameters\r
-\r
- None\r
-\r
-\r
-*** Outcomes\r
-\r
-*-----------*-------+\r
-| <<success>> | Resource successfully retrieved\r
-*-----------*-------+\r
-| <<not-found>> | Resource referenced does not exist\r
-*-----------*-------+\r
-| <<failure>> | Resource retrieve failed for some other reason\r
-*-----------*-------+\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<get-resource plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
- resource="ase-port"\r
- key="uni_circuit_id == $uni-circuit-id"\r
- pfx="current-port">\r
- <outcome value="success">\r
- <return status="success"/>\r
- </outcome>\r
- <outcome value="not-found">\r
- <return status="failure"/>\r
- </outcome>\r
- <outcome value="failure">\r
- <return status="failure"/>\r
- </outcome>\r
-</get-resource>\r
-+-------------------+\r
-\r
-** Is-available node\r
-\r
-*** Description\r
-\r
- An <<is-available>> node is used to determine whether a particular\r
- type of resource is available. For example, this might be used to\r
- test whether any ports are available for assignment on a particular switch.\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<plugin>> | Fully qualified Java class of resource adaptor to be used\r
-*--------------*-------+\r
-| <<resource>> | Type of resource to check\r
-*--------------*-------+\r
-| <<key>> | SQL-like string specifying key to check for\r
-*--------------*-------+\r
-| <<pfx>> | Prefix to add to context variable names set for data retrieved\r
-*--------------*-------+\r
-\r
-*** Parameters\r
-\r
- None\r
-\r
-*** Outcomes\r
-\r
-*-----------*-------+\r
-| <<true>> | Resource requested is available\r
-*-----------*-------+\r
-| <<false>> | Resource requested is not available\r
-*-----------*-------+\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<is-available plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
- resource="ase-port"\r
- key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value">\r
- <outcome value="true">\r
- <return status="success"/>\r
- </outcome>\r
- <outcome value="false">\r
- <return status="failure"/>\r
- </outcome>\r
-</is-available>\r
-+-------------------+\r
-\r
-** Notify node\r
-\r
-*** Description\r
-\r
- A <<notify>> node is used to inform an external application (e.g. A&AI) that a resource was\r
- updated.\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<plugin>> | Fully qualified Java class of resource adaptor to be used\r
-*--------------*-------+\r
-| <<resource>> | Identifies resource that was updated\r
-*--------------*-------+\r
-| <<action>> | Action that triggered notification to be sent (ADD/UPDATE/DELETE)\r
-*--------------*-------+\r
-\r
-*** Parameters\r
-\r
- None\r
-\r
-*** Outcomes\r
-\r
-*-----------*-------+\r
-| <<success>> | Notification was successful\r
-*-----------*-------+\r
-| <<failure>> | Notification failed is not available\r
-*-----------*-------+\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<notify plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
- resource="ase-port"\r
- action="ADD">\r
- <outcome value="success">\r
- <return status="success"/>\r
- </outcome>\r
- <outcome value="Other">\r
- <return status="failure"/>\r
- </outcome>\r
-</notify>\r
-+-------------------+\r
-\r
-** Release node\r
-\r
-*** Description\r
-\r
- A <<release>> node is used to mark a resource as no longer in use, and thus\r
- available for assignment.\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<plugin>> | Fully qualified Java class of resource adaptor to be used\r
-*--------------*-------+\r
-| <<resource>> | Type of resource to release\r
-*--------------*-------+\r
-| <<key>> | SQL-like string specifying key to check of resource to release\r
-*--------------*-------+\r
-\r
-*** Parameters\r
-\r
- None\r
-\r
-*** Outcomes\r
-\r
-*-----------*-------+\r
-| <<success>> | Resource successfully released\r
-*-----------*-------+\r
-| <<not-found>> | Resource referenced does not exist\r
-*-----------*-------+\r
-| <<failure>> | Resource release failed for some other reason\r
-*-----------*-------+\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<release plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
- resource="ase-port"\r
- key="uni_circuit_id == $uni-circuit-id">\r
- <outcome value="success">\r
- <return status="success"/>\r
- </outcome>\r
- <outcome value="not-found">\r
- <return status="failure"/>\r
- </outcome>\r
- <outcome value="failure">\r
- <return status="failure"/>\r
- </outcome>\r
-</release>\r
-+-------------------+\r
-\r
-\r
-** Reserve node\r
-\r
-*** Description\r
-\r
- A <<reserve>> node is used to reserve a particular\r
- type of resource.. For example, this might be used to\r
- reserve a port on a particular switch.\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<plugin>> | Fully qualified Java class of resource adaptor to be used\r
-*--------------*-------+\r
-| <<resource>> | Type of resource to reserve\r
-*--------------*-------+\r
-| <<key>> | SQL-like string specifying criteria for reservation\r
-*--------------*-------+\r
-| <<select>> | String to specify, if <<key>> matches multiple entries, which entry should take precedence\r
-*--------------*-------+\r
-\r
-*** Parameters\r
-\r
- None\r
-\r
-*** Outcomes\r
-\r
-*-----------*-------+\r
-| <<success>> | Resource requested was successfully reserved\r
-*-----------*-------+\r
-| <<failure>> | Resource requested was not successfully reserved\r
-*-----------*-------+\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"\r
- resource="ase-port"\r
- key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value"\r
- select="min(speed)">\r
- <outcome value="success">\r
- <return status="success"/>\r
- </outcome>\r
- <outcome value="failure">\r
- <return status="failure"/>\r
- </outcome>\r
-</reserve>\r
-+-------------------+\r
-\r
-** Save node\r
-\r
-*** Description\r
-\r
- A <<save>> node is used to save information about a\r
- particular resource to persistent storage. For example, this might be used to\r
- save information about a particular uni-port.\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<plugin>> | Fully qualified Java class of resource adaptor to be used\r
-*--------------*-------+\r
-| <<resource>> | Type of resource to save\r
-*--------------*-------+\r
-| <<key>> | SQL-like string specifying criteria for retrieval\r
-*--------------*-------+\r
-| <<force>> | If "true", save resource even if this resource is already stored in persistent storage\r
-*--------------*-------+\r
-| <<pfx>> | Prefix to be prepended to variable names, when attributes are set in SvcLogicContext\r
-*--------------*-------+\r
-\r
-*** Parameters\r
-\r
- Values to save (columns) are specified as parameters, with each name\r
- corresponding to a column name and each value corresponding to the\r
- value to set.\r
-\r
-*** Outcomes\r
-\r
-*-----------*-------+\r
-| <<success>> | Resource successfully saved\r
-*-----------*-------+\r
-| <<failure>> | Resource save failed\r
-*-----------*-------+\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<save plugin="`$sample-resource-plugin`" resource="vnf"\r
- key="vnf-name = $requests.vnf.vnf-name" force="true"\r
- pfx="requests.vnf">\r
- <parameter name="vnf-name"\r
- value="`$requests.cust-country-code + $requests.cust-id + $requests.cust-city + $requests.cust-state + '001VCE'`" />\r
- <parameter name="vnf-type" value="vce" />\r
- <parameter name="orchestration-status" value="pending-create" />\r
- <parameter name="heat-stack-id" value="`$requests.heat-stack-id`" />\r
- <parameter name="mso-catalog-key" value="`$requests.mso-catalog-key`" />\r
- <parameter name="oam-ipv4-address" value="`$vce-ipv4-oam-addr.ipv4-addr`" />\r
-</save>\r
-+-------------------+\r
-\r
-** Update node\r
-\r
-*** Description\r
-\r
- An <<update>> node is used to update information about a\r
- particular resource to persistent storage.\r
-\r
-*** Attributes\r
-\r
-*--------------*-------+\r
-| <<plugin>> | Fully qualified Java class of resource adaptor to be used\r
-*--------------*-------+\r
-| <<resource>> | Type of resource to update\r
-*--------------*-------+\r
-| <<key>> | SQL-like string specifying criteria for retrieval\r
-*--------------*-------+\r
-| <<pfx>> | Prefix to be prepended to variable names, when attributes are set in SvcLogicContext\r
-*--------------*-------+\r
-\r
-*** Parameters\r
-\r
- Values to save (columns) are specified as parameters, with each name\r
- corresponding to a column name and each value corresponding to the\r
- value to set.\r
-\r
-*** Outcomes\r
-\r
-*-----------*-------+\r
-| <<success>> | Resource successfully saved\r
-*-----------*-------+\r
-| <<failure>> | Resource save failed\r
-*-----------*-------+\r
-\r
-*** Example\r
-\r
-+-------------------+\r
-<update plugin="`$sample-resource-plugin`" resource="vnf"\r
- key="vnf-name = $requests.vnf.vnf-name"\r
- pfx="requests.vnf">\r
- <parameter name="vnf-name"\r
- value="`$requests.cust-country-code + $requests.cust-id + $requests.cust-city + $requests.cust-state + '001VCE'`" />\r
- <parameter name="vnf-type" value="vce" />\r
- <parameter name="orchestration-status" value="pending-create" />\r
- <parameter name="heat-stack-id" value="`$requests.heat-stack-id`" />\r
- <parameter name="mso-catalog-key" value="`$requests.mso-catalog-key`" />\r
- <parameter name="oam-ipv4-address" value="`$vce-ipv4-oam-addr.ipv4-addr`" />\r
-</update>\r
-+-------------------+\r
-\r
+~~ ============LICENSE_END=========================================================
+~~~
+
+ ---
+ Service Logic Interpreter
+ ---
+ Dan Timoney
+ ---
+ 2014-11-12
+ ---
+
+Supported node types
+
+ The following built-in node types are currently supported:
+
+ * Flow Control
+
+ * {{{Block node}<<block>>}}
+
+ * {{{Call node}<<call>>}}
+
+ * {{{For node}<<for>>}}
+
+ * {{{Return node}<<return>>}}
+
+ * {{{Set node}<<set>>}}
+
+ * {{{Switch node}<<switch>>}}
+
+ * Device Management
+
+ * {{{Configure node}<<configure>>}}
+
+ * Java Plugin Support
+
+ * {{{Execute node}<<execute>>}}
+
+ * Recording
+
+ * {{{Record node}<<record>>}}
+
+ * Resource Management
+
+ * {{{Delete node}<<delete>>}}
+
+ * {{{Exists node}<<exists>>}}
+
+ * {{{Get-resource node}<<get-resource>>}}
+
+ * {{{Is-available node}<<is-available>>}}
+
+ * {{{Notify node}<<notify>>}}
+
+ * {{{Release node}<<release>>}}
+
+ * {{{Reserve node}<<reserve>>}}
+
+ * {{{Save node}<<save>>}}
+
+ * {{{Update node}<<update>>}}
+
+
+* Flow Control
+
+** Block node
+
+*** Description
+
+ A <<block>> node is used to executes a set of nodes.
+
+*** Attributes
+
+*--------------*--------------------------------------------+
+| <<atomic>> | if <true>, then if a node returns failure, subsequent nodes will not be executed and nodes already executed will be backed out.
+*--------------*--------------------------------------------+
+
+*** Parameters
+
+ None
+
+*** Outcomes
+
+ None
+
+*** Example
+
++-----------------+
+<block>
+ <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+ <parameter name="file" value="/tmp/sample_r1.log" />
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="RESERVED"/>
+ <parameter name="field3" value="$asePort.uni_circuit_id"/>
+ </record>
+ <return status="success">
+ <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />
+ </return>
+</block>
++-----------------+
+
+
+
+**Call node
+
+*** Description
+
+ A <<call>> node is used to call another graph
+
+*** Attributes
+
+*--------------*-------+
+| <<module>> | Module of directed graph to call. If unset, defaults to that of calling graph
+*--------------*-------+
+| <<rpc>> | rpc of directed graph to call.
+*--------------*-------+
+| <<version>> | version of graph to call, If unset, uses active version.
+*--------------*-------+
+| <<mode>> | mode (sync/async) of graph to call. If unset, defaults to that of calling graph.
+*--------------*-------+
+
+
+
+*** Parameters
+
+ Not applicable
+
+*** Outcomes
+
+*----------*---------+
+| <<success>> | Sub graph returned success
+*----------*---------+
+| <<not-found>> | Graph not found
+*----------*---------+
+| <<failure>> | Subgraph returned success
+*----------*---------+
+ .
+
+*** Example
+
++-------------------+
+<call rpc="svc-topology-reserve" mode="sync" />
++-------------------+
+
+**For node
+
+*** Description
+
+ A <<for>> node provides a fixed iteration looping mechanism, similar to the Java for loop
+
+*** Attributes
+
+*--------------*-------+
+| <<index>> | index variable
+*--------------*-------+
+| <<start>> | initial value
+*--------------*-------+
+| <<end>> | maximum value
+*--------------*-------+
+
+
+*** Parameters
+
+ Not applicable.
+
+*** Outcomes
+
+ Not applicable. The <<status>> node has no outcomes.
+
+*** Example
+
++-------------------+
+<for index="i" start="0" end="`$service-data.universal-cpe-ft.l2-switch-interfaces_length`">
+ <record plugin="org.openecomp.sdnc.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="level" value="info"/>
+ <parameter name="field1" value="`'current l2-switch-interface name is ' + $service-data.universal-cpe-ft.l2-switch-interfaces[$i].name`"/>
+ </record>
+</for>
++-------------------+
+
+**Return node
+
+*** Description
+
+ A <<return>> node is used to return a status to the invoking MD-SAL application
+
+*** Attributes
+
+*--------------*-------+
+| <<status>> | Status value to return (<success> or <failure>)
+*--------------*-------+
+
+
+*** Parameters
+
+ The following optional parameters may be passed to convey more
+ detailed status information.
+
+*------------*-----------+
+| <<error-code>> | A brief, usually numeric, code indicating the error condition
+*------------*-----------+
+| <<error-message>> | A more detailed error message
+*------------*-----------+
+
+*** Outcomes
+
+ Not applicable. The <<status>> node has no outcomes.
+
+*** Example
+
++-------------------+
+<return status="failure">
+ <parameter name="error-code" value="1542" />
+ <parameter name="error-message" value="Activation failure" />
+</return>
++-------------------+
+
+**Set node
+
+*** Description
+
+ A <<set>> node is used to set one or more values in the execution context
+
+*** Attributes
+
+*--------------*-------+
+| <<only-if-unset>> | If true the set node will only execute if the current value of the target is null
+*--------------*-------+
+
+*** Parameters
+
+ Values to be set are passed as parameters
+
+*** Outcomes
+
+ Not applicable. The <<set>> node has no outcomes.
+
+*** Example
+
++-------------------+
+<set>
+ <parameter name="vlan" value="$network.provider-segmentation-id" />
+</set>
++-------------------+
+
+**Switch node
+
+*** Description
+
+ A <<switch>> node is used to make a decision based on its <<test>> attribute.
+
+*** Attributes
+
+*--------------*-------+
+| <<test>> | Condition to test
+*--------------*-------+
+
+
+*** Parameters
+
+ None
+
+
+*** Outcomes
+
+ Depends on the <<test>> condition
+
+*** Example
+
++-------------------+
+<switch test="$uni-cir-units">
+ <outcome value="Mbps">
+ <reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value"
+ pfx="asePort">
+
+ <outcome value="success">
+ <return status="success">
+ <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="error-code" value="1010" />
+ <parameter name="error-message" value="No ports found that match criteria" />
+ </return>
+ </outcome>
+ </reserve>
+ </outcome>
+ <outcome value="Gbps">
+ <reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value*1000"
+ pfx="asePort">
+
+ <outcome value="success">
+ <return status="success">
+ <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="error-code" value="1010" />
+ <parameter name="error-message" value="No ports found that match criteria" />
+ </return>
+ </outcome>
+ </reserve>
+ </outcome>
+</switch>
++-------------------+
+
+* Device Management
+
+**Configure node
+
+*** Description
+
+ A <<configure>> node is used to configure a device.
+
+*** Attributes
+
+*--------------*-------+
+| <<adaptor>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<activate>> | Activate device/interface, for devices that support a separate activation step.
+*--------------*-------+
+| <<key>> | SQL-like string specifying criteria for item to configure
+*--------------*-------+
+
+*** Parameters
+
+ Specific to device adaptor.
+
+*** Outcomes
+
+*-----------*-------+
+| <<success>> | Device successfully configured
+*-----------*-------+
+| <<not-found>> | Element to be configured does not exist.
+*-----------*--------+
+| <<not-ready>> | Element is not in a state where it can be configured/activated
+*-----------*-------+
+| <<already-active>> | Attempt to activate element that is already active
+*-----------*-------+
+| <<failure>> | Configure failed for some other reason
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<configure adaptor="org.openecomp.sdnc.sli.adaptor.emt.EmtAdaptor"
+ key="$uni-circuit-id" activate="true">
+ <parameter name="circuit.id" value="$uni-circuit-id" />
+ <parameter name="subscriber.name" value="$subscriber-name" />
+ <parameter name="emt.clli" value="$edge-device-clli" />
+ <parameter name="port.tagging" value="$port-tagging" />
+ <parameter name="port.mediaSpeed" value="$media-speed" />
+ <parameter name="location.state" value="$uni-location-state" />
+ <parameter name="location.city" value="$uni-location-city" />
+ <parameter name="cosCategory" value="$cos-category" />
+ <parameter name="gosProfile" value="$gos-profile" />
+ <parameter name="lldp" value="$asePort.resource-lldp" />
+ <parameter name="mtu" value="$asePort.resource-mtu" />
+ <outcome value="success">
+ <block>
+ <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+ <parameter name="file" value="/tmp/sample_r1.log" />
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="ACTIVE"/>
+ <parameter name="field3" value="$uni-circuit-id"/>
+ </record>
+ <return status="success">
+ <parameter name="edge-device-clli" value="$asePort.resource-emt-clli" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value="already-active">
+ <return status="failure">
+ <parameter name="error-code" value="1590" />
+ <parameter name="error-message" value="Port already active" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="error-code" value="1542" />
+ <parameter name="error-message" value="Activation failure" />
+ </return>
+ </outcome>
+</configure>
++-------------------+
+
+* Java Plugin Support
+
+**Execute node
+
+*** Description
+
+ An <<execute>> node is used to execute Java code supplied as a plugin
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of plugin to be used
+*--------------*-------+
+| <<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)
+*--------------*-------+
+
+*** Parameters
+
+ Specific to plugin / method
+
+*** Outcomes
+
+*-----------*-------+
+| <<success>> | Device successfully configured
+*-----------*-------+
+| <<not-found>> | Plugin class could not be loaded
+*-----------*--------+
+| <<unsupported-method>> | Named method taking (Map, SvcLogicContext) could not be found
+*-----------*-------+
+| <<failure>> | Configure failed for some other reason
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<execute plugin="org.openecomp.sdnc.sli.plugin.HelloWorld"
+ method="log">
+ <parameter name="message" value="Hello, world!" />
+ <outcome value="success">
+ <return status="success"/>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="error-code" value="1590" />
+ <parameter name="error-message" value="Could not locate plugin" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="error-code" value="1542" />
+ <parameter name="error-message" value="Internal error" />
+ </return>
+ </outcome>
+</execute>
++-------------------+
+
+* Recording
+
+** Record node
+
+*** Description
+
+ A <<record>> node is used to record an event. For example, this might be used
+ to log provisioning events.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class to handle recording.
+*--------------*-------+
+
+
+*** Parameters
+
+ Parameters will depend on the plugin being used. For the FileRecorder class,
+ the parameters are as follows
+
+*------------*-----------+
+| <<file>> | The file to which the record should be written
+*------------*-----------+
+| <<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
+*------------*-----------+
+
+
+*** Outcomes
+
+*----------*---------+
+| <<success>> | Record successfully written
+*----------*---------+
+| <<failure>> | Record could not be successfully written
+*----------*---------+
+
+*** Example
+
++-------------------+
+<record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+ <parameter name="file" value="/tmp/sample_r1.log" />
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="ACTIVE"/>
+ <parameter name="field3" value="$uni-circuit-id"/>
+</record>
++-------------------+
+
+* Resource Management
+
+** Delete node
+
+*** Description
+
+ A <<delete>> node is used to delete a resource from the local resource inventory.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Type of resource to delete
+*--------------*-------+
+| <<key>> | SQL-like string specifying key to delete
+*--------------*-------+
+
+*** Parameters
+
+ None
+
+*** Outcomes
+
+*-----------*-------+
+| <<success>> | Resource specified deleted successfully.
+*-----------*-------+
+| <failure>> | Resource specified was not deleted
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<delete plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ key="uni_circuit_id == $uni-circuit-id">
+ <outcome value="true">
+ <return status="success"/>
+ </outcome>
+ <outcome value="false">
+ <return status="failure"/>
+ </outcome>
+</delete>
++-------------------+
+
+
+** Exists node
+
+*** Description
+
+ An <<exists>> node is used to determine whether a particular
+ instance of a resource exists. For example, this might be
+ used to test whether a particular switch CLLI is provisioned.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Type of resource to check
+*--------------*-------+
+| <<key>> | SQL-like string specifying key to check for
+*--------------*-------+
+
+*** Parameters
+
+ None
+
+*** Outcomes
+
+*-----------*-------+
+| <<true>> | Resource specified exists.
+*-----------*-------+
+| <<false>> | Resource specified is unknown
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<exists plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ key="uni_circuit_id == $uni-circuit-id">
+ <outcome value="true">
+ <return status="success"/>
+ </outcome>
+ <outcome value="false">
+ <return status="failure"/>
+ </outcome>
+</exists>
++-------------------+
+
+** Get-resource node
+
+*** Description
+
+ A <<get-resource>> node is used to retrieve information about a
+ particular resource and make it available to other nodes in the
+ service logic tree. For example, this might be used to
+ retrieve information about a particular uni-port.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Type of resource to retrieve
+*--------------*-------+
+| <<key>> | SQL-like string specifying criteria for retrieval
+*--------------*-------+
+| <<pfx>> | Prefix to add to context variable names set for data retrieved
+*--------------*-------+
+| <<select>> | String to specify, if key matches multiple entries, which entry should take precedence
+*--------------*-------+
+| <<order-by>> | Prefix to add to context variable names set for data retrieved
+*--------------*-------+
+
+*** Parameters
+
+ None
+
+
+*** Outcomes
+
+*-----------*-------+
+| <<success>> | Resource successfully retrieved
+*-----------*-------+
+| <<not-found>> | Resource referenced does not exist
+*-----------*-------+
+| <<failure>> | Resource retrieve failed for some other reason
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<get-resource plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ key="uni_circuit_id == $uni-circuit-id"
+ pfx="current-port">
+ <outcome value="success">
+ <return status="success"/>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure"/>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure"/>
+ </outcome>
+</get-resource>
++-------------------+
+
+** Is-available node
+
+*** Description
+
+ An <<is-available>> node is used to determine whether a particular
+ type of resource is available. For example, this might be used to
+ test whether any ports are available for assignment on a particular switch.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Type of resource to check
+*--------------*-------+
+| <<key>> | SQL-like string specifying key to check for
+*--------------*-------+
+| <<pfx>> | Prefix to add to context variable names set for data retrieved
+*--------------*-------+
+
+*** Parameters
+
+ None
+
+*** Outcomes
+
+*-----------*-------+
+| <<true>> | Resource requested is available
+*-----------*-------+
+| <<false>> | Resource requested is not available
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<is-available plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value">
+ <outcome value="true">
+ <return status="success"/>
+ </outcome>
+ <outcome value="false">
+ <return status="failure"/>
+ </outcome>
+</is-available>
++-------------------+
+
+** Notify node
+
+*** Description
+
+ A <<notify>> node is used to inform an external application (e.g. A&AI) that a resource was
+ updated.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Identifies resource that was updated
+*--------------*-------+
+| <<action>> | Action that triggered notification to be sent (ADD/UPDATE/DELETE)
+*--------------*-------+
+
+*** Parameters
+
+ None
+
+*** Outcomes
+
+*-----------*-------+
+| <<success>> | Notification was successful
+*-----------*-------+
+| <<failure>> | Notification failed is not available
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<notify plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ action="ADD">
+ <outcome value="success">
+ <return status="success"/>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure"/>
+ </outcome>
+</notify>
++-------------------+
+
+** Release node
+
+*** Description
+
+ A <<release>> node is used to mark a resource as no longer in use, and thus
+ available for assignment.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Type of resource to release
+*--------------*-------+
+| <<key>> | SQL-like string specifying key to check of resource to release
+*--------------*-------+
+
+*** Parameters
+
+ None
+
+*** Outcomes
+
+*-----------*-------+
+| <<success>> | Resource successfully released
+*-----------*-------+
+| <<not-found>> | Resource referenced does not exist
+*-----------*-------+
+| <<failure>> | Resource release failed for some other reason
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<release plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ key="uni_circuit_id == $uni-circuit-id">
+ <outcome value="success">
+ <return status="success"/>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure"/>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure"/>
+ </outcome>
+</release>
++-------------------+
+
+
+** Reserve node
+
+*** Description
+
+ A <<reserve>> node is used to reserve a particular
+ type of resource.. For example, this might be used to
+ reserve a port on a particular switch.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Type of resource to reserve
+*--------------*-------+
+| <<key>> | SQL-like string specifying criteria for reservation
+*--------------*-------+
+| <<select>> | String to specify, if <<key>> matches multiple entries, which entry should take precedence
+*--------------*-------+
+
+*** Parameters
+
+ None
+
+*** Outcomes
+
+*-----------*-------+
+| <<success>> | Resource requested was successfully reserved
+*-----------*-------+
+| <<failure>> | Resource requested was not successfully reserved
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value"
+ select="min(speed)">
+ <outcome value="success">
+ <return status="success"/>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure"/>
+ </outcome>
+</reserve>
++-------------------+
+
+** Save node
+
+*** Description
+
+ A <<save>> node is used to save information about a
+ particular resource to persistent storage. For example, this might be used to
+ save information about a particular uni-port.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Type of resource to save
+*--------------*-------+
+| <<key>> | SQL-like string specifying criteria for retrieval
+*--------------*-------+
+| <<force>> | If "true", save resource even if this resource is already stored in persistent storage
+*--------------*-------+
+| <<pfx>> | Prefix to be prepended to variable names, when attributes are set in SvcLogicContext
+*--------------*-------+
+
+*** Parameters
+
+ Values to save (columns) are specified as parameters, with each name
+ corresponding to a column name and each value corresponding to the
+ value to set.
+
+*** Outcomes
+
+*-----------*-------+
+| <<success>> | Resource successfully saved
+*-----------*-------+
+| <<failure>> | Resource save failed
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<save plugin="`$sample-resource-plugin`" resource="vnf"
+ key="vnf-name = $requests.vnf.vnf-name" force="true"
+ pfx="requests.vnf">
+ <parameter name="vnf-name"
+ value="`$requests.cust-country-code + $requests.cust-id + $requests.cust-city + $requests.cust-state + '001VCE'`" />
+ <parameter name="vnf-type" value="vce" />
+ <parameter name="orchestration-status" value="pending-create" />
+ <parameter name="heat-stack-id" value="`$requests.heat-stack-id`" />
+ <parameter name="mso-catalog-key" value="`$requests.mso-catalog-key`" />
+ <parameter name="oam-ipv4-address" value="`$vce-ipv4-oam-addr.ipv4-addr`" />
+</save>
++-------------------+
+
+** Update node
+
+*** Description
+
+ An <<update>> node is used to update information about a
+ particular resource to persistent storage.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Type of resource to update
+*--------------*-------+
+| <<key>> | SQL-like string specifying criteria for retrieval
+*--------------*-------+
+| <<pfx>> | Prefix to be prepended to variable names, when attributes are set in SvcLogicContext
+*--------------*-------+
+
+*** Parameters
+
+ Values to save (columns) are specified as parameters, with each name
+ corresponding to a column name and each value corresponding to the
+ value to set.
+
+*** Outcomes
+
+*-----------*-------+
+| <<success>> | Resource successfully saved
+*-----------*-------+
+| <<failure>> | Resource save failed
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<update plugin="`$sample-resource-plugin`" resource="vnf"
+ key="vnf-name = $requests.vnf.vnf-name"
+ pfx="requests.vnf">
+ <parameter name="vnf-name"
+ value="`$requests.cust-country-code + $requests.cust-id + $requests.cust-city + $requests.cust-state + '001VCE'`" />
+ <parameter name="vnf-type" value="vce" />
+ <parameter name="orchestration-status" value="pending-create" />
+ <parameter name="heat-stack-id" value="`$requests.heat-stack-id`" />
+ <parameter name="mso-catalog-key" value="`$requests.mso-catalog-key`" />
+ <parameter name="oam-ipv4-address" value="`$vce-ipv4-oam-addr.ipv4-addr`" />
+</update>
++-------------------+
+