diff options
Diffstat (limited to 'ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_create-l3-subnet.xml')
-rwxr-xr-x | ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_create-l3-subnet.xml | 192 |
1 files changed, 192 insertions, 0 deletions
diff --git a/ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_create-l3-subnet.xml b/ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_create-l3-subnet.xml new file mode 100755 index 0000000..c7e3454 --- /dev/null +++ b/ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_create-l3-subnet.xml @@ -0,0 +1,192 @@ +<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='create-l3-subnet' mode='sync'>
+ <block atomic="true">
+ <set>
+ <parameter name='subnet-idx' value='0' />
+ </set>
+ <switch test='`$v4.entity-id`'>
+ <outcome value=''>
+ <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="GENERIC-RESOURCE-API.create-l3-subnet:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="v4.entity-id"/>
+ <parameter name="field5" value="null"/>
+ </record>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <switch test='`$network-model.ipv4-dhcp-enabled`'>
+ <outcome value='Y'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.ipv4dhcp-enabled' value='true' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='N'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.ipv4dhcp-enabled' value='false' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <execute plugin="com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool" method="getSubnetAddresses">
+ <parameter name="ipAddress" value="`$v4.ip-prefix`" />
+ <parameter name="ipVersion" value="4" />
+ <parameter name="subnet" value="`$v4.mask`" />
+ <parameter name="dhcp-enabled" value="`$tmp.ipv4dhcp-enabled`" />
+ <parameter name="ctxGateway" value="tmp.return.generate.gateway-address" />
+ <parameter name="ctxDhcpStart" value="tmp.return.generate.dhcp-start-address" />
+ <parameter name="ctxDhcpEnd" value="tmp.return.generate.dhcp-end-address" />
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to generate ipv4 addresses using IpAddressTools" />
+ </return>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].orchestration-status' value='PendingCreate' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].subnet-id' value='`$v4.entity-id`' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].subnet-name' value="`$tmp.l3-network.network-name + '_S' + $subnet-idx`" />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].gateway-address' value='`$tmp.return.generate.gateway-address`' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].network-start-address' value='`$v4.ip-prefix`' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].cidr-mask' value='`$v4.mask`' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].ip-version' value='`$network-model.ipv4-ip-version`' />
+ </set>
+ <switch test='`$network-model.ipv4-dhcp-enabled`'>
+ <outcome value='Y'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-enabled' value='true' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-start' value='`$tmp.return.generate.dhcp-start-address`' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-end' value='`$tmp.return.generate.dhcp-end-address`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='N'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-enabled' value='false' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-start' value='' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-end' value='' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='subnet-idx' value='`$subnet-idx+1`' />
+ </set>
+ <set>
+ <parameter name='tmp.l3-network.subnet_length' value='`$subnet-idx`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <switch test='`$v6.entity-id`'>
+ <outcome value=''>
+ <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="GENERIC-RESOURCE-API.create-l3-subnet:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="v6.entity-id"/>
+ <parameter name="field5" value="null"/>
+ </record>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <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="GENERIC-RESOURCE-API.create-l3-subnet:REQID"/>
+ <parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="v6.entity-id"/>
+ <parameter name="field5" value="`$v6.entity-id`"/>
+ </record>
+ <switch test='`$network-model.ipv6-dhcp-enabled`'>
+ <outcome value='Y'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.ipv6dhcp-enabled' value='true' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='N'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.ipv6dhcp-enabled' value='false' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <execute plugin="com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool" method="getSubnetAddresses">
+ <parameter name="ipAddress" value="`$v6.ip-prefix`" />
+ <parameter name="ipVersion" value="6" />
+ <parameter name="subnet" value="`$v6.mask`" />
+ <parameter name="dhcp-enabled" value="`$tmp.ipv6dhcp-enabled`" />
+ <parameter name="ctxGateway" value="tmp.return.generate.gateway-address" />
+ <parameter name="ctxDhcpStart" value="tmp.return.generate.dhcp-start-address" />
+ <parameter name="ctxDhcpEnd" value="tmp.return.generate.dhcp-end-address" />
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Failed to generate ipv6 addresses using IpAddressTools" />
+ </return>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].orchestration-status' value='PendingCreate' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].subnet-id' value='`$v6.entity-id`' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].subnet-name' value="`$tmp.l3-network.network-name + '_S' + $subnet-idx`" />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].gateway-address' value='`$tmp.return.generate.gateway-address`' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].network-start-address' value='`$v6.ip-prefix`' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].cidr-mask' value='`$v6.mask`' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].ip-version' value='`$network-model.ipv6-ip-version`' />
+ </set>
+ <switch test='`$network-model.ipv6-dhcp-enabled`'>
+ <outcome value='Y'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-enabled' value='true' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-start' value='`$tmp.return.generate.dhcp-start-address`' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-end' value='`$tmp.return.generate.dhcp-end-address`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='N'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-enabled' value='false' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-start' value='' />
+ <parameter name='tmp.l3-network.subnet[$subnet-idx].dhcp-end' value='' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='subnet-idx' value='`$subnet-idx+1`' />
+ </set>
+ <set>
+ <parameter name='tmp.l3-network.subnet_length' value='`$subnet-idx`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <return status='success'>
+ <parameter name='' value='' />
+ </return>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file |