'Transform the registered url to standard and valid format.'

@staticmethod
def _neaten_url(endpoint, tenant_id, reseller_prefix):

    return urlparse.urljoin((endpoint.split('/v1')[0].rstrip('/') + '/'), (('v1/' + reseller_prefix) + tenant_id))
