Package ganeti :: Module objects :: Class TaggableObject
[hide private]
[frames] | no frames]

Class TaggableObject

source code


An generic class supporting tags.

Instance Methods [hide private]
 
GetTags(self)
Return the tags list.
source code
 
AddTag(self, tag)
Add a new tag.
source code
 
RemoveTag(self, tag)
Remove a tag.
source code
 
ToDict(self)
Taggable-object-specific conversion to standard python types.
source code

Inherited from ConfigObject: Copy, UpgradeConfig, Validate, __getattr__, __getstate__, __repr__, __setstate__

Inherited from outils.ValidatedSlots: __init__

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

Class Methods [hide private]
 
ValidateTag(cls, tag)
Check if a tag is valid.
source code
 
FromDict(cls, val)
Custom function for instances.
source code

Inherited from outils.ValidatedSlots: GetAllSlots

Class Variables [hide private]
  VALID_TAG_RE = re.compile("^[\w.+*/:@-]+$")
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

ValidateTag(cls, tag)
Class Method

source code 

Check if a tag is valid.

If the tag is invalid, an errors.TagError will be raised. The function has no return value.

ToDict(self)

source code 

Taggable-object-specific conversion to standard python types.

This replaces the tags set with a list.

Overrides: ConfigObject.ToDict

FromDict(cls, val)
Class Method

source code 

Custom function for instances.

Overrides: ConfigObject.FromDict