Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log" />
<parameter name="level" value="info" />
<parameter name="field1" value="Hello World!"/>

...

The URL to use for you local machine isĀ http://localhost:8181/restconf/operations/SLI-API:execute-graph. Basic authorization is used, the username is admin and the password is adminthe standard ONAP default password.

Use the below body. Initially we will not pass any parameters because this graph does not read any parameters.

...

If everything worked we should get an HTTP 200 OK response. Let's check the logs to be sure.

Code Block
tail /var/sdnclog/logsonap/bvcsdnc/debugkaraf.log

Below is the output of this command

...

Connect the nodes so they match what we have below.

Image Removed

Double left click on the second record node, using the editor change field1 from "Hello World!" to "Goodbye". Click save, then upload and activate this graph.

...

Code Block
<record plugin="org.onap.openecompsli.sdnccore.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log" />
<parameter name="level" value="info" />
<parameter name="field1" value="Hello World!"/>
<parameter name="field2" value="`$customerName`"/>

You will be adding a second field. You will notice this field contains a dollar sign and back ticks. A dollar sign ($) is used any time anytime values are read from memory.

The back ticks (`) are used whenever a service logic expression is being created, in . In this case we have a very simple expression, but more complex expressions can be written.

...

Again check the logs

Code Block
/varopt/sdncopendaylight/logsdata/bvclog/debugkaraf.log
20172018-0312-14T1513T23:03:39.613Z|5879622a-ba67-4662-aa5b-1177e8c18a94|qtp1849298247-42|DEBUG|SvcLogicServiceImpl01:26,161 | INFO  | qtp892619002-352 | sliapiProvider                   |144 226 - comorg.attonap.sdnctlccsdk.sli.core.sliapi-provider - 11.0.73.SNAPSHOT1 |Executing  node- executor for| nodeCalling typedirected recordgraph - com.att.sdnctl.sli.provider.RecordNodeExecutor
2017-03-14T15:03:39.613Z|5879622a-ba67-4662-aa5b-1177e8c18a94|qtp1849298247-42|DEBUG|RecordNodeExecutorfor TUTORIAL/helloWorld/sync
2018-12-13T23:01:26,161 | INFO  | qtp892619002-352 | SvcLogicServiceImpl              |144 222 - com.att.sdnctlorg.onap.ccsdk.sli.core.sli-provider - 11.0.73.SNAPSHOT|record node encountered - looking for recorder class com.att.sdnctl.sli.recording.Slf4jRecorder
2017-03-14T15:03:39.613Z|5879622a-ba67-4662-aa5b-1177e8c18a94|qtp1849298247-42|INFO |message-log      1 |  -  | Fetching service logic from data store
2018-12-13T23:01:26,171 | INFO  | qtp892619002-352 | SvcLogicServiceImpl              | |145222 - com.att.sdnctlorg.onap.ccsdk.sli.core.sli-recordingprovider - 11.0.73.SNAPSHOT||Hello World!|john|
2017-03-14T15:03:39.613Z|5879622a-ba67-4662-aa5b-1177e8c18a94|qtp1849298247-42|DEBUG|RecordNodeExecutor              |144 - com.att.sdnctl.sli-provider - 11.0.7.SNAPSHOT|no failure or Other branch found
2017-03-14T15:03:39.613Z|5879622a-ba67-4662-aa5b-1177e8c18a94|qtp1849298247-42|DEBUG|BlockNodeExecutor 1 | SvcLogicGraph [module=TUTORIAL, rpc=helloWorld, mode=sync, version=1, md5sum=8d458c0a353f6676fd8ec607734412cf] -  | About to execute graph SvcLogicGraph [module=TUTORIAL, rpc=helloWorld, mode=sync, version=1, md5sum=8d458c0a353f6676fd8ec607734412cf]
2018-12-13T23:01:26,172 | INFO  | qtp892619002-352 | SvcLogicServiceImpl              |144 222 - com.att.sdnctlorg.onap.ccsdk.sli.core.sli-provider - 11.0.73.SNAPSHOT1 |Block - executing outcome 2
2017-03-14T15:03:39.613Z|5879622a-ba67-4662-aa5b-1177e8c18a94|qtp1849298247-42|DEBUG|SvcLogicServiceImpl             |144 - com.att.sdnctl.sli-provider - 11.0.7.SNAPSHOT|Executing node 3
2017-03-14T15:03:39.613Z|5879622a-ba67-4662-aa5b-1177e8c18a94|qtp1849298247-42|DEBUG|SvcLogicServiceImplSvcLogicGraph [module=TUTORIAL, rpc=helloWorld, mode=sync, version=1, md5sum=8d458c0a353f6676fd8ec607734412cf] - 1 (block) | About to execute node # 1 (block)
2018-12-13T23:01:26,173 | INFO  | qtp892619002-352 | message-log             |144 - com.att.sdnctl.sli-provider - 11.0.7.SNAPSHOT|Executing node executor for node type| record223 - comorg.attonap.sdnctlccsdk.sli.providercore.RecordNodeExecutorsli-recording 2017-03-14T15:03:39.613Z|5879622a-ba67-4662-aa5b-1177e8c18a94|qtp1849298247-42|DEBUG|RecordNodeExecutor              |144 - com.att.sdnctl.sli-provider - 11.0.7.SNAPSHOT|record node encountered - looking for recorder class com.att.sdnctl.sli.recording.Slf4jRecorder
2017-03-14T15:03:39.614Z|5879622a-ba67-4662-aa5b-1177e8c18a94|qtp1849298247-42|INFO |- 0.3.1 | SvcLogicGraph [module=TUTORIAL, rpc=helloWorld, mode=sync, version=1, md5sum=8d458c0a353f6676fd8ec607734412cf] - 1 (block) | |Hello World!|john|
2018-12-13T23:01:26,173 | INFO  | qtp892619002-352 | message-log                      |145 223 - com.att.sdnctlorg.onap.ccsdk.sli.core.sli-recording - 11.0.7.SNAPSHOT||Goodbye!|
2017-03-14T15:03:39.614Z|5879622a-ba67-4662-aa5b-1177e8c18a94|qtp1849298247-42|DEBUG|RecordNodeExecutor              |144 - com.att.sdnctl.sli-provider - 11.0.7.SNAPSHOT|no failure or Other branch found3.1 | SvcLogicGraph [module=TUTORIAL, rpc=helloWorld, mode=sync, version=1, md5sum=8d458c0a353f6676fd8ec607734412cf] - 1 (block) | |Goodbye!|


We can see that the value of the parameter named customerName is now printed out in the log.

...

Code Block
<record plugin="org.openecomp.sdnconap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log" />
<parameter name="level" value="info" />
<parameter name="field1" value="`$greeting[$greetingIdx]`"/>
<parameter name="field2" value="`$customerName`"/>

...