Chore: Add gerrit maven verify GHA workflow
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_manage-ipaddr-assignment.json
1 [
2   {
3     "id":"d81e50c6.10867",
4     "type":"dgstart",
5     "name":"DGSTART",
6     "outputs":1,
7     "x":186,
8     "y":168,
9     "z":"ee2bc85b.58f498",
10     "wires":[
11       [
12         "794b3924.54ea18"
13       ]
14     ]
15   },
16   {
17     "id":"794b3924.54ea18",
18     "type":"service-logic",
19     "name":"GENERIC-RESOURCE-API ${project.version}",
20     "module":"GENERIC-RESOURCE-API",
21     "version":"${project.version}",
22     "comments":"Reserve/release IP",
23     "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}'>",
24     "outputs":1,
25     "x":369,
26     "y":257,
27     "z":"ee2bc85b.58f498",
28     "wires":[
29       [
30         "3876df34.9cbea"
31       ]
32     ]
33   },
34   {
35     "id":"3876df34.9cbea",
36     "type":"method",
37     "name":"manage-ipaddr-assignment",
38     "xml":"<method rpc='manage-ipaddr-assignment' mode='sync'>\n",
39     "comments":"",
40     "outputs":1,
41     "x":471,
42     "y":329,
43     "z":"ee2bc85b.58f498",
44     "wires":[
45       [
46         "255e6973.efa936"
47       ]
48     ]
49   },
50   {
51     "id":"eac5864f.de8f18",
52     "type":"switchNode",
53     "name":"switch $tmp.manageIpaddr.action",
54     "xml":"<switch test='`$tmp.manageIpaddr.action`'>\n",
55     "comments":"",
56     "outputs":1,
57     "x":945,
58     "y":362,
59     "z":"ee2bc85b.58f498",
60     "wires":[
61       [
62         "980f17d0.c10a28",
63         "2fb21d9f.e9b6e2"
64       ]
65     ]
66   },
67   {
68     "id":"980f17d0.c10a28",
69     "type":"outcome",
70     "name":"reserve",
71     "xml":"<outcome value='reserve'>\n",
72     "comments":"",
73     "outputs":1,
74     "x":1227,
75     "y":361,
76     "z":"ee2bc85b.58f498",
77     "wires":[
78       [
79         "ab295c0b.78142"
80       ]
81     ]
82   },
83   {
84     "id":"ab295c0b.78142",
85     "type":"block",
86     "name":"block : atomic",
87     "xml":"<block atomic='true'>",
88     "atomic":"true",
89     "comments":"",
90     "outputs":1,
91     "x":1399,
92     "y":363,
93     "z":"ee2bc85b.58f498",
94     "wires":[
95       [
96         "8fd400db.0432d"
97       ]
98     ]
99   },
100   {
101     "id":"8fd400db.0432d",
102     "type":"get-resource",
103     "name":"get-resource IPADDR from IPV4_ADDRESS_POOL",
104     "xml":"<get-resource plugin='`$tmp.sql.plugin`' resource='IPADDR' key=\"SELECT min(ipv4_addr) ip from IPV4_ADDRESS_POOL where universe = $tmp.manageIpaddr.pool and status='AVAILABLE'\" pfx=\"tmp.manageIpaddr\" >\n",
105     "comments":"",
106     "outputs":1,
107     "x":1680,
108     "y":364,
109     "z":"ee2bc85b.58f498",
110     "wires":[
111       [
112         "7fb7948a.ed39dc"
113       ]
114     ]
115   },
116   {
117     "id":"255e6973.efa936",
118     "type":"block",
119     "name":"block : atomic",
120     "xml":"<block atomic='true'>",
121     "atomic":"true",
122     "comments":"",
123     "outputs":1,
124     "x":703,
125     "y":328,
126     "z":"ee2bc85b.58f498",
127     "wires":[
128       [
129         "d5fece9.ea5c63",
130         "eac5864f.de8f18"
131       ]
132     ]
133   },
134   {
135     "id":"d5fece9.ea5c63",
136     "type":"set",
137     "name":"set sql plugin name",
138     "xml":"<set>\n<parameter name='tmp.sql.plugin' value='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' />\n",
139     "comments":"",
140     "x":910,
141     "y":287,
142     "z":"ee2bc85b.58f498",
143     "wires":[
144
145     ]
146   },
147   {
148     "id":"7fb7948a.ed39dc",
149     "type":"success",
150     "name":"success",
151     "xml":"<outcome value='success'>\n",
152     "comments":"",
153     "outputs":1,
154     "x":1952,
155     "y":362,
156     "z":"ee2bc85b.58f498",
157     "wires":[
158       [
159         "7a9dcfdb.a10f9"
160       ]
161     ]
162   },
163   {
164     "id":"7a9dcfdb.a10f9",
165     "type":"save",
166     "name":"Mark ip address reserved",
167     "xml":"<save plugin='`$tmp.sql.plugin`' resource='IPADDR' key=\"UPDATE IPV4_ADDRESS_POOL set status='RESERVED' where universe='VGW' and ipv4_addr = $tmp.manageIpaddr.ip\" force='false'>\n\n",
168     "comments":"",
169     "outputs":1,
170     "x":2169,
171     "y":364,
172     "z":"ee2bc85b.58f498",
173     "wires":[
174       [
175
176       ]
177     ]
178   },
179   {
180     "id":"2fb21d9f.e9b6e2",
181     "type":"outcome",
182     "name":"release",
183     "xml":"<outcome value='release'>\n",
184     "comments":"",
185     "outputs":1,
186     "x":1225,
187     "y":428,
188     "z":"ee2bc85b.58f498",
189     "wires":[
190       [
191         "a8f883cf.1ee52"
192       ]
193     ]
194   },
195   {
196     "id":"a8f883cf.1ee52",
197     "type":"save",
198     "name":"Mark ipaddress available",
199     "xml":"<save plugin='`$tmp.sql.plugin`' resource='IPADDR' key=\"UPDATE IPV4_ADDRESS_POOL set status='AVAILABLE' where universe='VGW' and ipv4_addr = $tmp.manageIpaddr.ip\" force='false'>\n\n",
200     "comments":"",
201     "outputs":1,
202     "x":1411,
203     "y":431,
204     "z":"ee2bc85b.58f498",
205     "wires":[
206       [
207
208       ]
209     ]
210   }
211 ]