diff options
author | 2018-09-07 14:38:22 +0530 | |
---|---|---|
committer | 2018-09-07 17:24:17 +0530 | |
commit | 55b429cfc73802e3e52fa2f3864ecc4cdd552728 (patch) | |
tree | 5eee99f5b0b7e039ea0250d5549ca25aae74fd04 /platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-delete.xml | |
parent | db323d0fa39eabc03faf8c803876da5f87079e58 (diff) |
integration test issues fix for sdwan and sotn
Change-Id: I406550404f0cfb661d6e480cf1df48d39fad06e7
Issue-ID: SDNC-357
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
Former-commit-id: 3e4fa46160a5d6d52bb7eccf08dbb790d96a4682
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-delete.xml')
-rw-r--r-- | platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-delete.xml | 374 |
1 files changed, 189 insertions, 185 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-delete.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-delete.xml index f2ac12f1..2d723a70 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-delete.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-delete.xml @@ -1,185 +1,189 @@ -<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='GENERIC-RESOURCE-API' version='${project.version}'> - <method rpc='sotn-attachment-topology-operation-delete' mode='sync'> - <block atomic="true"> - <set> - <parameter name='tmp.ar.allotted-resource-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`' /> - <parameter name='tmp.ar.parent-service-instance-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id`' /> - </set> - <set> - <parameter name='tmp.ar.self-link' value="`'restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/' - + $tmp.ar.allotted-resource-id - + '/allotted-resource-data/connection-attachment-topology/'` " /> - </set> - <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' > - <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' /> - <parameter name='contextPrefix' value='prop' /> - </execute> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="`$prop.restapi.connection-attachment-allottedresource`"/> - <parameter name="outputPath" value="tmp.ar-url"/> - <parameter name="target" value="{allotted-resource-id}"/> - <parameter name="replacement" value="`$tmp.ar.allotted-resource-id`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' /> - <parameter name='restapiUser' value='`$prop.controller.user`' /> - <parameter name='restapiPassword' value='`$prop.controller.pwd`' /> - <parameter name='format' value='json' /> - <parameter name='httpMethod' value='Delete' /> - <parameter name="responsePrefix" value="mdsal-ar" /> - <outcome value='success'> - <block></block> - </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 updating md-sal for connection-attachment-allotted-resource" /> - </return> - </outcome> - <outcome value='not-found'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error updating md-sal for connection-attachment-allotted-resource" /> - </return> - </outcome> - </execute> - <switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'> - <outcome value=''> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Resource to be deleted doesn't exist in MDSAL." /> - </return> - </outcome> - <outcome value='Other'> - <block atomic="true"> - <for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' > - <switch test="`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`"> - <outcome value='true'> - <block atomic="true"> - <set> - <parameter name='tmp.cidx' value='`$cidx`' /> - </set> - </block> - </outcome> - </switch> - </for> - <switch test="`$tmp.cidx`"> - <outcome value=''> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="resource to be deleted is not available in mdsal" /> - </return> - </outcome> - </switch> - </block> - </outcome> - </switch> - <set> - <parameter name="service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx]." value="" /> - <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length - 1`' /> - </set> - <set> - <parameter name='tmp.ar.parent-service-instance-id' value="`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` " /> - </set> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > - <parameter name="source" value="/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data"/> - <parameter name="outputPath" value="tmp.ar-url-psd"/> - <parameter name="target" value="{service-instance-id}"/> - <parameter name="replacement" value="`$tmp.ar.parent-service-instance-id`"/> - </execute> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url-psd`' /> - <parameter name='restapiUser' value='`$prop.controller.user`' /> - <parameter name='restapiPassword' value='`$prop.controller.pwd`' /> - <parameter name='format' value='json' /> - <parameter name='httpMethod' value='GET' /> - <parameter name="responsePrefix" value="mdsal-psd" /> - <outcome value='success'> - <block></block> - </outcome> - <outcome value='Other'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="404" /> - <parameter name="error-message" value="Error: SOTN resource not found" /> - </return> - </outcome> - </execute> - <switch test='`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource_length`'> - <outcome value=''> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Resource to be deleted doesn't exist in MDSAL." /> - </return> - </outcome> - <outcome value='Other'> - <block atomic="true"> - <for index='pidx' start='0' end='`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource_length`' > - <switch test="`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource[$pidx].allotted-resource-id == $tmp.ar.allotted-resource-id`"> - <outcome value='true'> - <block atomic="true"> - <set> - <parameter name='tmp.pidx' value='`$pidx`' /> - </set> - </block> - </outcome> - </switch> - </for> - <switch test="`$tmp.pidx`"> - <outcome value=''> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="resource to be deleted is not available in mdsal" /> - </return> - </outcome> - </switch> - </block> - </outcome> - </switch> - <set> - <parameter name="service-data.provided-allotted-resources.consumed-allotted-resource[$pidx]." value="" /> - <parameter name="service-data.provided-allotted-resources.consumed-allotted-resource_length" value='`$service-data.provided-allotted-resources.consumed-allotted-resource_length - 1`' /> - </set> - <set> - <parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' /> - <parameter name='connection-attachment-object-path' value="`$tmp.ar.self-link`"/> - <parameter name='service-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' - + $connection-attachment-topology-operation-input.service-information.service-instance-id - + '/service-data/service-topology/'`"/> - </set> - <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource='allotted-resource' - key="customer.global-customer-id = $connection-attachment-topology-operation-input.service-information.global-customer-id AND - service-subscription.service-type = $connection-attachment-topology-operation-input.service-information.subscription-service-type AND - service-instance.service-instance-id = $connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id AND - allotted-resource.id = $tmp.ar.allotted-resource-id"> - <outcome value='failure'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="AAI failed" /> - </return> - </outcome> - <outcome value='not-found'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="AAI failed" /> - </return> - </outcome> - </delete> - <return status='success'> - <parameter name="ack-final-indicator" value="Y" /> - <parameter name="error-code" value="200" /> - <parameter name="error-message" value="`$error-message`" /> - </return> - </block> - </method> -</service-logic>
\ No newline at end of file +<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='GENERIC-RESOURCE-API' version='${project.version}'>
+ <method rpc='sotn-attachment-topology-operation-delete' mode='sync'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.ar.allotted-resource-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`' />
+ <parameter name='tmp.ar.parent-service-instance-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />
+ </set>
+ <set>
+ <parameter name='tmp.ar.self-link' value="`'restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/'
+ + $tmp.ar.allotted-resource-id
+ + '/allotted-resource-data/connection-attachment-topology/'` " />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.connection-attachment-allottedresource`"/>
+ <parameter name="outputPath" value="tmp.ar-url"/>
+ <parameter name="target" value="{allotted-resource-id}"/>
+ <parameter name="replacement" value="`$tmp.ar.allotted-resource-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='Delete' />
+ <parameter name="responsePrefix" value="mdsal-ar" />
+ <outcome value='success'>
+ <block></block>
+ </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 updating md-sal for connection-attachment-allotted-resource" />
+ </return>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating md-sal for connection-attachment-allotted-resource" />
+ </return>
+ </outcome>
+ </execute>
+ <switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Resource to be deleted doesn't exist in MDSAL." />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >
+ <switch test="`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.cidx' value='`$cidx`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test="`$tmp.cidx`">
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="resource to be deleted is not available in mdsal" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name="service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx]." value="" />
+ <parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length - 1`' />
+ </set>
+ <set>
+ <parameter name='tmp.ar.parent-service-instance-id' value="`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` " />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data"/>
+ <parameter name="outputPath" value="tmp.ar-url-psd"/>
+ <parameter name="target" value="{service-instance-id}"/>
+ <parameter name="replacement" value="`$tmp.ar.parent-service-instance-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url-psd`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='GET' />
+ <parameter name="responsePrefix" value="mdsal-psd" />
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="404" />
+ <parameter name="error-message" value="Error: SOTN resource not found" />
+ </return>
+ </outcome>
+ </execute>
+ <switch test='`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource_length`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Resource to be deleted doesn't exist in MDSAL." />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='pidx' start='0' end='`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource_length`' >
+ <switch test="`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource[$pidx].allotted-resource-id == $tmp.ar.allotted-resource-id`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.pidx' value='`$pidx`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test="`$tmp.pidx`">
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="resource to be deleted is not available in mdsal" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='restapiUrl' value="`$prop.controller.url + $tmp.ar-url-psd + '/provided-allotted-resources/provided-allotted-resource/' + $tmp.ar.allotted-resource-id`" />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='DELETE' />
+ <parameter name="responsePrefix" value="mdsal-psd-delete" />
+ </execute>
+ <set>
+ <parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />
+ <parameter name='connection-attachment-object-path' value="`$tmp.ar.self-link`"/>
+ <parameter name='service-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $connection-attachment-topology-operation-input.service-information.service-instance-id
+ + '/service-data/service-topology/'`"/>
+ </set>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource='allotted-resource'
+ key="customer.global-customer-id = $connection-attachment-topology-operation-input.service-information.global-customer-id AND
+ service-subscription.service-type = $connection-attachment-topology-operation-input.service-information.subscription-service-type AND
+ service-instance.service-instance-id = $connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id AND
+ allotted-resource.id = $tmp.ar.allotted-resource-id">
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="AAI failed" />
+ </return>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="AAI failed" />
+ </return>
+ </outcome>
+ </delete>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </method>
+</service-logic>
|