def is_available(cls, disk, kernel):
        """ Check if kernel is available for disk."""
        kmap = cls.list(disk['datacenter_id'], None, kernel, True)
        for flavor in kmap:
            if kernel in kmap[flavor]:
                return True
        return False
def is_available ( cls , disk , kernel ) : kmap = cls . list ( disk [ 'datacenter_id' ] , None , kernel , True ) for flavor in kmap : if kernel in kmap [ flavor ] : return True return False
Check if kernel is available for disk.