Update AC xApp interface in front end TS 85/185/1
authorLott, Christopher (cl778h) <cl778h@att.com>
Tue, 21 May 2019 13:59:22 +0000 (09:59 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Tue, 21 May 2019 13:59:22 +0000 (09:59 -0400)
Change-Id: I2a9e8eefa636b7af6d8345cacee8204ac1c39c57
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
docs/release-notes.rst
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AcXappController.java
webapp-frontend/src/app/interfaces/ac-xapp.types.ts

index 86c1791..5100a53 100644 (file)
 RIC Dashboard Release Notes
 ===========================
 
-Version 1.0.3, 20 May 2019
+Version 1.0.3, 21 May 2019
 --------------------------
-* Add AC xapp controller
+* Add AC xApp controller to backend
+* Add AC xApp interface to frontend
 * Add RAN type radio selector to connection setup
 * Update ANR xApp client to spec version 0.0.5
 * Update E2 manager client to spec version 20190515
index 87a783c..c1aac8f 100644 (file)
@@ -52,7 +52,8 @@ public class AcXappController {
 
        private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-       private static final String POLICY_CONTROL_ADMISSION_TIME = "control_admission_time";
+       // A "control" is an element in the XApp descriptor
+       private static final String AC_CONTROL_NAME = "admission_control_policy";
 
        // Populated by the autowired constructor
        private final A1MediatorApi a1MediatorApi;
@@ -71,28 +72,26 @@ public class AcXappController {
        }
 
        /*
-        * GET policy is not supported at present by A1 Mediator. Keeping this hidden
-        * until that changes.
-        *
-        * @ApiOperation(value =
-        * "Gets the named policy for AC xApp via the A1 Mediator")
-        * 
-        * @RequestMapping(value = "policy/{" + POLICY_NAME + "}", method =
-        * RequestMethod.GET) public Object getPolicy(@PathVariable(POLICY_NAME) String
-        * policyName) { logger.debug("getPolicy: policy {}", policyName);
-        * a1MediatorApi.a1ControllerGetHandler(policyName); return null; }
+        * GET policy is not supported at present by A1 Mediator! Always returns 501.
         */
+       @ApiOperation(value = "Gets the admission control policy for AC xApp via the A1 Mediator")
+       @RequestMapping(value = "admctrl", method = RequestMethod.GET)
+       public Object getAdmissionControlPolicy() {
+               logger.debug("getAdmissionControlPolicy");
+               a1MediatorApi.a1ControllerGetHandler(AC_CONTROL_NAME);
+               return null;
+       }
 
        /*
         * This controller is deliberately kept ignorant of the
-        * ACAdmissionIntervalControl data structure.
+        * ACAdmissionIntervalControl Typescript interface.
         */
-       @ApiOperation(value = "Sets the control admission time for AC xApp via the A1 Mediator")
-       @RequestMapping(value = "catime", method = RequestMethod.PUT)
-       public void setControlAdmissionTime(@ApiParam(value = "Control admission time") @RequestBody JsonNode caTime, //
+       @ApiOperation(value = "Sets the admission control policy for AC xApp via the A1 Mediator")
+       @RequestMapping(value = "admctrl", method = RequestMethod.PUT)
+       public void setAdmissionControlPolicy(@ApiParam(value = "Admission control policy") @RequestBody JsonNode acPolicy, //
                        HttpServletResponse response) {
-               logger.debug("setControlAdmissionTime {}", caTime);
-               a1MediatorApi.a1ControllerPutHandler(POLICY_CONTROL_ADMISSION_TIME, caTime);
+               logger.debug("setAdmissionControlPolicy {}", acPolicy);
+               a1MediatorApi.a1ControllerPutHandler(AC_CONTROL_NAME, acPolicy);
                response.setStatus(a1MediatorApi.getApiClient().getStatusCode().value());
        }
 
index 4aa833b..68c7f11 100644 (file)
 // Models of data used by the AC xApp
 
 export interface ACAdmissionIntervalControl {
-  dc_admission_start_time: string;
-  dc_admission_end_time: string;
+  enforce: boolean;
+  window_length: number;
+  blocking_rate: number;
+  trigger_threshold: number;
 }
 
 export interface ACAdmissionIntervalControlAck {