diff options
author | Gaurav Agrawal <gaurav.agrawal@huawei.com> | 2017-10-10 00:07:11 +0530 |
---|---|---|
committer | Gaurav Agrawal <gaurav.agrawal@huawei.com> | 2017-10-10 00:07:11 +0530 |
commit | 8157d1cfbc22cc05998a9e58a0da367f82ff63e3 (patch) | |
tree | 430a7f4c44e664622cdc1df2d1ca98653cd9e6d4 /platform-logic/generic-resource-api/src/main/xml | |
parent | 1259ff85a7be548471f49298959929e3791ca8d1 (diff) |
Fix for validate-network-input
Changes includes:
1) Fix an existing bug in validate-network-input because
of which DG validation was failing.
2) validate-network-input to do nothing for overlay validation.
3) validate-network-input-parameter to validate network-id for
deactivate flow.
Change-Id: I424817ab20263633b8dacd3b3d672e63e3960f6d
Issue-Id: SDNC-113
Signed-off-by: Gaurav Agrawal <gaurav.agrawal@huawei.com>
Former-commit-id: bf5801eae1015156972164d453dc737d63eeed95
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
2 files changed, 446 insertions, 276 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input-parameters.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input-parameters.xml index e54026dc..3af34c61 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input-parameters.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input-parameters.xml @@ -244,7 +244,22 @@ </outcome>
<outcome value="deactivate">
<switch test="`$network-topology-operation-input.request-information.request-action`">
- <outcome value="DeActivateDCINetworkInstance" />
+ <outcome value="DeActivateDCINetworkInstance">
+ <block atomic="true">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="requiredParameters">
+ <parameter name="$network-topology-operation-input.network-information.network-id" value="" />
+ </execute>
+ <switch test="`$network-topology-operation-input.network-information.network-id`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
<outcome value="Other">
<return status="failure">
<parameter name="ack-final" value="Y" />
@@ -293,4 +308,4 @@ </switch>
</block>
</method>
-</service-logic>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input.xml index b11b8417..1f950e64 100755 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input.xml @@ -1,274 +1,429 @@ -<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='validate-network-input' mode='sync'>
-<block atomic="true"><switch test='`$network-topology-operation-input.sdnc-request-header.svc-action`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="sdnc-request-header.svc-action is a required input" />
-</return></outcome></switch><switch test='`$network-topology-operation-input.sdnc-request-header.svc-request-id`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="sdnc-request-header.svc-request-id is a required input" />
-</return></outcome></switch><switch test='`$network-topology-operation-input.request-information.request-action`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="request-information.request-action is a required input" />
-</return></outcome></switch><switch test='`$network-topology-operation-input.service-information.service-instance-id`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="service-information.service-instance-id is a required input" />
-</return></outcome></switch><switch test='`$network-topology-operation-input.sdnc-request-header.svc-action`'>
-<outcome value='assign'><block atomic="true"><switch test='`$network-topology-operation-input.request-information.request-action`'>
-<outcome value='CreateNetworkInstance'><block atomic="true"><switch test='`$network-topology-operation-input.network-information.network-id`'>
-
-<outcome value=''><return status='success'>
-<parameter name='' value='' />
-</return></outcome><outcome value='Other'><block>
-<switch test='`$service-data.networks.network_length`'>
-<outcome value=''>
-<record plugin="com.att.sdnctl.sli.recording.Slf4jRecorder">
-<parameter name="logger" value="message-log"/>
-<parameter name="field1" value="__TIMESTAMP__"/>
-<parameter name="field2" value="GENERIC-RESOURCE-API.validate-network-input"/>
-<parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
-<parameter name="field4" value="Network id proveded but no network exists that matches"/>
-<parameter name="field5" value="`$network-topology-operation-input.network-information.network-id`"/>
-
-
-
-</record></outcome><outcome value='Other'>
-<block atomic="true"><for index='nidx' start='0' end='`$service-data.networks.network_length`' >
-<switch test="`$service-data.networks.network[$nidx].network-id == $network-topology-operation-input.network-information.network-id`">
-
-<outcome value='true'>
-<block atomic="true"><set>
-<parameter name='tmp.nidx' value='`$nidx`' />
-<parameter name='ctx.network-data.' value='`$service-data.networks.network[$nidx].`' />
-</set></block></outcome></switch></for><switch test="`$tmp.nidx`">
-
-<outcome value=''>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id not found in service-data" />
-</return></outcome></switch></block></outcome></switch></block></outcome></switch><switch test='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-information.onap-model-information.model-invariant-uuid is a required input" />
-</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-information.onap-model-information.model-customization-uuid is a required input" />
-</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-information.onap-model-information.model-uuid is a required input" />
-</return></outcome></switch><switch test='`$network-topology-operation-input.network-request-input.tenant`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.tenant is a required input" />
-</return></outcome></switch><switch test='`$network-topology-operation-input.network-request-input.aic-cloud-region`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="service-information.network-request-information.aic-cloud-region is a required input" />
-</return></outcome></switch><switch test='`$network-topology-operation-input.service-information.onap-model-information.model-uuid`'>
-<outcome value=''><block atomic="true"><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
- key='SELECT * from SERVICE_MODEL WHERE service_uuid = $service-data.service-information.onap-model-information.model-uuid'
- pfx='service-model'><outcome value='not-found'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
-</return></outcome><outcome value='failure'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
-</return></outcome></get-resource><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
- key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid
- and service_uuid = $service-data.service-information.onap-model-information.model-uuid'
- pfx='network-model'>
-
-<outcome value='not-found'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No network model found for customization UUID '
- + $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid +
- ' and model-uuid ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
-</return></outcome><outcome value='failure'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No network model found for customization UUID '
- + $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid +
- ' and model-uuid ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
-</return></outcome></get-resource></block></outcome><outcome value='Other'><block atomic="true"><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
- key='SELECT * from SERVICE_MODEL WHERE service_uuid = $network-topology-operation-input.service-information.onap-model-information.model-uuid'
- pfx='service-model'>
-
-<outcome value='not-found'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
-</return></outcome><outcome value='failure'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
-</return></outcome></get-resource><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
- key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid
- and service_uuid = $network-topology-operation-input.service-information.onap-model-information.model-uuid'
- pfx='network-model'>
-
-<outcome value='not-found'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No network model found for customization UUID '
- + $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid +
- ' and model-uuid ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
-</return></outcome><outcome value='failure'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No network model found for customization UUID '
- + $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid +
- ' and model-uuid ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
-</return></outcome></get-resource></block></outcome></switch></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="request-information.request-action is required to be CreateNetworkInstance for svc-action=assign" />
-</return></outcome></switch></block></outcome><outcome value='activate'><block atomic="true"><switch test='`$network-topology-operation-input.request-information.request-action`'>
-<outcome value='CreateNetworkInstance'><block atomic="true"><switch test='`$network-topology-operation-input.network-information.network-id`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="service-information.network-information.network-id is a required input" />
-</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-information.onap-model-information.model-invariant-uuid is a required input" />
-</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-information.onap-model-information.model-customization-uuid is a required input" />
-</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-information.onap-model-information.model-uuid is a required input" />
-</return></outcome></switch><switch test='`$network-topology-operation-input.network-request-input.tenant`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.tenant is a required input" />
-</return></outcome></switch><switch test='`$network-topology-operation-input.network-request-input.aic-cloud-region`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="service-information.network-request-information.aic-cloud-region is a required input" />
-</return></outcome></switch><switch test='`$network-topology-operation-input.service-information.onap-model-information.model-uuid`'>
-<outcome value=''><block atomic="true"><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
- key='SELECT * from SERVICE_MODEL WHERE service_uuid = $service-data.service-information.onap-model-information.model-uuid'
- pfx='service-model'><outcome value='not-found'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
-</return></outcome><outcome value='failure'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
-</return></outcome></get-resource><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
- key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid
- and service_uuid = $service-data.service-information.onap-model-information.model-uuid'
- pfx='network-model'>
-
-<outcome value='not-found'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No network model found for customization UUID '
- + $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid +
- ' and model-uuid ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
-</return></outcome><outcome value='failure'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No network model found for customization UUID '
- + $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid +
- ' and model-uuid ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
-</return></outcome></get-resource></block></outcome><outcome value='Other'><block atomic="true"><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
- key='SELECT * from SERVICE_MODEL WHERE service_uuid = $network-topology-operation-input.service-information.onap-model-information.model-uuid'
- pfx='service-model'>
-
-<outcome value='not-found'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
-</return></outcome><outcome value='failure'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
-</return></outcome></get-resource><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
- key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid
- and service_uuid = $network-topology-operation-input.service-information.onap-model-information.model-uuid'
- pfx='network-model'>
-
-<outcome value='not-found'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No network model found for customization UUID '
- + $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid +
- ' and model-uuid ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
-</return></outcome><outcome value='failure'>
-<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No network model found for customization UUID '
- + $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid +
- ' and model-uuid ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
-</return></outcome></get-resource></block></outcome></switch></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="request-information.request-action is required to be CreateNetworkInstance for svc-action=activate" />
-</return></outcome></switch></block></outcome><outcome value='deactivate'><block atomic="true"><switch test='`$network-topology-operation-input.request-information.request-action`'>
-<outcome value='DeleteNetworkInstance'><block atomic="true"><switch test='`$network-topology-operation-input.network-information.network-id`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="service-information.network-information.network-id is a required input" />
-</return></outcome></switch></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="request-information.request-action is required to be DeleteNetworkInstance for svc-action=deactivate" />
-</return></outcome></switch></block></outcome><outcome value='unassign'><block atomic="true"><switch test='`$network-topology-operation-input.request-information.request-action`'>
-<outcome value='DeleteNetworkInstance'><block atomic="true"><switch test='`$network-topology-operation-input.network-information.network-id`'>
-<outcome value=''><return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="service-information.network-information.network-id is a required input" />
-</return></outcome></switch></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="request-information.request-action is required to be DeleteNetworkInstance for svc-action=unassign" />
-</return></outcome></switch></block></outcome></switch><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> +<?xml version="1.0" encoding="UTF-8"?>
+<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="validate-network-input" mode="sync">
+ <block atomic="true">
+ <switch test="`$network-topology-operation-input.sdnc-request-header.svc-action`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="sdnc-request-header.svc-action is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.sdnc-request-header.svc-request-id`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="sdnc-request-header.svc-request-id is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.service-information.service-instance-id`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.service-instance-id is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.sdnc-request-header.svc-action`">
+ <outcome value="assign">
+ <block atomic="true">
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="CreateNetworkInstance">
+ <block atomic="true">
+ <switch test="`$network-topology-operation-input.network-information.network-id`">
+ <outcome value="" />
+ <outcome value="Other">
+ <block>
+ <switch test="`$service-data.networks.network_length`">
+ <outcome value="">
+ <record plugin="com.att.sdnctl.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log" />
+ <parameter name="field1" value="__TIMESTAMP__" />
+ <parameter name="field2" value="GENERIC-RESOURCE-API.validate-network-input" />
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`" />
+ <parameter name="field4" value="Network id proveded but no network exists that matches" />
+ <parameter name="field5" value="`$network-topology-operation-input.network-information.network-id`" />
+ </record>
+ </outcome>
+ <outcome value="Other">
+ <block atomic="true">
+ <for index="nidx" start="0" end="`$service-data.networks.network_length`">
+ <switch test="`$service-data.networks.network[$nidx].network-id == $network-topology-operation-input.network-information.network-id`">
+ <outcome value="true">
+ <block atomic="true">
+ <set>
+ <parameter name="tmp.nidx" value="`$nidx`" />
+ <parameter name="ctx.network-data." value="`$service-data.networks.network[$nidx].`" />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test="`$tmp.nidx`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-information.onap-model-information.model-invariant-uuid is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-information.onap-model-information.model-customization-uuid is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-information.onap-model-information.model-uuid`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-information.onap-model-information.model-uuid is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.tenant`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-request-input.tenant is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.aic-cloud-region`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.network-request-information.aic-cloud-region is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.service-information.onap-model-information.model-uuid`">
+ <outcome value="">
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource" resource="SQL" key="SELECT * from SERVICE_MODEL WHERE service_uuid = $service-data.service-information.onap-model-information.model-uuid" pfx="service-model">
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
+ </return>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource" resource="SQL" key="SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid and service_uuid = $service-data.service-information.onap-model-information.model-uuid" pfx="network-model">
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network model found for customization UUID ' + $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid + ' and model-uuid ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
+ </return>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network model found for customization UUID ' + $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid + ' and model-uuid ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
+ </return>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ <outcome value="Other">
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource" resource="SQL" key="SELECT * from SERVICE_MODEL WHERE service_uuid = $network-topology-operation-input.service-information.onap-model-information.model-uuid" pfx="service-model">
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
+ </return>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource" resource="SQL" key="SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid and service_uuid = $network-topology-operation-input.service-information.onap-model-information.model-uuid" pfx="network-model">
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network model found for customization UUID ' + $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid + ' and model-uuid ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
+ </return>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network model found for customization UUID ' + $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid + ' and model-uuid ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
+ </return>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ </switch>
+ </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="request-information.request-action is required to be CreateNetworkInstance for svc-action=assign" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value="activate">
+ <block atomic="true">
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="ActivateDCINetworkInstance" />
+ <outcome value="CreateNetworkInstance">
+ <block atomic="true">
+ <switch test="`$network-topology-operation-input.network-information.network-id`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.network-information.network-id is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-information.onap-model-information.model-invariant-uuid is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-information.onap-model-information.model-customization-uuid is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-information.onap-model-information.model-uuid`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-information.onap-model-information.model-uuid is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.tenant`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-request-input.tenant is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.aic-cloud-region`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.network-request-information.aic-cloud-region is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.service-information.onap-model-information.model-uuid`">
+ <outcome value="">
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource" resource="SQL" key="SELECT * from SERVICE_MODEL WHERE service_uuid = $service-data.service-information.onap-model-information.model-uuid" pfx="service-model">
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
+ </return>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource" resource="SQL" key="SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid and service_uuid = $service-data.service-information.onap-model-information.model-uuid" pfx="network-model">
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network model found for customization UUID ' + $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid + ' and model-uuid ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
+ </return>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network model found for customization UUID ' + $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid + ' and model-uuid ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
+ </return>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ <outcome value="Other">
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource" resource="SQL" key="SELECT * from SERVICE_MODEL WHERE service_uuid = $network-topology-operation-input.service-information.onap-model-information.model-uuid" pfx="service-model">
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
+ </return>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource" resource="SQL" key="SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid and service_uuid = $network-topology-operation-input.service-information.onap-model-information.model-uuid" pfx="network-model">
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network model found for customization UUID ' + $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid + ' and model-uuid ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
+ </return>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No network model found for customization UUID ' + $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid + ' and model-uuid ' + $network-topology-operation-input.service-information.onap-model-information.model-uuid`" />
+ </return>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ </switch>
+ </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="request-information.request-action is required to be CreateNetworkInstance for svc-action=activate" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value="deactivate">
+ <block atomic="true">
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="DeActivateDCINetworkInstance" />
+ <outcome value="DeleteNetworkInstance">
+ <block atomic="true">
+ <switch test="`$network-topology-operation-input.network-information.network-id`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.network-information.network-id is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ </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="request-information.request-action is required to be DeleteNetworkInstance for svc-action=deactivate" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value="unassign">
+ <block atomic="true">
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="DeleteNetworkInstance">
+ <block atomic="true">
+ <switch test="`$network-topology-operation-input.network-information.network-id`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.network-information.network-id is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ </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="request-information.request-action is required to be DeleteNetworkInstance for svc-action=unassign" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <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 |