Break out RestClient error checking.
Break out RestClient error checking.

This commit breaks out the error checking from the request()
method in RestClient. This allows for the glance_http module
to use the same error checks as RestClient, to keep compatibility
between the 2 modules.

Partially implements blueprint add-glance-api-v1-tests

Change-Id: I0b21c93afcee8e9a22782b12c7b7e1f1ec1ea64c

zsoltdudas/lis-tempest,itskewpie/tempest,izadorozhna/tempest,tudorvio/tempest,JioCloud/tempest,Juraci/tempest,tudorvio/tempest,xbezdick/tempest,nunogt/tempest,ntymtsiv/tempest,Tesora/tesora-tempest,sebrandon1/tempest,queria/my-tempest,flyingfish007/tempest,citrix-openstack-build/tempest,citrix-openstack/build-tempest,dkalashnik/tempest,akash1808/tempest,Lilywei123/tempest,yamt/tempest,adkerr/tempest,danielmellado/tempest,vmahuli/tempest,akash1808/tempest,FujitsuEnablingSoftwareTechnologyGmbH/tempest,Vaidyanath/tempest,LIS/lis-tempest,manasi24/tempest,manasi24/jiocloud-tempest-qatempest,afaheem88/tempest_neutron,NexusIS/tempest,rzarzynski/tempest,BeenzSyed/tempest,cisco-openstack/tempest,queria/my-tempest,rakeshmi/tempest,CiscoSystems/tempest,jamielennox/tempest,nunogt/tempest,varunarya10/tempest,adkerr/tempest,yamt/tempest,neerja28/Tempest,bigswitch/tempest,NexusIS/tempest,masayukig/tempest,CiscoSystems/tempest,vedujoshi/tempest,masayukig/tempest,ntymtsiv/tempest,rakeshmi/tempest,Vaidyanath/tempest,itskewpie/tempest,vedujoshi/tempest,cisco-openstack/tempest,vedujoshi/os_tempest,openstack/tempest,armando-migliaccio/tempest,manasi24/jiocloud-tempest-qatempest,eggmaster/tempest,FujitsuEnablingSoftwareTechnologyGmbH/tempest,hayderimran7/tempest,pandeyop/tempest,hayderimran7/tempest,Mirantis/tempest,Lilywei123/tempest,Juraci/tempest,roopali8/tempest,afaheem88/tempest,izadorozhna/tempest,citrix-openstack-build/tempest,JioCloud/tempest,redhat-cip/tempest,Juniper/tempest,LIS/lis-tempest,Mirantis/tempest,varunarya10/tempest,jaspreetw/tempest,redhat-cip/tempest,roopali8/tempest,flyingfish007/tempest,hpcloud-mon/tempest,bigswitch/tempest,cloudbase/lis-tempest,jaspreetw/tempest,tonyli71/tempest,tonyli71/tempest,rzarzynski/tempest,armando-migliaccio/tempest,vedujoshi/os_tempest,zsoltdudas/lis-tempest,hpcloud-mon/tempest,BeenzSyed/tempest,citrix-openstack/build-tempest,pczerkas/tempest,Juniper/tempest,ebagdasa/tempest,cloudbase/lis-tempest,eggmaster/tempest,alinbalutoiu/tempest,Tesora/tesora-tempest,danielmellado/tempest,alinbalutoiu/tempest,pczerkas/tempest,vmahuli/tempest,afaheem88/tempest,jamielennox/tempest,manasi24/tempest,pandeyop/tempest,neerja28/Tempest,openstack/tempest,sebrandon1/tempest,ebagdasa/tempest,dkalashnik/tempest,xbezdick/tempest,afaheem88/tempest_neutron