I can think of a number of ways to achieve this:
1. Add a dict called 'extra' as an attribute to the Node class. Any
driver specific information could be put there.
2. Allow Node objects to have extra attributes set. Two approaches to
this:
2a. Have Node.__init__ set any extra keyword arguments as attributes on
the Node object.
2b. Leave it up to the drivers to "manually" add attributes to the Node
objects.
3. Allow the drivers to subclass Node adding whatever extra
functionality they need.
I /think/ someone (I forget who) on IRC suggested option 1 a while ago.
However, I think option 2, implemented by 2a, most closely matches the
approach taken for create_node and thus feels most natural.
[1]: As an example, the Rackspace API returns an adminPass attribute
containing the root password in response to the "create_node" call.
There's no other way to get your hands on this information.
--
Soren Hansen |
Lead virtualisation engineer | Ubuntu Server Team
Canonical Ltd. | http://www.ubuntu.com/
My word.. Well, that's what you get if you're looking at a stale, old
git snapshot. :)
Thanks!