Skip to content

Commit

Permalink
Merge pull request #50 from ARGOeu/devel
Browse files Browse the repository at this point in the history
Devel into master
  • Loading branch information
skanct committed Jul 23, 2015
2 parents 9696da5 + d276ed0 commit 29fc1d0
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 9 deletions.
5 changes: 4 additions & 1 deletion argo-egi-connectors.spec
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 <[email protected]> - 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 <[email protected]> - 1.4.2-1%{?dist}
- changed internal parser structure to address entities with doubled scope
https://github.com/ARGOeu/ARGO/issues/141
Expand Down
8 changes: 7 additions & 1 deletion bin/downtimes-gocdb-connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
11 changes: 6 additions & 5 deletions bin/poem-connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']:
Expand Down
3 changes: 2 additions & 1 deletion bin/topology-gocdb-connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
10 changes: 9 additions & 1 deletion bin/topology-vo-connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
import re
import sys
import xml.dom.minidom
import copy

LegMapServType = {'SRM' : 'SRMv2', 'SRMv2': 'SRM'}
globopts = {}

class VOReader:
Expand Down Expand Up @@ -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()

0 comments on commit 29fc1d0

Please sign in to comment.