diff --git a/argo-egi-connectors.spec b/argo-egi-connectors.spec index 75caec95..ee3db04c 100644 --- a/argo-egi-connectors.spec +++ b/argo-egi-connectors.spec @@ -1,6 +1,6 @@ Name: argo-egi-connectors Version: 1.4.2 -Release: 1%{?dist} +Release: 2%{?dist} Group: EGI/SA4 License: ASL 2.0 @@ -45,6 +45,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0750,root,root) %dir %{_localstatedir}/log/argo-egi-connectors/ %changelog +* Wed Jul 15 2015 Daniel Vrcic - 1.4.2-2%{?dist} +- fixed bug with duplicating poem profiles info for prefilter +- fixed bug with SRM service type handling for topology and downtimes connectors * Tue Jun 23 2015 Daniel Vrcic - 1.4.2-1%{?dist} - changed internal parser structure to address entities with doubled scope https://github.com/ARGOeu/ARGO/issues/141 diff --git a/bin/downtimes-gocdb-connector.py b/bin/downtimes-gocdb-connector.py index 61c4670a..58df3cb3 100755 --- a/bin/downtimes-gocdb-connector.py +++ b/bin/downtimes-gocdb-connector.py @@ -30,6 +30,7 @@ import os import sys import xml.dom.minidom +import copy from argo_egi_connectors.writers import AvroWriter from argo_egi_connectors.config import Global, CustomerConf @@ -125,12 +126,17 @@ def main(): gocdb = GOCDBReader(feed) dts = gocdb.getDowntimes(start, end) + dtslegmap = [] + for dt in dts: + if dt['service'] in LegMapServType.keys(): + dtslegmap.append(copy.copy(dt)) + dtslegmap[-1]['service'] = LegMapServType[dt['service']] for job, cust in jobcust: jobdir = confcust.get_fulldir(cust, job) filename = jobdir + globopts['OutputDowntimes'.lower()] % timestamp avro = AvroWriter(globopts['AvroSchemasDowntimes'.lower()], filename, - dts) + dts + dtslegmap) avro.write() main() diff --git a/bin/poem-connector.py b/bin/poem-connector.py index 0ab4fe5f..f2cd3c17 100755 --- a/bin/poem-connector.py +++ b/bin/poem-connector.py @@ -121,11 +121,12 @@ def getProfiles(self): serverProfiles = defaultProfiles else: serverProfiles = self.loadProfilesFromServer(servers[0], vo, filteredProfiles).keys() - for profile in serverProfiles: - if profile.upper() in validProfiles.keys(): - for ngi in ngis: - for server in servers: - profileList.extend(self.createProfileEntries(server, ngi, validProfiles[profile.upper()])) + + for profile in serverProfiles: + if profile.upper() in validProfiles.keys(): + for ngi in ngis: + for server in servers: + profileList.extend(self.createProfileEntries(server, ngi, validProfiles[profile.upper()])) for profile in validProfiles.values(): for metric in profile['metrics']: diff --git a/bin/topology-gocdb-connector.py b/bin/topology-gocdb-connector.py index f253b216..2847c709 100755 --- a/bin/topology-gocdb-connector.py +++ b/bin/topology-gocdb-connector.py @@ -29,6 +29,7 @@ import xml.dom.minidom import httplib import sys +import copy from argo_egi_connectors.writers import AvroWriter from argo_egi_connectors.config import Global, CustomerConf @@ -265,7 +266,7 @@ def main(): gelegmap = [] for g in group_endpoints: if g['service'] in LegMapServType.keys(): - gelegmap.append(g) + gelegmap.append(copy.copy(g)) gelegmap[-1]['service'] = LegMapServType[g['service']] filename = jobdir+globopts['OutputTopologyGroupOfEndpoints'.lower()] % timestamp avro = AvroWriter(globopts['AvroSchemasTopologyGroupOfEndpoints'.lower()], filename, diff --git a/bin/topology-vo-connector.py b/bin/topology-vo-connector.py index 3eef5cfb..151d9b2e 100755 --- a/bin/topology-vo-connector.py +++ b/bin/topology-vo-connector.py @@ -32,7 +32,9 @@ import re import sys import xml.dom.minidom +import copy +LegMapServType = {'SRM' : 'SRMv2', 'SRMv2': 'SRM'} globopts = {} class VOReader: @@ -136,7 +138,13 @@ def ismatch(elem): avro.write() filename = jobdir + globopts['OutputTopologyGroupOfEndpoints'.lower()] % timestamp - avro = AvroWriter(globopts['AvroSchemasTopologyGroupOfEndpoints'.lower()], filename, vo.get_groupendpoints()) + gelegmap = [] + group_endpoints = vo.get_groupendpoints() + for g in group_endpoints: + if g['service'] in LegMapServType.keys(): + gelegmap.append(copy.copy(g)) + gelegmap[-1]['service'] = LegMapServType[g['service']] + avro = AvroWriter(globopts['AvroSchemasTopologyGroupOfEndpoints'.lower()], filename, group_endpoints + gelegmap) avro.write() main()