aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_create-l3-subnet.xml
blob: 5000dfdd00b459872ef74d966fb0867178b60780 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
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>