Skip to content

Commit

Permalink
Add IETF Administrative LLC groups. Fixes #3302. Commit ready for merge.
Browse files Browse the repository at this point in the history
 - Legacy-Id: 19310
  • Loading branch information
rjsparks committed Aug 31, 2021
1 parent d427303 commit 847f37d
Show file tree
Hide file tree
Showing 9 changed files with 277 additions and 17 deletions.
6 changes: 4 additions & 2 deletions ietf/doc/templatetags/wg_menu.py
Expand Up @@ -45,9 +45,9 @@
}

parents = Group.objects.filter(
models.Q(type="area") | models.Q(type="irtf", acronym="irtf") | models.Q(acronym='iab'),
models.Q(type="area") | models.Q(type="irtf", acronym="irtf") | models.Q(acronym='iab') | models.Q(acronym='ietfadminllc'),
state="active"
).order_by('type_id', 'acronym')
).order_by('type__order','type_id', 'acronym')

@register.simple_tag
def wg_menu():
Expand All @@ -64,5 +64,7 @@ def wg_menu():
p.menu_url = "/rg/"
elif p.acronym == "iab":
p.menu_url = "/program/"
elif p.acronym == 'ietfadminllc':
p.menu_url = "/adm/"

return render_to_string('base/menu_wg.html', { 'parents': parents })
55 changes: 55 additions & 0 deletions ietf/group/migrations/0046_grouptypename_admin_to_adm.py
@@ -0,0 +1,55 @@
# Copyright The IETF Trust 2021 All Rights Reserved

from django.db import migrations

def forward(apps, schema_editor):
GroupTypeName = apps.get_model('name','GroupTypeName')
Group = apps.get_model('group', 'Group')
GroupHistory = apps.get_model('group', 'GroupHistory')
GroupFeatures = apps.get_model('group', 'GroupFeatures')

a = GroupTypeName.objects.get(pk='admin')
a.pk='adm'
a.order=1
a.save()
f = GroupFeatures.objects.get(pk='admin')
f.pk='adm'
f.save()

Group.objects.filter(type_id='admin').update(type_id='adm')
GroupHistory.objects.filter(type_id='admin').update(type_id='adm')

GroupFeatures.objects.filter(pk='admin').delete()
GroupTypeName.objects.filter(pk='admin').delete()

def reverse(apps, schema_editor):
GroupTypeName = apps.get_model('name','GroupTypeName')
Group = apps.get_model('group', 'Group')
GroupHistory = apps.get_model('group','GroupHistory')
GroupFeatures = apps.get_model('group', 'GroupFeatures')

a = GroupTypeName.objects.get(pk='adm')
a.pk='admin'
a.order=0
a.save()
f = GroupFeatures.objects.get(pk='adm')
f.pk='admin'
f.save()

Group.objects.filter(type_id='adm').update(type_id='admin')
GroupHistory.objects.filter(type_id='adm').update(type_id='admin')

GroupFeatures.objects.filter(type_id='adm').delete()
GroupTypeName.objects.filter(pk='adm').delete()


class Migration(migrations.Migration):

dependencies = [
('group', '0045_iabasg'),
('name', '0028_iabasg'),
]

operations = [
migrations.RunPython(forward,reverse)
]
88 changes: 88 additions & 0 deletions ietf/group/migrations/0047_ietfllc.py
@@ -0,0 +1,88 @@
# Copyright The IETF Trust 2021 All Rights Reserved

from django.db import migrations

def email(person):
e = person.email_set.filter(primary=True).first()
if not e:
e = person.email_set.filter(active=True).order_by("-time").first()
return e

