summaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_site-vnf-topology-operation-deactivate.json
blob: f97be6bbf1ac491762505b24add001700e860f5d (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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
}
@media (prefers-color-scheme: light) {
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
}
<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='site-vnf-topology-operation-deactivate' mode='sync'>
        <block atomic="true">
            <block atomic="true">
                <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >
                    <parameter name="vnf-topology-operation-input.vnf-information.vnf-id" value="$vnf-topology-operation-input.vnf-information.vnf-id"/>
                </execute>
                <switch test="`$vnf-topology-operation-input.vnf-information.vnf-id`">
                    <outcome value=''>
                        <return status='failure'>
                            <parameter name='ack-final' value='Y'/>
                            <parameter name="error-code" value="500" />
                            <parameter name="error-message" value="vnf-topology-operation-input.vnf-information.vnf-id is a required input" />
                        </return>
                    </outcome>
                </switch>
                <switch test='`$service-data.vnfs.vnf_length`'>
                    <outcome value=''>
                        <return status='failure'>
                            <parameter name='ack-final' value='Y'/>
                            <parameter name="error-code" value="500" />
                            <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
                        </return>
                    </outcome>
                    <outcome value='Other'>
                        <block atomic="true">
                            <for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >
                                <switch test="`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`">
                                    <outcome value='true'>
                                        <set>
                                            <parameter name='tmp.vidx' value='`$vidx`' />
                                            <parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].vnf-data.`' />
                                        </set>
                                    </outcome>
                                </switch>
                            </for>
                            <switch test="`$tmp.vidx`">
                                <outcome value=''>
                                    <return status='failure'>
                                        <parameter name='ack-final' value='Y'/>
                                        <parameter name="error-code" value="500" />
                                        <parameter name="error-message" value="vnf-topology-operation-input.vnf-information.vnf-id not found in service-data" />
                                    </return>
                                </outcome>
                            </switch>
                        </block>
                    </outcome>
                </switch>
                <switch test='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status`'>
                    <outcome value='Active'>
                        <block atomic="true"></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="`'VNF is not in appropriate state for deactivate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`" />
                        </return>
                    </outcome>
                </switch>
            </block>
            <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>
            <for index='idx' start='0' end='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`' >
                <block>
                    <switch test="`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`">
                        <outcome value='true'>
                            <block atomic="true">
                                <set>
                                    <parameter name='prop.site.type' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
                                    <parameter name='prop.site.sdwan' value="true" />
                                </set>
                            </block>
                        </outcome>
                    </switch>
                    <switch test="`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'siteId'`">
                        <outcome value='true'>
                            <block atomic="true">
                                <set>
                                    <parameter name='prop.site.siteId' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
                                </set>
                            </block>
                        </outcome>
                    </switch>
                </block>
            </for>
            <switch test="`$prop.site.sdwan`">
                <outcome value='true'>
                    <block atomic="true">
                        <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
		resource="esr-thirdparty-sdnc" 
		key="esr-thirdparty-sdnc.thirdparty-sdnc-id = SDWANController AND 
		     depth = '1'"
        pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >
                            <outcome value='success'>
                                <set>
                                    <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
                                    <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
                                    <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" />
                                </set>
                            </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="`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
                                </return>
                            
