import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.ApiOperation;
public SuccessTransport getClientVersion() {
return new SuccessTransport(200, DashboardApplication.getImplementationVersion(HealthApi.class));
}
@ApiOperation(value = "Health check of xApp Manager - Liveness probe.")
public SuccessTransport getClientVersion() {
return new SuccessTransport(200, DashboardApplication.getImplementationVersion(HealthApi.class));
}
@ApiOperation(value = "Health check of xApp Manager - Liveness probe.")
public void getHealth(HttpServletResponse response) {
logger.debug("getHealthAlive");
healthApi.getHealthAlive();
public void getHealth(HttpServletResponse response) {
logger.debug("getHealthAlive");
healthApi.getHealthAlive();
public void getHealthReady(HttpServletResponse response) {
logger.debug("getHealthReady");
healthApi.getHealthReady();
public void getHealthReady(HttpServletResponse response) {
logger.debug("getHealthReady");
healthApi.getHealthReady();
public AllXappConfig getAllXappConfig() {
logger.debug("getAllXappConfig");
return xappApi.getAllXappConfig();
}
@ApiOperation(value = "Create xApp config.", response = XAppConfig.class)
public AllXappConfig getAllXappConfig() {
logger.debug("getAllXappConfig");
return xappApi.getAllXappConfig();
}
@ApiOperation(value = "Create xApp config.", response = XAppConfig.class)
public XAppConfig createXappConfig(@RequestBody XAppConfig xAppConfig) {
logger.debug("createXappConfig {}", xAppConfig);
return xappApi.createXappConfig(xAppConfig);
}
@ApiOperation(value = "Modify xApp config.", response = XAppConfig.class)
public XAppConfig createXappConfig(@RequestBody XAppConfig xAppConfig) {
logger.debug("createXappConfig {}", xAppConfig);
return xappApi.createXappConfig(xAppConfig);
}
@ApiOperation(value = "Modify xApp config.", response = XAppConfig.class)
public XAppConfig modifyXappConfig(@RequestBody XAppConfig xAppConfig) {
logger.debug("modifyXappConfig {}", xAppConfig);
return xappApi.modifyXappConfig(xAppConfig);
}
@ApiOperation(value = "Delete xApp configuration.")
public XAppConfig modifyXappConfig(@RequestBody XAppConfig xAppConfig) {
logger.debug("modifyXappConfig {}", xAppConfig);
return xappApi.modifyXappConfig(xAppConfig);
}
@ApiOperation(value = "Delete xApp configuration.")
public void deleteXappConfig(@RequestBody ConfigMetadata configMetadata, HttpServletResponse response) {
logger.debug("deleteXappConfig {}", configMetadata);
xappApi.deleteXappConfig(configMetadata);
public void deleteXappConfig(@RequestBody ConfigMetadata configMetadata, HttpServletResponse response) {
logger.debug("deleteXappConfig {}", configMetadata);
xappApi.deleteXappConfig(configMetadata);
// Answer a collection of structure instead of string
// because I expect the AppMgr to be extended with
// additional properties for each one.
// Answer a collection of structure instead of string
// because I expect the AppMgr to be extended with
// additional properties for each one.
public AllDeployedXapps getDeployedXapps() {
logger.debug("getDeployedXapps");
return xappApi.getAllXapps();
}
@ApiOperation(value = "Returns the status of a given xapp.", response = Xapp.class)
public AllDeployedXapps getDeployedXapps() {
logger.debug("getDeployedXapps");
return xappApi.getAllXapps();
}
@ApiOperation(value = "Returns the status of a given xapp.", response = Xapp.class)
- @RequestMapping(value = XAPPS_METHOD + "/{" + PP_XAPP_NAME + "}", method = RequestMethod.GET)
+ @GetMapping(XAPPS_METHOD + "/{" + PP_XAPP_NAME + "}")
+ @Secured({ DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD })
public Xapp getXapp(@PathVariable("xAppName") String xAppName) {
logger.debug("getXapp {}", xAppName);
return xappApi.getXappByName(xAppName);
}
@ApiOperation(value = "Deploy a xapp.", response = Xapp.class)
public Xapp getXapp(@PathVariable("xAppName") String xAppName) {
logger.debug("getXapp {}", xAppName);
return xappApi.getXappByName(xAppName);
}
@ApiOperation(value = "Deploy a xapp.", response = Xapp.class)
public Xapp deployXapp(@RequestBody XAppInfo xAppInfo) {
logger.debug("deployXapp {}", xAppInfo);
return xappApi.deployXapp(xAppInfo);
}
@ApiOperation(value = "Undeploy an existing xapp.")
public Xapp deployXapp(@RequestBody XAppInfo xAppInfo) {
logger.debug("deployXapp {}", xAppInfo);
return xappApi.deployXapp(xAppInfo);
}
@ApiOperation(value = "Undeploy an existing xapp.")
public void undeployXapp(@PathVariable("xAppName") String xAppName, HttpServletResponse response) {
logger.debug("undeployXapp {}", xAppName);
xappApi.undeployXapp(xAppName);
public void undeployXapp(@PathVariable("xAppName") String xAppName, HttpServletResponse response) {
logger.debug("undeployXapp {}", xAppName);
xappApi.undeployXapp(xAppName);