Skip to content

Commit

Permalink
Fixed http|https endpoint id
Browse files Browse the repository at this point in the history
  • Loading branch information
enricovianello committed Aug 7, 2020
1 parent a9beaef commit b8ace06
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/info_provider/glue/glue2.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,16 @@ def get_static_ldif_nodes(self, spaceinfo):
if self._configuration.has_webdav():

logging.debug("new logic webdav endpoints")
i = 0
http_i = 0
https_i = 0
for endpoint in self._configuration.get_webdav_endpoints():
protocol = urlparse(endpoint).scheme.upper()
if protocol == "HTTP":
endpoint_id = self._get_http_endpoint_id(i)
endpoint_id = self._get_http_endpoint_id(http_i)
http_i += 1
elif protocol == "HTTPS":
endpoint_id = self._get_https_endpoint_id(i)
endpoint_id = self._get_https_endpoint_id(https_i)
https_i += 1
else:
raise ValueError("unable to read a valid protocol from " + endpoint)
node = GLUE2WebDAVStorageEndpoint(endpoint_id, service_id)
Expand All @@ -353,7 +356,6 @@ def get_static_ldif_nodes(self, spaceinfo):
'GLUE2PolicyUserDomainForeignKey': self._configuration.get_used_VOs()
})
nodes.append(node)
i += 1

else:

Expand Down

0 comments on commit b8ace06

Please sign in to comment.