diff options
author | 2018-10-05 11:29:55 +0530 | |
---|---|---|
committer | 2018-10-05 11:29:55 +0530 | |
commit | d9e26826bff32fdfd92296e2f4b425a81e7ecdf3 (patch) | |
tree | c0bc1573ccdc43aec9848b5754f03a50419bb13f /platform-logic/generic-resource-api/src/main/xml/sotn/GENERIC-RESOURCE-API_sotn-network-topology-operation-create.xml | |
parent | 351d5315bafe499e9f6904fa51c3b70c13f3cb70 (diff) |
Refactored SOTN and SDWAN DG
Refactored SOTN and SDWAN DG to seperate sub directories for better
maintainability.
Change-Id: I49c57d20fc8fcb7de65d3634bceb691d0b7f80fd
Issue-ID: SDNC-350
Signed-off-by: Gaurav Agrawal <gaurav.agrawal@huawei.com>
Former-commit-id: d3d3ce137625a244accf736da3a8f6736b44300e
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml/sotn/GENERIC-RESOURCE-API_sotn-network-topology-operation-create.xml')
-rw-r--r-- | platform-logic/generic-resource-api/src/main/xml/sotn/GENERIC-RESOURCE-API_sotn-network-topology-operation-create.xml | 209 |
1 files changed, 209 insertions, 0 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/sotn/GENERIC-RESOURCE-API_sotn-network-topology-operation-create.xml b/platform-logic/generic-resource-api/src/main/xml/sotn/GENERIC-RESOURCE-API_sotn-network-topology-operation-create.xml new file mode 100644 index 00000000..af67bd68 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/sotn/GENERIC-RESOURCE-API_sotn-network-topology-operation-create.xml @@ -0,0 +1,209 @@ +<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-network-topology-operation-create' mode='sync'> + <block atomic="true"> + <call module='GENERIC-RESOURCE-API' rpc='validate-sotn-network-input-parameters' mode='sync' ></call> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' > + <parameter name="ctx-destination" value="prop.sotn.network-id"/> + </execute> + <for index="idx" start="0" end="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`"> + <block> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'name'`"> + <outcome value='true'> + <set> + <parameter name='prop.sotn.etht-svc-name' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'description'`"> + <outcome value='true'> + <set> + <parameter name='prop.sotn.etht-svc-descr' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'tenantId'`"> + <outcome value='true'> + <set> + <parameter name='prop.sotn.tenantId' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'vpnType'`"> + <outcome value='true'> + <set> + <parameter name='prop.sotn.vpnType' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'cir'`"> + <outcome value='true'> + <set> + <parameter name='prop.sotn.cir' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'eir'`"> + <outcome value='true'> + <set> + <parameter name='prop.sotn.eir' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'cbs'`"> + <outcome value='true'> + <set> + <parameter name='prop.sotn.cbs' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'ebs'`"> + <outcome value='true'> + <set> + <parameter name='prop.sotn.ebs' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'colorAware'`"> + <outcome value='true'> + <set> + <parameter name='prop.sotn.colorAware' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'couplingFlag'`"> + <outcome value='true'> + <set> + <parameter name='prop.sotn.couplingFlag' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'access-provider-id'`"> + <outcome value='true'> + <set> + <parameter name='prop.sotn.access-provider-id' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'access-client-id'`"> + <outcome value='true'> + <set> + <parameter name='prop.sotn.access-client-id' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'access-topology-id'`"> + <outcome value='true'> + <set> + <parameter name='prop.sotn.access-topology-id' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'access-node-id'`"> + <outcome value='true'> + <set> + <parameter name='prop.sotn.access-node-id' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'access-ltp-id'`"> + <outcome value='true'> + <set> + <parameter name='prop.sotn.access-ltp-id' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' /> + </set> + </outcome> + </switch> + </block> + </for> + <switch test='`$service-data.networks.network_length`'> + <outcome value=''> + <set> + <parameter name='nidx' value='0' /> + </set> + </outcome> + <outcome value='Other'> + <block> + <set> + <parameter name='nidx' value='`$service-data.networks.network_length`' /> + </set> + <for index='idx' start='0' end='`$nidx`' > + <switch test="`$service-data.networks.network[$idx].network-id == $network-topology-operation-input.network-information.network-id`"> + <outcome value='true'> + <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 already found in service-data" /> + </return> + </outcome> + </switch> + </for> + </block> + </outcome> + </switch> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/> + <parameter name="field1" value="__TIMESTAMP__"/> + <parameter name="field2" value="sotn-network-topology-operation-create"/> + <parameter name="field3" value="SOTN-Config"/> + </record> + <set> + <parameter name='service-data.networks.network[$nidx].network-id' value='`$prop.sotn.network-id`' /> + <parameter name='service-data.networks.network[$nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' /> + <parameter name='service-data.networks.network[$nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' /> + <parameter name='service-data.networks.network[$nidx].network-data.service-information.' value='`$network-topology-operation-input.service-information.`' /> + <parameter name='service-data.networks.network[$nidx].network-data.network-information.' value='`$network-topology-operation-input.network-information.`' /> + <parameter name='service-data.networks.network[$nidx].network-data.network-request-input.' value='`$network-topology-operation-input.network-request-input.`' /> + <parameter name='service-data.networks.network_length' value='`$nidx+1`' /> + </set> + <set> + <parameter name='networkId' value='`$prop.sotn.network-id`' /> + <parameter name="network-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.sotn.network-id + '/network-data/'` " /> + </set> + <set> + <parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.order-status' value='Created' /> + <parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-rpc-action' value='`$network-topology-operation-input.sdnc-request-header.svc-action`' /> + <parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-action' value='`$network-topology-operation-input.request-information.request-action`' /> + </set> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' + key='connectivity.connectivity-id = $prop.sotn.network-id' > + <parameter name='connectivity-id' value='`$prop.sotn.network-id`' /> + <parameter name='bandwidth-profile-name' value='`$prop.sotn.etht-svc-name`' /> + <parameter name='vpn-type' value='`$prop.sotn.vpnType`' /> + <parameter name='CIR' value='`$prop.sotn.cir`' /> + <parameter name='EIR' value='`$prop.sotn.eir`' /> + <parameter name='CBS' value='`$prop.sotn.cbs`' /> + <parameter name='EBS' value='`$prop.sotn.ebs`' /> + <parameter name='color-aware' value='`$prop.sotn.colorAware`' /> + <parameter name='coupling-flag' value='`$prop.sotn.couplingFlag`' /> + <parameter name='etht-svc-name' value='`$prop.sotn.etht-svc-name`' /> + <parameter name='access-provider-id' value='`$prop.sotn.access-provider-id`' /> + <parameter name='access-client-id' value='`$prop.sotn.access-client-id`' /> + <parameter name='access-topology-id' value='`$prop.sotn.access-topology-id`' /> + <parameter name='access-node-id' value='`$prop.sotn.access-node-id`' /> + <parameter name='access-ltp-id' value='`$prop.sotn.access-ltp-id`' /> + <parameter name='cvlan' value='`$prop.sotn.cVLAN`' /> + <parameter name='operational-status' value='Created' /> + <parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' /> + <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='connectivity-selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.sotn.network-id + '/network-data/'` " /> + </save> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' + key='service-instance.service-instance-id = $service-data.service-information.service-instance-id + AND customer.global-customer-id = $service-data.networks.network[$nidx].network-data.service-information.global-customer-id + AND service-subscription.service-type = $service-data.networks.network[$nidx].network-data.service-information.subscription-service-type' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="connectivity" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.sotn.network-id`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.sotn.network-id`" /> + </save> + <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 |