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/03/22 10:56:46 UTC
[2/3] libcloud git commit: Fixes the function ex_create_floating_ip
Fixes the function ex_create_floating_ip
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/68c8d581
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/68c8d581
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/68c8d581
Branch: refs/heads/trunk
Commit: 68c8d581e3f4ca84c52484b2b5d4766ccef01e90
Parents: 1a057c9
Author: marko_praprotnik <praprtm65>
Authored: Mon Mar 21 09:49:32 2016 +0100
Committer: anthony-shaw <an...@gmail.com>
Committed: Tue Mar 22 20:56:19 2016 +1100
----------------------------------------------------------------------
libcloud/compute/drivers/openstack.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/68c8d581/libcloud/compute/drivers/openstack.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/openstack.py b/libcloud/compute/drivers/openstack.py
index 199a7af..c7df4bf 100644
--- a/libcloud/compute/drivers/openstack.py
+++ b/libcloud/compute/drivers/openstack.py
@@ -2313,15 +2313,19 @@ class OpenStack_1_1_NodeDriver(OpenStackNodeDriver):
ip_obj, = [x for x in floating_ips if x.ip_address == ip]
return ip_obj
- def ex_create_floating_ip(self):
+ def ex_create_floating_ip(self, ip_pool):
"""
Create new floating IP
+ :param ip_pool: name of the floating IP pool
+ :type ip_pool: ``str``
+
:rtype: :class:`OpenStack_1_1_FloatingIpAddress`
"""
resp = self.connection.request('/os-floating-ips',
method='POST',
- data={})
+ data={'pool': ip_pool})
+
data = resp.object['floating_ip']
id = data['id']
ip_address = data['ip']