use of org.onap.so.adapters.appc.orchestrator.client.ApplicationControllerOrchestratorException in project so by onap.
the class ApplicationControllerClient method vnfCommand.
public Status vnfCommand(Action action, String requestId, String vnfId, Optional<String> vserverId, Optional<String> request, String controllerType, ApplicationControllerCallback listener, String requestorId) throws ApplicationControllerOrchestratorException {
this.setControllerType(controllerType);
Status status;
ActionIdentifiers actionIdentifiers = new ActionIdentifiers();
actionIdentifiers.setVnfId(vnfId);
if (vserverId.isPresent()) {
actionIdentifiers.setVserverId(vserverId.get());
}
Payload payload = null;
if (request.isPresent()) {
payload = new Payload(request.get());
}
status = runCommand(action, actionIdentifiers, payload, requestId, listener, requestorId);
if (appCSupport.getCategoryOf(status).equals(StatusCategory.ERROR)) {
throw new ApplicationControllerOrchestratorException(status.getMessage(), status.getCode());
} else {
return status;
}
}
Aggregations