Update CBS-Client to read policy configuration from a file exposed by policy-sidecar...
[dcaegen2/services/sdk.git] / rest-services / cbs-client / src / test / resources / policies.json
1 {
2    "policies":{
3       "items":[
4          {
5             "type":"onap.policies.monitoring.tcagen2",
6             "type_version":"1.0.0",
7             "name":"onap.vfirewall.tca",
8             "version":"1.0.0",
9             "metadata":{
10                "policy-id":"onap.vfirewall.tca",
11                "policy-version":"1.0.0"
12             },
13             "policyName":"onap.vfirewall.tca.1-0-0.xml",
14             "policyVersion":"1.0.0",
15             "config":{
16                "tca.policy":{
17                   "domain":"measurementsForVfScaling",
18                   "metricsPerEventName":[
19                      {
20                         "eventName":"vFirewallBroadcastPackets",
21                         "controlLoopSchemaType":"VM",
22                         "policyScope":"DCAE",
23                         "policyName":"DCAE.Config_tca-hi-lo",
24                         "policyVersion":"v0.0.1",
25                         "thresholds":[
26                            {
27                               "closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
28                               "version":"1.0.2",
29                               "fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
30                               "thresholdValue":300,
31                               "direction":"LESS_OR_EQUAL",
32                               "severity":"MAJOR",
33                               "closedLoopEventStatus":"ONSET"
34                            },
35                            {
36                               "closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
37                               "version":"1.0.2",
38                               "fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
39                               "thresholdValue":700,
40                               "direction":"GREATER_OR_EQUAL",
41                               "severity":"CRITICAL",
42                               "closedLoopEventStatus":"ONSET"
43                            }
44                         ]
45                      }
46                   ]
47                }
48             }
49          }
50       ]
51    },
52    "event":{
53       "action":"gathered",
54       "timestamp":"2021-04-19T23:37:19.709Z",
55       "update_id":"379fb01a-cfe2-4c06-8f6b-d51f3c8504af",
56       "policies_count":1
57    }
58 }