def resolve_service_href(self, href):
absolute_href = urljoin(self.api.url, href)
# The first replace remove the root of ovirt location
# The second replace is to remove the first / in the path
# The str ensure that service_path is a str, not a unicode in python 2
service_path = str(absolute_href.replace(self.api.url, "").replace("/", "", 1))
new_service = self.api.service(service_path)
return new_service
评论列表
文章目录