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_create-l3-subnet.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_create-l3-subnet.xml')
-rwxr-xr-x | platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_create-l3-subnet.xml | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_create-l3-subnet.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_create-l3-subnet.xml new file mode 100755 index 00000000..5000dfdd --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_create-l3-subnet.xml @@ -0,0 +1,123 @@ +<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='`$tmp.l3-network.level2.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="tmp.l3-network.level2.v4.entity-id"/>
+<parameter name="field5" value="null"/>
+
+
+
+</record></block></outcome><outcome value='Other'>
+<block atomic="true"><execute plugin="com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool" method="getSubnetAddresses">
+ <parameter name="ipAddress" value="`$tmp.l3-network.level2.v4.ip-prefix`" />
+ <parameter name="ipVersion" value="4" />
+ <parameter name="subnet" value="`$tmp.l3-network.level2.v4.mask`" />
+ <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='`$tmp.l3-network.level2.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='`$tmp.l3-network.level2.v4.ip-prefix`' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].cidr-mask' value='`$tmp.l3-network.level2.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='`$tmp.l3-network.level2.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="tmp.l3-network.level2.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="tmp.l3-network.level2.v6.entity-id"/>
+<parameter name="field5" value="`$tmp.l3-network.level2.v6.entity-id`"/>
+
+
+
+</record><execute plugin="com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool" method="getSubnetAddresses">
+ <parameter name="ipAddress" value="`$tmp.l3-network.level2.v6.ip-prefix`" />
+ <parameter name="ipVersion" value="6" />
+ <parameter name="subnet" value="`$tmp.l3-network.level2.v6.mask`" />
+ <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='`$tmp.l3-network.level2.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='`$tmp.l3-network.level2.v6.ip-prefix`' />
+<parameter name='tmp.l3-network.subnet[$subnet-idx].cidr-mask' value='`$tmp.l3-network.level2.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> |