diff options
author | 2017-09-06 11:03:15 -0400 | |
---|---|---|
committer | 2017-09-06 19:17:34 -0400 | |
commit | 79a537071550d5ae0df0c58572ff2b5aa3065c72 (patch) | |
tree | 75d0cc1e0e0a0c0fdc09c1a6e932f8f72d9c106b /platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input.xml | |
parent | 98ddb133dec262b727b93eab40f384b88fed864a (diff) |
Add generic-resource-api DG seed code
Add seed code for generic-resource-api directed graphs.
Change-Id: I51df937740d54d6f907c79fe322e4ffafe53537c
Issue-ID: SDNC-45
Signed-off-by: Dan Timoney <dtimoney@att.com>
Former-commit-id: b014b942536d93f55664b67a36436168e623bcec
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input.xml')
-rwxr-xr-x | platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input.xml | 274 |
1 files changed, 274 insertions, 0 deletions
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 new file mode 100755 index 00000000..49735fdc --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input.xml @@ -0,0 +1,274 @@ +<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.ecomp-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.ecomp-model-information.model-invariant-uuid is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.ecomp-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.ecomp-model-information.model-customization-uuid is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.ecomp-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.ecomp-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.ecomp-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.ecomp-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.ecomp-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.ecomp-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.ecomp-model-information.model-customization-uuid
+ and service_uuid = $service-data.service-information.ecomp-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.ecomp-model-information.model-customization-uuid +
+ ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-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.ecomp-model-information.model-customization-uuid +
+ ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-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.ecomp-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.ecomp-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.ecomp-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.ecomp-model-information.model-customization-uuid
+ and service_uuid = $network-topology-operation-input.service-information.ecomp-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.ecomp-model-information.model-customization-uuid +
+ ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-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.ecomp-model-information.model-customization-uuid +
+ ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-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.ecomp-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.ecomp-model-information.model-invariant-uuid is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.ecomp-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.ecomp-model-information.model-customization-uuid is a required input" />
+</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.ecomp-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.ecomp-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.ecomp-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.ecomp-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.ecomp-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.ecomp-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.ecomp-model-information.model-customization-uuid
+ and service_uuid = $service-data.service-information.ecomp-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.ecomp-model-information.model-customization-uuid +
+ ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-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.ecomp-model-information.model-customization-uuid +
+ ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-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.ecomp-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.ecomp-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.ecomp-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.ecomp-model-information.model-customization-uuid
+ and service_uuid = $network-topology-operation-input.service-information.ecomp-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.ecomp-model-information.model-customization-uuid +
+ ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-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.ecomp-model-information.model-customization-uuid +
+ ' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-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> |