diff options
author | wsx25289 <10200860@zte.com.cn> | 2018-09-19 15:52:49 +0800 |
---|---|---|
committer | wsx25289 <10200860@zte.com.cn> | 2018-09-21 15:18:28 +0800 |
commit | 8a829355092c93b256211c47077367889c64940d (patch) | |
tree | 486bc0686e03a10fcd7c129d5aa5b07c05bb39af /platform-logic/datachange/src/main/xml | |
parent | 92e0073f0c5d96e1af5eba4ab3c898f456929d78 (diff) |
add zte esr-thirdparty-sdnc discovery logic
Issue-ID: SDNC-354
Change-Id: Ida2c54bfd2211774c872c0535032182cf4f90324
Signed-off-by: Wsx25289 <10200860@zte.com.cn>
Former-commit-id: 60775f8fffb91a098315385f6919ce5593005d2d
Diffstat (limited to 'platform-logic/datachange/src/main/xml')
3 files changed, 123 insertions, 6 deletions
diff --git a/platform-logic/datachange/src/main/xml/DataChange_data-change-notification.xml b/platform-logic/datachange/src/main/xml/DataChange_data-change-notification.xml index 80c8acf5..529b8497 100644 --- a/platform-logic/datachange/src/main/xml/DataChange_data-change-notification.xml +++ b/platform-logic/datachange/src/main/xml/DataChange_data-change-notification.xml @@ -6,9 +6,14 @@ <switch test='`$data-change-notification-input.aai-node-type`'>
<outcome value='esr-thirdparty-sdnc'>
<for index='idx' start='0' end='`$data-change-notification-input.key-data_length`'>
- <switch test="`$data-change-notification-input.key-data[$idx].key-value == 'ZTE'`">
+ <switch test='`$data-change-notification-input.key-data[$idx].key-value == 'ZTE'`'>
<outcome value='true'>
- <call module='DataChange' rpc='esr-thirdparty-sdnc-of-zte' mode='sync'></call>
+ <block atomic="true">
+ <set>
+ <parameter name='zte.prop.sdncRestApi.vendor' value='`$data-change-notification-input.key-data[$idx].key-value`'/>
+ </set>
+ <call module='DataChange' rpc='esr-thirdparty-sdnc-of-zte' mode='sync'></call>
+ </block>
</outcome>
<outcome value='false'>
<block atomic="true">
diff --git a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery-of-zte.xml b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery-of-zte.xml new file mode 100644 index 00000000..2cc77da8 --- /dev/null +++ b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery-of-zte.xml @@ -0,0 +1,53 @@ +<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='esr-thirdparty-sdnc-discovery-of-zte' mode='sync'>
+ <block atomic="true">
+ <switch test='`$data-change-notification-input.aai-event-trigger`'>
+ <outcome value='Update'>
+ <block>
+ <switch test='`$prop.sdncRestApi.type`'>
+ <outcome value='SOTN'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest'>
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/getztetopotemplate.json'`"/>
+ <parameter name="restapiUrl" value="`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-topology-details'`"/>
+ <parameter name="restapiUser" value="`$zte.prop.sdncRestApi.thirdpartySdnc.user`"/>
+ <parameter name="restapiPassword" value="`$zte.prop.sdncRestApi.thirdpartySdnc.password`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="POST"/>
+ <parameter name="responsePrefix" value="ztetopology"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.zte.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.zte.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <outcome value='success'>
+ <block atomic="true"/>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Error executing Create vpn rest api"/>
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="`'Unsupported type = ' + $prop.sdncRestApi.type`"/>
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='delete'>
+ <block atomic="true"/>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-of-zte.xml b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-of-zte.xml index 52161217..25fef6b2 100644 --- a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-of-zte.xml +++ b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-of-zte.xml @@ -1,5 +1,64 @@ -<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='esr-thirdparty-sdnc-of-zte' mode='sync'></method> +<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='esr-thirdparty-sdnc-of-zte' mode='sync'>
+ <block atomic="true">
+ <call module='DataChange' rpc='validate-esr-thirdparty-sdnc-input' mode='sync'></call>
+ <for index='idx' start='0' end='`$data-change-notification-input.key-data_length`'>
+ <block>
+ <switch test='`$data-change-notification-input.key-data[$idx].key-name == 'service-url'`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='zte.prop.sdncRestApi.thirdpartySdnc.url' value='`$data-change-notification-input.key-data[$idx].key-value`'/>
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$data-change-notification-input.key-data[$idx].key-name == 'user-name'`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='zte.prop.sdncRestApi.thirdpartySdnc.user' value='`$data-change-notification-input.key-data[$idx].key-value`'/>
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$data-change-notification-input.key-data[$idx].key-name == 'password'`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='zte.prop.sdncRestApi.thirdpartySdnc.password' value='`$data-change-notification-input.key-data[$idx].key-value`'/>
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$data-change-notification-input.key-data[$idx].key-name == 'esr-system-info-id'`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='zte.prop.sdncRestApi.thirdpartySdnc.system-info-id' value='`$data-change-notification-input.key-data[$idx].key-value`'/>
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$data-change-notification-input.key-data[$idx].key-name == 'thirdparty-sdnc-id'`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='zte.prop.sdncRestApi.thirdpartySdnc.id' value='`$data-change-notification-input.key-data[$idx].key-value`'/>
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$data-change-notification-input.key-data[$idx].key-name == 'type'`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='zte.prop.sdncRestApi.type' value='`$data-change-notification-input.key-data[$idx].key-value`'/>
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/zte.svclogic.log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="data-change-notification"/>
+ <parameter name="field3" value="Config"/>
+ <parameter name="field4" value="`service-url`"/>
+ <parameter name="field5" value="`$zte.prop.sdncRestApi.thirdpartySdnc.url`"/>
+ </record>
+ <call module='DataChange' rpc='esr-thirdparty-sdnc-discovery-of-zte' mode='sync'></call>
+ </block>
+ </method>
</service-logic>
\ No newline at end of file |