You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Gaurav Aradhye <ga...@clogeny.com> on 2014/05/15 11:27:28 UTC

Re: Error Codes\ Export Import Config

Hello all,

Re-iterating over what Santhosh has asked before. Is there any document
related to the error codes thrown by APIs and related scenarios?
In recent daily builds, there have been many failures which make it
absolutely necessary to know this information. Typical example is whenever
test cases are checking for exceptions.

with self.assertRaises(Exception):
    *Code expecting exception*

In some scenarios, API throws exception with error code 431, and the above
code works totally fine.
But in some scenarios, API returns a response (Not Exception) with error
code 530. In this case, above code snippet fails.

I discussed with Santhosh, and we think that APIs should return proper
error codes for different scenarios and not throw exceptions. And the test
cases should check for those error codes.

My questions to community are:
1) Is there any document providing information about different error codes
API is returning?
2) What is the difference between these error codes (430 and 531 in this
case, for that reason between all the error codes that APIs may possibly
return)?
3) Do we plan to return proper error codes and not exceptions? (Basically
make this consistent for all errors). This will be very helpful in making
test cases and marvin library more robust.



Regards,
Gaurav


On Wed, Jan 22, 2014 at 2:00 PM, Santhosh Edukulla <
santhosh.edukulla@citrix.com> wrote:

> Team,
>
> Regarding note1 below, if we can have status\fault\return codes returned
> for every API atleast for new additions going ahead as part of the
> response, that should be good i believe.
>
> Even for blocking\nonblocking calls, we can have some status codes
> provided, so that we user can take appropriate action, before proceeding
> with next action.  EX: INVALID_INPUT,SUCCESS etc.
>
> Some times, throwing exception may also could be because of an issue with
> code away from request handling.
>
> Regards,
> Santhosh
> ________________________________________
> From: Santhosh Edukulla
> Sent: Tuesday, October 15, 2013 1:38 PM
> To: dev@cloudstack.apache.org
> Subject: Error Codes\ Export Import Config
>
> Hello Team,
>
> 1/ Is there a document with  information to know all the Error\Fault
> codes, their level ,subject and description info returned by different
> API's under cloudstack? EX: If we call a particular API, its returned code
> at various levels of API call, for failure\Info\success case in general?
>
> 2/ A way to export all the configuration related to a cloudstack
> deployment and re import on other deployment for use?
>
> 3/ Also, Is there  a way to get\export configuration for various entities
> viz., offerings ssvms,cpvms, templates ,guest vms information created under
> given zone, account etc, Export that configuration and use that
> configuration as template to reimport at other place to create a similar
> cloud information? Any API\s exposed to do this task,say export, import and
> create, import and recreate, list available configurations, delete
> configurations etc.?
>
>
> Thanks!
> Santhosh
>

Re: Error Codes\ Export Import Config

Posted by Gaurav Aradhye <ga...@clogeny.com>.
I guess above mail was lost in the flood, so bringing this to your
attention again.
Kindly take your time to read and reply.

Regards,
Gaurav


On Thu, May 15, 2014 at 2:57 PM, Gaurav Aradhye
<ga...@clogeny.com>wrote:

> Hello all,
>
> Re-iterating over what Santhosh has asked before. Is there any document
> related to the error codes thrown by APIs and related scenarios?
> In recent daily builds, there have been many failures which make it
> absolutely necessary to know this information. Typical example is whenever
> test cases are checking for exceptions.
>
> with self.assertRaises(Exception):
>     *Code expecting exception*
>
> In some scenarios, API throws exception with error code 431, and the above
> code works totally fine.
> But in some scenarios, API returns a response (Not Exception) with error
> code 530. In this case, above code snippet fails.
>
> I discussed with Santhosh, and we think that APIs should return proper
> error codes for different scenarios and not throw exceptions. And the test
> cases should check for those error codes.
>
> My questions to community are:
> 1) Is there any document providing information about different error codes
> API is returning?
> 2) What is the difference between these error codes (430 and 531 in this
> case, for that reason between all the error codes that APIs may possibly
> return)?
> 3) Do we plan to return proper error codes and not exceptions? (Basically
> make this consistent for all errors). This will be very helpful in making
> test cases and marvin library more robust.
>
>
>
> Regards,
> Gaurav
>
>
> On Wed, Jan 22, 2014 at 2:00 PM, Santhosh Edukulla <
> santhosh.edukulla@citrix.com> wrote:
>
>> Team,
>>
>> Regarding note1 below, if we can have status\fault\return codes returned
>> for every API atleast for new additions going ahead as part of the
>> response, that should be good i believe.
>>
>> Even for blocking\nonblocking calls, we can have some status codes
>> provided, so that we user can take appropriate action, before proceeding
>> with next action.  EX: INVALID_INPUT,SUCCESS etc.
>>
>> Some times, throwing exception may also could be because of an issue with
>> code away from request handling.
>>
>> Regards,
>> Santhosh
>> ________________________________________
>> From: Santhosh Edukulla
>> Sent: Tuesday, October 15, 2013 1:38 PM
>> To: dev@cloudstack.apache.org
>> Subject: Error Codes\ Export Import Config
>>
>> Hello Team,
>>
>> 1/ Is there a document with  information to know all the Error\Fault
>> codes, their level ,subject and description info returned by different
>> API's under cloudstack? EX: If we call a particular API, its returned code
>> at various levels of API call, for failure\Info\success case in general?
>>
>> 2/ A way to export all the configuration related to a cloudstack
>> deployment and re import on other deployment for use?
>>
>> 3/ Also, Is there  a way to get\export configuration for various entities
>> viz., offerings ssvms,cpvms, templates ,guest vms information created under
>> given zone, account etc, Export that configuration and use that
>> configuration as template to reimport at other place to create a similar
>> cloud information? Any API\s exposed to do this task,say export, import and
>> create, import and recreate, list available configurations, delete
>> configurations etc.?
>>
>>
>> Thanks!
>> Santhosh
>>
>
>