Handle 300 status code in common HTTPClient

Common HTTPClient uses requests library for http communication, but
this library raise no exception if we get code 300 as response status.
On the other hand, some openstack clients (ceilometerclient,
glanceclient, heatclient, ironiccilent, tuskarclient) handles this
status code and raise a special exception in such case. So we should
provide a special exception for 300 status code in common apiclient.

Added required exception - MultipleChoices.

blueprint common-client-library-2

Change-Id: I991737dd4c2d8bdf8bbb5380f05d4cf2b3bcf953
Add test for raising errors in HTTPClient

Class `HTTPClient` doesn't have tests for raising errors.
This patch tests HTTPClient:
* when server returned status code #400 (Bad Request);
* when auth plugin does not return any token and endpoint.
* when client_request raises Unauthorized

Change-Id: Ic30db9fade2368c51db742d3809e84885b8e41b3
Fix DictOpt support in config sample generator

Class DictOpt was defined in oslo.config.cfg .
The config sample generator cannot recognize DictOpt type config options,
and will exit with exception when generating config sample files from codes
that contain DictOpt type options. This will result in unexpected output
of tools/config/generate_sample.sh and tools/config/check_uptodate.sh.
This problem is fixed by adding DictOpt support to config sample generator.

Change-Id: Ia360dbfae8446ddaa563e94f51900071e95cdf6d
Closes: bug #1276859
Remove None for dict.get()

Because If no default value is specified it defaults to None already.

Change-Id: Iebbb0622f7941c6ce8ea26aca1968f1ae68a6c14
Merge "Add test for raising errors in HTTPClient"
Merge "Handle 300 status code in common HTTPClient"
Merge "Fix DictOpt support in config sample generator"
Merge "Remove None for dict.get()"