[one-dev] [Question] XML-RPC return code on one.vm.attachnic failure

Carlos Martín Sánchez cmartin at opennebula.org
Tue Jul 15 06:41:14 PDT 2014


Hi Boris,

On Thu, Jul 10, 2014 at 7:34 PM, Boris Parak <256254 at mail.muni.cz> wrote:

> Hi Carlos,
>
> On Thu, Jul 10, 2014 at 6:27 PM, Carlos Martín Sánchez
> <cmartin at opennebula.org> wrote:
> > Hi Boris,
> >
> > The return code in that case is ACTION, see [1] for more details.
>
> thanks! Does ACTION have a special meaning? In other words, if you had
> to translate it to an HTTP status code which one would you pick? Is it
> used consistently for a certain type of errors? The same goes for
> XML_RPC_API, which HTTP code would you pick? Both have 'FIXME'
> description in the docs :-)
>


ACTION was supposed to be a response to a bad request (e.g. bad state to
perform action), and INTERNAL for other errors, like the VM you are trying
to shutdown could not be loaded from the DB.
XML_RPC_API was for bad parameters (e.g. it should be a flag -1 or -2, and
you sent -7).

But to be honest, I think the ACTION, INTERNAL and XML_RPC_API values are
not clearly defined in the code, and there is a bit of overlap in their
use. I would simplify things and consider them the same error. I guess
that's why they are still documented with FIXME....

Regards.
--
Carlos Martín, MSc
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org <http://www.opennebula.org/> | cmartin at opennebula.org |
@OpenNebula <http://twitter.com/opennebula> <cmartin at opennebula.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/dev-opennebula.org/attachments/20140715/cc238ed5/attachment.htm>


More information about the Dev mailing list