1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

feature #873: Add mapping for errno to HTTP codes

This commit is contained in:
Daniel Molina 2011-10-14 15:51:52 +02:00
parent bb6ee69f29
commit 20a0a78184

View File

@ -22,6 +22,18 @@ require 'CloudAuth'
# API (OCA). Any cloud implementation should derive from this class
##############################################################################
class CloudServer
##########################################################################
# Class Constants. Define the OpenNebula Error and HTTP codes mapping
##########################################################################
HTTP_ERROR_CODE = {
OpenNebula::Error::EAUTHENTICATION => 401,
OpenNebula::Error::EAUTHORIZATION => 403,
OpenNebula::Error::ENO_EXISTS => 404,
OpenNebula::Error::EACTION => 500,
OpenNebula::Error::EXML_RPC_API => 500,
OpenNebula::Error::EINTERNAL => 500,
OpenNebula::Error::ENOTDEFINED => 500
}
##########################################################################
# Public attributes