You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2020/08/30 15:12:41 UTC

[libcloud] 01/03: Fix typos and set ex_get_volume_by_name to return None if there is no volume

This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git

commit bd5fb41a0e1f80ad16ca7a24dc8cd1a3a401680a
Author: Eis <mo...@gmail.com>
AuthorDate: Mon Aug 24 18:36:38 2020 +0300

    Fix typos and set ex_get_volume_by_name to return None if there is no volume
---
 libcloud/container/drivers/lxd.py | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/libcloud/container/drivers/lxd.py b/libcloud/container/drivers/lxd.py
index de74174..e674e02 100644
--- a/libcloud/container/drivers/lxd.py
+++ b/libcloud/container/drivers/lxd.py
@@ -1015,7 +1015,7 @@ class LXDContainerDriver(ContainerDriver):
 
         try:
 
-            # wait until the timeout...but util getting here the operation
+            # wait until the timeout...but until getting here the operation
             # may have finished already
             id = response_dict['metadata']['id']
             req = '/%s/operations/%s/wait?timeout=%s' % (self.version,
@@ -1069,7 +1069,7 @@ class LXDContainerDriver(ContainerDriver):
     def ex_has_image(self, alias):
         """
         Helper function. Returns true and the image fingerprint
-        if the image with the given alias exits on the host.
+        if the image with the given alias exists on the host.
 
         :param alias: the image alias
         :type  alias: ``str``
@@ -1315,11 +1315,7 @@ class LXDContainerDriver(ContainerDriver):
                 if vol.name == name:
                     return vol
 
-        return self._to_storage_volume(pool_id=None,
-                                       metadata={"pool_id": None,
-                                                 "type": None,
-                                                 "used_by": None,
-                                                 "config": None})
+        return None
 
     def create_volume(self, pool_id, definition, **kwargs):
 
@@ -1484,7 +1480,7 @@ class LXDContainerDriver(ContainerDriver):
 
     def ex_get_network(self, name):
         """
-        Retunrs the LXD network with the given name.
+        Returns the LXD network with the given name.
         Implements GET /1.0/networks/<name>
 
         Authentication: trusted