Remove hypen from hostname when we compare node number.

This commit is contained in:
Magnus Andersson 2024-03-04 13:37:29 +01:00
parent f3e93b7e1a
commit 160877f19a
Signed by: mandersson
GPG key ID: 19CB2C58E1F19B16

View file

@ -264,7 +264,7 @@ def parse_drive_fqdn(fqdn: str) -> tuple:
else:
customer = 'common'
hostname = fqdn.split('.')[0]
number = re.sub(r'[a-z.]', '', hostname)
number = re.sub(r'[-a-z.]', '', hostname)
location = 'sto4'
if number == '3':
location = 'sto3'