def forward(apps, schema_editor):
Group = apps.get_model('group', 'Group')
Person = apps.get_model('person', 'Person')
llc = Group.objects.create(
acronym='ietfadminllc',
name="IETF Administration LLC",
state_id='active',
type_id='adm',
description="The IETF Administration LLC (IETF LLC) provides the corporate legal home for the IETF, the Internet Architecture Board (IAB), and the Internet Research Task Force (IRTF). The Administration (https://www.ietf.org/about/administration/) section of the website has full details of the LLC and is where the various policies and reports produced by the LLC are published.",
)
Group.objects.filter(acronym='llc-board').update(parent=llc, description="The IETF Administration LLC (IETF LLC) provides the corporate legal home for the IETF, the Internet Architecture Board (IAB), and the Internet Research Task Force (IRTF). The Administration (https://www.ietf.org/about/administration/) section of the website has full details of the LLC and is where the various policies and reports produced by the LLC are published.")
llc_staff= Group.objects.create(
acronym='llc-staff',
name="IETF LLC employees",
state_id='active',
type_id='adm',
parent=llc,
description="The IETF Administration LLC (IETF LLC) provides the corporate legal home for the IETF, the Internet Architecture Board (IAB), and the Internet Research Task Force (IRTF). The Administration (https://www.ietf.org/about/administration/) section of the website has full details of the LLC and is where the various policies and reports produced by the LLC are published.",
)
legal = Group.objects.create(
acronym='legal-consult',
name="Legal consultation group",
state_id='active',
type_id='adm',
parent=llc,
description="The legal-consult list is a group of community participants who provide their views to the IETF Administration LLC in private on various legal matters. This was first established under the IAOC and has not been reviewed since. Legal advice is provided separately to the LLC by contracted external counsel.",
)

for email_addr in ('jay@ietf.org', 'ghwood@ietf.org', 'lbshaw@ietf.org', 'krathnayake@ietf.org'):
p = Person.objects.get(email__address=email_addr)
llc_staff.role_set.create(name_id='member',person=p,email=email(p))

for email_addr in (
'amorris@amsl.com',
'brad@biddle.law',
'David.Wilson@thompsonhine.com',
'glenn.deen@nbcuni.com',
'hall@isoc.org',
'Jason_Livingood@comcast.com',
'jay@ietf.org',
'jmh@joelhalpern.com',
'johnl@taugh.com',
'kathleen.moriarty.ietf@gmail.com',
'lars@eggert.org',
'lflynn@amsl.com',
'stewe@stewe.org',
'vigdis@biddle.law',
'wendy@seltzer.org',
):
p = Person.objects.filter(email__address=email_addr).first()
if p:
legal.role_set.create(name_id='member', person=p, email=email(p))


def reverse(apps, schema_editor):
Group = apps.get_model('group', 'Group')
Group.objects.filter(acronym='llc-board').update(parent=None)
Group.objects.filter(acronym__in=['llc_staff','legal-consult']).delete()
Group.objects.filter(acronym='ietfadminllc').delete()


class Migration(migrations.Migration):

dependencies = [
('group', '0046_grouptypename_admin_to_adm'),
('person', '0019_auto_20210604_1443'),
# The below are needed for reverse migrations to work
('name','0028_iabasg'),
('doc', '0043_bofreq_docevents'),
('liaisons','0009_delete_liaisonstatementgroupcontacts_model'),
('meeting', '0018_document_primary_key_cleanup'),
('review', '0014_document_primary_key_cleanup'),
('submit', '0008_submissionextresource'),
]

operations = [
migrations.RunPython(forward,reverse)
]
4 changes: 2 additions & 2 deletions ietf/group/tests_info.py
Expand Up @@ -74,7 +74,7 @@ def test_active_groups(self):
self.assertContains(r, group.name)
self.assertContains(r, escape(group.ad_role().person.plain_name()))

for t in ('rg','area','ag', 'rag', 'dir','review','team','program'):
for t in ('rg','area','ag', 'rag', 'dir','review','team','program','iabasg','adm'):
g = GroupFactory.create(type_id=t,state_id='active')
if t in ['dir','review']:
g.parent = GroupFactory.create(type_id='area',state_id='active')
Expand All @@ -90,7 +90,7 @@ def test_active_groups(self):
self.assertContains(r, "Directorate")
self.assertContains(r, "AG")

