Updated documentation for mock a1 tool
[ric-app/admin.git] / schemas / rate-control-policy.json
1 {
2   "name": "Policy for Rate Control",
3     "policy_type_id":21000,
4     "description":"This policy is associated with rate control. Entities which support this policy type must accept the following policy inputs (see the payload for more specifics) : class, which represents the class of traffic for which the policy is being enforced",
5     
6     "create_schema":{
7         "$schema":"http://json-schema.org/draft-07/schema#",
8         "type":"object",
9         "additionalProperties":false,
10         "required":["class"],
11         "properties":{
12             "class":{
13                 "type":"integer",
14                 "minimum":1,
15                 "maximum":256,
16                 "description":"integer id representing class to which we are applying policy"
17             },
18             "enforce":{
19                 "type":"boolean",
20                 "description": "Whether to enable or disable enforcement of policy on this class"
21             },
22             "window_length":{
23                 "type":"integer",
24                 "minimum":15,
25                 "maximum":300,
26                 "description":"Sliding window length in seconds"
27             },
28             "trigger_threshold":{
29                 "type":"integer",
30                 "minimum":1
31             },
32             "blocking_rate":{
33                 "type":"number",
34                 "minimum":0,
35                 "maximum":100
36             }
37             
38         }
39     },
40     
41     "downstream_schema":{
42         "type":"object",
43         "additionalProperties":false,
44         "required":["policy_type_id", "policy_instance_id", "operation"],
45         "properties":{
46             "policy_type_id":{
47                 "type":"integer",
48                 "enum":[21000]
49             },
50             "policy_instance_id":{
51                 "type":"string"
52             },
53             "operation":{
54                 "type":"string", 
55                 "enum":["CREATE", "UPDATE", "DELETE"]
56             },
57             "payload":{
58                 "$schema":"http://json-schema.org/draft-07/schema#",
59                 "type":"object",
60                 "additionalProperties":false,
61                 "required":["class"],
62                 "properties":{
63                     "class":{
64                         "type":"integer",
65                         "minimum":1,
66                         "maximum":256,
67                         "description":"integer id representing class to which we are applying policy"
68                     },
69                     "enforce":{
70                         "type":"boolean",
71                         "description": "Whether to enable or disable enforcement of policy on this class"
72                     },
73                     "window_length":{
74                         "type":"integer",
75                         "minimum":15,
76                         "maximum":300,
77                         "description":"Sliding window length in seconds"
78                     },
79                     "trigger_threshold":{
80                         "type":"integer",
81                         "minimum":1
82                     },
83                     "blocking_rate":{
84                         "type":"number",
85                         "minimum":0,
86                         "maximum":100
87                     }
88                     
89                     
90                 }
91             }
92         }
93     },
94     "notify_schema":{
95         "type":"object",
96         "additionalProperties":false,
97         "required":["policy_type_id", "policy_instance_id", "handler_id", "status"],
98         "properties":{
99             "policy_type_id":{
100                 "type":"integer",
101                 "enum":[21000]
102             },
103             "policy_instance_id":{
104                 "type":"string"
105             },
106             "handler_id":{
107                 "type":"string"
108             },
109             "status":{
110                 "type":"string", 
111                 "enum":["OK", "ERROR", "DELETED"]
112             }
113         }
114     }
115 }
116                 
117