blob: a28aa0cc69529f87812bc961cf5ab562ea3fe162 (
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
|
<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='SUBNET-API' version='${project.version}'><method rpc='managed-network-notification' mode='sync'>
<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="managed-network-notification"/>
<parameter name="field3" value="`$managed-network-notification-input.request-id`"/>
<parameter name="field4" value="`$managed-network-notification-input.managed-network-status.status.code`"/>
<parameter name="field5" value="`$managed-network-notification-input.managed-network-status.status.description`"/>
<parameter name="field6" value="`$managed-network-notification-input.managed-network-status.final-notification-indicator`"/>
</record><switch test="`$managed-network-notification-input.managed-network-status.status.code`">
<outcome value="Success"><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="activateSubnet">
<outcome value="success"><block><save plugin="com.att.sdnctl.sli.resource.gamma.GammaResource" resource="eipam-ip-subnets"
key="entity-id = $eipam-ip-block.entity-id" force="true">
<parameter name="status" value="ACTIVE" />
</save><set>
<parameter name="eipam-ip-block.status" value="ACTIVE" /></set><save plugin="org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource" resource="eipam-ip-block">
<parameter name="eipam-ip-block.status" value="ACTIVE" /></save><execute plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' method='setStatusMethod' >
<parameter name="key1" value="SUCCESS: eipam-ip-block.status is ACTIVE."/></execute><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="vpe" key="vnf-id = $data-change-notification-input.key-data[0].key-value" pfx="vpe-after">
<parameter name="operational-state" value="SDNC_COMPLETED" />
<parameter name="summary-status" value="`$aai-summary-status-message`" />
</update> <return status="success">
</return></block></outcome><outcome value="Other">
<block><save plugin="com.att.sdnctl.sli.resource.gamma.GammaResource" resource="eipam-ip-subnets"
key="entity-id = $eipam-ip-block.entity-id" force="true">
<parameter name="status" value="ERROR" />
</save><set>
<parameter name="eipam-ip-block.status" value="ERROR" /></set><save plugin="org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource" resource="eipam-ip-block">
<parameter name="eipam-ip-block.status" value="ERROR" /></save><execute plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' method='setStatusMethod' >
<parameter name="key1" value="ActivateSubnet failure, need to manually activate in EIPAM."/></execute><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="vpe"
key="vnf-id = $data-change-notification-input.key-data[0].key-value" pfx="vpe-after">
<parameter name="operational-state" value="EIPAM_ERROR" />
<parameter name="summary-status" value="`$aai-summary-status-message`" />
<parameter name="prov-status" value="PREPROV" />
</update> <return status="failure">
<parameter name="error-code" value="3000" />
<parameter name="error-message" value="ActivateSubnet failure, need to manually activate in EIPAM" />
</return></block></outcome></execute></outcome><outcome value="Other"><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deallocateSubnet">
<outcome value="success"><!--subnet and subnet_keys are deleted in the EIPAMPlugin--><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="deletePool">
<outcome value="success"><block><set>
<parameter name="eipam-ip-block.status" value="DELETED" /></set><execute plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' method='setStatusMethod' >
<parameter name="key1" value="Failure from NCS and deleted pool/subnet in EIPAM."/></execute><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="vpe" key="vnf-id = $data-change-notification-input.key-data[0].key-value" pfx="vpe-after">
<parameter name="operational-state" value="SDN_C_BACKOUT_ERROR" />
<parameter name="summary-status" value="`$aai-summary-status-message`" />
<parameter name="prov-status" value="PREPROV" />
</update> <return status="failure">
<parameter name="error-code" value="2000" />
<parameter name="error-message" value="Failure from NCS and deleted pool/subnet in EIPAM"/>
</return></block></outcome><outcome value="Other">
<block><save plugin="com.att.sdnctl.sli.resource.gamma.GammaResource" resource="eipam-ip-subnets"
key="entity-id = $eipam-ip-block.entity-id" force="true">
<parameter name="status" value="DEALLOCATED" />
</save><set>
<parameter name="eipam-ip-block.status" value="ERROR" /></set><save plugin="org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource" resource="eipam-ip-block">
<parameter name="eipam-ip-block.status" value="ERROR" /></save><execute plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' method='setStatusMethod' >
<parameter name="key1" value="Failure from NCS and deletePool failed in EIPAM, need to manually delete."/></execute><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="vpe"
key="vnf-id = $data-change-notification-input.key-data[0].key-value" pfx="vpe-after">
<parameter name="operational-state" value="SDN_C_BACKOUT_ERROR" />
<parameter name="summary-status" value="`$aai-summary-status-message`" />
<parameter name="prov-status" value="PREPROV" />
</update> <return status="failure">
<parameter name="error-code" value="1000" />
<parameter name="error-message" value="Failure from NCS and deletePool failed in EIPAM, need to manually delete." />
</return></block></outcome></execute></outcome><outcome value="Other">
<block><save plugin="com.att.sdnctl.sli.resource.gamma.GammaResource" resource="eipam-ip-subnets"
key="entity-id = $eipam-ip-block.entity-id" force="true">
<parameter name="status" value="ERROR" />
</save><set>
<parameter name="eipam-ip-block.status" value="ERROR" /></set><save plugin="org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource" resource="eipam-ip-block">
<parameter name="eipam-ip-block.status" value="ERROR" /></save><execute plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' method='setStatusMethod' >
<parameter name="key1" value="Failure from NCS and deletePool failed in EIPAM, need to manually delete."/></execute><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="vpe"
key="vnf-id = $data-change-notification-input.key-data[0].key-value" pfx="vpe-after">
<parameter name="operational-state" value="SDN_C_BACKOUT_ERROR" />
<parameter name="summary-status" value="`$aai-summary-status-message`" />
<parameter name="prov-status" value="PREPROV" />
</update> <return status="failure">
<parameter name="error-code" value="1000" />
<parameter name="error-message" value="Failure from NCS and deletePool failed in EIPAM, need to manually delete." />
</return></block></outcome></execute></outcome></switch></block></method></service-logic>
|