for slug in GroupTypeName.objects.exclude(slug__in=['wg','rg','ag','rag','area','dir','review','team','program','adhoc','ise']).values_list('slug',flat=True):
for slug in GroupTypeName.objects.exclude(slug__in=['wg','rg','ag','rag','area','dir','review','team','program','adhoc','ise','adm','iabasg']).values_list('slug',flat=True):
with self.assertRaises(NoReverseMatch):
url=urlreverse('ietf.group.views.active_groups', kwargs=dict(group_type=slug))

Expand Down
8 changes: 7 additions & 1 deletion ietf/group/views.py
Expand Up @@ -294,6 +294,8 @@ def active_groups(request, group_type=None):
return active_review_dirs(request)
elif group_type in ("program", "iabasg"):
return active_iab(request)
elif group_type == "adm":
return active_adm(request)
else:
raise Http404

Expand Down Expand Up @@ -327,6 +329,10 @@ def active_iab(request):
group.leads = sorted(roles(group, "lead"), key=extract_last_name)
return render(request, 'group/active_iabgroups.html', {'iabgroups' : iabgroups })

def active_adm(request):
adm = Group.objects.filter(type="adm", state="active").order_by("parent","name")
return render(request, 'group/active_adm.html', {'adm' : adm })

def active_areas(request):
areas = Group.objects.filter(type="area", state="active").order_by("name")
return render(request, 'group/active_areas.html', {'areas': areas })
Expand Down Expand Up @@ -1290,7 +1296,7 @@ def group_json(request, acronym):
@cache_control(public=True, max_age=30*60)
@cache_page(30 * 60)
def group_menu_data(request):
groups = Group.objects.filter(state="active", parent__state="active").filter(Q(type__features__acts_like_wg=True)|Q(type_id__in=['program','iabasg'])).order_by("-type_id","acronym")
groups = Group.objects.filter(state="active", parent__state="active").filter(Q(type__features__acts_like_wg=True)|Q(type_id__in=['program','iabasg'])|Q(parent__acronym='ietfadminllc')).order_by("-type_id","acronym")

