adapted glance plugin to use the v2 api.