@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
}
@media (prefers-color-scheme: light) {
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
}
[
  {
    "id": "f2d5a044.e7585",
    "type": "service-logic",
    "name": "GENERIC-RESOURCE-API ${project.version}",
    "module": "GENERIC-RESOURCE-API",
    "version": "${project.version}",
    "comments": "",
    "xml": "<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}'>",
    "outputs": 1,
    "x": 182.8570785522461,
    "y": 139.23809814453125,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "3fa00e50.ff8f92"
      ]
    ]
  },
  {
    "id": "1dae242d.6645cc",
    "type": "dgstart",
    "name": "DGSTART",
    "outputs": 1,
    "x": 107.57137298583984,
    "y": 98.99998664855957,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "f2d5a044.e7585"
      ]
    ]
  },
  {
    "id": "3fa00e50.ff8f92",
    "type": "method",
    "name": "method site-vnf-topology-operation-deactivate",
    "xml": "<method rpc='site-vnf-topology-operation-deactivate' mode='sync'>",
    "comments": "",
    "outputs": 1,
    "x": 176,
    "y": 178.99998092651367,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "42e004c2.23654c"
      ]
    ]
  },
  {
    "id": "42e004c2.23654c",
    "type": "block",
    "name": "block : atomic",
    "xml": "<block atomic=\"true\">",
    "atomic": "true",
    "outputs": 1,
    "x": 216.73809814453125,
    "y": 250.69349193572998,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "65c407c9.9f1008",
        "48bce7ba.2d8768",
        "a7851b19.e94318",
        "7b84792a.cd09f8",
        "33ca4ea0.f0ad62",
        "85876d42.f8148",
        "145e6ab2.474a25",
        "65cd0ad5.7b6474",
        "e07817c8.713ef8"
      ]
    ]
  },
  {
    "id": "33ca4ea0.f0ad62",
    "type": "block",
    "name": "block : atomic",
    "xml": "<block atomic=\"true\">",
    "atomic": "true",
    "outputs": 1,
    "x": 623.7856979370117,
    "y": 115.80950736999512,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "44befce.c3f5f04",
        "7d171976.884c68",
        "2cfd8e20.8f3c62",
        "c7b90528.204df8"
      ]
    ]
  },
  {
    "id": "44befce.c3f5f04",
    "type": "switchNode",
    "name": "switch service-data.vnfs.vnf_length",
    "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
    "comments": "",
    "outputs": 1,
    "x": 903.6747055053711,
    "y": 141.14282512664795,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "85e6c857.e79cf8",
        "f4c886b6.8c7de8"
      ]
    ]
  },
  {
    "id": "85e6c857.e79cf8",
    "type": "other",
    "name": "outcome Null",
    "xml": "<outcome value=''>\n",
    "comments": "",
    "outputs": 1,
    "x": 1157.2858276367188,
    "y": 122.8095121383667,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "f39dd2df.24642"
      ]
    ]
  },
  {
    "id": "f39dd2df.24642",
    "type": "returnFailure",
    "name": "return failure",
    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n",
    "comments": "",
    "x": 1331.2858428955078,
    "y": 122.8095121383667,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "f4c886b6.8c7de8",
    "type": "other",
    "name": "other",
    "xml": "<outcome value='Other'>\n",
    "comments": "",
    "outputs": 1,
    "x": 1140.7857971191406,
    "y": 158.80952262878418,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "9dbcc4cd.8daf68"
      ]
    ]
  },
  {
    "id": "9dbcc4cd.8daf68",
    "type": "block",
    "name": "block : atomic",
    "xml": "<block atomic=\"true\">",
    "atomic": "true",
    "outputs": 1,
    "x": 1322.7859954833984,
    "y": 169.80952835083008,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "5192b087.75251",
        "a84b6b1.e64a598"
      ]
    ]
  },
  {
    "id": "a84b6b1.e64a598",
    "type": "switchNode",
    "name": "switch tmp.vidx ",
    "xml": "<switch test=\"`$tmp.vidx`\">\n\n",
    "comments": "",
    "outputs": 1,
    "x": 1512.785888671875,
    "y": 186.80952262878418,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "f8861e43.09ff7"
      ]
    ]
  },
  {
    "id": "c7b90528.204df8",
    "type": "switchNode",
    "name": "switch vnf-level-oper-status",
    "xml": "<switch test='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status`'>\n",
    "comments": "",
    "outputs": 1,
    "x": 866.952507019043,
    "y": 236.69837856292725,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "4f6faf17.9da86",
        "63b6f7c3.593ea8"
      ]
    ]
  },
  {
    "id": "4f6faf17.9da86",
    "type": "outcome",
    "name": "outcome Active",
    "xml": "<outcome value='Active'>\n",
    "comments": "",
    "outputs": 1,
    "x": 1173.7858200073242,
    "y": 217.8095006942749,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "a798f2fb.14365"
      ]
    ]
  },
  {
    "id": "63b6f7c3.593ea8",
    "type": "other",
    "name": "other",
    "xml": "<outcome value='Other'>\n",
    "comments": "",
    "outputs": 1,
    "x": 1141.7858200073242,
    "y": 257.8095006942749,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "1d11ed5c.996383"
      ]
    ]
  },
  {
    "id": "1d11ed5c.996383",
    "type": "returnFailure",
    "name": "return failure",
    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`'VNF is not in appropriate state for deactivate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`\" />",
    "comments": "",
    "x": 1299.2858200073242,
    "y": 257.8095006942749,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "7d171976.884c68",
    "type": "switchNode",
    "name": "switch vnf-id",
    "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\">\n",
    "comments": "",
    "outputs": 1,
    "x": 845.7858047485352,
    "y": 81.80949974060059,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "f940f6c8.c04158"
      ]
    ]
  },
  {
    "id": "f940f6c8.c04158",
    "type": "outcome",
    "name": "NULL",
    "xml": "<outcome value=''>",
    "comments": "",
    "outputs": 1,
    "x": 988.7857971191406,
    "y": 81.80950260162354,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "8db9d430.4ecf68"
      ]
    ]
  },
  {
    "id": "8db9d430.4ecf68",
    "type": "returnFailure",
    "name": "return failure",
    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"vnf-topology-operation-input.vnf-information.vnf-id is a required input\" />\n",
    "comments": "",
    "x": 1137.2857971191406,
    "y": 81.80950164794922,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "5192b087.75251",
    "type": "for",
    "name": "for vidx..service-data.vnfs.vnf[]",
    "xml": "<for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
    "comments": "",
    "outputs": 1,
    "x": 1558.2859191894531,
    "y": 148.8095121383667,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "93fbba5f.463c78"
      ]
    ]
  },
  {
    "id": "93fbba5f.463c78",
    "type": "switchNode",
    "name": "switch vnf-id found",
    "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n",
    "comments": "",
    "outputs": 1,
    "x": 1844.2859191894531,
    "y": 148.8095121383667,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "8c6bb65a.97de78"
      ]
    ]
  },
  {
    "id": "8c6bb65a.97de78",
    "type": "outcomeTrue",
    "name": "true",
    "xml": "<outcome value='true'>\n",
    "comments": "",
    "outputs": 1,
    "x": 2029.7859954833984,
    "y": 148.80951404571533,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "5c836ef8.46731"
      ]
    ]
  },
  {
    "id": "5c836ef8.46731",
    "type": "set",
    "name": "set tmp.vidx and ctx.vnf-data",
    "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].vnf-data.`' />\n",
    "comments": "",
    "x": 2237.785919189453,
    "y": 148.8095121383667,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "7e651921.d7b4c8",
    "type": "returnFailure",
    "name": "return failure",
    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"vnf-topology-operation-input.vnf-information.vnf-id not found in service-data\" />\n",
    "comments": "",
    "x": 1804.285888671875,
    "y": 186.80952262878418,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "f8861e43.09ff7",
    "type": "outcome",
    "name": "NULL",
    "xml": "<outcome value=''>\n",
    "comments": "",
    "outputs": 1,
    "x": 1666.785888671875,
    "y": 186.80952262878418,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "7e651921.d7b4c8"
      ]
    ]
  },
  {
    "id": "65c407c9.9f1008",
    "type": "set",
    "name": "set vnf in service-data",
    "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='`$vnf-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='`$vnf-topology-operation-input.request-information.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='`$vnf-topology-operation-input.service-information.`' />",
    "comments": "",
    "x": 610.5715866088867,
    "y": 584.00022315979,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "48bce7ba.2d8768",
    "type": "set",
    "name": "set vnfId and vnf-object-path",
    "xml": "<set>\n<parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name=\"vnf-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'  + $vnf-topology-operation-input.service-information.service-instance-id  + '/service-data/vnfs/vnf/'  + $vnf-topology-operation-input.vnf-information.vnf-id  + '/vnf-data/'` \" />",
    "comments": "",
    "x": 632.1271820068359,
    "y": 621.2224445343018,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "7b84792a.cd09f8",
    "type": "returnSuccess",
    "name": "return success",
    "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n",
    "comments": "",
    "x": 585.9049634933472,
    "y": 771.7778739929199,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "a7851b19.e94318",
    "type": "set",
    "name": "set vnf-level-oper-status to PendingDelete",
    "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='PendingDelete' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n",
    "comments": "",
    "x": 670.5715866088867,
    "y": 665.0002861022949,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "a798f2fb.14365",
    "type": "block",
    "name": "block : atomic",
    "xml": "<block atomic=\"true\">",
    "atomic": "true",
    "outputs": 1,
    "x": 1367.713279724121,
    "y": 221.88886964321136,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      []
    ]
  },
  {
    "id": "2cfd8e20.8f3c62",
    "type": "execute",
    "name": "execute requiredParameters",
    "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >\n<parameter name=\"vnf-topology-operation-input.vnf-information.vnf-id\" value=\"$vnf-topology-operation-input.vnf-information.vnf-id\"/>\n\n",
    "comments": "",
    "outputs": 1,
    "x": 895.5716171264648,
    "y": 44,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      []
    ]
  },
  {
    "id": "dc5cbf86.069cb",
    "type": "comment",
    "name": "site-vnf-topology-operation-deactivate",
    "info": "",
    "comments": "",
    "x": 489.8570785522461,
    "y": 44.23809814453125,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "85876d42.f8148",
    "type": "for",
    "name": "for loop idx - VNF input parameters",
    "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`' >\n",
    "comments": "",
    "outputs": 1,
    "x": 667.8572273254395,
    "y": 315.0000219345093,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "3e4458ac.5a1978"
      ]
    ]
  },
  {
    "id": "3e4458ac.5a1978",
    "type": "block",
    "name": "block",
    "xml": "<block>\n",
    "atomic": "false",
    "comments": "",
    "outputs": 1,
    "x": 874.7529640197754,
    "y": 314.9218854904175,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "d28edbd3.ae9358",
        "bda524fb.86fa98"
      ]
    ]
  },
  {
    "id": "d28edbd3.ae9358",
    "type": "switchNode",
    "name": "switch type",
    "xml": "<switch test=\"`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`\">\n",
    "comments": "",
    "outputs": 1,
    "x": 1011.8701667785645,
    "y": 314.89532566070557,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "a740d422.40d728"
      ]
    ]
  },
  {
    "id": "a740d422.40d728",
    "type": "outcomeTrue",
    "name": "true",
    "xml": "<outcome value='true'>\n",
    "comments": "",
    "outputs": 1,
    "x": 1151.870174407959,
    "y": 315.89532566070557,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "feaf8bb0.d7e508"
      ]
    ]
  },
  {
    "id": "feaf8bb0.d7e508",
    "type": "block",
    "name": "block : atomic",
    "xml": "<block atomic=\"true\">",
    "atomic": "true",
    "outputs": 1,
    "x": 1300.419822692871,
    "y": 316.9220190048218,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "6e080bd9.2cad94"
      ]
    ]
  },
  {
    "id": "6e080bd9.2cad94",
    "type": "set",
    "name": "set type and sdwan flag",
    "xml": "<set>\n<parameter name='prop.site.type' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='prop.site.sdwan' value=\"true\" />\n",
    "comments": "",
    "x": 1444.7531852722168,
    "y": 317.9220361709595,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "145e6ab2.474a25",
    "type": "switchNode",
    "name": "switch prop.site.sdwan",
    "xml": "<switch test=\"`$prop.site.sdwan`\">\n",
    "comments": "",
    "outputs": 1,
    "x": 641.8570785522461,
    "y": 470.00004386901855,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "c9081f3c.c4c52"
      ]
    ]
  },
  {
    "id": "c9081f3c.c4c52",
    "type": "outcomeTrue",
    "name": "true",
    "xml": "<outcome value='true'>\n",
    "comments": "",
    "outputs": 1,
    "x": 822.8572120666504,
    "y": 471.0000705718994,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "5bb614a8.7a50ac"
      ]
    ]
  },
  {
    "id": "619fc994.c8c7e8",
    "type": "success",
    "name": "success",
    "xml": "<outcome value='success'>\n",
    "comments": "",
    "outputs": 1,
    "x": 1527.357234954834,
    "y": 439.00012493133545,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "9d1c31d.0bb00d"
      ]
    ]
  },
  {
    "id": "9d1c31d.0bb00d",
    "type": "set",
    "name": "set controller data",
    "xml": "<set>\n<parameter name='prop.sdncRestApi.thirdpartySdnc.url' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.user' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.password' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`\" />\n",
    "comments": "",
    "x": 1715.8573303222656,
    "y": 433.0001345872879,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "a8d0eff5.22c29",
    "type": "not-found",
    "name": "not-found",
    "xml": "<outcome value='not-found'>\n",
    "comments": "",
    "outputs": 1,
    "x": 1530.848201751709,
    "y": 486.5741605758667,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "182c54e4.50314b"
      ]
    ]
  },
  {
    "id": "182c54e4.50314b",
    "type": "returnFailure",
    "name": "return failure",
    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n",
    "comments": "",
    "x": 1704.4196128845215,
    "y": 474.8598966598511,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "dafc7114.f9611",
    "type": "other",
    "name": "other",
    "xml": "<outcome value='Other'>\n",
    "comments": "",
    "outputs": 1,
    "x": 1523.181209564209,
    "y": 527.907473564148,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "9c3bc7c8.8428c8"
      ]
    ]
  },
  {
    "id": "9c3bc7c8.8428c8",
    "type": "returnFailure",
    "name": "return failure",
    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n",
    "comments": "",
    "x": 1710.9537658691406,
    "y": 523.3466663360596,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "2718b5aa.7ee4da",
    "type": "get-resource",
    "name": "get-resource esr-thirdparty-sdnc",
    "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"esr-thirdparty-sdnc\" \n\t\tkey=\"esr-thirdparty-sdnc.thirdparty-sdnc-id = SDWANController AND \n\t\t     depth = '1'\"\n        pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\n\n",
    "comments": "",
    "outputs": 1,
    "x": 1260.3571472167969,
    "y": 487.00013077259064,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "619fc994.c8c7e8",
        "a8d0eff5.22c29",
        "dafc7114.f9611"
      ]
    ]
  },
  {
    "id": "f6e580dc.483b5",
    "type": "execute",
    "name": "execute RestApiCallNode Create  SDWAN site",
    "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-site-del.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/sites/action/batch-delete'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"site-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />",
    "comments": "",
    "outputs": 1,
    "x": 1288.8574905395508,
    "y": 685.0002021789551,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "9ccdb4e3.7037b8",
        "542d6497.1e051c"
      ]
    ]
  },
  {
    "id": "efaab9ba.da6af8",
    "type": "block",
    "name": "block : atomic",
    "xml": "<block atomic=\"true\">",
    "atomic": "true",
    "comments": "",
    "outputs": 1,
    "x": 1684.523811340332,
    "y": 664.8890171051025,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      []
    ]
  },
  {
    "id": "eed03e10.52741",
    "type": "returnFailure",
    "name": "return failure",
    "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Error executing Create vpn rest api\" />\n",
    "comments": "",
    "x": 1681.9683113098145,
    "y": 699.444356918335,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "f190e7e4.b492e8",
    "type": "failure",
    "name": "failure",
    "xml": "<outcome value='failure'>\n",
    "comments": "",
    "outputs": 1,
    "x": 1537.9683074951172,
    "y": 698.444356918335,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "eed03e10.52741"
      ]
    ]
  },
  {
    "id": "3d884d4b.3bb372",
    "type": "success",
    "name": "success",
    "xml": "<outcome value='success'>\n",
    "comments": "",
    "outputs": 1,
    "x": 1541.4126434326172,
    "y": 667.1111841201782,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "efaab9ba.da6af8"
      ]
    ]
  },
  {
    "id": "268a0227.9f4d8e",
    "type": "success",
    "name": "success",
    "xml": "<outcome value='success'>\n",
    "comments": "",
    "outputs": 1,
    "x": 1526.611125946045,
    "y": 565.0040866136551,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "7a5f68d2.12c3e8"
      ]
    ]
  },
  {
    "id": "ec5d99f5.fe59b8",
    "type": "failure",
    "name": "failure",
    "xml": "<outcome value='failure'>\n",
    "comments": "",
    "outputs": 1,
    "x": 1518.861125946045,
    "y": 606.6469699144363,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "dc9e3b17.c88cb8"
      ]
    ]
  },
  {
    "id": "dc9e3b17.c88cb8",
    "type": "block",
    "name": "block",
    "xml": "<block>\n",
    "atomic": "false",
    "comments": "",
    "outputs": 1,
    "x": 1644.944622039795,
    "y": 606.8930026292801,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      []
    ]
  },
  {
    "id": "7a5f68d2.12c3e8",
    "type": "set",
    "name": "set token-id",
    "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n",
    "comments": "",
    "x": 1663.611125946045,
    "y": 565.0040866136551,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "cbf3519f.042f3",
    "type": "comment",
    "name": "tmp.thirdparty-sdnc-id is hardcoded value?",
    "info": "",
    "comments": "",
    "x": 1256.8610382080078,
    "y": 454.0040522813797,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "5bb614a8.7a50ac",
    "type": "block",
    "name": "block : atomic",
    "xml": "<block atomic=\"true\">",
    "atomic": "true",
    "outputs": 1,
    "x": 983.8571472167969,
    "y": 471.6665782928467,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "2718b5aa.7ee4da",
        "8fc11da9.0efed",
        "f6e580dc.483b5",
        "49b38240.460c6c"
      ]
    ]
  },
  {
    "id": "65cd0ad5.7b6474",
    "type": "save",
    "name": "update siteInstance configuration in AAI",
    "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' \n      key='site-resource.site-resource-id = $vnf-topology-operation-input.vnf-information.vnf-id' >\n<parameter name='site-resource-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />      \n<parameter name='operational-status' value='PendingDelete' />\n",
    "comments": "",
    "outputs": 1,
    "x": 663.8571701049805,
    "y": 704.0001029968262,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      []
    ]
  },
  {
    "id": "bda524fb.86fa98",
    "type": "switchNode",
    "name": "switch siteId",
    "xml": "<switch test=\"`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'siteId'`\">\n",
    "comments": "",
    "outputs": 1,
    "x": 1011.8700637817383,
    "y": 389.8953685760498,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "5e12f6f2.154df8"
      ]
    ]
  },
  {
    "id": "5e12f6f2.154df8",
    "type": "outcomeTrue",
    "name": "true",
    "xml": "<outcome value='true'>\n",
    "comments": "",
    "outputs": 1,
    "x": 1151.8700714111328,
    "y": 390.8953685760498,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "c0b4aa42.b23db8"
      ]
    ]
  },
  {
    "id": "c0b4aa42.b23db8",
    "type": "block",
    "name": "block : atomic",
    "xml": "<block atomic=\"true\">",
    "atomic": "true",
    "outputs": 1,
    "x": 1300.419719696045,
    "y": 391.922061920166,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "12912fa7.36df6"
      ]
    ]
  },
  {
    "id": "12912fa7.36df6",
    "type": "set",
    "name": "set siteId",
    "xml": "<set>\n<parameter name='prop.site.siteId' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n\n",
    "comments": "",
    "x": 1444.7530822753906,
    "y": 392.9220790863037,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "cc3aa10c.cf485",
    "type": "comment",
    "name": "Get siteId to delete",
    "info": "",
    "comments": "",
    "x": 1023.857048034668,
    "y": 359.0000247955322,
    "z": "ccd0c7cf.3cb8d8",
    "wires": []
  },
  {
    "id": "8fc11da9.0efed",
    "type": "execute",
    "name": "execute RestApiCallNode Get token",
    "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/actokentemplate.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"token-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>",
    "comments": "",
    "outputs": 1,
    "x": 1277.0000762939453,
    "y": 588.000039100647,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "268a0227.9f4d8e",
        "ec5d99f5.fe59b8"
      ]
    ]
  },
  {
    "id": "e07817c8.713ef8",
    "type": "execute",
    "name": "execute Properties",
    "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n    <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n    <parameter name='contextPrefix' value='prop' />\n",
    "comments": "",
    "outputs": 1,
    "x": 617,
    "y": 225.00000095367432,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      []
    ]
  },
  {
    "id": "49b38240.460c6c",
    "type": "call",
    "name": "call sdwan-get-tenant-auth",
    "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-tenant-auth' mode='sync' >\n",
    "comments": "",
    "outputs": 1,
    "x": 1237,
    "y": 637,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      []
    ]
  },
  {
    "id": "9ccdb4e3.7037b8",
    "type": "failure",
    "name": "failure",
    "xml": "<outcome value='failure'>\n",
    "comments": "",
    "outputs": 1,
    "x": 1545,
    "y": 762,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "b8677116.110c6"
      ]
    ]
  },
  {
    "id": "b8677116.110c6",
    "type": "block",
    "name": "block : atomic",
    "xml": "<block atomic=\"true\">",
    "atomic": "true",
    "comments": "",
    "outputs": 1,
    "x": 1701,
    "y": 762,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      []
    ]
  },
  {
    "id": "542d6497.1e051c",
    "type": "other",
    "name": "other",
    "xml": "<outcome value='Other'>\n",
    "comments": "",
    "outputs": 1,
    "x": 1545,
    "y": 811,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      [
        "e1c3f88e.80fd88"
      ]
    ]
  },
  {
    "id": "e1c3f88e.80fd88",
    "type": "block",
    "name": "block : atomic",
    "xml": "<block atomic=\"true\">",
    "atomic": "true",
    "comments": "",
    "outputs": 1,
    "x": 1723,
    "y": 808,
    "z": "ccd0c7cf.3cb8d8",
    "wires": [
      []
    ]
  }
]