diff options
Diffstat (limited to 'ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_vnf-topology-operation.xml')
-rw-r--r-- | ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_vnf-topology-operation.xml | 253 |
1 files changed, 253 insertions, 0 deletions
diff --git a/ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_vnf-topology-operation.xml b/ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_vnf-topology-operation.xml new file mode 100644 index 0000000..9b8f9a0 --- /dev/null +++ b/ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_vnf-topology-operation.xml @@ -0,0 +1,253 @@ +<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='vnf-topology-operation' mode='sync'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='validate-vnf-input' mode='sync' ></call>
+ <switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>
+ <outcome value='assign'>
+ <block>
+ <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>
+ <switch test='`length($vnf-topology-operation-input.sdnc-request-header.svc-notification-url) == 0`'>
+ <outcome value='true'>
+ <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-assign-sync' mode='sync' ></call>
+ </outcome>
+ <outcome value='false'>
+ <switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-notification-url == $prop.so.ignore-url`'>
+ <outcome value='true'>
+ <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-assign-sync' mode='sync' ></call>
+ </outcome>
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name='skip-mdsal-update' value='Y' />
+ </set>
+ <set>
+ <parameter name='ack-final' value='N' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='activate'>
+ <block atomic="true">
+ <switch test='`$vnf-topology-operation-input.request-information.request-action`'>
+ <outcome value='ActivateSiteInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-activate' mode='sync' ></call>
+ </outcome>
+ <outcome value='ActivateSDWANDeviceInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-device-activate' mode='sync' ></call>
+ </outcome>
+ <outcome value='ActivateSDWANPortInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-wanport-activate' mode='sync' ></call>
+ </outcome>
+ <outcome value='ActivateSDWANVpnInstance'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-vpn-site-resource-activate' mode='sync' ></call>
+ </block>
+ </outcome>
+ <outcome value='ActivateSDWANSiteInstance'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-vpn-site-resource-activate' mode='sync' ></call>
+ </block>
+ </outcome>
+ <outcome value='ActivateSOTNUnderlayInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sotn-vnf-topology-operation-underlay-activate' mode='sync' ></call>
+ </outcome>
+ <outcome value='Other'>
+ <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-activate' mode='sync' ></call>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='deactivate'>
+ <block atomic="true">
+ <switch test='`$vnf-topology-operation-input.request-information.request-action`'>
+ <outcome value='DeactivateSiteInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-deactivate' mode='sync' ></call>
+ </outcome>
+ <outcome value='DeactivateSDWANDeviceInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-device-deactivate' mode='sync' ></call>
+ </outcome>
+ <outcome value='DeactivateSDWANPortInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-wanport-deactivate' mode='sync' ></call>
+ </outcome>
+ <outcome value='DeactivateSDWANVpnInstance'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-vpn-site-resource-deactivate' mode='sync' ></call>
+ </block>
+ </outcome>
+ <outcome value='DeactivateSDWANSiteInstance'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-vpn-site-resource-deactivate' mode='sync' ></call>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-deactivate' mode='sync' ></call>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='unassign'>
+ <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-unassign' mode='sync' ></call>
+ </outcome>
+ <outcome value='create'>
+ <block atomic="true">
+ <switch test='`$vnf-topology-operation-input.request-information.request-action`'>
+ <outcome value='CreateAccessConnectivityInstance'>
+ <for index='idx' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`' >
+ <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'manufacturer'`">
+ <outcome value='true'>
+ <switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`'>
+ <outcome value='HUAWEI'>
+ <call module='GENERIC-RESOURCE-API' rpc='bbs-access-connectivity-vnf-topology-operation-create-huawei' mode='sync' ></call>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name+' is invalid manufacturer,please check!'`" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ <outcome value='CreateInternetProfileInstance'>
+ <for index='idx' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`' >
+ <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'manufacturer'`">
+ <outcome value='true'>
+ <switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`'>
+ <outcome value='HUAWEI'>
+ <call module='GENERIC-RESOURCE-API' rpc='bbs-internet-profile-vnf-topology-operation-create-huawei' mode='sync' ></call>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ <outcome value='CreateSiteInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-create' mode='sync' ></call>
+ </outcome>
+ <outcome value='CreateSDWANDeviceInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-device-create' mode='sync' ></call>
+ </outcome>
+ <outcome value='CreateSDWANPortInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-wanport-create' mode='sync' ></call>
+ </outcome>
+ <outcome value='CreateSDWANVpnInstance'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-vpn-site-resource-create' mode='sync' ></call>
+ </block>
+ </outcome>
+ <outcome value='CreateSDWANSiteInstance'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-vpn-site-resource-create' mode='sync' ></call>
+ </block>
+ </outcome>
+ <outcome value='CreateSOTNUnderlayInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sotn-vnf-topology-operation-underlay-create' mode='sync' ></call>
+ </outcome>
+ <outcome value='Other'>
+ <block></block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='delete'>
+ <block atomic="true">
+ <switch test='`$vnf-topology-operation-input.request-information.request-action`'>
+ <outcome value='DeleteAccessConnectivityInstance'>
+ <for index='idx' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`' >
+ <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'manufacturer'`">
+ <outcome value='true'>
+ <switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`'>
+ <outcome value='HUAWEI'>
+ <call module='GENERIC-RESOURCE-API' rpc='bbs-access-connectivity-vnf-topology-operation-delete-huawei' mode='sync' ></call>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ <outcome value='DeleteInternetProfileInstance'>
+ <for index='idx' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`' >
+ <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'manufacturer'`">
+ <outcome value='true'>
+ <switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`'>
+ <outcome value='HUAWEI'>
+ <call module='GENERIC-RESOURCE-API' rpc='bbs-internet-profile-vnf-topology-operation-delete-huawei' mode='sync' ></call>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ <outcome value='DeleteSiteInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='site-vnf-topology-operation-delete' mode='sync' ></call>
+ </outcome>
+ <outcome value='DeleteSDWANDeviceInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-device-delete' mode='sync' ></call>
+ </outcome>
+ <outcome value='DeleteSDWANPortInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-vnf-topology-operation-wanport-delete' mode='sync' ></call>
+ </outcome>
+ <outcome value='DeleteSDWANVpnInstance'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-vpn-site-resource-delete' mode='sync' ></call>
+ </block>
+ </outcome>
+ <outcome value='DeleteSDWANSiteInstance'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-vpn-site-resource-delete' mode='sync' ></call>
+ </block>
+ </outcome>
+ <outcome value='DeleteSOTNUnderlayInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sotn-vnf-topology-operation-underlay-delete' mode='sync' ></call>
+ </outcome>
+ <outcome value='Other'>
+ <block></block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='update'>
+ <switch test='`$vnf-topology-operation-input.request-information.request-action`'>
+ <outcome value='ChangeInternetProfileInstance'>
+ <for index='idx' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`' >
+ <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'manufacturer'`">
+ <outcome value='true'>
+ <switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`'>
+ <outcome value='HUAWEI'>
+ <call module='GENERIC-RESOURCE-API' rpc='bbs-internet-profile-vnf-topology-operation-change-huawei' mode='sync' ></call>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$vnf-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`" />
+ </return>
+ </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 |