LIBCLOUD-345: Fix CloudStack compute driver create_node method to return CloudStackNode and add new expunging node state.
Signed-off-by: Tomaz Muraus <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/ac022ce5 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/ac022ce5 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/ac022ce5 Branch: refs/heads/0.12.x Commit: ac022ce583cb901bd1ae0d045f74a91cc3ecbed7 Parents: 9901b55 Author: Sebastien Goasguen <[email protected]> Authored: Thu Jun 20 15:50:20 2013 -0400 Committer: Tomaz Muraus <[email protected]> Committed: Fri Jun 21 12:22:36 2013 +0200 ---------------------------------------------------------------------- libcloud/compute/drivers/cloudstack.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/ac022ce5/libcloud/compute/drivers/cloudstack.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/drivers/cloudstack.py b/libcloud/compute/drivers/cloudstack.py index d2c1799..eb95a67 100644 --- a/libcloud/compute/drivers/cloudstack.py +++ b/libcloud/compute/drivers/cloudstack.py @@ -118,7 +118,8 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver): 'Starting': NodeState.REBOOTING, 'Stopped': NodeState.TERMINATED, 'Stopping': NodeState.TERMINATED, - 'Destroyed': NodeState.TERMINATED + 'Destroyed': NodeState.TERMINATED, + 'Expunging': NodeState.TERMINATED } def __init__(self, key, secret=None, secure=True, host=None, @@ -274,7 +275,7 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver): public_ips = [] private_ips = [nic['ipaddress'] for nic in node['nic']] - return Node( + return CloudStackNode( id=node['id'], name=node['displayname'], state=state,
