diff options
author | Franklin Dsilva <franklin.dsilva@us.fujitsu.com> | 2020-02-20 05:14:28 +0000 |
---|---|---|
committer | Franklin Dsilva <franklin.dsilva@us.fujitsu.com> | 2020-02-20 05:14:40 +0000 |
commit | 1b4700191e39fcd7b40e8bd20270451d39d0c225 (patch) | |
tree | 4a7940b38902342e71cb3e8d8d392841aef00f50 /platform-logic/optical-service/src/main/xml | |
parent | 8bbe748d631353b8c48c7d71eb733cf85712884c (diff) |
Topology Discovery and optical-service DGs
to support MDONS usecase
Change-Id: I1c28e799cc83325e8913d17ee8b718b0a4160cb2
Issue-ID: SDNC-928
Signed-off-by: Franklin Dsilva <franklin.dsilva@us.fujitsu.com>
Former-commit-id: 6a42d5eee5d71870527c8a302308f3e49829a496
Diffstat (limited to 'platform-logic/optical-service/src/main/xml')
5 files changed, 449 insertions, 0 deletions
diff --git a/platform-logic/optical-service/src/main/xml/optical-service_optical-service-create-sync-success.xml b/platform-logic/optical-service/src/main/xml/optical-service_optical-service-create-sync-success.xml new file mode 100644 index 00000000..43359c40 --- /dev/null +++ b/platform-logic/optical-service/src/main/xml/optical-service_optical-service-create-sync-success.xml @@ -0,0 +1,95 @@ +<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='optical-service' version='${project.version}'>
+ <method rpc='optical-service-create-sync-success' mode='sync'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/optical-service-create.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="Inside sync success"/>
+ </record>
+ <set>
+ <parameter name='available-bandwidth-aend' value='0' />
+ <parameter name='available-bandwidth-zend' value='0' />
+ </set>
+ <save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
+resource='SQL'
+key='UPDATE TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE SET rate = $available-bandwidth-aend WHERE
+interface_name = $optical-service-create-input.payload.service-aend.port-id'
+force='true' pfx='save-result'></save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
+resource='SQL'
+key='UPDATE TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE SET rate = $available-bandwidth-zend WHERE
+interface_name = $optical-service-create-input.payload.service-zend.port-id'
+force='true' pfx='save-result'></save>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='p-interface'
+key = 'pnf.pnf-name = $a-end-pnf-name
+ AND p-interface.interface-name = $optical-service-create-input.payload.service-aend.port-id'
+ local-only='false'>
+ <parameter name='available-capacity' value='`$available-bandwidth-aend`' />
+ </update>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='p-interface'
+key = 'pnf.pnf-name = $z-end-pnf-name
+ AND p-interface.interface-name = $optical-service-create-input.payload.service-zend.port-id'
+ local-only='false'>
+ <parameter name='available-capacity' value='`$available-bandwidth-zend`' />
+ </update>
+ <switch test='`$optical-service-create-input.payload.domain-type`'>
+ <outcome value='MSA'>
+ <block>
+ <save plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL" key="INSERT INTO REQUEST_DETAILS (request_id, controller_id, status, service_rate, service_instance_id, service_type, global_customer_id, notification_url) VALUES ( $optical-service-create-input.request-id , $controller-id , 'CREATING' , $optical-service-create-input.payload.service-rate , $optical-service-create-input.service-id , $optical-service-create-input.service-type , $optical-service-create-input.global-customer-id , $optical-service-create-input.notification-url );"></save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance'
+ key='customer.global-customer-id = $optical-service-create-input.global-customer-id AND
+ service-subscription.service-type = $optical-service-create-input.service-type AND
+ service-instance.service-instance-id = $optical-service-create-input.service-id' >
+ <parameter name='service-instance-id' value='`$optical-service-create-input.service-id`' />
+ <parameter name='service-instance-name' value='`$optical-service-create-input.payload.service-name`' />
+ <parameter name='service-type' value='Domain-Service' />
+ <parameter name='orchestration-status' value='CREATING' />
+ <parameter name='service-rate' value='`$optical-service-create-input.payload.service-rate`' />
+ <parameter name='service-layer' value='`$optical-service-create-input.payload.service-layer`' />
+ </save>
+ </block>
+ </outcome>
+ <outcome value='TAPI'>
+ <block>
+ <save plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL" key="INSERT INTO REQUEST_DETAILS (request_id, controller_id, status, service_rate, service_instance_id, service_type, global_customer_id, notification_url) VALUES ( $optical-service-create-input.request-id , $controller-id , 'CREATED' , $optical-service-create-input.payload.service-rate , $optical-service-create-input.service-id , $optical-service-create-input.service-type , $optical-service-create-input.global-customer-id , $optical-service-create-input.notification-url );"></save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance'
+ key='customer.global-customer-id = $optical-service-create-input.global-customer-id AND
+ service-subscription.service-type = $optical-service-create-input.service-type AND
+ service-instance.service-instance-id = $optical-service-create-input.service-id' >
+ <parameter name='service-instance-id' value='`$optical-service-create-input.service-id`' />
+ <parameter name='service-instance-name' value='`$optical-service-create-input.payload.service-name`' />
+ <parameter name='service-type' value='Domain-Service' />
+ <parameter name='orchestration-status' value='CREATED' />
+ <parameter name='service-rate' value='`$optical-service-create-input.payload.service-rate`' />
+ <parameter name='service-layer' value='`$optical-service-create-input.payload.service-layer`' />
+ </save>
+ </block>
+ </outcome>
+ </switch>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list'
+ key='customer.global-customer-id = $optical-service-create-input.global-customer-id AND
+ service-subscription.service-type = $optical-service-create-input.service-type AND
+ service-instance.service-instance-id = $optical-service-create-input.service-id' force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="p-interface" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/pnfs/pnf/' + $a-end-pnf-name + '/p-interfaces/p-interface/' + $optical-service-create-input.payload.service-aend.port-id `" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="pnf.pnf-name" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$a-end-pnf-name`" />
+ <parameter name="relationship-list.relationship[1].related-to" value="p-interface" />
+ <parameter name="relationship-list.relationship[1].related-link" value="`'/network/pnfs/pnf/' + $z-end-pnf-name + '/p-interfaces/p-interface/' + $optical-service-create-input.payload.service-zend.port-id `" />
+ <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-key" value="pnf.pnf-name" />
+ <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-value" value="`$z-end-pnf-name`" />
+ </save>
+ <return status='success'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='Service Creation in Progress' />
+ <parameter name='ack-final-indicator' value='N' />
+ </return>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/optical-service/src/main/xml/optical-service_optical-service-create.xml b/platform-logic/optical-service/src/main/xml/optical-service_optical-service-create.xml new file mode 100644 index 00000000..240316ab --- /dev/null +++ b/platform-logic/optical-service/src/main/xml/optical-service_optical-service-create.xml @@ -0,0 +1,73 @@ +<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='optical-service' version='${project.version}'>
+ <method rpc='optical-service-create' mode='sync'>
+ <block atomic='true'>
+ <call module='optical-service' rpc='optical-validate-input-params' mode='sync' ></call>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='/opt/onap/sdnc/data/properties/optical-service-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+key='SELECT controller_id
+from TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE
+WHERE interface_name = $optical-service-create-input.payload.service-aend.port-id
+AND interface_id = $optical-service-create-input.payload.service-aend.port-name'
+pfx='controllerid'>
+ <outcome value='success'>
+ <set>
+ <parameter name='controller-id' value='`$controllerid.controller-id`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$controller-id`'/>
+ <parameter name="regex" value="_"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix"/>
+ </execute>
+ <set>
+ <parameter name='controller-ip' value='`$param-prefix[1]`' />
+ </set>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+key='SELECT *
+from TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE
+WHERE interface_name = $optical-service-create-input.payload.service-aend.port-id
+AND interface_id = $optical-service-create-input.payload.service-aend.port-name'
+pfx='db-aend'>
+ <outcome value='success'>
+ <set>
+ <parameter name='aend-nodeid' value='`$db-aend.pnf-id`' />
+ <parameter name='a-end-pnf-name' value='`$db-aend.pnf-name`' />
+ <parameter name='aend-clli' value='`$db-aend.clli`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+key='SELECT *
+from TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE
+WHERE interface_name = $optical-service-create-input.payload.service-zend.port-id
+AND interface_id = $optical-service-create-input.payload.service-zend.port-name'
+pfx='db-zend'>
+ <outcome value='success'>
+ <set>
+ <parameter name='zend-nodeid' value='`$db-zend.pnf-id`' />
+ <parameter name='z-end-pnf-name' value='`$db-zend.pnf-name`' />
+ <parameter name='zend-clli' value='`$db-zend.clli`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <switch test='`$optical-service-create-input.payload.domain-type`'>
+ <outcome value='MSA'>
+ <block atomic='true'>
+ <call module='optical-service' rpc='service-create-msa' mode='sync' ></call>
+ </block>
+ </outcome>
+ <outcome value='TAPI'>
+ <block atomic='true'>
+ <call module='optical-service' rpc='service-create-tapi' mode='sync' ></call>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/optical-service/src/main/xml/optical-service_optical-service-delete.xml b/platform-logic/optical-service/src/main/xml/optical-service_optical-service-delete.xml new file mode 100644 index 00000000..4b42278c --- /dev/null +++ b/platform-logic/optical-service/src/main/xml/optical-service_optical-service-delete.xml @@ -0,0 +1,123 @@ +<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='optical-service' version='${project.version}'>
+ <method rpc='optical-service-delete' mode='sync'>
+ <block atomic='true'>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='/opt/onap/sdnc/data/properties/optical-service-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+key='SELECT controller_id
+from REQUEST_DETAILS
+WHERE request_id = $optical-service-delete-input.request-id'
+pfx='controllerid'>
+ <outcome value='success'>
+ <set>
+ <parameter name='controller-id' value='`$controllerid.controller-id`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$controller-id`'/>
+ <parameter name="regex" value="_"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix"/>
+ </execute>
+ <set>
+ <parameter name='controller-ip' value='`$param-prefix[1]`' />
+ <parameter name='domain-type' value='`$param-prefix[0]`' />
+ <parameter name='notification-url' value="`$prop.controller.url + '/' + $prop.sdnc.async.url`" />
+ </set>
+ <switch test='`$domain-type`'>
+ <outcome value='MSA'>
+ <block>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/optical-service-delete-msa.json'`" />
+ <parameter name="restapiUrl" value="`$controller-ip + '/cxf/openroadm/openroadm-services/' + $optical-service-delete-input.payload.service-name`"/>
+ <parameter name='restapiUser' value='admin' />
+ <parameter name='restapiPassword' value='admin' />
+ <parameter name="httpMethod" value="DELETE"/>
+ <parameter name="responsePrefix" value="service-delete-response"/>
+ <parameter name='contentType' value='application/json' />
+ <parameter name='format' value='json' />
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.msa.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <outcome value='failure'>
+ <block atomic='true'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='Error deleting the Service' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/optical-service-create.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="Successfully sent the request"/>
+ </record>
+ <switch test='`$service-delete-response.configuration-response-common.response-code`'>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='error-code' value='`$service-delete-response.configuration-response-common.response-code`' />
+ <parameter name='error-message' value='`$service-delete-response.configuration-response-common.response-message`' />
+ </return>
+ </outcome>
+ <outcome value='200'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/optical-service-create.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="Inside controller"/>
+ </record>
+ <save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
+resource='SQL'
+key='UPDATE REQUEST_DETAILS SET status = "DELETING" WHERE request_id = $optical-service-delete-input.request-id'
+force='true' pfx='save-result'></save>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+key='SELECT *
+from REQUEST_DETAILS
+WHERE request_id = $optical-service-delete-input.request-id'
+pfx='db.request-details'>
+ <outcome value='success'>
+ <set>
+ <parameter name='instance-id' value='`$db.request-details.service-instance-id`' />
+ <parameter name='customer-id' value='`$db.request-details.global-customer-id`' />
+ <parameter name='service-id' value='`$db.request-details.service-type`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='service-instance'
+key = 'customer.global-customer-id = $customer-id AND
+ service-subscription.service-type = $service-id AND
+ service-instance.service-instance-id = $instance-id'
+local-only='false'>
+ <parameter name='orchestration-status' value='DELETING' />
+ </update>
+ <return status='success'>
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="Service Deletion in Progress" />
+ <parameter name='ack-final-indicator' value='N' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='TAPI'>
+ <block>
+ <call module='optical-service' rpc='service-delete-tapi' mode='sync' ></call>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/optical-service/src/main/xml/optical-service_optical-validate-input-params.xml b/platform-logic/optical-service/src/main/xml/optical-service_optical-validate-input-params.xml new file mode 100644 index 00000000..b6517f99 --- /dev/null +++ b/platform-logic/optical-service/src/main/xml/optical-service_optical-validate-input-params.xml @@ -0,0 +1,63 @@ +<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='optical-service' version='${project.version}'>
+ <method rpc='optical-validate-input-params' mode='sync'>
+ <block atomic='true'>
+ <switch test='`$optical-service-create-input.request-id`'>
+ <outcome value='``'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='request-id is a mandatory field' />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic='true'></block>
+ </outcome>
+ </switch>
+ <switch test='`$optical-service-create-input.service-type`'>
+ <outcome value='``'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='service-type is a mandatory field' />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic='true'></block>
+ </outcome>
+ </switch>
+ <switch test='`$optical-service-create-input.global-customer-id`'>
+ <outcome value='``'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='global-customer-id is a mandatory field' />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic='true'></block>
+ </outcome>
+ </switch>
+ <switch test='`$optical-service-create-input.service-id`'>
+ <outcome value='``'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='service-id is a mandatory field' />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic='true'></block>
+ </outcome>
+ </switch>
+ <switch test='`$optical-service-create-input.source`'>
+ <outcome value='SO'>
+ <block atomic='true'></block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='source must be SO' />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/optical-service/src/main/xml/optical-service_service-create-msa.xml b/platform-logic/optical-service/src/main/xml/optical-service_service-create-msa.xml new file mode 100644 index 00000000..db2d29f6 --- /dev/null +++ b/platform-logic/optical-service/src/main/xml/optical-service_service-create-msa.xml @@ -0,0 +1,95 @@ +<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='optical-service' version='${project.version}'>
+ <method rpc='service-create-msa' mode='sync'>
+ <block atomic='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$aend-nodeid`'/>
+ <parameter name="regex" value="-"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$zend-nodeid`'/>
+ <parameter name="regex" value="-"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix1"/>
+ </execute>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/optical-service-create.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="Logical link name"/>
+ <parameter name="field2" value="`$logical-link-check`"/>
+ <parameter name="field3" value="`$a-end-pnf-name`"/>
+ <parameter name="field4" value="`$z-end-pnf-name`"/>
+ </record>
+ <set>
+ <parameter name='notification-url' value="`$prop.controller.url + '/' + $prop.sdnc.async.url`" />
+ <parameter name='service-aend-nodeid' value='`$param-prefix[0]`' />
+ <parameter name='service-zend-nodeid' value='`$param-prefix1[0]`' />
+ </set>
+ <switch test='`$optical-service-create-input.payload.service-protocol`'>
+ <outcome value='Ethernet'>
+ <block atomic='true'>
+ <switch test='`$optical-service-create-input.payload.coding-func`'>
+ <outcome value='10GBASE-R'>
+ <set>
+ <parameter name='mapping-mode-aend' value='mapping-mode' />
+ <parameter name='mapping-mode-zend' value='mapping-mode' />
+ <parameter name='mapping-mode.value' value='GFP-F' />
+ </set>
+ </outcome>
+ <outcome value='Other'></outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='Other'></outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/optical-service-create-msa.json'`" />
+ <parameter name="restapiUrl" value="`$controller-ip + '/cxf/openroadm/openroadm-services'`"/>
+ <parameter name='restapiUser' value='admin' />
+ <parameter name='restapiPassword' value='admin' />
+ <parameter name="httpMethod" value="POST"/>
+ <parameter name="responsePrefix" value="service-create-response"/>
+ <parameter name='contentType' value='application/json' />
+ <parameter name='format' value='json' />
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.msa.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <outcome value='failure'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/optical-service-create.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="Failure"/>
+ </record>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='Could not connect to Controller' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/optical-service-create.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="Successfully sent the request"/>
+ </record>
+ <switch test='`$service-create-response.configuration-response-common.response-code`'>
+ <outcome value='200'>
+ <call module='optical-service' rpc='optical-service-create-sync-success' mode='sync' ></call>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='error-code' value='`$service-create-response.configuration-response-common.response-code`' />
+ <parameter name='error-message' value='`$service-create-response.configuration-response-common.response-message`' />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file |