Skip to content

Commit f8f80f0

Browse files
committed
Remove old ssmd file. Correct UR production. Correct fetching gap config from config file.
1 parent 9d1bd65 commit f8f80f0

File tree

3 files changed

+11
-86
lines changed

3 files changed

+11
-86
lines changed

apel/db/records/job.py

+9-11
Original file line numberDiff line numberDiff line change
@@ -192,24 +192,22 @@ def get_ur(self):
192192

193193
user_id = doc.createElement('urf:UserIdentity')
194194

195-
if self.get_field('urf:GlobalUserName') is not None:
195+
if self.get_field('GlobalUserName') is not None:
196196
global_user_name = doc.createElement('urf:GlobalUserName')
197197
global_user_name.appendChild(doc.createTextNode(self.get_field('GlobalUserName')))
198198
global_user_name.setAttribute('urf:type', 'opensslCompat')
199199
user_id.appendChild(global_user_name)
200200

201-
group = doc.createElement('urf:Group')
202-
group.appendChild(doc.createTextNode(self.get_field('VO')))
203-
user_id.appendChild(group)
201+
if self.get_field('VO') is not None:
202+
group = doc.createElement('urf:Group')
203+
group.appendChild(doc.createTextNode(self.get_field('VO')))
204+
user_id.appendChild(group)
204205

205-
local_user_id = doc.createElement('urf:LocalUserId')
206-
local_user_id.appendChild(doc.createTextNode(self.get_field('LocalUserId')))
207-
user_id.appendChild(local_user_id)
206+
if self.get_field('LocalUserId') is not None:
207+
local_user_id = doc.createElement('urf:LocalUserId')
208+
local_user_id.appendChild(doc.createTextNode(self.get_field('LocalUserId')))
209+
user_id.appendChild(local_user_id)
208210

209-
local_group = doc.createElement('urf:LocalGroup')
210-
local_group.appendChild(doc.createTextNode(str(self.get_field('LocalGroup'))))
211-
user_id.appendChild(local_group)
212-
213211
if self.get_field('FQAN') is not None:
214212
fqan = doc.createElement('urf:GroupAttribute')
215213
fqan.setAttribute('type', 'FQAN')

bin/client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ def main():
220220
if interval == 'latest':
221221
msgs, recs = unloader.unload_latest(table_name, send_ur)
222222
elif interval == 'gap':
223-
start = cp.get('unloader', 'gap-start')
224-
end = cp.get('unloader', 'gap-end')
223+
start = cp.get('unloader', 'gap_start')
224+
end = cp.get('unloader', 'gap_end')
225225
msgs, recs = unloader.unload_gap(table_name, start, end, send_ur)
226226
elif interval == 'all':
227227
msgs, recs = unloader.unload_all(table_name, send_ur)

init.d/ssmd

-73
This file was deleted.

0 commit comments

Comments
 (0)