diff options
Diffstat (limited to 'ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_bbs-access-connectivity-network-topology-operation-create-huawei.xml')
-rw-r--r-- | ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_bbs-access-connectivity-network-topology-operation-create-huawei.xml | 266 |
1 files changed, 0 insertions, 266 deletions
diff --git a/ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_bbs-access-connectivity-network-topology-operation-create-huawei.xml b/ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_bbs-access-connectivity-network-topology-operation-create-huawei.xml deleted file mode 100644 index 9417333..0000000 --- a/ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_bbs-access-connectivity-network-topology-operation-create-huawei.xml +++ /dev/null @@ -1,266 +0,0 @@ -<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='bbs-access-connectivity-network-topology-operation-create-huawei' mode='sync'> - <block atomic="true"> - <call module='GENERIC-RESOURCE-API' rpc='validate-bbs-network-input-parameters' mode='sync' ></call> - <set> - <parameter name='network-input-parameters.' value='`$network-topology-operation-input.network-request-input.network-input-parameters.`' /> - <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value='https://172.30.0.55:26335' /> - <parameter name='prop.bbs.HsiPackage' value='50M' /> - <parameter name='prop.bbs.HsiType' value='IPoE' /> - </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> - <for index='idx' start='0' end='`$network-input-parameters.param_length`' > - <block> - <switch test="`$network-input-parameters.param[$idx].name == 'remote_id'`"> - <outcome value='true'> - <switch test='`$network-input-parameters.param[$idx].value`'> - <outcome value=''> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="`$network-input-parameters.param[$idx].name +' value is null, please check it.'`" /> - </return> - </outcome> - <outcome value='Other'> - <set> - <parameter name='prop.bbs.remote_id' value='`$network-input-parameters.param[$idx].value`' /> - </set> - </outcome> - </switch> - </outcome> - </switch> - <switch test="`$network-input-parameters.param[$idx].name == 'ONTSN'`"> - <outcome value='true'> - <switch test='`$network-input-parameters.param[$idx].value`'> - <outcome value=''> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="`$network-input-parameters.param[$idx].name +' value is null, please check it.'`" /> - </return> - </outcome> - <outcome value='Other'> - <set> - <parameter name='prop.bbs.ONTSN' value='`$network-input-parameters.param[$idx].value`' /> - </set> - </outcome> - </switch> - </outcome> - </switch> - <switch test="`$network-input-parameters.param[$idx].name == 'CVLAN'`"> - <outcome value='true'> - <switch test='`$network-input-parameters.param[$idx].value`'> - <outcome value=''> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="`$network-input-parameters.param[$idx].name +' value is null, please check it.'`" /> - </return> - </outcome> - <outcome value='Other'> - <set> - <parameter name='prop.bbs.CVLAN' value='`$network-input-parameters.param[$idx].value`' /> - </set> - </outcome> - </switch> - </outcome> - </switch> - <switch test="`$network-input-parameters.param[$idx].name == 'SVLAN'`"> - <outcome value='true'> - <switch test='`$network-input-parameters.param[$idx].value`'> - <outcome value=''> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="`$network-input-parameters.param[$idx].name +' value is null, please check it.'`" /> - </return> - </outcome> - <outcome value='Other'> - <set> - <parameter name='prop.bbs.SVLAN' value='`$network-input-parameters.param[$idx].value`' /> - </set> - </outcome> - </switch> - </outcome> - </switch> - </block> - </for> - <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest"> - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/bbs-token-template.json'`"/> - <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url+'/rest/plat/smapp/v1/oauth/token'`"/> - <parameter name="format" value="json"/> - <parameter name="httpMethod" value="put"/> - <parameter name="responsePrefix" value="token-result"/> - <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"/> - <outcome value='success'> - <switch test='`$token-result.accessSession`'> - <outcome value='Other'> - <set> - <parameter name='prop.sdncRestApi.token_id' value='`$token-result.accessSession`' /> - </set> - </outcome> - <outcome value=''> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error executing queryTokenID,vaule is null" /> - </return> - </outcome> - </switch> - </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 failed to call queryTokenID" /> - </return> - </outcome> - </execute> - <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest"> - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/bbs-access-connectivity-create.json'`" /> - <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/ws/rest/1002/FanOpenAPI/ActiveOnt'`" /> - <parameter name="contentType" value="application/json"/> - <parameter name="httpMethod" value="post"/> - <parameter name="responsePrefix" value="service-result"/> - <parameter name="customHttpHeaders" value="`'X-Auth-Token=' + $prop.sdncRestApi.token_id`"/> - <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"/> - <outcome value='failure'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Error failed to call createAccessConnectivityService" /> - </return> - </outcome> - <outcome value='success'> - <switch test="`$service-result.errors.error[0].error-message`"> - <outcome value='Other'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="`'Error createAccessConnectivityService return: '+$service-result.errors.error[0].error-message`" /> - </return> - </outcome> - <outcome value=''> - <block> - <set> - <parameter name='prop.bbs.serviceID' value="`$service-result.accessE2Eservice.serviceID`"/> - </set> - </block> - </outcome> - </switch> - </outcome> - </execute> - <block> - <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID"> - <parameter name="ctx-destination" value="prop.random-data"/> - <outcome value='success'> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > - <parameter name="ctx_memory_result_key" value="prop.random-data-list"/> - <parameter name="original_string" value="`$prop.random-data`"/> - <parameter name="regex" value="-"/> - <outcome value='success'></outcome> - </execute> - </outcome> - </execute> - <set> - <parameter name='vnf-id' value="`$prop.random-data-list[3]`"/> - <parameter name='vnf-name' value="`'vnf-'+$prop.random-data-list[4]`"/> - </set> - <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="generic-vnf" key="generic-vnf.vnf-id = $vnf-id" > - <parameter name= "vnf-id" value = "`$vnf-id`"/> - <parameter name= "vnf-name" value = "`$vnf-name`"/> - <parameter name= "vnf-type" value = "AccessConnectivity"/> - <parameter name= "service-id" value = "`$network-topology-operation-input.service-information.service-id`"/> - <parameter name= "prov-status" value = "ACTIVE"/> - <parameter name= "orchestration-status" value = "Active"/> - <parameter name= "is-closed-loop-disabled" value = "false" /> - <parameter name= "model-invariant-id" value = "`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`"/> - <parameter name= "model-version-id" value = "`$network-topology-operation-input.network-information.onap-model-information.model-uuid`"/> - <parameter name= "model-customization-id" value = "`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`"/> - <outcome value='failure'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Failure calling AAI to save generic-vnf" /> - </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="generic-vnf instance does not exist in AAI" /> - </return> - </outcome> - <outcome value='success'></outcome> - </save> - <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="service-instance:metadata" - key="service-instance.service-instance-id = $network-topology-operation-input.service-information.service-id - AND customer.global-customer-id = $network-topology-operation-input.service-information.global-customer-id - AND service-subscription.service-type = $network-topology-operation-input.service-information.subscription-service-type - AND service-instance.service-instance-id = $network-topology-operation-input.service-information.service-instance-id" force="true" pfx="tmp.AnAI-data" - > - <parameter name="metadata.metadatum[0].metaname" value="remote-id" /> - <parameter name="metadata.metadatum[0].metaval" value="`$prop.bbs.remote_id`" /> - <parameter name="metadata.metadatum[1].metaname" value="controller-service-id" /> - <parameter name="metadata.metadatum[1].metaval" value="`$prop.bbs.serviceID`" /> - <outcome value='failure'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Failure calling AAI to save metadatum" /> - </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="metadatum instance does not exist in AAI" /> - </return> - </outcome> - <outcome value='success'></outcome> - </save> - <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="service-instance:relationship-list" - key="service-instance.service-instance-id = $network-topology-operation-input.service-information.service-id - AND customer.global-customer-id = $network-topology-operation-input.service-information.global-customer-id - AND service-subscription.service-type = $network-topology-operation-input.service-information.subscription-service-type - AND service-instance.service-instance-id = $network-topology-operation-input.service-information.service-instance-id" force="true" pfx="tmp.AnAI-data"> - <parameter name="relationship-list.relationship[0].related-to" value="generic-vnf" /> - <parameter name="relationship-list.relationship[0].related-link" value="`'/network/generic-vnfs/generic-vnf/' + $vnf-id`" /> - <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="generic-vnf.vnf-id" /> - <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$vnf-id`" /> - <outcome value='failure'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="Failure calling AAI to save metadatum" /> - </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="metadatum instance does not exist in AAI" /> - </return> - </outcome> - <outcome value='success'></outcome> - </save> - </block> - <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> |