Skip to content

Commit

Permalink
Merge pull request #718 from grycap/devel
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer authored Nov 20, 2018
2 parents 4acec20 + 575127c commit 487c7b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions IM/connectors/GCE.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ def get_instance_type(self, sizes, radl):
# get the node size with the lowest price and memory (in the case
# of the price is not set)
if size.price is None:
size.price = 0
if res is None or (size.price <= res.price and size.ram <= res.ram):
size.price = 9999
if res is None or (size.price <= res.price or size.ram <= res.ram):
str_compare = ""
if 'guestCpus' in size.extra and size.extra['guestCpus']:
str_compare = "size.extra['guestCpus'] " + cpu_op + " cpu and "
Expand Down
7 changes: 4 additions & 3 deletions IM/connectors/OpenNebula.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import hashlib
import defusedxml.xmlrpc
defusedxml.xmlrpc.monkey_patch()

try:
from xmlrpclib import ServerProxy
except ImportError:
from xmlrpc.client import ServerProxy

import hashlib
import time
import defusedxml.xmlrpc
defusedxml.xmlrpc.monkey_patch()

from distutils.version import LooseVersion
from IM.xmlobject import XMLObject
Expand Down

0 comments on commit 487c7b1

Please sign in to comment.