You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by GitBox <gi...@apache.org> on 2021/07/21 21:15:57 UTC

[GitHub] [libcloud] dpeschman opened a new issue #1595: OpenStack_1_1_NodeDriver.ex_get_floating_ip raises exception when not found

dpeschman opened a new issue #1595:
URL: https://github.com/apache/libcloud/issues/1595


   ## Summary
   
   Calling ex_get_floating_ip with an IP not in the list raises an exception, but feels like it should return None instead to be consistent w/ ex_get_node_details.
   
   Honestly, not sure this is a bug.  Seems like there are a lot of methods in this driver that will throw an exception if the requested resource is not found.  Figured I'd raise this anyway so we can discuss.  I wound up wrapping this method in my own that has the behavior I want, and that feels wrong.
   
   ## Detailed Information
   
   Using apache-libcloud 3.3.1.
   
   ```
   >>> d = get_driver('openstack', ...)
   >>> d.ex_get_floating_ip('1.2.3.4')
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "/home/vagrant/source/libcloud-drivers/.venv/lib/python3.8/site-packages/libcloud/compute/drivers/openstack.py", line 2580, in ex_get_floating_ip
       ip_obj, = [x for x in floating_ips if x.ip_address == ip]
   ValueError: not enough values to unpack (expected 1, got 0)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [libcloud] micafer closed issue #1595: OpenStack_1_1_NodeDriver.ex_get_floating_ip raises exception when not found

Posted by GitBox <gi...@apache.org>.
micafer closed issue #1595:
URL: https://github.com/apache/libcloud/issues/1595


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org