+ @ApiOperation(value = "Returns a list of deployable xapps.", response = DashboardDeployableXapps.class)
+ @RequestMapping(value = "/xapps/list", method = RequestMethod.GET)
+ public Object getAvailableXapps() {
+ logger.debug("getAvailableXapps");
+ try {
+ AllDeployableXapps appNames = xappApi.listAllXapps();
+ // Answer a collection of structure instead of string
+ DashboardDeployableXapps apps = new DashboardDeployableXapps();
+ for (String n : appNames)
+ apps.add(new AppTransport(n));
+ return apps;
+ } catch (HttpStatusCodeException ex) {
+ logger.error("getAvailableXapps failed: {}", ex.toString());
+ return ResponseEntity.status(HttpServletResponse.SC_BAD_GATEWAY).body(ex.getResponseBodyAsString());
+ }
+ }
+
+ @ApiOperation(value = "Returns the status of all deployed xapps.", response = AllDeployedXapps.class)