groups_by_parent = defaultdict(list)
for g in groups:
Expand Down
90 changes: 80 additions & 10 deletions ietf/name/fixtures/names.json
Expand Up @@ -2620,7 +2620,7 @@
"show_on_agenda": false
},
"model": "group.groupfeatures",
"pk": "admin"
"pk": "adm"
},
{
"fields": {
Expand Down Expand Up @@ -2771,6 +2771,43 @@
"model": "group.groupfeatures",
"pk": "iab"
},
{
"fields": {
"about_page": "ietf.group.views.group_about",
"acts_like_wg": false,
"admin_roles": "[\n \"lead\"\n]",
"agenda_type": "ad",
"create_wiki": false,
"custom_group_roles": true,
"customize_workflow": false,
"default_parent": "",
"default_tab": "ietf.group.views.group_about",
"default_used_roles": "[\n \"member\",\n \"chair\",\n \"lead\"\n]",
"docman_roles": "[\n \"lead\",\n \"chair\",\n \"secr\"\n]",
"groupman_authroles": "[\n \"Secretariat\",\n \"IAB\"\n]",
"groupman_roles": "[\n \"lead\",\n \"chair\",\n \"secr\"\n]",
"has_chartering_process": false,
"has_default_jabber": false,
"has_documents": true,
"has_meetings": true,
"has_milestones": true,
"has_nonsession_materials": false,
"has_reviews": false,
"has_session_materials": false,
"is_schedulable": false,
"material_types": "[\n \"slides\"\n]",
"matman_roles": "[\n \"lead\",\n \"chair\",\n \"secr\"\n]",
"need_parent": false,
"parent_types": [
"ietf"
],
"req_subm_approval": false,
"role_order": "[\n \"lead\",\n \"chair\",\n \"secr\"\n]",
"show_on_agenda": false
},
"model": "group.groupfeatures",
"pk": "iabasg"
},
{
"fields": {
"about_page": "ietf.group.views.group_about",
Expand Down Expand Up @@ -3295,7 +3332,7 @@
"default_tab": "ietf.group.views.group_about",
"default_used_roles": "[\n \"ad\",\n \"member\",\n \"delegate\",\n \"secr\",\n \"liaison\",\n \"atlarge\",\n \"chair\",\n \"matman\",\n \"techadv\"\n]",
"docman_roles": "[\n \"chair\"\n]",
"groupman_authroles": "[\n \"Secretariat\"\n]",
"groupman_authroles": "[\n \"Secretariat\",\n \"Area Director\"\n]",
"groupman_roles": "[\n \"chair\"\n]",
"has_chartering_process": false,
"has_default_jabber": false,
Expand Down Expand Up @@ -10719,12 +10756,12 @@
"fields": {
"desc": "",
"name": "Admin",
"order": 0,
"order": 1,
"used": true,
"verbose_name": "Administrative Group"
},
"model": "name.grouptypename",
"pk": "admin"
"pk": "adm"
},
{
"fields": {
Expand Down Expand Up @@ -10770,6 +10807,17 @@
"model": "name.grouptypename",
"pk": "iab"
},
{
"fields": {
"desc": "",
"name": "IAB ASG",
"order": 0,
"used": true,
"verbose_name": "IAB Administrative Support Group"
},
"model": "name.grouptypename",
"pk": "iabasg"
},
{
"fields": {
"desc": "",
Expand Down Expand Up @@ -10968,17 +11016,39 @@
"model": "name.importantdatename",
"pk": "01cutoff"
},
{
"fields": {
"default_offset_days": -57,
"desc": "Cut-off date for BOF proposal requests. To request a BOF, please see instructions at https://www.ietf.org/how/bofs/bof-procedures on Requesting a BOF",
"name": "Cut-off preliminary BOF requests",
"order": 0,
"used": true
},
"model": "name.importantdatename",
"pk": "bofprelimcutoff"
},
{
"fields": {
"default_offset_days": -57,
"desc": "Preliminary BOF proposals requested. To request a BOF, please see instructions on requesting a BOF at https://www.ietf.org/how/bofs/bof-procedures/",
"name": "Preliminary BOF proposals requested",
"order": 0,
"used": true
"used": false
},
"model": "name.importantdatename",
"pk": "bofproposals"
},
{
"fields": {
"default_offset_days": -43,
"desc": "Cut-off date for revised BOF proposal requests to Area Directors at UTC 23:59. To request a BOF, please see instructions at https://www.ietf.org/how/bofs/bof-procedures on Requesting a BOF.",
"name": "Cut-off revised BOF requests",
"order": 0,
"used": true
},
"model": "name.importantdatename",
"pk": "bofrevcutoff"
},
{
"fields": {
"default_offset_days": -36,
Expand All @@ -10996,7 +11066,7 @@
"desc": "Cut-off date for BOF proposal requests to Area Directors at UTC 23:59",
"name": "Cut-off BOF scheduling Requests",
"order": 0,
"used": true
"used": false
},
"model": "name.importantdatename",
"pk": "cutoffbofreq"
Expand Down Expand Up @@ -15485,7 +15555,7 @@
"fields": {
"command": "xym",
"switch": "--version",
"time": "2021-07-13T00:12:25.184",
"time": "2021-08-30T00:16:41.046",
"used": true,
"version": "xym 0.5"
},
Expand All @@ -15496,7 +15566,7 @@
"fields": {
"command": "pyang",
"switch": "--version",
"time": "2021-07-13T00:12:26.721",
"time": "2021-08-30T00:16:42.619",
"used": true,
"version": "pyang 2.5.0"
},
Expand All @@ -15507,7 +15577,7 @@
"fields": {
"command": "yanglint",
"switch": "--version",
"time": "2021-07-13T00:12:27.015",
"time": "2021-08-30T00:16:42.981",
"used": true,
"version": "yanglint SO 1.6.7"
},
Expand All @@ -15518,7 +15588,7 @@
"fields": {
"command": "xml2rfc",
"switch": "--version",
"time": "2021-07-13T00:12:29.814",
"time": "2021-08-30T00:16:45.742",
"used": true,
"version": "xml2rfc 3.9.1"
},
Expand Down

0 comments on commit 847f37d

Please sign in to comment.