451d1f2221036e63d5c0b88893fb5939e86284b0
[ric-app/admin.git] / schemas / adm-ctrl-xapp-policy-schema.json
1 {
2   "name":"admission_control_xapp",
3   "owner":"att:app_paas",
4   "description":"Admission Control logic for dual connection",
5   "controls":[
6     {
7       "name":"admission_control_policy",
8       "description":"various parameters to control admission of dual connection",
9       "message_receives_rmr_type":"DC_ADMISSION_INTERVAL_CONTROL",
10       "message_receives_payload_schema":{
11         "$schema":"http://json-schema.org/draft-07/schema#",
12         "type":"object",
13         "properties":{
14           "enforce":{
15             "type":"boolean",
16             "default":true
17           },
18           "window_length":{
19             "type":"integer",
20             "default":1,
21             "minimum":1,
22             "maximum":60,
23             "description":"Sliding window length (in minutes)"
24           },
25           "blocking_rate":{
26              "type":"number",
27              "default":10,
28              "minimum":1,
29              "maximum":100,
30              "description":"% Connections to block"
31           },
32           "trigger_threshold":{
33              "type":"integer",
34              "default":10,
35              "minimum":1,
36              "description":"Minimum number of events in window to trigger blocking"
37           }
38         },
39
40         "required":["enforce", "blocking_rate", "trigger_threshold", "window_length"],
41         "additionalProperties":false
42       },
43       "message_sends_rmr_type":"DC_ADMISSION_INTERVAL_CONTROL_ACK",
44       "message_sends_payload_schema":{
45         "$schema":"http://json-schema.org/draft-07/schema#",
46         "type":"object",
47         "properties":{
48           "status":{
49             "type":"string",
50             "enum":[
51               "SUCCESS",
52               "FAIL"
53             ]
54           },
55           "message":{
56             "type":"string"
57           }
58         },
59         "required":["status"],
60         "additionalProperties":false
61       }
62     }
63   ],
64   "configuration":[
65     {
66       "name":"rnib-endpoint",
67       "type":"string",
68       "description":"rnib namespace",
69       "default_value":"127.0.0.1:6379"
70     },
71     {
72       "name":"spid",
73       "type":"NUMBER",
74       "description":"spid values for admitting dual connection",
75       "default_value":"34,35"
76     }
77   ],
78   "metrics":[
79     {
80       "name":"num_accepted_dc_reqs",
81       "type":"COUNTER",
82       "unit":"",
83       "description":"Number of accepted dc requests since the start of the xapp"
84     },
85     {
86       "name":"num_rejected_dc_reqs",
87       "type":"COUNTER",
88       "unit":"",
89       "description":"Number of rejected dc requests since the start of the xapp"
90     },
91     {
92       "name":"num_dc_reqs_per_min",
93       "type":"GUAGE",
94       "description":"Number of dc requests received by this xAPP per min",
95       "unit":"Number per min"
96     }
97   ]
98 }