blob: 5bccbb864374f196d171de1fe915138c01498d29 (
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
|
<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='network-topology-operation-assign' mode='sync'>
<block atomic="true">
<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="`$network-topology-operation-input.network-request-input.cloud-owner != ''`">
<outcome value='true'>
<set>
<parameter name='prop.cloud-region.cloud-owner' value='`$network-topology-operation-input.network-request-input.cloud-owner`' />
</set>
</outcome>
</switch>
<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="tenant"
key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner AND
cloud-region.cloud-region-id = $network-topology-operation-input.network-request-input.aic-cloud-region AND
tenant.tenant-id = $network-topology-operation-input.network-request-input.tenant"
pfx='aai.tenant' local-only='false' >
<outcome value='success'>
<block atomic="true"></block>
</outcome>
<outcome value='not-found'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="Tenant not found in AAI" />
</return>
</outcome>
<outcome value='Other'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="Tenant not found in AAI" />
</return>
</outcome>
</get-resource>
<switch test='`$network-topology-operation-input.network-information.network-id`'>
<outcome value=''>
<call module='GENERIC-RESOURCE-API' rpc='generate-l3network-network-id' mode='sync' ></call>
</outcome>
<outcome value='Other'>
<set>
<parameter name='tmp.return.generate-l3network-network-id.uuid' value='`$network-topology-operation-input.network-information.network-id`' />
</set>
</outcome>
</switch>
<set>
<parameter name='tmp.l3-network.network-id' value='`$tmp.return.generate-l3network-network-id.uuid`' />
<parameter name='network-topology-operation-input.network-information.network-id' value='`$tmp.return.generate-l3network-network-id.uuid`' />
</set>
<switch test='`$network-topology-operation-input.network-information.network-instance-group-id`'>
<outcome value=''>
<switch test='`$network-topology-operation-input.network-request-input.network-name`'>
<outcome value=''>
<block atomic="true">
<switch test='`$network-model.ecomp-generated-naming`'>
<outcome value='Y'>
<block atomic="true">
<set>
<parameter name='naming-policy-generate-name-input.policy-instance-name' value='`$network-model.naming-policy`' />
<parameter name='naming-policy-generate-name-input.context-id' value='`$tmp.l3-network.network-id`' />
<parameter name='naming-policy-generate-name-input.naming-type' value='NETWORK' />
<parameter name='naming-policy-generate-name-input.action' value='ASSIGN' />
<parameter name='naming-policy-generate-name-input.query-parameter' value='`$network-model.customization-uuid`' />
</set>
<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
<set>
<parameter name='tmp.network-instance-name' value='`$naming-policy-generate-name-output.network-name`' />
<parameter name='tmp.l3-network.network-name' value='`$naming-policy-generate-name-output.network-name`' />
</set>
<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-assign-automated' mode='sync' ></call>
</block>
</outcome>
<outcome value='Other'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="Network name is required if onap naming is false" />
</return>
</outcome>
</switch>
</block>
</outcome>
<outcome value='Other'>
<block atomic="true">
<set>
<parameter name='tmp.network-instance-name' value="`$network-topology-operation-input.network-request-input.network-name`" />
<parameter name='tmp.l3-network.network-name' value="`$network-topology-operation-input.network-request-input.network-name`" />
</set>
<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-assign-from-preload' mode='sync' ></call>
</block>
</outcome>
</switch>
</outcome>
<outcome value='Other'>
<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-assign-vlantagging-instancegroup' mode='sync' ></call>
</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>
|