DRY up image fetch code in v2 API
DRY up image fetch code in v2 API

Change-Id: Ic6aaaf8fd671a96d72c1fb081f982024610ab334

jumpstarter-io/glance,redhat-openstack/glance,scripnichenko/glance,takeshineshiro/glance,darren-wang/gl,wkoathp/glance,vuntz/glance,rickerc/glance_audit,tanglei528/glance,vuntz/glance,dims/glance,rajalokan/glance,ozamiatin/glance,rajalokan/glance,jumpstarter-io/glance,ntt-sic/glance,sigmavirus24/glance,cloudbau/glance,SUSE-Cloud/glance,klmitch/glance,citrix-openstack-build/glance,takeshineshiro/glance,scripnichenko/glance,tanglei528/glance,kfwang/Glance-OVA-OVF,cloudbau/glance,stevelle/glance,openstack/glance,kfwang/Glance-OVA-OVF,rickerc/glance_audit,wkoathp/glance,darren-wang/gl,stevelle/glance,SUSE-Cloud/glance,JioCloud/glance,redhat-openstack/glance,ntt-sic/glance,JioCloud/glance,paramite/glance,sigmavirus24/glance,paramite/glance,ozamiatin/glance,saeki-masaki/glance,akash1808/glance,dims/glance,openstack/glance,klmitch/glance,saeki-masaki/glance,citrix-openstack-build/glance,akash1808/glance,openstack/glance