You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2016/06/25 06:46:00 UTC
[1/3] libcloud git commit: Libvirt/lookup domain by uuid and name
Repository: libcloud
Updated Branches:
refs/heads/trunk d960e651f -> 2ffa00053
Libvirt/lookup domain by uuid and name
Signed-off-by: wuyuewen <su...@126.com>
Update libvrit_driver.py
Signed-off-by: wuyuewen <su...@126.com>
Update libvirt_driver.py
Signed-off-by: wuyuewen <su...@126.com>
Update libvirt_driver.py
Signed-off-by: wuyuewen <su...@126.com>
tox check
Signed-off-by: wuyuewen <su...@126.com>
tox check
Signed-off-by: wuyuewen <su...@126.com>
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/5969c74d
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/5969c74d
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/5969c74d
Branch: refs/heads/trunk
Commit: 5969c74d545c7d5fb11c333c8ed4dd2f4f243e80
Parents: d960e65
Author: wuyuewen <su...@126.com>
Authored: Fri Jun 24 14:26:29 2016 +0800
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Jun 25 16:44:16 2016 +1000
----------------------------------------------------------------------
libcloud/compute/drivers/libvirt_driver.py | 34 +++++++++++++++++++++++++
1 file changed, 34 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/5969c74d/libcloud/compute/drivers/libvirt_driver.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/libvirt_driver.py b/libcloud/compute/drivers/libvirt_driver.py
index 9d4e1a0..bba0da7 100644
--- a/libcloud/compute/drivers/libvirt_driver.py
+++ b/libcloud/compute/drivers/libvirt_driver.py
@@ -176,6 +176,26 @@ class LibvirtNodeDriver(NodeDriver):
domain = self._get_domain_for_node(node=node)
return domain.resume() == 0
+ def ex_get_node_by_uuid(self, uuid):
+ """
+ Retrieve Node object for a domain with a provided uuid.
+
+ :type uuid: ``str``
+ """
+ domain = self._get_domain_for_uuid(uuid=uuid)
+ node = self._to_node(domain=domain)
+ return node
+
+ def ex_get_node_by_name(self, name):
+ """
+ Retrieve Node object for a domain with a provided name.
+
+ :type name: ``str``
+ """
+ domain = self._get_domain_for_name(name=name)
+ node = self._to_node(domain=domain)
+ return node
+
def ex_take_node_screenshot(self, node, directory, screen=0):
"""
Take a screenshot of a monitoring of a running instance.
@@ -344,6 +364,20 @@ class LibvirtNodeDriver(NodeDriver):
domain = self.connection.lookupByUUIDString(node.uuid)
return domain
+ def _get_domain_for_uuid(self, uuid):
+ """
+ Return libvirt domain object for the provided uuid.
+ """
+ domain = self.connection.lookupByUUIDString(uuid)
+ return domain
+
+ def _get_domain_for_name(self, name):
+ """
+ Return libvirt domain object for the provided name.
+ """
+ domain = self.connection.lookupByName(name)
+ return domain
+
def _get_entries(self, element):
"""
Parse entries dictionary.
[3/3] libcloud git commit: updated changes for #823
Posted by an...@apache.org.
updated changes for #823
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/2ffa0005
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/2ffa0005
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/2ffa0005
Branch: refs/heads/trunk
Commit: 2ffa00053b50f170177b32bd58cceee8c1faee2c
Parents: 142ab8d
Author: Anthony Shaw <an...@apache.org>
Authored: Sat Jun 25 16:45:54 2016 +1000
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Jun 25 16:45:54 2016 +1000
----------------------------------------------------------------------
CHANGES.rst | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/2ffa0005/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index faa4f22..fbdf5ad 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -7,6 +7,10 @@ Changes with current version of Apache Libcloud
Compute
~~~~~~~
+- Add node lookup by UUID for libvirt driver
+ (GITHUB-823)
+ [Frank Wu]
+
- Add block storage support to DigitalOcean node driver
(GITHUB-807)
[Adam Wolfe Gordon]
[2/3] libcloud git commit: Adds some docstring
Posted by an...@apache.org.
Adds some docstring
Signed-off-by: wuyuewen <su...@126.com>
Closes #823
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/142ab8d0
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/142ab8d0
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/142ab8d0
Branch: refs/heads/trunk
Commit: 142ab8d0637b38c0d80235028c8c4aacf2806785
Parents: 5969c74
Author: wuyuewen <su...@126.com>
Authored: Fri Jun 24 20:26:26 2016 +0800
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Jun 25 16:44:20 2016 +1000
----------------------------------------------------------------------
libcloud/compute/drivers/libvirt_driver.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/142ab8d0/libcloud/compute/drivers/libvirt_driver.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/libvirt_driver.py b/libcloud/compute/drivers/libvirt_driver.py
index bba0da7..7a2e132 100644
--- a/libcloud/compute/drivers/libvirt_driver.py
+++ b/libcloud/compute/drivers/libvirt_driver.py
@@ -180,7 +180,8 @@ class LibvirtNodeDriver(NodeDriver):
"""
Retrieve Node object for a domain with a provided uuid.
- :type uuid: ``str``
+ :param uuid: Uuid of the domain.
+ :type uuid: ``str``
"""
domain = self._get_domain_for_uuid(uuid=uuid)
node = self._to_node(domain=domain)
@@ -190,7 +191,8 @@ class LibvirtNodeDriver(NodeDriver):
"""
Retrieve Node object for a domain with a provided name.
- :type name: ``str``
+ :param name: Name of the domain.
+ :type name: ``str``
"""
domain = self._get_domain_for_name(name=name)
node = self._to_node(domain=domain)