Merge "user guide demo for monitoring gui"
[policy/parent.git] / docs / drools / clsimulation.rst
1
2 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
4
5 **********************************************************
6 Control Loop Simulation and Injection of Messages Overview
7 **********************************************************
8
9 .. contents::
10     :depth: 2
11
12 This section will cover how to interact with the PDP-D using telemetry commands. This assumes that you have a PDP-D running to interact with. Take a look at the page "Methods to run PDP-D" if you do not have a PDP-D running for testing purposes.
13
14 Telemetry
15 ^^^^^^^^^
16 The username and password for the Telemetry commands are in *${POLICY_HOME}/config/engine.properties*.
17 If you are using Eclipse, the credentials can be found in the file **install-drools/src/files/base.conf** within the "drools-pdp" repository.
18 The environment variables $TELEMETRY_USER and $TELEMETRY_PASSWORD will also have the credentials if they have already been set.
19
20 Recall you can use the command "docker exec -it drools bash" to get the PDP-D running with Docker.
21
22     .. code-block:: bash
23
24       docker exec -it drools bash
25
26 Your terminal should now look similar to "policy@drools:/<path>". This indicates you are in the drools docker container. If you run "policy status" the controller should be running.
27
28     .. image:: img/docker/policyStatus.png
29
30 To enter the telemetry subshell, use the command "telemetry".
31
32     .. code-block:: bash
33
34       telemetry
35
36 Use the "exit" command to exit the telemetry subshell. The terminal will now go back to the docker container.
37
38     .. code-block:: bash
39
40       exit
41
42     .. image:: img/docker/credentials.png
43
44 Injecting messages:
45 -------------------
46
47 To inject messages, use the following command.  The injected message will look as if it came in from the specified topic and will be processed accordingly.
48
49 Use the command:
50
51     .. code-block:: bash
52
53         http --verify=no --default-scheme=https -a <userName>:<password> PUT :9696/policy/pdp/engine/topics/sources/<comm>/<topic>/events @<onsetFile> Content-Type:"text/plain"
54
55 The equivalent "curl" version:
56
57     .. code-block:: bash
58
59         curl --insecure --silent --user <userName>:<password> -X PUT --header "Content-Type: text/plain" --data @<onsetFile> https://localhost:9696/policy/pdp/engine/topics/sources/<comm>/<topic>/events
60
61 Note: you may have to replace "https" with "http" depending on how you are running the drools-pdp.
62
63 The <comm> is a messaging communication infrastructure in an ONAP installation. Depending on how a topic has been defined in the configuration, the <comm> is either "dmaap", "ueb", or "noop".
64 The default messaging communication infrastructure is "dmaap".
65
66 The <topic> is a specific topic name used to send and/or receive information. There are two types of topics:
67
68 1. **source** topics (Example: dmaap.source.topics=APPC-LCM-WRITE or dmaap.source.topics=APPC-CL)
69
70 2. **sink** topics (Example: dmaap.sink.topics=APPC-LCM-READ or dmaap.sink.topics=APPC-CL)
71
72 You can extract <comm> and <topic> from the following example:
73 Example: dmaap.sink.topics=APPC-LCM-READ
74
75 1. <comm>=dmaap
76
77 2. <topic>=APPC-LCM-READ
78
79 The onset is a json file that contains the data to inject as the onset.  The data contained depends on the use case. This is an example for the vFirewall usecase:
80
81     .. code-block:: json
82        :caption: vFirewall_Sample_Onset
83
84         {
85             "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
86             "closedLoopAlarmStart": 1463679805324,
87             "closedLoopEventClient": "microservice.stringmatcher",
88             "closedLoopEventStatus": "ONSET",
89             "requestID": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65",
90             "target_type": "VNF",
91             "target": "generic-vnf.vnf-name",
92             "AAI": {
93                 "vserver.is-closed-loop-disabled": "false",
94                 "vserver.prov-status": "ACTIVE",
95                 "generic-vnf.vnf-name": "fw0002vm002fw002",
96                 "vserver.vserver-name": "OzVServer"
97             },
98             "from": "DCAE",
99             "version": "1.0.2"
100         }
101
102 Getting Information
103 -------------------
104
105 To get the name(s) of the active controller(s), use:
106
107     .. code-block:: bash
108
109         curl --insecure --silent --user <username>:<password> -X GET https://localhost:9696/policy/pdp/engine/controllers | python -m json.tool
110
111         # Example output when running PDP-D with Docker:
112
113         policy@drools:/opt/app/policy/config$ echo $TELEMETRY_USER
114
115         demo@people.osaaf.org
116
117         policy@drools:/opt/app/policy/config$ echo $TELEMETRY_PASSWORD
118
119         demo123456!
120
121         policy@drools:/opt/app/policy/config$ curl --insecure --silent --user demo@people.osaaf.org:demo123456! -X GET https://localhost:9696/policy/pdp/engine/controllers | python -m json.tool
122         [
123             "frankfurt",
124             "usecases"
125         ]
126
127 To check the facts currently in working memory, use the following command.
128
129     .. code-block:: bash
130
131         curl --insecure --silent --user <username>:<password> -X GET https://localhost:9696/policy/pdp/engine/controllers/<controllerName>/drools/facts | python -m json.tool
132
133         # Example output:
134
135         policy@drools:/opt/app/policy/config$ curl --insecure --silent --user demo@people.osaaf.org:demo123456! -X GET https://localhost:9696/policy/pdp/engine/controllers/frankfurt/drools/facts/ | python -m json.tool
136         {
137             "frankfurt": 0
138         }
139         policy@drools:/opt/app/policy/config$ curl --insecure --silent --user demo@people.osaaf.org:demo123456! -X GET https://localhost:9696/policy/pdp/engine/controllers/usecases/drools/facts/ | python -m json.tool
140         {
141             "usecases": 0
142         }
143
144 To get additional information about the controller, use:
145
146     .. code-block:: bash
147
148         curl --insecure --silent --user <username>:<password> -X GET https://localhost:9696/policy/pdp/engine/controllers/<controllerName> | python -m json.tool
149
150         # Example output:
151
152         policy@drools:/opt/app/policy/config$ curl --insecure --silent --user demo@people.osaaf.org:demo123456! -X GET https://localhost:9696/policy/pdp/engine/controllers/frankfurt/ | python -m json.tool
153         {
154             "alive": true,
155             "name": "frankfurt",
156             "topicSinks": [
157                 {
158                     "effectiveTopic": "APPC-CL",
159                     "topicCommInfrastructure": "NOOP",
160                     "servers": [
161                         "NOOP"
162                     ],
163                     "alive": true,
164                     "topic": "APPC-CL",
165                     "recentEvents": [],
166                     "locked": false
167                 },
168                 {
169                     "effectiveTopic": "APPC-LCM-READ",
170                     "topicCommInfrastructure": "NOOP",
171                     "servers": [
172                         "NOOP"
173                     ],
174                     "alive": true,
175                     "topic": "APPC-LCM-READ",
176                     "recentEvents": [],
177                     "locked": false
178                 },
179                 {
180                     "effectiveTopic": "POLICY-CL-MGT",
181                     "topicCommInfrastructure": "NOOP",
182                     "servers": [
183                         "NOOP"
184                     ],
185                     "alive": true,
186                     "topic": "POLICY-CL-MGT",
187                     "recentEvents": [],
188                     "locked": false
189                 },
190                 {
191                     "effectiveTopic": "SDNR-CL",
192                     "topicCommInfrastructure": "NOOP",
193                     "servers": [
194                         "NOOP"
195                     ],
196                     "alive": true,
197                     "topic": "SDNR-CL",
198                     "recentEvents": [],
199                     "locked": false
200                 },
201                 {
202                     "effectiveTopic": "DCAE_CL_RSP",
203                     "topicCommInfrastructure": "NOOP",
204                     "servers": [
205                         "NOOP"
206                     ],
207                     "alive": true,
208                     "topic": "DCAE_CL_RSP",
209                     "recentEvents": [],
210                     "locked": false
211                 }
212             ],
213             "drools": {
214                 "sessions": [
215                     "frankfurt"
216                 ],
217                 "alive": true,
218                 "brained": true,
219                 "groupId": "org.onap.policy.drools-applications.controlloop.common",
220                 "recentSourceEvents": [],
221                 "version": "1.6.0",
222                 "modelClassLoaderHash": -1185895883,
223                 "baseDomainNames": [
224                     "onap.policies.controlloop.operational.common.Drools",
225                     "onap.policies.controlloop.Operational"
226                 ],
227                 "artifactId": "controller-frankfurt",
228                 "recentSinkEvents": [],
229                 "sessionCoordinates": [
230                     "org.onap.policy.drools-applications.controlloop.common:controller-frankfurt:1.6.0:frankfurt"
231                 ],
232                 "locked": false
233             },
234             "policyTypes": [
235                 {
236                     "name": "onap.policies.controlloop.operational.common.Drools",
237                     "version": "1.0.0"
238                 },
239                 {
240                     "name": "onap.policies.controlloop.Operational",
241                     "version": "1.0.0"
242                 }
243             ],
244             "locked": false,
245             "topicSources": [
246                 {
247                     "effectiveTopic": "DCAE_TOPIC",
248                     "topicCommInfrastructure": "NOOP",
249                     "servers": [
250                         "NOOP"
251                     ],
252                     "alive": false,
253                     "topic": "DCAE_TOPIC",
254                     "recentEvents": [],
255                     "locked": false
256                 },
257                 {
258                     "effectiveTopic": "APPC-CL",
259                     "topicCommInfrastructure": "NOOP",
260                     "servers": [
261                         "NOOP"
262                     ],
263                     "alive": false,
264                     "topic": "APPC-CL",
265                     "recentEvents": [],
266                     "locked": false
267                 },
268                 {
269                     "effectiveTopic": "APPC-LCM-WRITE",
270                     "topicCommInfrastructure": "NOOP",
271                     "servers": [
272                         "NOOP"
273                     ],
274                     "alive": false,
275                     "topic": "APPC-LCM-WRITE",
276                     "recentEvents": [],
277                     "locked": false
278                 },
279                 {
280                     "effectiveTopic": "SDNR-CL-RSP",
281                     "topicCommInfrastructure": "NOOP",
282                     "servers": [
283                         "NOOP"
284                     ],
285                     "alive": false,
286                     "topic": "SDNR-CL-RSP",
287                     "recentEvents": [],
288                     "locked": false
289                 }
290             ]
291         }
292
293 Within the telemetry subshell, it is easy to get information. Simply navigate to a specific directory using "cd". Use the "get" command to get information. This is a shorter alternatve to using the "curl" requests as shown above.
294
295 To get information about the engine:
296
297     .. image:: img/docker/getEngine.png
298
299 To list the names of the active controllers:
300
301     .. image:: img/docker/getControllers.png
302
303 To get information about the specific "frankfurt" controller:
304
305     .. image:: img/docker/getFrankfurt.png
306
307 To get information about the PDP-D environment:
308
309     .. image:: img/docker/getEnvironment.png
310
311 To get a list of features that are currently enabled:
312
313     .. image:: img/docker/getFeatures.png
314
315 Simulators
316 ^^^^^^^^^^
317
318 Currently, there are 4 supported simulators: A&AI, SO, vFC, and guard.  When they are up, they are accessed via localhost on the following ports:
319
320 1. A&AI - localhost:6666
321
322 2. SO - localhost:6667
323
324 3. vFC - localhost:6668
325
326 4. guard - localhost:6669
327
328
329 They all respond with hard-coded values representing their various success messages except for with certain inputs.  For the A&AI simulator, if the value being queried with a “GET” query is “getFail” the simulator returns an exception message, if the value being queried in a “GET” query is “disableClosedLoop” the simulator returns a response with the value of “is-closed-loop-disabled” set to true, and if the value being queried in a named query is “error” the response from the simulator is A&AI’s failure message.
330
331 The other simulator that can return multiple responses is the guard simulator, and that returns a deny response if the closed loop control name passed in is “denyGuard”.
332
333 Using the Simulators
334 --------------------
335
336 To check the status of the simulators, run the command: "*policy status*".  If the feature "controlloop-utils" is enabled, the simulators are being used, otherwise, they are not.
337
338 **Turning on the simulators**
339
340     - First, make sure the controller is off by running the command “*policy stop*”.
341     - Then turn the feature on with the command “*features enable controlloop-utils*”.
342     - Finally restart the controller by running “*policy start*”.
343     - Run “*features status*” again and the *feature controlloop-utils* will be **enabled**.
344
345 **Turning the simulators off**
346
347     - First, make sure the controller is off by running the command “*policy stop*”.
348     - Then turn the feature off with the command “*features disable controlloop-utils*”.
349     - Finally restart the controller by running “*policy start*”.
350     - Run “*features status*” again and the *feature controlloop-utils* will be **disabled**.
351
352 **For Junits**
353
354     For Junits, the package *org.onap.policy.simulators* is needed.  In the Util class, there are six methods to start the six different simulators: *buildAaiSim()*, *buildSoSim()*, *buildVfcSim()*, *buildGuardSim()*, *buildSdnc()*, and *buildDmaap()*.  Once the method is called, the simulator should be up and waiting to respond to requests.  To bring down the simulators, call *HttpServletServer.factory.destroy()*.
355
356 Sample Responses
357 ^^^^^^^^^^^^^^^^
358
359 A&AI
360 --------
361
362     .. code-block:: bash
363        :caption: vnf-GET-response
364
365         {
366          "vnf-id": vnfId, // vnfId will be the vnfId you query on.  If you query on a vnfName, the id will be "error" if the name is "error", "5e49ca06-2972-4532-9ed4-6d071588d792" otherwise
367          "vnf-name": vnfName, // vnfName will be the vnfName you query on.  If you query on a vnfId, the name will be "USUCP0PCOIL0110UJRT01"
368          "vnf-type": "RT",
369          "service-id": "d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4",
370          "equipment-role": "UCPE",
371          "orchestration-status": "created",
372          "management-option": "ATT",
373          "ipv4-oam-address": "32.40.68.35",
374          "ipv4-loopback0-address": "32.40.64.57",
375          "nm-lan-v6-address": "2001:1890:e00e:fffe::1345",
376          "management-v6-address": "2001:1890:e00e:fffd::36",
377          "in-maint": false,
378          "prov-status":"ACTIVE",
379          "is-closed-loop-disabled": isDisabled, // isDisabled will be true if the vnf name/Id you query on is disableClosedLoop, false otherwise
380          "resource-version": "1493389458092",
381          "relationship-list": {
382           "relationship": [{
383            "related-to": "service-instance",
384            "related-link": "/aai/v11/business/customers/customer/1610_Func_Global_20160817084727/service-subscriptions/service-subscription/uCPE-VMS/service-instances/service-instance/USUCP0PCOIL0110UJZZ01",
385            "relationship-data": [{
386             "relationship-key": "customer.global-customer-id",
387             "relationship-value": "1610_Func_Global_20160817084727"
388            }, {
389             "relationship-key": "service-subscription.service-type",
390             "relationship-value": "uCPE-VMS"
391            }, {
392             "relationship-key": "service-instance.service-instance-id",
393             "relationship-value": "USUCP0PCOIL0110UJZZ01"
394            }],
395            "related-to-property": [{
396             "property-key": "service-instance.service-instance-name"
397            }]
398           }, {
399            "related-to": "vserver",
400            "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/USUCP0PCOIL0110UJZZ01%3A%3AuCPE-VMS/vservers/vserver/3b2558f4-39d8-40e7-bfc7-30660fb52c45",
401            "relationship-data": [{
402             "relationship-key": "cloud-region.cloud-owner",
403             "relationship-value": "att-aic"
404            }, {
405             "relationship-key": "cloud-region.cloud-region-id",
406             "relationship-value": "AAIAIC25"
407            }, {
408             "relationship-key": "tenant.tenant-id",
409             "relationship-value": "USUCP0PCOIL0110UJZZ01::uCPE-VMS"
410            }, {
411             "relationship-key": "vserver.vserver-id",
412             "relationship-value": "3b2558f4-39d8-40e7-bfc7-30660fb52c45"
413            }],
414            "related-to-property": [{
415             "property-key": "vserver.vserver-name",
416             "property-value": "USUCP0PCOIL0110UJZZ01-vsrx"
417            }]
418           }]
419          }
420
421
422     .. code-block:: bash
423        :caption: vnf-GET-fail
424
425         // This is returned if you query on the value "getFail"
426         {
427          "requestError": {
428           "serviceException": {
429            "messageId": "SVC3001",
430            "text": "Resource not found for %1 using id %2 (msg=%3) (ec=%4)",
431            "variables": ["GET", "network/generic-vnfs/generic-vnf/getFail", "Node Not Found:No Node of type generic-vnf found at network/generic-vnfs/generic-vnf/getFail", "ERR.5.4.6114"]
432           }
433          }
434         }
435
436
437     .. code-block:: bash
438        :caption: vserver-GET-response
439
440         {
441          "vserver": [{
442           "vserver-id": "d0668d4f-c25e-4a1b-87c4-83845c01efd8",
443           "vserver-name": vserverName, // The value you query on
444           "vserver-name2": "vjunos0",
445           "vserver-selflink": "https://aai-ext1.test.att.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/USMSO1SX7NJ0103UJZZ01%3A%3AuCPE-VMS/vservers/vserver/d0668d4f-c25e-4a1b-87c4-83845c01efd8",
446           "in-maint": false,
447           "prov-status":"ACTIVE",
448           "is-closed-loop-disabled": isDisabled, // True if the vserverName is "disableClosedLoop", false otherwise
449           "resource-version": "1494001931513",
450           "relationship-list": {
451            "relationship": [{
452             "related-to": "generic-vnf",
453             "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/e1a41e99-4ede-409a-8f9d-b5e12984203a",
454             "relationship-data": [{
455              "relationship-key": "generic-vnf.vnf-id",
456              "relationship-value": "e1a41e99-4ede-409a-8f9d-b5e12984203a"
457             }],
458             "related-to-property": [{
459              "property-key": "generic-vnf.vnf-name",
460              "property-value": "USMSO1SX7NJ0103UJSW01"
461             }]
462            }, {
463             "related-to": "pserver",
464             "related-link": "/aai/v11/cloud-infrastructure/pservers/pserver/USMSO1SX7NJ0103UJZZ01",
465             "relationship-data": [{
466              "relationship-key": "pserver.hostname",
467              "relationship-value": "USMSO1SX7NJ0103UJZZ01"
468             }],
469             "related-to-property": [{
470              "property-key": "pserver.pserver-name2"
471             }]
472            }]
473           }
474          }]
475         }
476
477
478     .. code-block:: bash
479        :caption: vserver-GET-error
480
481         // This is returned if you query on the value "getFail"
482         {
483          "requestError": {
484           "serviceException": {
485            "messageId": "SVC3001",
486            "text": "Resource not found for %1 using id %2 (msg=%3) (ec=%4)",
487            "variables": ["GET", "nodes/vservers", "Node Not Found:No Node of type generic-vnf found at nodes/vservers", "ERR.5.4.6114"]
488           }
489          }
490         }
491
492
493     .. code-block:: bash
494        :caption: vnf-NamedQuery-response
495
496         {
497           "inventory-response-item": [
498             {
499               "model-name": "service-instance",
500               "generic-vnf": {
501                 "vnf-id": "vnfId",  //vnfId will be the vnfId you query on
502                 "vnf-name": "ZRDM2MMEX39",
503                 "vnf-type": "vMME Svc Jul 14/vMME VF Jul 14 1",
504                 "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
505                 "prov-status": "ACTIVE",
506                 "in-maint": false,
507                 "is-closed-loop-disabled": false,
508                 "resource-version": "1503082370097",
509                 "model-invariant-id": "82194af1-3c2c-485a-8f44-420e22a9eaa4",
510                 "model-version-id": "46b92144-923a-4d20-b85a-3cbd847668a9"
511               },
512               "extra-properties": {
513                 "extra-property": []
514               },
515               "inventory-response-items": {
516                 "inventory-response-item": [
517                   {
518                     "model-name": "service-instance",
519                     "service-instance": {
520                       "service-instance-id": "37b8cdb7-94eb-468f-a0c2-4e3c3546578e",
521                       "service-instance-name": "Changed Service Instance NAME",
522                       "resource-version": "1503082993532",
523                       "model-invariant-id": "82194af1-3c2c-485a-8f44-420e22a9eaa4",
524                       "model-version-id": "46b92144-923a-4d20-b85a-3cbd847668a9"
525                     },
526                     "extra-properties": {
527                       "extra-property": []
528                     },
529                     "inventory-response-items": {
530                       "inventory-response-item": [
531                         {
532                           "model-name": "pnf",
533                           "generic-vnf": {
534                             "vnf-id": "pnfVnfId",   // pnfVnfId is UUID generated from ${pnfVnfName}
535                             "vnf-name": "pnfVnfName",   // pnfVnfName is pnf-test-${vnfId}
536                             "vnf-type": "vMME Svc Jul 14/vMME VF Jul 14 1",
537                             "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
538                             "in-maint": false,
539                             "is-closed-loop-disabled": false,
540                             "resource-version": "1504013830207",
541                             "model-invariant-id": "862b25a1-262a-4961-bdaa-cdc55d69785a",
542                             "model-version-id": "e9f1fa7d-c839-418a-9601-03dc0d2ad687"
543                           },
544                           "extra-properties": {
545                             "extra-property": []
546                           }
547                         },
548                         {
549                           "model-name": "service-instance",
550                           "generic-vnf": {
551                             "vnf-id": "serviceInstanceVnfId",   // serviceInstanceVnfId is UUID generated from ${serviceInstanceVnfName}
552                             "vnf-name": "serviceInstanceVnfName",   // serviceInstanceVnfName is service-instance-test-${vnfId}
553                             "vnf-type": "vMME Svc Jul 14/vMME VF Jul 14 1",
554                             "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
555                             "in-maint": false,
556                             "is-closed-loop-disabled": false,
557                             "resource-version": "1504014833841",
558                             "model-invariant-id": "Eace933104d443b496b8.nodes.heat.vpg",
559                             "model-version-id": "46b92144-923a-4d20-b85a-3cbd847668a9"
560                           },
561                           "extra-properties": {
562                             "extra-property": []
563                           }
564                         }
565                       ]
566                     }
567                   }
568                 ]
569               }
570             }
571           ]
572         }
573
574
575     .. code-block:: bash
576        :caption: vserver-NamedQuery-response
577
578         {
579           "inventory-response-item": [
580             {
581               "vserver": {
582                 "vserver-id": "6ed3642c-f7a1-4a7c-9290-3d51fe1531eb",
583                 "vserver-name": "zdfw1lb01lb02",
584                 "vserver-name2": "zdfw1lb01lb02",
585                 "prov-status": "ACTIVE",
586                 "vserver-selflink": "http://10.12.25.2:8774/v2.1/41d6d38489bd40b09ea8a6b6b852dcbd/servers/6ed3642c-f7a1-4a7c-9290-3d51fe1531eb",
587                 "in-maint": false,
588                 "is-closed-loop-disabled": false,
589                 "resource-version": "1510606403522"
590               },
591               "extra-properties": {
592                 "extra-property": []
593               },
594               "inventory-response-items": {
595                 "inventory-response-item": [
596                   {
597                     "model-name": "vLoadBalancer",
598                     "generic-vnf": {
599                       "vnf-id": "db373a8d-f7be-4d02-8ac8-6ca4c305d144",
600                       "vnf-name": "Vfmodule_vLB1113",
601                       "vnf-type": "vLoadBalancer-1106/vLoadBalancer 0",
602                       "service-id": "66f157fc-4148-4880-95f5-e120677e98d1",
603                       "prov-status": "PREPROV",
604                       "in-maint": false,
605                       "is-closed-loop-disabled": false,
606                       "resource-version": "1510604011851",
607                       "model-invariant-id": "cee050ed-92a5-494f-ab04-234307a846dc",
608                       "model-version-id": "fd65becc-6b2c-4fe8-ace9-cc29db9a3da2"
609                     },
610                     "extra-properties": {
611                       "extra-property": [
612                         {
613                           "property-name": "model-ver.model-version-id",
614                           "property-value": "fd65becc-6b2c-4fe8-ace9-cc29db9a3da2"
615                         },
616                         {
617                           "property-name": "model-ver.model-name",
618                           "property-value": "vLoadBalancer"
619                         },
620                         {
621                           "property-name": "model.model-type",
622                           "property-value": "resource"
623                         },
624                         {
625                           "property-name": "model.model-invariant-id",
626                           "property-value": "cee050ed-92a5-494f-ab04-234307a846dc"
627                         },
628                         {
629                           "property-name": "model-ver.model-version",
630                           "property-value": "1.0"
631                         }
632                       ]
633                     },
634                     "inventory-response-items": {
635                       "inventory-response-item": [
636                         {
637                           "model-name": "vLoadBalancer-1106",
638                           "service-instance": {
639                             "service-instance-id": "3b12f31f-8f2d-4f5c-b875-61ff1194b941",
640                             "service-instance-name": "vLoadBalancer-1113",
641                             "resource-version": "1510603936425",
642                             "model-invariant-id": "1321d60d-f7ff-4300-96c2-6bf0b3268b7a",
643                             "model-version-id": "732d4692-4b97-46f9-a996-0b3339e88c50"
644                           },
645                           "extra-properties": {
646                             "extra-property": [
647                               {
648                                 "property-name": "model-ver.model-version-id",
649                                 "property-value": "732d4692-4b97-46f9-a996-0b3339e88c50"
650                               },
651                               {
652                                 "property-name": "model-ver.model-name",
653                                 "property-value": "vLoadBalancer-1106"
654                               },
655                               {
656                                 "property-name": "model.model-type",
657                                 "property-value": "service"
658                               },
659                               {
660                                 "property-name": "model.model-invariant-id",
661                                 "property-value": "1321d60d-f7ff-4300-96c2-6bf0b3268b7a"
662                               },
663                               {
664                                 "property-name": "model-ver.model-version",
665                                 "property-value": "1.0"
666                               }
667                             ]
668                           }
669                         },
670                         {
671                           "model-name": "Vloadbalancer..base_vlb..module-0",
672                           "vf-module": {
673                             "vf-module-id": "e6b3e3eb-34e1-4c00-b8c1-2a4fbe479b12",
674                             "vf-module-name": "Vfmodule_vLB1113-1",
675                             "heat-stack-id": "Vfmodule_vLB1113-1/3dd6d900-772f-4fcc-a0cb-e250ab2bb4db",
676                             "orchestration-status": "active",
677                             "is-base-vf-module": true,
678                             "resource-version": "1510604612557",
679                             "model-invariant-id": "6d760188-9a24-451a-b05b-e08b86cb94f2",
680                             "model-version-id": "93facad9-55f2-4fe0-9574-814c2bc2d071"
681                           },
682                           "extra-properties": {
683                             "extra-property": [
684                               {
685                                 "property-name": "model-ver.model-version-id",
686                                 "property-value": "93facad9-55f2-4fe0-9574-814c2bc2d071"
687                               },
688                               {
689                                 "property-name": "model-ver.model-name",
690                                 "property-value": "Vloadbalancer..base_vlb..module-0"
691                               },
692                               {
693                                 "property-name": "model.model-type",
694                                 "property-value": "resource"
695                               },
696                               {
697                                 "property-name": "model.model-invariant-id",
698                                 "property-value": "6d760188-9a24-451a-b05b-e08b86cb94f2"
699                               },
700                               {
701                                 "property-name": "model-ver.model-version",
702                                 "property-value": "1"
703                               }
704                             ]
705                           }
706                         },
707                         {
708                           "model-name": "Vloadbalancer..dnsscaling..module-1",
709                           "vf-module": {
710                             "vf-module-id": "dummy_db373a8d-f7be-4d02-8ac8-6ca4c305d144",
711                             "vf-module-name": "dummy_db373a8d-f7be-4d02-8ac8-6ca4c305d144",
712                             "is-base-vf-module": false,
713                             "resource-version": "1510610079687",
714                             "model-invariant-id": "356a1cff-71f2-4086-9980-a2927ce11c1c",
715                             "model-version-id": "6b93d804-cfc8-4be3-92cc-9336d135859a"
716                           },
717                           "extra-properties": {
718                             "extra-property": [
719                               {
720                                 "property-name": "model-ver.model-version-id",
721                                 "property-value": "6b93d804-cfc8-4be3-92cc-9336d135859a"
722                               },
723                               {
724                                 "property-name": "model-ver.model-name",
725                                 "property-value": "Vloadbalancer..dnsscaling..module-1"
726                               },
727                               {
728                                 "property-name": "model.model-type",
729                                 "property-value": "resource"
730                               },
731                               {
732                                 "property-name": "model.model-invariant-id",
733                                 "property-value": "356a1cff-71f2-4086-9980-a2927ce11c1c"
734                               },
735                               {
736                                 "property-name": "model-ver.model-version",
737                                 "property-value": "1"
738                               }
739                             ]
740                           }
741                         },
742                         {
743                           "model-name": "Vloadbalancer..dnsscaling..module-1",
744                           "vf-module": {
745                             "vf-module-id": "my_module_db373a8d-f7be-4d02-8ac8-6ca4c305d144",
746                             "vf-module-name": "my_module_1",
747                             "is-base-vf-module": false,
748                             "resource-version": "1510610079687",
749                             "model-invariant-id": "356a1cff-71f2-4086-9980-a2927ce11c1c",
750                             "model-version-id": "6b93d804-cfc8-4be3-92cc-9336d135859a"
751                           },
752                           "extra-properties": {
753                             "extra-property": [
754                               {
755                                 "property-name": "model-ver.model-version-id",
756                                 "property-value": "6b93d804-cfc8-4be3-92cc-9336d135859a"
757                               },
758                               {
759                                 "property-name": "model-ver.model-name",
760                                 "property-value": "Vloadbalancer..dnsscaling..module-1"
761                               },
762                               {
763                                 "property-name": "model.model-type",
764                                 "property-value": "resource"
765                               },
766                               {
767                                 "property-name": "model.model-invariant-id",
768                                 "property-value": "356a1cff-71f2-4086-9980-a2927ce11c1c"
769                               },
770                               {
771                                 "property-name": "model-ver.model-version",
772                                 "property-value": "1"
773                               }
774                             ]
775                           }
776                         },
777                         {
778                           "model-name": "Vloadbalancer..dnsscaling..module-1",
779                           "vf-module": {
780                             "vf-module-id": "my_module_db373a8d-f7be-4d02-8ac8-6ca4c305d144",
781                             "vf-module-name": "my_module_2",
782                             "is-base-vf-module": false,
783                             "resource-version": "1510610079687",
784                             "model-invariant-id": "356a1cff-71f2-4086-9980-a2927ce11c1c",
785                             "model-version-id": "6b93d804-cfc8-4be3-92cc-9336d135859a"
786                           },
787                           "extra-properties": {
788                             "extra-property": [
789                               {
790                                 "property-name": "model-ver.model-version-id",
791                                 "property-value": "6b93d804-cfc8-4be3-92cc-9336d135859a"
792                               },
793                               {
794                                 "property-name": "model-ver.model-name",
795                                 "property-value": "Vloadbalancer..dnsscaling..module-1"
796                               },
797                               {
798                                 "property-name": "model.model-type",
799                                 "property-value": "resource"
800                               },
801                               {
802                                 "property-name": "model.model-invariant-id",
803                                 "property-value": "356a1cff-71f2-4086-9980-a2927ce11c1c"
804                               },
805                               {
806                                 "property-name": "model-ver.model-version",
807                                 "property-value": "1"
808                               }
809                             ]
810                           }
811                         }
812                       ]
813                     }
814                   },
815                   {
816                     "tenant": {
817                       "tenant-id": "41d6d38489bd40b09ea8a6b6b852dcbd",
818                       "tenant-name": "Integration-SB-00",
819                       "resource-version": "1509587770200"
820                     },
821                     "extra-properties": {
822                       "extra-property": []
823                     },
824                     "inventory-response-items": {
825                       "inventory-response-item": [
826                         {
827                           "cloud-region": {
828                             "cloud-owner": "CloudOwner",
829                             "cloud-region-id": "RegionOne",
830                             "cloud-region-version": "v1",
831                             "resource-version": "1509587770092"
832                           },
833                           "extra-properties": {
834                             "extra-property": []
835                           }
836                         }
837                       ]
838                     }
839                   }
840                 ]
841               }
842             }
843           ]
844         }
845
846
847     .. code-block:: bash
848        :caption: NamedQuery-error
849
850         // This is returned if you query the value "error"
851         {
852          "requestError": {
853           "serviceException": {
854            "messageId": "SVC3001",
855            "text": "Resource not found for %1 using id %2 (msg=%3) (ec=%4)",
856            "variables": ["POST Search", "getNamedQueryResponse", "Node Not Found:No Node of type generic-vnf found for properties", "ERR.5.4.6114"]
857           }
858          }
859         }
860
861
862 SO
863 ------
864
865     .. code-block:: bash
866        :caption: SO-response
867
868         {
869          "requestReferences": {
870           "requestId":"3e074e0e-5468-48f2-9226-51039d30fe5d"    // randomly generated UUID
871           },
872           "request": {
873            "requestId":"a8f58372-aab2-45b8-9d36-c7a42e701c29",  // randomly generated UUID
874            "requestStatus": {
875             "percentProgress":0,
876             "requestState":"COMPLETE",
877             "wasRolledBack":false
878            }
879           }
880          }
881         }
882
883
884
885 vFC
886 -------
887
888     .. code-block:: bash
889        :caption: vFC-POST-response
890
891         {
892          "jobId": "1"
893         }
894
895
896     .. code-block:: bash
897        :caption: vFC-GET-response
898
899         {
900          "jobId": jobId, //The jod id that you query
901          "responseDescriptor": {
902           "progress": "40",
903           "status": "finished",
904           "statusDescription": "OMC VMs are decommissioned in VIM",
905           "errorCode": null,
906           "responseId": 101,
907           "responseHistoryList": [{
908            "progress": "40",
909            "status": "proccessing",
910            "statusDescription": "OMC VMs are decommissioned in VIM",
911            "errorCode": null,
912            "responseId": "1"
913           }, {
914            "progress": "41",
915            "status": "proccessing",
916            "statusDescription": "OMC VMs are decommissioned in VIM",
917            "errorCode": null,
918            "responseId": "2"
919           }]
920          }
921         }
922
923
924 GUARD
925 ---------
926
927     .. code-block:: bash
928        :caption: permit-response
929
930         {
931          "decision": "PERMIT",
932          "details": "Decision Permit. OK!"
933         }
934
935
936     .. code-block:: bash
937        :caption: deny-response
938
939         // This is returned if the closed loop name is denyGuard
940         {
941          "decision": "DENY",
942          "details": "Decision Deny. You asked for it"
943         }
944
945
946 End of Document