'Return True if supplied image ID is cached, False otherwise'

def is_image_cached(self, image_id):

    exe_cmd = ('%s    -m    glance.cmd.cache_manage' % sys.executable)
    cmd = ('%s    --port=%d    list-cached' % (exe_cmd, self.api_port))
    (exitcode, out, err) = execute(cmd)
    self.assertEqual(0, exitcode)
    out = out.decode('utf-8')
    return (image_id in out)
