Align unit and int tests w.r.t. AC xapp 38/1738/1
authorTommy Carpenter <tc677g@att.com>
Fri, 22 Nov 2019 14:40:58 +0000 (09:40 -0500)
committerTommy Carpenter <tc677g@att.com>
Fri, 22 Nov 2019 14:43:14 +0000 (09:43 -0500)
Change-Id: Ia31b9db61410cbf1b3391fd9752d7939dba1a3a5
Signed-off-by: Tommy Carpenter <tc677g@att.com>
docs/release-notes.rst
integration_tests/test_a1.tavern.yaml
tests/conftest.py

index a886aaa..485f5a8 100644 (file)
@@ -37,6 +37,8 @@ and this project adheres to `Semantic Versioning <http://semver.org/>`__.
     * Uses the standard RIC logging library
     * Switch the backend routing scheme to using subscription id with constant message types, per request.
     * Given the above, policy type ids can be any valid 32bit greater than 0
+    * Decouple the API between northbound and A1 from A1 with xapps. This is now two seperate OpenAPI files
+    * Update example for AC Xapp
 
 [1.0.4]
 -------
index 44eeb3d..4c1dea6 100644 (file)
@@ -76,7 +76,6 @@ stages:
             - window_length
             - trigger_threshold
             - blocking_rate
-          additionalProperties: false
     response:
       status_code: 201
 
index cfbafca..c5b3a57 100644 (file)
@@ -45,37 +45,34 @@ def adm_type_good():
     represents a good put for adm control type
     """
     return {
-        "name": "Admission Control",
-        "description": "various parameters to control admission of dual connection",
+        "name": "Policy for Rate Control",
         "policy_type_id": 6660666,
+        "description": "This policy is associated with rate control. An instance of the policy specifies the traffic class to which it applies and parameters to use to control how much it must be throttled in case of an overload. Each instance of the policy that is created MUST be associated with a unique class ID (identifyed by the key 'class', which is used by the xAPP to differentiate traffic. If an agent tries to create a policy with the SAME class id, it will be rejected by the xAPP, even if it has a unique policy instance id. ",
         "create_schema": {
             "$schema": "http://json-schema.org/draft-07/schema#",
             "type": "object",
+            "additionalProperties": False,
             "properties": {
-                "enforce": {"type": "boolean", "default": True},
-                "window_length": {
+                "class": {
                     "type": "integer",
-                    "default": 1,
                     "minimum": 1,
-                    "maximum": 60,
-                    "description": "Sliding window length (in minutes)",
+                    "maximum": 256,
+                    "description": "integer id representing class to which we are applying policy",
                 },
-                "blocking_rate": {
-                    "type": "number",
-                    "default": 10,
-                    "minimum": 1,
-                    "maximum": 100,
-                    "description": "% Connections to block",
+                "enforce": {
+                    "type": "boolean",
+                    "description": "Whether to enable or disable enforcement of policy on this class",
                 },
-                "trigger_threshold": {
+                "window_length": {
                     "type": "integer",
-                    "default": 10,
-                    "minimum": 1,
-                    "description": "Minimum number of events in window to trigger blocking",
+                    "minimum": 15,
+                    "maximum": 300,
+                    "description": "Sliding window length in seconds",
                 },
+                "trigger_threshold": {"type": "integer", "minimum": 1},
+                "blocking_rate": {"type": "number", "minimum": 0, "maximum": 100},
             },
-            "required": ["enforce", "blocking_rate", "trigger_threshold", "window_length"],
-            "additionalProperties": False,
+            "required": ["class", "enforce", "blocking_rate", "trigger_threshold", "window_length"],
         },
     }
 
@@ -85,4 +82,4 @@ def adm_instance_good():
     """
     represents a good put for adm control instance
     """
-    return {"enforce": True, "window_length": 10, "blocking_rate": 20, "trigger_threshold": 10}
+    return {"class": 12, "enforce": True, "window_length": 20, "blocking_rate": 20, "trigger_threshold": 10}