l.c.b.UuidMixin(object) : class documentation

Part of libcloud.compute.base View Source View In Hierarchy

Known subclasses: libcloud.compute.base.Node, libcloud.compute.base.NodeImage, libcloud.compute.base.NodeSize, libcloud.compute.base.StorageVolume

Mixin class for get_uuid function.
Method __init__ Undocumented
Method get_uuid Unique hash for a node, node image, or node size
Method uuid Undocumented
def __init__(self): (source)
Undocumented
def get_uuid(self): (source)
Unique hash for a node, node image, or node size

@return: C{string}

The hash is a function of an SHA1 hash of the node, node image,
or node size's ID and its driver which means that it should be
unique between all objects of its type.
In some subclasses (e.g. GoGridNode) there is no ID
available so the public IP address is used.  This means that,
unlike a properly done system UUID, the same UUID may mean a
different system install at a different time

>>> from libcloud.compute.drivers.dummy import DummyNodeDriver
>>> driver = DummyNodeDriver(0)
>>> node = driver.create_node()
>>> node.get_uuid()
'd3748461511d8b9b0e0bfa0d4d3383a619a2bb9f'

Note, for example, that this example will always produce the
same UUID!
@property
def uuid(self): (source)
Undocumented
API Documentation for libcloud, generated by pydoctor at 2013-04-20 21:40:42.