def os_vers(req_language):
for vm in asl_vms:
hostname = vm['name']
if re.match(r"Debian 10", vm['distribution']['description']):
increment = 'vms_required'
else:
increment = 'vms_exist_updated'
return increment
increment = os_vers(req_language)
print('increment from os_vers:', increment)
...
y = '{}-{}-{}.node.eu.consul'.format(service, lang, index + 6)
return y, service
log = get_next_hostname('aff-java-8.node.eu.consul')
print(log)
service = get_next_hostname('service')
print(service)
➜ python python3 forforum.py
('aff-java-1343.node.eu.consul', 'aff')
('aff-java-1343.node.eu.consul', 'aff')