diff options
author | Dan Timoney <dtimoney@att.com> | 2018-11-30 23:32:45 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-11-30 23:32:45 +0000 |
commit | 08ff1d1faa600a41dff298aca1205cb50a035682 (patch) | |
tree | 50800f1f38b30e59d2c94933198b3aa7ed617d46 /platform-logic/datachange/src/main/xml | |
parent | 6db55e3181789e31e9940890065d51b362c50a49 (diff) | |
parent | 7fe360162ec282dfe7f289c58a8b2679a83cab5c (diff) |
Merge "Notification Sub-DG with Restconf discovery node"
Former-commit-id: 5e86f460701a5ec2099ceaa2be3760b84b706f0c
Diffstat (limited to 'platform-logic/datachange/src/main/xml')
-rw-r--r-- | platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml | 22 | ||||
-rw-r--r-- | platform-logic/datachange/src/main/xml/DataChange_sotn-notification-handler.xml | 43 |
2 files changed, 65 insertions, 0 deletions
diff --git a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml index 0d47536e..e71c0419 100644 --- a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml +++ b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml @@ -101,6 +101,28 @@ </execute> </outcome> </switch> + <set> + <parameter name='input' value='ietf-subscribed-notifications:establish-subscription.input.' /> + <parameter name="`$input + 'encoding'`" value="encode-json" /> + </set> + <execute plugin='org.onap.ccsdk.sli.plugins.restconfdiscovery.RestconfDiscoveryNode' method='establishSubscription' > + <parameter name="subscriberId" value="sotn-controller" /> + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ietf-subscribed-notifications:establish-subscription'`" /> + <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" /> + <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" /> + <parameter name="sseConnectURL" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/streams/yang-push-json'`" /> + <parameter name="dirPath" value="/opt/sdnc/restconfapi/yang/notification" /> + <parameter name="format" value="json" /> + <parameter name="httpMethod" value="post" /> + <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/> + <parameter name="trustStorePassword" value="adminadmin"/> + <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/> + <parameter name="keyStorePassword" value="adminadmin"/> + <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" /> + <parameter name="module" value="DataChange" /> + <parameter name="rpc" value="sotn-notification-handler" /> + <parameter name="mode" value="sync" /> + </execute> </block> </outcome> <outcome value='Other'> diff --git a/platform-logic/datachange/src/main/xml/DataChange_sotn-notification-handler.xml b/platform-logic/datachange/src/main/xml/DataChange_sotn-notification-handler.xml new file mode 100644 index 00000000..baac91c9 --- /dev/null +++ b/platform-logic/datachange/src/main/xml/DataChange_sotn-notification-handler.xml @@ -0,0 +1,43 @@ +<service-logic
+ xmlns='http://www.onap.org/sdnc/svclogic'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='DataChange' version='${project.version}'>
+ <method rpc='sotn-notification-handler' mode='sync'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$notification.push-change-update.datastore-changes.yang-patch.edit[0].target`'/>
+ <parameter name="regex" value="/"/>
+ <parameter name="ctx_memory_result_key" value="yang-nodes"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$yang-nodes[$yang-nodes_length -1]`'/>
+ <parameter name="regex" value="="/>
+ <parameter name="ctx_memory_result_key" value="last-node"/>
+ <outcome value='success'>
+ <block>
+ <switch test='`$last-node[0]`'>
+ <outcome value='ietf-network-topology:termination-point'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$yang-nodes[$yang-nodes_length -2]`'/>
+ <parameter name="regex" value="="/>
+ <parameter name="ctx_memory_result_key" value="node-prefix"/>
+ </execute>
+ <set>
+ <parameter name='unique-ltpId' value="`'nodeId-' + $node-prefix[$node-prefix_length -1] + '-ltpId-' + $last-node[$last-node_length -1]`" />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface'
+ key='pnf.pnf-name = $node.node-id
+ AND p-interface.interface-name = $unique-ltpId' >
+ <parameter name='interface-name' value='`$unique-ltpId`' />
+ <parameter name='operational-status' value='`$notification.push-change-update.datastore-changes.yang-patch.edit[0].value.termination-point[0].te.oper-status`' />
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='failure'></outcome>
+ </execute>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file |