From 568fbb8b6821419970d06d8f10f0833dc149cd93 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Wed, 23 Jul 2014 17:36:32 +0200 Subject: [PATCH] bug #3035: Update XPATH to the new VNET XML --- src/cloud/ec2/lib/elastic_ip.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cloud/ec2/lib/elastic_ip.rb b/src/cloud/ec2/lib/elastic_ip.rb index cc34771491..dcb6cc7b61 100644 --- a/src/cloud/ec2/lib/elastic_ip.rb +++ b/src/cloud/ec2/lib/elastic_ip.rb @@ -22,7 +22,7 @@ module ElasticIP return vnet end - ips = vnet.retrieve_elements('LEASES/LEASE[USED=0]/IP') + ips = vnet.retrieve_elements('AR_POOL/AR[USED_LEASES=0 and SIZE=1]/IP') if ips.nil? rc = OpenNebula::Error.new("There is no lease available to be allocated") rc.ec2_code = "AddressLimitExceeded" @@ -230,4 +230,4 @@ module ElasticIP user.info user.id end -end \ No newline at end of file +end