Commit 6ff4d35d authored by Marian Babik's avatar Marian Babik
Browse files

py3; pep8 fixes

parent 4cf3291a
......@@ -65,11 +65,10 @@ def run(url, ipv6=False):
h.add(service[0], tags=[service[1]])
h.serialize()
# Add host groups
sites = feed.get_groups("CMS_Site")
hg = Groups("host_groups")
for site, hosts in sites.iteritems():
for site, hosts in sites.items():
for host in hosts:
hg.add(site, host)
hg.serialize()
......@@ -91,7 +90,7 @@ def run(url, ipv6=False):
for service in services:
flavor = service[1]
if flavor not in ["XROOTD"]:
continue
continue
host = service[0]
endpoint = service[2]
site = hg.exact_match(host)
......@@ -101,9 +100,13 @@ def run(url, ipv6=False):
if len(site) > 1:
log.warning("Host assigned to multiple sites: %s, %s picking first one" % (host, site))
if ipv6:
c.add("org.cms.SE-xrootd-read", hosts=(host,), params={'args': {'--site': site.pop(), '--endpoint': endpoint, '-6': ''}, '_tags': 'XROOTD'})
c.add("org.cms.SE-xrootd-read", hosts=(host,), params={'args': {'--site': site.pop(),
'--endpoint': endpoint, '-6': ''},
'_tags': 'XROOTD'})
else:
c.add("org.cms.SE-xrootd-read", hosts=(host,), params={'args': {'--site': site.pop(), '--endpoint': endpoint, '-4': ''}, '_tags': 'XROOTD'})
c.add("org.cms.SE-xrootd-read", hosts=(host,), params={'args': {'--site': site.pop(),
'--endpoint': endpoint, '-4': ''},
'_tags': 'XROOTD'})
# ETF env - environment variables to export on the worker node (global for all sites), such as:
# ETF_TESTS - points to a list of WN tests to execute (stored in WN_METRICS)
......@@ -153,7 +156,6 @@ def run(url, ipv6=False):
else:
res = "%s://%s/%s/%s/%s" % (FLAVOR_MAP[flavor], host, 'nosched', 'nobatch', 'noqueue')
for m in CE_STATE_METRICS:
c.add(m, hosts=(service[0],), params={ 'args': { '--resource': '%s' % res }})
c.add(m, hosts=(service[0],), params={'args': {'--resource': '%s' % res}})
c.serialize()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment