+ if not 'hypervisor' in requirements: #Unikernels extension -END-
+ requirements['hypervisor'] = "kvm"
+ for valid_host in valid_hosts:
+ if not 'hypervisors' in valid_host:
+ valid_host['hypervisors'] = "kvm"
+
+ valid_hosts = tuple(valid_host for valid_host in valid_hosts if requirements['hypervisor'] in valid_host['hypervisors'].split(","))
+
+ if len(valid_hosts)<=0:
+ error_text = 'No room at data center. Cannot find a host with %s hypervisor or not have enough resources available' % (str(requirements['hypervisor']))
+ #self.logger.debug(error_text)
+ return -1, error_text #Unikernels extension -END-
+