Repository: libcloud Updated Branches: refs/heads/trunk 9f0178984 -> 48f0eebc5
Add more extension methods to the vSphere driver. Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/a0150609 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/a0150609 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/a0150609 Branch: refs/heads/trunk Commit: a0150609d13f13a14bb3a5bfd029e581e6a0ae31 Parents: 9f01789 Author: Tomaz Muraus <[email protected]> Authored: Thu Jul 31 13:24:35 2014 +0200 Committer: Tomaz Muraus <[email protected]> Committed: Thu Jul 31 13:24:35 2014 +0200 ---------------------------------------------------------------------- libcloud/compute/drivers/vsphere.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/a0150609/libcloud/compute/drivers/vsphere.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/drivers/vsphere.py b/libcloud/compute/drivers/vsphere.py index 6507959..c862b8a 100644 --- a/libcloud/compute/drivers/vsphere.py +++ b/libcloud/compute/drivers/vsphere.py @@ -319,6 +319,26 @@ class VSphereNodeDriver(NodeDriver): return vm.get_resource_pool_name() @wrap_non_libcloud_exceptions + def ex_get_hosts(self): + """ + Retrurn all the available hosts. + + :rtype: ``dict`` + """ + result = self.connection.client.get_hosts() + return result + + @wrap_non_libcloud_exceptions + def ex_get_datastores(self): + """ + Return all the available datastores. + + :rtype: ``dict`` + """ + result = self.connection.client.get_datastores() + return result + + @wrap_non_libcloud_exceptions def ex_get_node_by_path(self, path): """ Retrieve Node object for a VM with a provided path.
