Update ANR API to version 0.0.5
[portal/ric-dashboard.git] / webapp-backend / src / main / java / org / oransc / ric / portal / dashboard / controller / E2ManagerController.java
index 26b404a..8b1fe72 100644 (file)
@@ -27,10 +27,12 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.oransc.ric.e2mgr.client.api.E2ManagerApi;
 import org.oransc.ric.e2mgr.client.model.SetupRequest;
+import org.oransc.ric.portal.dashboard.DashboardApplication;
 import org.oransc.ric.portal.dashboard.DashboardConstants;
 import org.oransc.ric.portal.dashboard.model.E2SetupRequestType;
 import org.oransc.ric.portal.dashboard.model.E2SetupResponse;
 import org.oransc.ric.portal.dashboard.model.IDashboardResponse;
+import org.oransc.ric.portal.dashboard.model.SuccessTransport;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -82,6 +84,13 @@ public class E2ManagerController {
                        throw new IllegalArgumentException("Empty not permitted");
        }
 
+       @ApiOperation(value = "Gets the E2 manager client library MANIFEST.MF property Implementation-Version.", response = SuccessTransport.class)
+       @RequestMapping(value = DashboardConstants.VERSION_PATH, method = RequestMethod.GET)
+       public SuccessTransport getVersion() {
+               logger.debug("getVersion enter");
+               return new SuccessTransport(200, DashboardApplication.getImplementationVersion(E2ManagerApi.class));
+       }
+
        @ApiOperation(value = "Gets the health from the E2 manager, expressed as the response code.")
        @RequestMapping(value = "/health", method = RequestMethod.GET)
        public void getHealth(HttpServletResponse response) {