You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users-cn@cloudstack.apache.org by "javaart@126.com" <ja...@126.com> on 2014/11/07 03:57:17 UTC

cloudstack的返回码

大家好,
     cloudstack的接口调用后,errorcode及的含义,有谁知道吗?请不吝赐教,谢谢!

如:
返回结果:{ "queryasyncjobresultresponse" : {"accountid":"9abf7fa4-d35f-11e3-8041-e03f49a17d5d","userid":"9acaf744-d35f-11e3-8041-e03f49a17d5d","cmd":"org.apache.cloudstack.api.command.user.vm.DeployVMCmd","jobstatus":2,"jobprocstatus":0,"jobresultcode":530,"jobresulttype":"object","jobresult":{"errorcode":533,"errortext":"Unable to create a deployment for VM[User|YZZQ-L0005162]"},"created":"2014-11-07T10:40:10+0800","jobid":"41b03abf-b812-4896-9d75-c57a91fdabd1"} }



javaart@126.com

RE: cloudstack的返回码

Posted by "YUAN, GUI -HBIS" <yu...@hbis.com.cn>.
很有可能是这儿的

  F:\git\cloudstack\api\src\org\apache\cloudstack\api\ApiErrorCode.java(33):    INSUFFICIENT_CAPACITY_ERROR(533),

///////////////////////////////////////////
package org.apache.cloudstack.api;

/**
 * Enum class for various API error code used in CloudStack
 *
 */
public enum ApiErrorCode {

    MALFORMED_PARAMETER_ERROR(430),
    PARAM_ERROR(431),
    UNSUPPORTED_ACTION_ERROR(432),
    API_LIMIT_EXCEED(429),

    INTERNAL_ERROR(530),
    ACCOUNT_ERROR(531),
    ACCOUNT_RESOURCE_LIMIT_ERROR(532),
    INSUFFICIENT_CAPACITY_ERROR(533),
    RESOURCE_UNAVAILABLE_ERROR(534),
    RESOURCE_ALLOCATION_ERROR(535),
    RESOURCE_IN_USE_ERROR(536),
    NETWORK_RULE_CONFLICT_ERROR(537);

    private int httpCode;

    private ApiErrorCode(int httpStatusCode){
        httpCode = httpStatusCode;
    }

    public int getHttpCode() {
        return httpCode;
    }

    public void setHttpCode(int httpCode) {
        this.httpCode = httpCode;
    }

    public String toString(){
        return String.valueOf(this.httpCode);
    }


}

>-----Original Message-----
>From: javaart@126.com [mailto:javaart@126.com]
>Sent: Friday, November 07, 2014 11:57 AM
>To: users-cn
>Subject: cloudstack的返回码
>
>大家好,
>     cloudstack的接口调用后,errorcode及的含义,有谁知道吗?请不吝赐
>教,谢谢!
>
>如:
>返回结果:{ "queryasyncjobresultresponse" :
>{"accountid":"9abf7fa4-d35f-11e3-8041-e03f49a17d5d","userid":"9acaf74
>4-d35f-11e3-8041-e03f49a17d5d","cmd":"org.apache.cloudstack.api.comma
>nd.user.vm.DeployVMCmd","jobstatus":2,"jobprocstatus":0,"jobresultcod
>e":530,"jobresulttype":"object","jobresult":{"errorcode":533,"errorte
>xt":"Unable to create a deployment for
>VM[User|YZZQ-L0005162]"},"created":"2014-11-07T10:40:10+0800","jobid"
>:"41b03abf-b812-4896-9d75-c57a91fdabd1"} }
>
>
>
>javaart@126.com

Disclaimer:
The contents of this e-mail, and its attachments, if any, are confidential and may be protected
by law against any unauthorized use.  If you have received this e-mail by mistake or have
reason to believe that you are not the intended recipient, please notify the sender by reply
e-mail as soon as possible and delete it from your computer system immediately thereafter.
If you are not the intended recipient, you must not copy this e-mail or attachment or disclose
the contents to any other person.  While we have made every effort to keep our network virus free,
we take no responsibility for any computer virus which might be transferred by way of this e-mail.