Skip to content

Commit e68e51c

Browse files
committed
Removed hardcoded rewrites - bad idea, and added default .ad's also for working group documents (.group.acronym != 'none').
- Legacy-Id: 5904
1 parent e5b551f commit e68e51c

3 files changed

Lines changed: 16 additions & 57 deletions

File tree

ietf/bin/aliasutil.py

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -12,57 +12,6 @@
1212
1313
"""
1414

15-
ad_replacement = {
16-
# 2009 Ad replacements
17-
'chris.newman@sun.com': 'alexey.melnikov@isode.com',
18-
'townsley@cisco.com': 'rdroms@cisco.com',
19-
'jon.peterson@neustar.biz': 'rjsparks@nostrum.com',
20-
'dward@cisco.com': 'adrian@olddog.co.uk',
21-
22-
# 2010 AD replacements -- activate after spring ietf
23-
'lisa@osafoundation.org': 'stpeter@stpeter.im',
24-
'fluffy@cisco.com': 'gonzalo.camarillo@ericsson.com',
25-
'rcallon@juniper.net': 'stbryant@cisco.com',
26-
'pasi.eronen@nokia.com': 'turners@ieca.com',
27-
'magnus.westerlund@ericsson.com': 'ietfdbh@comcast.net',
28-
29-
# 2011 AD replacements -- activate after spring ietf
30-
'alexey.melnikov@isode.com': 'presnick@qualcomm.com',
31-
'tim.polk@nist.gov': 'stephen.farrell@cs.tcd.ie',
32-
'lars.eggert@nokia.com': 'wes@mti-systems.com',
33-
34-
#2013 AD replacements
35-
'housley@vigilsec.com': 'jari.arkko@piuha.net',
36-
'rdroms.ietf@gmail.com': 'ted.lemon@nominum.com',
37-
'rbonica@juniper.net': 'jjaeggli@zynga.com',
38-
'rjsparks@nostrum.com': 'rbarnes@bbn.com',
39-
}
40-
41-
email_replacement = {
42-
'barryleiba@computer.org': 'barryleiba@gmail.com',
43-
'greg.daley@eng.monash.edu.au': 'gdaley@netstarnetworks.com',
44-
'radia.perlman@sun.com': 'radia@alum.mit.edu',
45-
'lisa@osafoundation.org': 'lisa.dusseault@gmail.com',
46-
'lisa.dusseault@messagingarchitects.com': 'lisa.dusseault@gmail.com',
47-
'scott.lawrence@nortel.com': 'scottlawrenc@avaya.com',
48-
'charliep@computer.org': 'charliep@computer.org, charles.perkins@earthlink.net',
49-
'yaronf@checkpoint.com': 'yaronf.ietf@gmail.com',
50-
'mary.barnes@nortel.com': 'mary.ietf.barnes@gmail.com',
51-
'scottlawrenc@avaya.com': 'xmlscott@gmail.com',
52-
'henk@ripe.net': 'henk@uijterwaal.nl',
53-
'jonne.soininen@nsn.com': 'jonne.soininen@renesasmobile.com',
54-
'tom.taylor@rogers.com': 'tom.taylor.stds@gmail.com',
55-
'rahul@juniper.net': 'raggarwa_1@yahoo.com',
56-
'dward@juniper.net': 'dward@cisco.com',
57-
'alan.ford@roke.co.uk': 'alanford@cisco.com',
58-
'rod.walsh@nokia.com': 'roderick.walsh@tut.fi',
59-
'bob.hinden@nokia.com': 'bob.hinden@gmail.com',
60-
'martin.thomson@commscope.com': 'martin.thomson@gmail.com',
61-
'rjs@estacado.net': 'rjsparks@nostrum.com',
62-
'rbarnes@bbn.com': 'rlb@ipv.sx',
63-
}
64-
65-
6615
def rewrite_email_address(email, is_ad):
6716
""" Prettify the email address (and if it's empty, skip it by
6817
returning None). """
@@ -76,9 +25,6 @@ def rewrite_email_address(email, is_ad):
7625
# If it doesn't look like email, skip
7726
if '@' not in email and '?' not in email:
7827
return
79-
if is_ad:
80-
email = ad_replacement.get(email, email)
81-
email = email_replacement.get(email, email)
8228
return email
8329

8430
def rewrite_address_list(l):

ietf/bin/generate-draft-aliases

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,17 @@ from django.core import management
3737
management.setup_environ(settings)
3838

3939
from ietf.doc.models import Document
40-
from ietf.group.utils import get_group_chairs_emails
40+
from ietf.group.utils import get_group_chairs_emails, get_group_ads_emails
4141
from aliasutil import *
4242
import time
4343

4444
def get_draft_ad_emails(draft):
4545
" Get AD email for the given draft, if any. "
46+
# If working group document, return current WG ADs
47+
wg = draft.group
48+
if wg and wg.acronym != 'none' and wg.parent and wg.parent.acronym != 'none':
49+
return get_group_ads_emails(wg)
50+
# If not, return explicit AD set (whether up to date or not)
4651
ad = draft.ad
4752
#return [ad and ad.user and ad.user.email]
4853
return [ad and ad.email_address()]
@@ -123,11 +128,12 @@ if __name__ == '__main__':
123128
continue
124129
handle_sublist('%s%s' % (name, '.authors'), get_draft_authors_emails, draft)
125130
wg = draft.group
131+
126132
if wg:
127133
# .chairs = WG chairs
128134
handle_sublist('%s%s' % (name, '.chairs'), get_group_chairs_emails, wg)
129135

130-
# .ad = sponsoring AD
136+
# .ad = sponsoring AD / WG AD (WG document)
131137
handle_sublist('%s%s' % (name, '.ad'), get_draft_ad_emails, draft, True)
132138

133139
# .notify = notify email list from the Document

ietf/group/utils.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,18 @@ def get_charter_text(group):
5050
return desc
5151

5252
def get_area_ads_emails(area):
53+
if area.acronym == 'none':
54+
return []
5355
emails = [r.email.email_address()
5456
for r in area.role_set.filter(name__in=('ad', 'chair'))]
5557
return filter(None, emails)
5658

5759
def get_group_ads_emails(wg):
5860
" Get list of area directors' emails for a given WG "
59-
if wg.parent:
61+
if wg.acronym == 'none':
62+
return []
63+
64+
if wg.parent and wg.parent.acronym != 'none':
6065
# By default, we should use _current_ list of ads!
6166
return get_area_ads_emails(wg.parent)
6267

@@ -65,6 +70,8 @@ def get_group_ads_emails(wg):
6570

6671
def get_group_chairs_emails(wg):
6772
" Get list of area chairs' emails for a given WG "
73+
if wg.acronym == 'none':
74+
return []
6875
emails = Email.objects.filter(role__group=wg,
6976
role__name='chair')
7077
if not emails:

0 commit comments

Comments
 (0)