From: Lott, Christopher (cl778h) Date: Wed, 7 Aug 2019 11:57:22 +0000 (-0400) Subject: Upgrade App Manager API spec to v0.1.7 X-Git-Tag: R2~50 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=c3b80bfed44dd12cf869d85bcda9c63583b147fb;hp=a38e36caa736b48ca6aefafc3f03eeb966f6efb5;p=portal%2Fric-dashboard.git Upgrade App Manager API spec to v0.1.7 Change-Id: I74204d5636948430a8ea0dfac8c29cae5dc81f2d Signed-off-by: Lott, Christopher (cl778h) --- diff --git a/app-mgr-client/pom.xml b/app-mgr-client/pom.xml index bac52faa..3c50b618 100644 --- a/app-mgr-client/pom.xml +++ b/app-mgr-client/pom.xml @@ -31,7 +31,7 @@ limitations under the License. org.o-ran-sc.ric.plt.appmgr.client app-mgr-client RIC App Manager client - 0.1.5-SNAPSHOT + 0.1.7-SNAPSHOT UTF-8 UTF-8 @@ -102,7 +102,7 @@ limitations under the License. generate - ${project.basedir}/src/main/resources/xapp_manager_rest_api_v0_1_5.yaml + ${project.basedir}/src/main/resources/api_appmgr_rest_api_0.1.7.yaml java ${project.groupId} diff --git a/app-mgr-client/src/main/resources/xapp_manager_rest_api_v0_1_5.yaml b/app-mgr-client/src/main/resources/api_appmgr_rest_api_0.1.7.yaml similarity index 98% rename from app-mgr-client/src/main/resources/xapp_manager_rest_api_v0_1_5.yaml rename to app-mgr-client/src/main/resources/api_appmgr_rest_api_0.1.7.yaml index eb893594..45569f1d 100644 --- a/app-mgr-client/src/main/resources/xapp_manager_rest_api_v0_1_5.yaml +++ b/app-mgr-client/src/main/resources/api_appmgr_rest_api_0.1.7.yaml @@ -18,7 +18,7 @@ swagger: '2.0' info: description: This is a draft API for RIC appmgr - version: 0.1.5 + version: 0.1.7 title: RIC appmgr license: name: Apache 2.0 @@ -31,7 +31,7 @@ paths: /health/alive : get : summary : Health check of xApp Manager - Liveness probe - tags : + tags : - health operationId : getHealthAlive responses : @@ -40,7 +40,7 @@ paths: /health/ready : get : summary : Readiness check of xApp Manager - Readiness probe - tags : + tags : - health operationId : getHealthReady responses : @@ -114,12 +114,12 @@ paths: $ref: '#/definitions/AllDeployedXapps' '500': description: Internal error - '/xapps/list': + '/xapps/search': get: summary: Returns the list of all deployable xapps tags: - xapp - operationId: listAllXapps + operationId: listAllDeployableXapps produces: - application/json responses: @@ -282,7 +282,7 @@ paths: $ref: '#/definitions/ConfigMetadata' responses: '204': - description: Successful deletion of xApp + description: Successful deletion of xApp config '400': description: Invalid parameters supplied '500': @@ -306,8 +306,8 @@ paths: schema: $ref: '#/definitions/subscriptionRequest' responses: - '200': - description: Subscription successful + '201': + description: Subscription successfully created schema: $ref: '#/definitions/subscriptionResponse' '400': diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 598daf64..a214b213 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -20,8 +20,8 @@ RIC Dashboard Release Notes =========================== -Version 1.2.0, 31 July 2019 ---------------------------- +Version 1.2.0, 7 Aug 2019 +------------------------- * Split URL properties into prefix/suffix parts * Add jacoco plugin to back-end for code coverage * Compile with Java version 11, run with image openjdk:11 @@ -31,6 +31,7 @@ Version 1.2.0, 31 July 2019 * Move mock configuration classes into test area * Add EPSDK-FW user management and Portal security * Update A1 mediator client to spec version 0.10.0 +* Update App manager client to spec version 0.1.7 Version 1.0.5, 5 July 2019 -------------------------- diff --git a/webapp-backend/pom.xml b/webapp-backend/pom.xml index a7ee92ba..e8fb920a 100644 --- a/webapp-backend/pom.xml +++ b/webapp-backend/pom.xml @@ -57,7 +57,7 @@ limitations under the License. org.o-ran-sc.ric.plt.appmgr.client app-mgr-client - 0.1.5-SNAPSHOT + 0.1.7-SNAPSHOT org.o-ran-sc.ric.plt.e2mgr.client diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AppManagerController.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AppManagerController.java index f71c6bd9..365a5803 100644 --- a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AppManagerController.java +++ b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AppManagerController.java @@ -157,7 +157,7 @@ public class AppManagerController { @Secured({ DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD }) public Object getAvailableXapps() { logger.debug("getAvailableXapps"); - AllDeployableXapps appNames = xappApi.listAllXapps(); + AllDeployableXapps appNames = xappApi.listAllDeployableXapps(); // Answer a collection of structure instead of string // because I expect the AppMgr to be extended with // additional properties for each one. diff --git a/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/AppManagerMockConfiguration.java b/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/AppManagerMockConfiguration.java index f4cd4955..32de4df1 100644 --- a/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/AppManagerMockConfiguration.java +++ b/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/AppManagerMockConfiguration.java @@ -62,7 +62,7 @@ public class AppManagerMockConfiguration { @Value("${mock.config.delay:0}") private int delayMs; - private final AllDeployableXapps availXapps; + private final AllDeployableXapps deployableApps; private final AllDeployedXapps deployedXapps; private final AllXappConfig allXappConfigs; private final SubscriptionResponse subRes; @@ -73,13 +73,13 @@ public class AppManagerMockConfiguration { final String configJson = " { \"config\" : \"example\" }"; final String descriptorJson = " { \"descriptor\" : \"example\" }"; allXappConfigs = new AllXappConfig(); - availXapps = new AllDeployableXapps(); + deployableApps = new AllDeployableXapps(); deployedXapps = new AllDeployedXapps(); for (String n : appNames) { ConfigMetadata metadata = new ConfigMetadata().configName("config-" + n).name(n).namespace("namespace"); XAppConfig config = new XAppConfig().config(configJson).descriptor(descriptorJson).metadata(metadata); allXappConfigs.add(config); - availXapps.add(n); + deployableApps.add(n); Xapp xapp = new Xapp().name(n).version("version").status(StatusEnum.UNKNOWN); xapp.addInstancesItem(new XappInstance().name("abcd-1234").ip("127.0.0.1").port(200) .status(XappInstance.StatusEnum.RUNNING)); @@ -144,11 +144,11 @@ public class AppManagerMockConfiguration { }).when(mockApi).deployXapp(any(XAppInfo.class)); doAnswer(inv -> { if (delayMs > 0) { - logger.debug("listAllXapps sleeping {}", delayMs); + logger.debug("listAllDeployableXapps sleeping {}", delayMs); Thread.sleep(delayMs); } - return availXapps; - }).when(mockApi).listAllXapps(); + return deployableApps; + }).when(mockApi).listAllDeployableXapps(); doAnswer(inv -> { if (delayMs > 0) { logger.debug("getAllXapps sleeping {}", delayMs);