@@ -65,6 +65,7 @@ if __name__ == '__main__':
6565 vfile .write (signature )
6666 vfile .write ("%s anything\n " % settings .GROUP_VIRTUAL_DOMAIN )
6767
68+ # - Working groups -----------------------------------------
6869 wgs = Group .objects .filter (type = 'wg' ).all ()
6970
7071 # - status = Active
@@ -79,9 +80,11 @@ if __name__ == '__main__':
7980 dump_sublist (afile , vfile , name + '-ads' , ['ietf.org' , ], settings .GROUP_VIRTUAL_DOMAIN , get_group_ad_emails (wg ))
8081 dump_sublist (afile , vfile , name + '-chairs' , ['ietf.org' , ], settings .GROUP_VIRTUAL_DOMAIN , get_group_role_emails (wg , ['chair' , 'secr' ]))
8182
82- # - status = Active
83+ # - Research groups -----------------------------------------
8384 rgs = Group .objects .filter (type = 'rg' ).all ()
8485 debug .pprint ('rgs' )
86+
87+ # - status = Active
8588 active_rgs = rgs .filter (state__in = ACTIVE_STATES )
8689 debug .pprint ('active_rgs' )
8790
@@ -96,6 +99,22 @@ if __name__ == '__main__':
9699 #dump_sublist('%s%s' % (name, '-ads'), get_group_ad_emails, rg, True)
97100 dump_sublist (afile , vfile , name + '-chairs' , ['ietf.org' , 'irtf.org' , ], settings .GROUP_VIRTUAL_DOMAIN , get_group_role_emails (rg , ['chair' , 'secr' ]))
98101
102+ # - Directorates -----------------------------------------
103+ directorates = Group .objects .filter (type = 'dir' ).all ()
104+
105+ # - status = Active
106+ active_directorates = directorates .filter (state__in = ACTIVE_STATES )
107+
108+ # - activity within last year? (use concluded_date)
109+ inactive_recent_directorates = directorates .exclude (state__in = ACTIVE_STATES ).filter (time__gte = show_since )
110+ interesting_directorates = active_directorates | inactive_recent_directorates
111+
112+ for directorate in interesting_directorates .distinct ().iterator ():
113+ name = directorate .acronym
114+ dump_sublist (afile , vfile , name + '-ads' , ['ietf.org' , ], settings .GROUP_VIRTUAL_DOMAIN , get_group_ad_emails (directorate ))
115+ dump_sublist (afile , vfile , name + '-chairs' , ['ietf.org' , ], settings .GROUP_VIRTUAL_DOMAIN , get_group_role_emails (directorate , ['chair' , 'secr' ]))
116+
117+ # - Areas --------------------------------------------------
99118 # Additionally, for areaz, we should list -ads and -chairs
100119 # (for every chair in active groups within the area).
101120 areas = Group .objects .filter (type = 'area' ).all ()
0 commit comments