Depending on a specific deployment of Zun, the API endpoint could
be of various formats. For example:
1. the classic (legacy) endpoint:
http://{host}:{optional_port}/v1/
2. under wsgi:
http://{host}:{optional_port}/container/v1
3. other:
https://container.example.com/
https://example.com/container
We need to parse the url correctly in order to get the correct version
URL which is used to determinate the API version.
Change-Id: Ia69959431e2d751d228f4cfc1db74b774bd9d69e
Closes-Bug: #1799343