aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/optical-service/src/main/xml
diff options
context:
space:
mode:
authorFranklin Dsilva <franklin.dsilva@us.fujitsu.com>2020-04-03 05:50:12 +0000
committerFranklin Dsilva <franklin.dsilva@us.fujitsu.com>2020-04-03 05:50:29 +0000
commit98c82621446df1902b136b2a67eba68cfa8e1507 (patch)
treef86335aac678d211270be36739faeb90461bb84c /platform-logic/optical-service/src/main/xml
parentdeb729cf3099ad58cb8c243101c37904da4fe349 (diff)
Changes in MSA service flow
to support MDONs use case Change-Id: I11244d58d6adc3400d3a97e294c0f914ab6192a1 Issue-ID: SDNC-1144 Signed-off-by: Franklin Dsilva <franklin.dsilva@us.fujitsu.com> Former-commit-id: 64490238f742f486d4ab5ede3b49140d2859cbcd
Diffstat (limited to 'platform-logic/optical-service/src/main/xml')
-rw-r--r--platform-logic/optical-service/src/main/xml/optical-service_aai-delete-service-handling.xml4
-rw-r--r--platform-logic/optical-service/src/main/xml/optical-service_optical-service-create-sync-success.xml48
-rw-r--r--platform-logic/optical-service/src/main/xml/optical-service_optical-service-create.xml7
-rw-r--r--platform-logic/optical-service/src/main/xml/optical-service_service-create-msa.xml12
-rw-r--r--platform-logic/optical-service/src/main/xml/optical-service_service-delete-msa.xml31
5 files changed, 38 insertions, 64 deletions
diff --git a/platform-logic/optical-service/src/main/xml/optical-service_aai-delete-service-handling.xml b/platform-logic/optical-service/src/main/xml/optical-service_aai-delete-service-handling.xml
index 0f3e967b..e11d061b 100644
--- a/platform-logic/optical-service/src/main/xml/optical-service_aai-delete-service-handling.xml
+++ b/platform-logic/optical-service/src/main/xml/optical-service_aai-delete-service-handling.xml
@@ -21,7 +21,7 @@ pfx='aai.service' local-only='false'></get-resource>
<parameter name="field2" value="`$aai.service.orchestration-status`"/>
<parameter name="field3" value="`$aai.service.relationship-list.relationship_length`"/>
</record>
- <for index='idx' start='0' end='`$aai.service.relationship-list.relationship_length`' >
+ <for index='idx' start='1' end='`$aai.service.relationship-list.relationship_length`' >
<block atomic='true'>
<set>
<parameter name='pnf-name' value='`$aai.service.relationship-list.relationship[$idx].relationship-data[0].relationship-value`' />
@@ -66,4 +66,4 @@ service-instance.service-instance-id = $output.service-instance-id'></delete>
key="DELETE FROM REQUEST_DETAILS WHERE request_id = $request-id"></delete>
</block>
</method>
-</service-logic> \ No newline at end of file
+</service-logic>
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
index 43359c40..4eed4026 100644
--- 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
@@ -38,40 +38,18 @@ key = 'pnf.pnf-name = $z-end-pnf-name
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'
+ <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='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>
+ <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>
<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
@@ -85,11 +63,9 @@ key = 'pnf.pnf-name = $z-end-pnf-name
<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>
+ <set>
+ <parameter name='final-response-code' value='200' />
+ </set>
</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
index 0c09b4a5..2341c607 100644
--- 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
@@ -87,6 +87,13 @@
</set>
</outcome>
</switch>
+ <switch test="`$optical-service-create-input.payload.param[$idx].name == 'uni1_client_proto'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='optical-service-create-input.payload.service-protocol' value="`$optical-service-create-input.payload.param[$idx].value`"/>
+ </set>
+ </outcome>
+ </switch>
</for>
<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
key='SELECT controller_id
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
index db2d29f6..6768a50c 100644
--- 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
@@ -26,6 +26,18 @@
<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-rate`'>
+ <outcome value='10'>
+ <set>
+ <parameter name='optical-service-create-input.payload.coding-func' value='10GBASE-R' />
+ </set>
+ </outcome>
+ <outcome value='100'>
+ <set>
+ <parameter name='optical-service-create-input.payload.coding-func' value='100GBASE-R' />
+ </set>
+ </outcome>
+ </switch>
<switch test='`$optical-service-create-input.payload.service-protocol`'>
<outcome value='Ethernet'>
<block atomic='true'>
diff --git a/platform-logic/optical-service/src/main/xml/optical-service_service-delete-msa.xml b/platform-logic/optical-service/src/main/xml/optical-service_service-delete-msa.xml
index 562195a0..a4233171 100644
--- a/platform-logic/optical-service/src/main/xml/optical-service_service-delete-msa.xml
+++ b/platform-logic/optical-service/src/main/xml/optical-service_service-delete-msa.xml
@@ -3,10 +3,6 @@
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-delete-msa' mode='sync'>
<block atomic="true">
- <set>
- <parameter name='optical-service-create-input.request-id' value="`$domain-service1`" />
- <parameter name='optical-service-delete-input.payload.service-name' value="`$optical-service-delete-input.payload.param[0].value + '_MDONS-OTN-MSA'`"/>
- </set>
<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`"/>
@@ -49,32 +45,15 @@
<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>
+pfx='output'></get-resource>
+ <set>
+ <parameter name='request-id' value='`$optical-service-create-input.request-id`' />
+ </set>
+ <call module='optical-service' rpc='aai-delete-service-handling' mode='sync' ></call>
<set>
<parameter name='final-response-code' value="200" />
</set>