diff options
Diffstat (limited to 'ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_self-serve-mS-mac-address-assign.xml')
-rw-r--r-- | ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_self-serve-mS-mac-address-assign.xml | 625 |
1 files changed, 625 insertions, 0 deletions
diff --git a/ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_self-serve-mS-mac-address-assign.xml b/ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_self-serve-mS-mac-address-assign.xml new file mode 100644 index 0000000..60c749a --- /dev/null +++ b/ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_self-serve-mS-mac-address-assign.xml @@ -0,0 +1,625 @@ +<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='self-serve-mS-mac-address-assign' mode='sync'>
+ <block atomic='true'>
+ <switch test="`$ss.capability-name`">
+ <outcome value='Other'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: ss.capability-name is not mS-mac-address-assign or it is not set"/>
+ </record>
+ <return status='failure'>
+ <parameter name='error-code' value='401' />
+ <parameter name='error-message' value='ss.capability-name is not set' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value=''>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: ss.capability-name is not mS-mac-address-assign or it is not set"/>
+ </record>
+ <return status='failure'>
+ <parameter name='error-code' value='401' />
+ <parameter name='error-message' value='ss.capability-name is not set' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='null'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: ss.capability-name is not mS-mac-address-assign or it is not set"/>
+ </record>
+ <return status='failure'>
+ <parameter name='error-code' value='401' />
+ <parameter name='error-message' value='ss.capability-name is not set' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='mS-mac-address-assign'>
+ <record plugin="com.att.sdnctl.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: ss.capability-name is mS-mac-address-assign"/>
+ </record>
+ </outcome>
+ </switch>
+ <switch test="`$ss.capability-action`">
+ <outcome value='Other'></outcome>
+ <outcome value=''>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: ss.capability-action is not set"/>
+ </record>
+ <return status='failure'>
+ <parameter name='error-code' value='401' />
+ <parameter name='error-message' value='ss.capability-action is not set' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='null'></outcome>
+ <outcome value='assign'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: ss.capability-action is assign"/>
+ </record>
+ </outcome>
+ <outcome value='unassign'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: ss.capability-action is unassign"/>
+ </record>
+ </outcome>
+ </switch>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: call self-serve-capability-param-resolution DG"/>
+ </record>
+ <set>
+ <!--<parameter name='name' value='value' />-->
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-capability-param-resolution' mode='sync' >
+ <outcome value='failure'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Failure calling self-serve-capability-param-resolution"/>
+ </record>
+ <return status='failure'>
+ <parameter name='error-code' value='402' />
+ <parameter name='error-message' value='Failure calling self-serve-capability-param-resolution' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'></outcome>
+ </call>
+ </block>
+ <block atomic='true'>
+ <set>
+ <parameter name='ma.elements.element_length' value='0' />
+ </set>
+ <set>
+ <parameter name='tmp.vf-module-parameters-length' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' />
+ </set>
+ <for index='vf-module-param-index' start='0' end='`$tmp.vf-module-parameters-length`' >
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: vf-module-param-index"/>
+ <parameter name="field3" value='`$vf-module-param-index`'/>
+ </record>
+ <block>
+ <set>
+ <parameter name='vfModuleParamsCapabilityName' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.capability-name`' />
+ <parameter name='tmp.vnfHostName' value='' />
+ <parameter name='tmp.policyInstanceName' value='' />
+ <parameter name='tmp.cloudParamName' value='' />
+ <parameter name='tmp.swName' value='' />
+ <parameter name='tmp.resourceValue' value='' />
+ </set>
+ <switch test="`$ss.capability-name == $vfModuleParamsCapabilityName`">
+ <outcome value='true'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Found ss.capability-name MATCH"/>
+ </record>
+ <block atomic='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].value`" />
+ <parameter name="target" value="$"/>
+ <outcome value='false'>
+ <block>
+ <set>
+ <parameter name='tmp.resourceValue' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].value`' />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name='tmp.cloudParamName' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].name`' />
+ </set>
+ <set>
+ <parameter name='tmp.resource-resolution-data.' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.`' />
+ </set>
+ <switch test="`$tmp.resource-resolution-data.status == 'PENDING'`">
+ <outcome value='false'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: reseouce-resolution-data.status is not PENDING"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='401' />
+ <parameter name='error-message' value='reseouce-resolution-data.status is not PENDING' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.resource-key-length' value='`$tmp.resource-resolution-data.resource-key_length`' />
+ </set>
+ <for index='key-index' start='0' end='`$tmp.resource-resolution-data.resource-key_length`' >
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: key-index"/>
+ <parameter name="field3" value='`$key-index`'/>
+ </record>
+ <block>
+ <switch test="`$tmp.resource-resolution-data.resource-key[$key-index].name`">
+ <outcome value='key'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Found resource-resolution-data.name = vnf-name"/>
+ </record>
+ <set>
+ <parameter name='tmp.vnfHostName' value='`$tmp.resource-resolution-data.resource-key[$key-index].value`' />
+ </set>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: resolved vnfHostName: "/>
+ <parameter name="field3" value='`$tmp.vnfHostName`'/>
+ </record>
+ </block>
+ </outcome>
+ <outcome value='policy-instance-name'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Found resource-resolution-data.name = policy-instance-name-name"/>
+ </record>
+ <set>
+ <parameter name='tmp.policyInstanceName' value='`$tmp.resource-resolution-data.resource-key[$key-index].value`' />
+ </set>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: resolved policyInstanceName: "/>
+ <parameter name="field3" value='`$tmp.policyInstanceName`'/>
+ </record>
+ </block>
+ </outcome>
+ <outcome value='sw-name'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Found resource-resolution-data.name = sw-name"/>
+ </record>
+ <set>
+ <parameter name='tmp.swName' value='`$tmp.resource-resolution-data.resource-key[$key-index].value`' />
+ </set>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: resolved swName: "/>
+ <parameter name="field3" value='`$tmp.swName`'/>
+ </record>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <switch test="`$tmp.vnfHostName`">
+ <outcome value='null'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: vnfHostName is not set"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='403' />
+ <parameter name='error-message' value='vnfHostName is not set' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value=''>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: vnfHostName is not set"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='403' />
+ <parameter name='error-message' value='vnfHostName is not set' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$tmp.cloudParamName`">
+ <outcome value='null'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: cloudParamName is not set"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='403' />
+ <parameter name='error-message' value='cloudParamName is not set' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value=''>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: cloudParamName is not set"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='403' />
+ <parameter name='error-message' value='cloudParamName is not set' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$tmp.policyInstanceName`">
+ <outcome value='null'>
+ <switch test="`$ss.capability-action` == 'assign'">
+ <outcome value='true'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: policyInstanceName is not set and action is assign"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='403' />
+ <parameter name='error-message' value='policyInstanceName is not set and action is assign' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value=''>
+ <switch test="`$ss.capability-action` == 'assign'">
+ <outcome value='true'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: policyInstanceName is not set and action is assign"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='403' />
+ <parameter name='error-message' value='policyInstanceName is not set and action is assign' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ <switch test="`$tmp.swName`">
+ <outcome value='null'>
+ <switch test="`$ss.capability-action` == 'assign'">
+ <outcome value='true'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: swName is not set and action is assign"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='403' />
+ <parameter name='error-message' value='swName is not set and action is assign' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value=''>
+ <switch test="`$ss.capability-action` == 'assign'">
+ <outcome value='true'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: swName is not set and action is assign"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='403' />
+ <parameter name='error-message' value='swName is not set and action is assign' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='ma.elements.element[$ma.elements.element_length].policy-instance-name' value='`$tmp.policyInstanceName`' />
+ <parameter name='ma.elements.element[$ma.elements.element_length].vnf-host-name' value='`$tmp.vnfHostName`' />
+ <parameter name='ma.elements.element[$ma.elements.element_length].cloud-param-name' value='`$tmp.cloudParamName`' />
+ <parameter name='ma.elements.element[$ma.elements.element_length].sw-name' value='`$tmp.swName`' />
+ </set>
+ <switch test="`$tmp.resourceValue`">
+ <outcome value='Other'>
+ <set>
+ <parameter name='ma.elements.element[$ma.elements.element_length].resource-value' value='`$tmp.resourceValue`' />
+ </set>
+ </outcome>
+ <outcome value='null'></outcome>
+ <outcome value=''></outcome>
+ </switch>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Adding this vf-module-parameters.param to ma.elements "/>
+ <parameter name="field3" value='`$ma.elements.element_length`'/>
+ <parameter name="field4" value='`$ma.elements.element[$ma.elements.element_length].policy-instance-name`'/>
+ <parameter name="field5" value='`$ma.elements.element[$ma.elements.element_length].vnf-host-name`'/>
+ <parameter name="field6" value='`$ma.elements.element[$ma.elements.element_length].cloud-param-name`'/>
+ <parameter name="field7" value='`$ma.elements.element[$ma.elements.element_length].sw-name`'/>
+ <parameter name="field8" value='`$ma.elements.element[$ma.elements.element_length].resource-value`'/>
+ </record>
+ <set>
+ <parameter name='ma.elements.element_length' value='`$ma.elements.element_length + 1`' />
+ </set>
+ </block>
+ </block>
+ </outcome>
+ <outcome value='false'></outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ <switch test='`$ss.capability-action`'>
+ <outcome value='assign'>
+ <block atomic='true'>
+ <set>
+ <parameter name='prop.restapi.templateDir' value="/opt/lsc/restapi/templates" />
+ <parameter name='prop.mac-address-microserivice.url' value="http://mtanjv9sdlg51-eth1-0.aic.cip.att.com:8989" />
+ </set>
+ <record plugin="com.att.sdnctl.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: restapi-call-node Call MAC Address microService assign"/>
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/mac-address-assign.json'`" />
+ <parameter name='restapiUrl' value="`$prop.mac-address-microserivice.url + '/macaddress/service/assign'`" />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='customHttpHeaders'
+ value="Authorization=Basic YWRtaW46YWRtaW4=" />
+ <parameter name="responsePrefix" value="tmp.mac-address-resp.prefix" />
+ <outcome value='failure'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Error calling MAC Address Micro Service assign"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='502' />
+ <parameter name='error-message' value='self-serve-mS-mac-address-assign: Error calling MAC Address Micro Service assign' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: assign SUCCESS"/>
+ </record>
+ </block>
+ </outcome>
+ </execute>
+ <for index='mac-address-list-index' start='0' end='`$tmp.mac-address-resp.prefix.mac-address-list_length`' >
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: mac-address-list-index|name|value "/>
+ <parameter name="field3" value='`$mac-address-list-index`'/>
+ <parameter name="field4" value='`$tmp.mac-address-resp.prefix.mac-address-list[$mac-address-list-index].name`'/>
+ <parameter name="field5" value='`$tmp.mac-address-resp.prefix.mac-address-list[$mac-address-list-index].value`'/>
+ </record>
+ <for index='vf-module-param-index' start='0' end='`$tmp.vf-module-parameters-length`' >
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: vf-module-param-index"/>
+ <parameter name="field3" value='`$vf-module-param-index`'/>
+ </record>
+ <block>
+ <switch test="`$tmp.mac-address-resp.prefix.mac-address-list[$mac-address-list-index].name == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].name`">
+ <outcome value='true'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: mac-address-list MATCH with param.value: "/>
+ <parameter name="field3" value="`$tmp.mac-address-resp.prefix.mac-address-list[$mac-address-list-index].name`"/>
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].value`" />
+ <parameter name="target" value="$"/>
+ <outcome value='false'>
+ <block>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.capability-name' value='INPUT' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name="`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].value`" value="`$tmp.mac-address-resp.prefix.mac-address-list[$mac-address-list-index].value`" />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name="`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status`" value='SUCCESS' />
+ </set>
+ </block>
+ </for>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ <outcome value='unassign'>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.restapi.templateDir' value="/opt/lsc/restapi/templates" />
+ <parameter name='prop.mac-address-microserivice.url' value="http://mtanjv9sdlg51-eth1-0.aic.cip.att.com:8989" />
+ </set>
+ <record plugin="com.att.sdnctl.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: restapi-call-node Call MAC Address microService unassign"/>
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/mac-address-unassign.json'`" />
+ <parameter name='restapiUrl' value="`$prop.mac-address-microserivice.url + '/macaddress/service/unassign'`" />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='customHttpHeaders'
+ value="Authorization=Basic YWRtaW46YWRtaW4=" />
+ <parameter name="responsePrefix" value="tmp.mac-address-resp.prefix" />
+ <outcome value='failure'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Error calling MAC Address Micro Service unassign"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='502' />
+ <parameter name='error-message' value='self-serve-mS-mac-address-assign: Error calling MAC Address Micro Service unassign' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: unassign SUCCESS: response: "/>
+ <parameter name='field3' value='`$tmp.mac-address-resp.prefix.status`' />
+ </record>
+ <switch test="`$tmp.mac-address-resp.prefix.status == 'deleted successfully'`">
+ <outcome value='false'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Address Micro Service unassign did not return: deleted successfully"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='502' />
+ <parameter name='error-message' value='self-serve-mS-mac-address-assign: Address Micro Service unassign did not return: deleted successfully' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='true'>
+ <block>
+ <for index='vf-module-param-index' start='0' end='`$tmp.vf-module-parameters-length`' >
+ <set>
+ <parameter name="`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status`" value="DELETED" />
+ </set>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/self-serve-mS-mac-address-assign.log' />
+ </execute>
+ <return status='success'>
+ <parameter name="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-parameters-index].resource-resolution-data.status`" value='SUCCESS' />
+ </return>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file |