Skip to end of metadata
Go to start of metadata

(Capitalized terminology in this document as defined by RFC 2119)

N. Bastin
Stanford University
November 2011

A proposal for namespacing return codes in the GENI AM API

I generally find the method "code" in the Change Set B draft changes to be both constraining and wasteful (most of the code space is by design excluded from specific AMs). I would like to propose that we allow for namespacing an AM code value such that AMs can merely reserve a namespace, and not have to worry about any kind of registry to avoid number conflicts, and separating that from the geni-specific codes.

geni_code : 500
am_type : "foam"
am_code : 65

Rationale

We don't lose any magic here - when an AM adds a new code clients would still have to be updated to handle it if they wanted to do something special, but it makes it easier for AM developers to allocate error codes and it supports the ability to have different AMs with different error codes for the same resources (say, someone combines the openflow and pgeni AMs for a given site for local stitching, and then has some new specific error codes they would like to generate, or someone writes a new openflow AM on top of some new network virtualization software and then wants to use "new" openflow error codes, rather than the ones currently used for FOAM).

The AM Type

  • Type names are case insensitive
  • Types are maintained at a registry linked off of the GENI AM API wiki page at geni.net

Codes

  • Codes are XMLRPC integers (32-bit signed values)

The GENI Code

The geni_code SHALL contain errors which are common across multiple (although not necessarily all) aggregates.

GENI Codes

0

SUCCESS

"Success"

1

BADARGS

"Bad Arguments"

2

ERROR

"Error"

3

FORBIDDEN

"Operation Forbidden"

4

BADVERSION

"Bad Version"

5

SERVERERROR

"Server Error"

6

TOOBIG

"Too Big"

7

REFUSED

"Operation Refused"

8

TIMEDOUT

"Operation Timed Out"

9

DBERROR

"Database Error"

10

RPCERROR

"RPC Error"

11

UNAVAILABLE

"Unavailable"

12

SEARCHFAILED

"Search Failed"

13

UNSUPPORTED

"Operation Unsupported"

14

BUSY

"Busy"

15

EXPIRED

"Expired"

16

INPROGRESS

"In Progress"

17

ALREADYEXISTS

"Already Exists"

Success

Success MUST be indicated by the use of 0 in the geni_code attribute.

  • No labels