Package ganeti :: Package rapi :: Module rlib2 :: Class _R_Tags
[hide private]
[frames] | no frames]

Class _R_Tags

source code


Quasiclass for tagging resources.

Manages tags. When inheriting this class you must define the TAG_LEVEL for it.

Nested Classes [hide private]
  GET_OPCODE
Set this to a class derived from opcodes.OpCode to automatically generate a GET handler submitting the opcode
  PUT_OPCODE
Set this to a class derived from opcodes.OpCode to automatically generate a PUT handler submitting the opcode
  DELETE_OPCODE
Set this to a class derived from opcodes.OpCode to automatically generate a DELETE handler submitting the opcode

Inherited from baserlib.OpcodeResource: __metaclass__

Instance Methods [hide private]
 
__init__(self, items, queryargs, req, **kwargs)
A tag resource constructor.
source code
 
GET(self)
Returns a list of tags.
source code
 
GetPutOpInput(self)
Define this to override the default method for getting opcode parameters (see baserlib.OpcodeResource._GetDefaultData)
source code
 
GetDeleteOpInput(self)
Define this to override the default method for getting opcode parameters (see baserlib.OpcodeResource._GetDefaultData)
source code

Inherited from baserlib.ResourceBase: GetClient, SubmitJob, dryRun, getBodyParameter, useBulk, useForce, useLocking

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  TAG_LEVEL = None

Inherited from baserlib.OpcodeResource: DELETE_RENAME, GET_RENAME, POST_OPCODE, POST_RENAME, PUT_RENAME

Inherited from baserlib.ResourceBase: DELETE_ACCESS, GET_ACCESS, POST_ACCESS, PUT_ACCESS, request_body

Instance Variables [hide private]

Inherited from baserlib.OpcodeResource: GetGetOpInput, GetPostOpInput

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, items, queryargs, req, **kwargs)
(Constructor)

source code 

A tag resource constructor.

We have to override the default to sort out cluster naming case.

Parameters:
  • items - a list with variables encoded in the URL
  • queryargs - a dictionary with additional options from URL
  • req - Request context
  • _client_cls - luxi client class (unittests only)
Overrides: object.__init__

GET(self)

source code 

Returns a list of tags.

Example: ["tag1", "tag2", "tag3"]

GetPutOpInput(self)

source code 
Define this to override the default method for getting opcode parameters (see baserlib.OpcodeResource._GetDefaultData)
Overrides: GetPutOpInput

GetDeleteOpInput(self)

source code 
Define this to override the default method for getting opcode parameters (see baserlib.OpcodeResource._GetDefaultData)
Overrides: GetDeleteOpInput