Search in sources :

Example 1 with CustomCertificateResponse

use of org.apache.cloudstack.api.response.CustomCertificateResponse in project cloudstack by apache.

the class UploadCustomCertificateCmd method execute.

@Override
public void execute() {
    String result = _mgr.uploadCertificate(this);
    if (result != null) {
        CustomCertificateResponse response = new CustomCertificateResponse();
        response.setResponseName(getCommandName());
        response.setResultMessage(result);
        response.setObjectName("customcertificate");
        this.setResponseObject(response);
    } else {
        throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to upload custom certificate");
    }
}
Also used : CustomCertificateResponse(org.apache.cloudstack.api.response.CustomCertificateResponse) ServerApiException(org.apache.cloudstack.api.ServerApiException)

Aggregations

ServerApiException (org.apache.cloudstack.api.ServerApiException)1 CustomCertificateResponse (org.apache.cloudstack.api.response.CustomCertificateResponse)1