From ed4432da4388b54e099dbf23000639f45e486803 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Fri, 2 Aug 2013 22:20:16 -0700 Subject: [PATCH] Remove dead capabilities code Although the scheduler.host_manager has logic to handle the 'allowed_vm_type' capabilities, no virt driver supports that capability. So just remove the dead code. Part of bp no-compute-fanout-to-scheduler Change-Id: I223fc10a27291d88d0e12057504525233ab845ad --- nova/scheduler/host_manager.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/nova/scheduler/host_manager.py b/nova/scheduler/host_manager.py index b88591d72d85..15e0f5c3a893 100644 --- a/nova/scheduler/host_manager.py +++ b/nova/scheduler/host_manager.py @@ -111,11 +111,6 @@ class HostState(object): self.free_disk_mb = 0 self.vcpus_total = 0 self.vcpus_used = 0 - # Valid vm types on this host: 'pv', 'hvm' or 'all' - if 'allowed_vm_type' in self.capabilities: - self.allowed_vm_type = self.capabilities['allowed_vm_type'] - else: - self.allowed_vm_type = 'all' # Additional host information from the compute node stats: self.vm_states = {} @@ -246,9 +241,9 @@ class HostState(object): return dict((st['key'], st['value']) for st in stats) def __repr__(self): - return ("(%s, %s) ram:%s disk:%s io_ops:%s instances:%s vm_type:%s" % + return ("(%s, %s) ram:%s disk:%s io_ops:%s instances:%s" % (self.host, self.nodename, self.free_ram_mb, self.free_disk_mb, - self.num_io_ops, self.num_instances, self.allowed_vm_type)) + self.num_io_ops, self.num_instances)) class HostManager(object):