Skip to content

Commit

Permalink
Merge "Add virt driver capabilities definition"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Oct 24, 2012
2 parents 7c36755 + 0daebe7 commit a3d27d1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nova/compute/manager.py
Expand Up @@ -2970,6 +2970,8 @@ def remove_aggregate_host(self, context, aggregate_id,
def _run_image_cache_manager_pass(self, context):
"""Run a single pass of the image cache manager."""

if not self.driver.capabilities["has_imagecache"]:
return
if FLAGS.image_cache_manager_interval == 0:
return

Expand Down
4 changes: 4 additions & 0 deletions nova/virt/driver.py
Expand Up @@ -88,6 +88,10 @@ class ComputeDriver(object):
"""

capabilities = {
"has_imagecache": False,
}

def init_host(self, host):
"""Initialize anything that is necessary for the driver to function,
including catching up with currently running VM's on the given host."""
Expand Down
4 changes: 4 additions & 0 deletions nova/virt/libvirt/driver.py
Expand Up @@ -258,6 +258,10 @@ def _get_eph_disk(ephemeral):

class LibvirtDriver(driver.ComputeDriver):

capabilities = {
"has_imagecache": True,
}

def __init__(self, read_only=False):
super(LibvirtDriver, self).__init__()

Expand Down

0 comments on commit a3d27d1

Please sign in to comment.