Merged in ^/personal/henrik/6.72.1-django-1.11@14676: Upgrade to Django 1.11

- Legacy-Id: 14695
This commit is contained in:
Henrik Levkowetz 2018-02-25 19:55:16 +00:00
commit 1ed8e967e7
321 changed files with 1680 additions and 17531 deletions

View file

@ -1,30 +0,0 @@
(this applies to the django/ subdirectory)
---------------------------------------------------------------------------
Copyright (c) Django Software Foundation and individual contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of Django nor the names of its contributors may be used
to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -96,10 +96,10 @@ class Command(AppCommand):
for field in model._meta.fields:
if isinstance(field, (models.ForeignKey, models.OneToOneField)):
#debug.show('field.name')
#debug.pprint('dir(field.rel.to)')
#debug.pprint('dir(field.remote_field.to)')
#exit()
rel_app=field.rel.to._meta.app_label
rel_model_name=field.rel.to.__name__
rel_app=field.remote_field.to._meta.app_label
rel_model_name=field.remote_field.to.__name__
if rel_model_name == model_name:
# foreign key to self class -- quote
# the rmodel_name
@ -111,10 +111,10 @@ class Command(AppCommand):
name=field.name,
app=rel_app,
module=rel_app.split('.')[-1],
model=field.rel.to,
model=field.remote_field.to,
model_name=rel_model_name,
rmodel_name=rmodel_name,
resource_name=field.rel.to.__name__.lower(),
resource_name=field.remote_field.to.__name__.lower(),
))
imports[rel_app]["module"] = rel_app
imports[rel_app]["names"].append(rel_model_name)
@ -124,10 +124,10 @@ class Command(AppCommand):
m2m_keys = []
for field in model._meta.many_to_many:
#debug.show('field.name')
#debug.pprint('dir(field.rel.to)')
#debug.pprint('dir(field.remote_field.to)')
#exit()
rel_app=field.rel.to._meta.app_label
rel_model_name=field.rel.to.__name__
rel_app=field.remote_field.to._meta.app_label
rel_model_name=field.remote_field.to.__name__
if rel_model_name == model_name:
# foreign key to self class -- quote
# the rmodel_name
@ -139,10 +139,10 @@ class Command(AppCommand):
name=field.name,
app=rel_app,
module=rel_app.split('.')[-1],
model=field.rel.to,
model=field.remote_field.to,
model_name=rel_model_name,
rmodel_name=rmodel_name,
resource_name=field.rel.to.__name__.lower(),
resource_name=field.remote_field.to.__name__.lower(),
))
imports[rel_app]["module"] = rel_app
imports[rel_app]["names"].append(rel_model_name)

View file

@ -1,11 +1,16 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-20 10:52
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
import django.db.models.deletion
import ietf.utils.models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
@ -13,78 +18,23 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='CommunityList',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('secret', models.CharField(max_length=255, null=True, blank=True)),
('cached', models.TextField(null=True, blank=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='DisplayConfiguration',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('sort_method', models.CharField(default=b'by_filename', max_length=100, choices=[(b'by_filename', b'Alphabetical by I-D filename and RFC number'), (b'by_title', b'Alphabetical by document title'), (b'by_wg', b'Alphabetical by associated WG'), (b'date_publication', b'Date of publication of current version of the document'), (b'recent_change', b'Date of most recent change of status of any type'), (b'recent_significant', b'Date of most recent significant change of status')])),
('display_fields', models.TextField(default=b'filename,title,date')),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='DocumentChangeDates',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('new_version_date', models.DateTimeField(null=True, blank=True)),
('normal_change_date', models.DateTimeField(null=True, blank=True)),
('significant_change_date', models.DateTimeField(null=True, blank=True)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='EmailSubscription',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('email', models.CharField(max_length=200)),
('significant', models.BooleanField(default=False)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('notify_on', models.CharField(choices=[(b'all', b'All changes'), (b'significant', b'Only significant state changes')], default=b'all', max_length=30)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='ExpectedChange',
name='SearchRule',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('expected_date', models.DateField(verbose_name=b'Expected date')),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('rule_type', models.CharField(choices=[(b'group', b'All I-Ds associated with a particular group'), (b'area', b'All I-Ds associated with all groups in a particular Area'), (b'group_rfc', b'All RFCs associated with a particular group'), (b'area_rfc', b'All RFCs associated with all groups in a particular Area'), (b'state_iab', b'All I-Ds that are in a particular IAB state'), (b'state_iana', b'All I-Ds that are in a particular IANA state'), (b'state_iesg', b'All I-Ds that are in a particular IESG state'), (b'state_irtf', b'All I-Ds that are in a particular IRTF state'), (b'state_ise', b'All I-Ds that are in a particular ISE state'), (b'state_rfceditor', b'All I-Ds that are in a particular RFC Editor state'), (b'state_ietf', b'All I-Ds that are in a particular Working Group state'), (b'author', b'All I-Ds with a particular author'), (b'author_rfc', b'All RFCs with a particular author'), (b'ad', b'All I-Ds with a particular responsible AD'), (b'shepherd', b'All I-Ds with a particular document shepherd'), (b'name_contains', b'All I-Ds with particular text/regular expression in the name')], max_length=30)),
('text', models.CharField(blank=True, default=b'', max_length=255, verbose_name=b'Text/RegExp')),
('community_list', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='community.CommunityList')),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='ListNotification',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('significant', models.BooleanField(default=False)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Rule',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('rule_type', models.CharField(max_length=30, choices=[(b'wg_asociated', b'All I-Ds associated with a particular WG'), (b'area_asociated', b'All I-Ds associated with all WGs in a particular Area'), (b'ad_responsible', b'All I-Ds with a particular responsible AD'), (b'author', b'All I-Ds with a particular author'), (b'shepherd', b'All I-Ds with a particular document shepherd'), (b'with_text', b'All I-Ds that contain a particular text string in the name'), (b'in_iab_state', b'All I-Ds that are in a particular IAB state'), (b'in_iana_state', b'All I-Ds that are in a particular IANA state'), (b'in_iesg_state', b'All I-Ds that are in a particular IESG state'), (b'in_irtf_state', b'All I-Ds that are in a particular IRTF state'), (b'in_ise_state', b'All I-Ds that are in a particular ISE state'), (b'in_rfcEdit_state', b'All I-Ds that are in a particular RFC Editor state'), (b'in_wg_state', b'All I-Ds that are in a particular Working Group state'), (b'wg_asociated_rfc', b'All RFCs associated with a particular WG'), (b'area_asociated_rfc', b'All RFCs associated with all WGs in a particular Area'), (b'author_rfc', b'All RFCs with a particular author')])),
('value', models.CharField(max_length=255)),
('last_updated', models.DateTimeField(auto_now=True)),
],
options={
},
bases=(models.Model,),
),
]

View file

@ -1,88 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('group', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('community', '0001_initial'),
('doc', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='rule',
name='cached_ids',
field=models.ManyToManyField(to='doc.Document'),
preserve_default=True,
),
migrations.AddField(
model_name='rule',
name='community_list',
field=models.ForeignKey(to='community.CommunityList'),
preserve_default=True,
),
migrations.AlterUniqueTogether(
name='rule',
unique_together=set([('community_list', 'rule_type', 'value')]),
),
migrations.AddField(
model_name='listnotification',
name='event',
field=models.ForeignKey(to='doc.DocEvent'),
preserve_default=True,
),
migrations.AddField(
model_name='expectedchange',
name='community_list',
field=models.ForeignKey(to='community.CommunityList'),
preserve_default=True,
),
migrations.AddField(
model_name='expectedchange',
name='document',
field=models.ForeignKey(to='doc.Document'),
preserve_default=True,
),
migrations.AddField(
model_name='emailsubscription',
name='community_list',
field=models.ForeignKey(to='community.CommunityList'),
preserve_default=True,
),
migrations.AddField(
model_name='documentchangedates',
name='document',
field=models.ForeignKey(to='doc.Document'),
preserve_default=True,
),
migrations.AddField(
model_name='displayconfiguration',
name='community_list',
field=models.ForeignKey(to='community.CommunityList'),
preserve_default=True,
),
migrations.AddField(
model_name='communitylist',
name='added_ids',
field=models.ManyToManyField(to='doc.Document'),
preserve_default=True,
),
migrations.AddField(
model_name='communitylist',
name='group',
field=models.ForeignKey(blank=True, to='group.Group', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='communitylist',
name='user',
field=models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, null=True),
preserve_default=True,
),
]

View file

@ -1,120 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('person', '0004_auto_20150308_0440'),
('doc', '0010_auto_20150930_0251'),
('group', '0006_auto_20150718_0509'),
('community', '0002_auto_20141222_1749'),
]
operations = [
migrations.RenameModel(
old_name='Rule',
new_name='SearchRule',
),
migrations.RemoveField(
model_name='displayconfiguration',
name='community_list',
),
migrations.DeleteModel(
name='DisplayConfiguration',
),
migrations.RemoveField(
model_name='documentchangedates',
name='document',
),
migrations.DeleteModel(
name='DocumentChangeDates',
),
migrations.RemoveField(
model_name='expectedchange',
name='community_list',
),
migrations.RemoveField(
model_name='expectedchange',
name='document',
),
migrations.DeleteModel(
name='ExpectedChange',
),
migrations.RemoveField(
model_name='listnotification',
name='event',
),
migrations.DeleteModel(
name='ListNotification',
),
migrations.RemoveField(
model_name='searchrule',
name='cached_ids',
),
migrations.RenameField(
model_name='communitylist',
old_name='added_ids',
new_name='added_docs',
),
migrations.RemoveField(
model_name='communitylist',
name='cached',
),
migrations.RemoveField(
model_name='communitylist',
name='secret',
),
migrations.AddField(
model_name='searchrule',
name='group',
field=models.ForeignKey(blank=True, to='group.Group', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='searchrule',
name='person',
field=models.ForeignKey(blank=True, to='person.Person', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='searchrule',
name='state',
field=models.ForeignKey(blank=True, to='doc.State', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='searchrule',
name='text',
field=models.CharField(default=b'', max_length=255, verbose_name=b'Text/RegExp', blank=True),
preserve_default=True,
),
migrations.RemoveField(
model_name='searchrule',
name='last_updated',
),
migrations.AlterField(
model_name='searchrule',
name='rule_type',
field=models.CharField(max_length=30, choices=[(b'group', b'All I-Ds associated with a particular group'), (b'area', b'All I-Ds associated with all groups in a particular Area'), (b'group_rfc', b'All RFCs associated with a particular group'), (b'area_rfc', b'All RFCs associated with all groups in a particular Area'), (b'state_iab', b'All I-Ds that are in a particular IAB state'), (b'state_iana', b'All I-Ds that are in a particular IANA state'), (b'state_iesg', b'All I-Ds that are in a particular IESG state'), (b'state_irtf', b'All I-Ds that are in a particular IRTF state'), (b'state_ise', b'All I-Ds that are in a particular ISE state'), (b'state_rfceditor', b'All I-Ds that are in a particular RFC Editor state'), (b'state_ietf', b'All I-Ds that are in a particular Working Group state'), (b'author', b'All I-Ds with a particular author'), (b'author_rfc', b'All RFCs with a particular author'), (b'ad', b'All I-Ds with a particular responsible AD'), (b'shepherd', b'All I-Ds with a particular document shepherd'), (b'name_contains', b'All I-Ds with particular text/regular expression in the name')]),
preserve_default=True,
),
migrations.AlterUniqueTogether(
name='searchrule',
unique_together=set([]),
),
migrations.AddField(
model_name='emailsubscription',
name='notify_on',
field=models.CharField(default=b'all', max_length=30, choices=[(b'all', b'All changes'), (b'significant', b'Only significant state changes')]),
preserve_default=True,
),
migrations.AddField(
model_name='searchrule',
name='name_contains_index',
field=models.ManyToManyField(to='doc.Document'),
preserve_default=True,
),
]

View file

@ -1,259 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re
from django.db import migrations, models
def port_rules_to_typed_system(apps, schema_editor):
SearchRule = apps.get_model("community", "SearchRule")
State = apps.get_model("doc", "State")
Group = apps.get_model("group", "Group")
Person = apps.get_model("person", "Person")
draft_active = State.objects.get(type="draft", slug="active")
draft_rfc = State.objects.get(type="draft", slug="rfc")
def try_to_uniquify_person(rule, person_qs):
if rule.community_list.user and len(person_qs) > 1:
user_specific_qs = person_qs.filter(user=rule.community_list.user)
if len(user_specific_qs) > 0 and len(user_specific_qs) < len(person_qs):
return user_specific_qs
return person_qs
for rule in SearchRule.objects.all():
handled = False
if rule.rule_type in ['wg_asociated', 'area_asociated', 'wg_asociated_rfc', 'area_asociated_rfc']:
try:
rule.group = Group.objects.get(acronym=rule.value)
if rule.rule_type in ['wg_asociated_rfc', 'area_asociated_rfc']:
rule.state = draft_rfc
else:
rule.state = draft_active
handled = True
except Group.DoesNotExist:
pass
elif rule.rule_type in ['in_iab_state', 'in_iana_state', 'in_iesg_state', 'in_irtf_state', 'in_ise_state', 'in_rfcEdit_state', 'in_wg_state']:
state_types = {
'in_iab_state': 'draft-stream-iab',
'in_iana_state': 'draft-iana-review',
'in_iesg_state': 'draft-iesg',
'in_irtf_state': 'draft-stream-irtf',
'in_ise_state': 'draft-stream-ise',
'in_rfcEdit_state': 'draft-rfceditor',
'in_wg_state': 'draft-stream-ietf',
}
try:
rule.state = State.objects.get(type=state_types[rule.rule_type], slug=rule.value)
handled = True
except State.DoesNotExist:
pass
elif rule.rule_type in ["author", "author_rfc"]:
found_persons = list(try_to_uniquify_person(rule, Person.objects.filter(documentauthor__id__gte=1).filter(name__icontains=rule.value).distinct()))
if found_persons:
rule.person = found_persons[0]
rule.state = draft_active
for p in found_persons[1:]:
SearchRule.objects.create(
community_list=rule.community_list,
rule_type=rule.rule_type,
state=rule.state,
person=p,
)
#print "created", rule.rule_type, p.name
handled = True
elif rule.rule_type == "ad_responsible":
try:
rule.person = Person.objects.get(id=rule.value)
rule.state = draft_active
handled = True
except Person.DoesNotExist:
pass
elif rule.rule_type == "shepherd":
found_persons = list(try_to_uniquify_person(rule, Person.objects.filter(email__shepherd_document_set__type="draft").filter(name__icontains=rule.value).distinct()))
if found_persons:
rule.person = found_persons[0]
rule.state = draft_active
for p in found_persons[1:]:
SearchRule.objects.create(
community_list=rule.community_list,
rule_type=rule.rule_type,
state=rule.state,
person=p,
)
#print "created", rule.rule_type, p.name
handled = True
elif rule.rule_type == "with_text":
rule.state = draft_active
if rule.value:
rule.text = rule.value
handled = True
if handled:
rule.save()
else:
rule.delete()
#print "NOT HANDLED", rule.pk, rule.rule_type, rule.value
def delete_extra_person_rules(apps, schema_editor):
SearchRule = apps.get_model("community", "SearchRule")
SearchRule.objects.exclude(person=None).filter(value="").delete()
RENAMED_RULES = [
('wg_asociated', 'group'),
('area_asociated', 'area'),
('wg_asociated_rfc', 'group_rfc'),
('area_asociated_rfc', 'area_rfc'),
('in_iab_state', 'state_iab'),
('in_iana_state', 'state_iana'),
('in_iesg_state', 'state_iesg'),
('in_irtf_state', 'state_irtf'),
('in_ise_state', 'state_ise'),
('in_rfcEdit_state', 'state_rfceditor'),
('in_wg_state', 'state_ietf'),
('ad_responsible', 'ad'),
('with_text', 'name_contains'),
]
def rename_rule_type_forwards(apps, schema_editor):
SearchRule = apps.get_model("community", "SearchRule")
renamings = dict(RENAMED_RULES)
for r in SearchRule.objects.all():
if r.rule_type in renamings:
r.rule_type = renamings[r.rule_type]
r.save()
def rename_rule_type_backwards(apps, schema_editor):
SearchRule = apps.get_model("community", "SearchRule")
renamings = dict((to, fro) for fro, to in RENAMED_RULES)
for r in SearchRule.objects.all():
if r.rule_type in renamings:
r.rule_type = renamings[r.rule_type]
r.save()
def get_rid_of_empty_lists(apps, schema_editor):
CommunityList = apps.get_model("community", "CommunityList")
for cl in CommunityList.objects.filter(added_docs=None, searchrule=None, emailsubscription=None):
cl.delete()
def move_email_subscriptions_to_preregistered_email(apps, schema_editor):
EmailSubscription = apps.get_model("community", "EmailSubscription")
Email = apps.get_model("person", "Email")
Person = apps.get_model("person", "Person")
for e in EmailSubscription.objects.all():
email_obj = None
try:
email_obj = Email.objects.get(address=e.email)
except Email.DoesNotExist:
if e.community_list.user:
person = Person.objects.filter(user=e.community_list.user).first()
#print "creating", e.email, person.ascii
# we'll register it on the user, on the assumption
# that the user and the subscriber is the same person
email_obj = Email.objects.create(
address=e.email,
person=person,
)
if not email_obj:
print "deleting", e.email
e.delete()
def fill_in_notify_on(apps, schema_editor):
EmailSubscription = apps.get_model("community", "EmailSubscription")
EmailSubscription.objects.filter(significant=False).update(notify_on="all")
EmailSubscription.objects.filter(significant=True).update(notify_on="significant")
def add_group_community_lists(apps, schema_editor):
Group = apps.get_model("group", "Group")
DocAlias = apps.get_model("doc", "DocAlias")
State = apps.get_model("doc", "State")
CommunityList = apps.get_model("community", "CommunityList")
SearchRule = apps.get_model("community", "SearchRule")
active_state = State.objects.get(slug="active", type="draft")
rfc_state = State.objects.get(slug="rfc", type="draft")
draft_aliases = DocAlias.objects.filter(name__startswith="draft")
for g in Group.objects.filter(type__in=("rg", "wg")):
clist = CommunityList.objects.filter(group=g).first()
if clist:
SearchRule.objects.get_or_create(community_list=clist, rule_type="group", group=g, state=active_state)
SearchRule.objects.get_or_create(community_list=clist, rule_type="group_rfc", group=g, state=rfc_state)
r, _ = SearchRule.objects.get_or_create(community_list=clist, rule_type="name_contains", text=r"^draft-[^-]+-%s-" % g.acronym, state=active_state)
# do the matching manually in Python to speed up the operation
#r.name_contains_index = Document.objects.filter(docalias__name__regex=r.text)
name_re = re.compile(r.text)
r.name_contains_index = [ a.document_id for a in draft_aliases if name_re.match(a.name) ]
else:
clist = CommunityList.objects.create(group=g)
SearchRule.objects.create(community_list=clist, rule_type="group", group=g, state=active_state)
SearchRule.objects.create(community_list=clist, rule_type="group_rfc", group=g, state=rfc_state)
r = SearchRule.objects.create(community_list=clist, rule_type="name_contains", text=r"^draft-[^-]+-%s-" % g.acronym, state=active_state)
name_re = re.compile(r.text)
r.name_contains_index = [ a.document_id for a in draft_aliases if name_re.match(a.name) ]
def noop(apps, schema_editor):
pass
class Migration(migrations.Migration):
dependencies = [
('community', '0003_cleanup'),
]
operations = [
migrations.RunPython(port_rules_to_typed_system, delete_extra_person_rules),
migrations.RunPython(rename_rule_type_forwards, rename_rule_type_backwards),
migrations.RunPython(move_email_subscriptions_to_preregistered_email, noop),
migrations.RunPython(get_rid_of_empty_lists, noop),
migrations.RunPython(fill_in_notify_on, noop),
migrations.RunPython(add_group_community_lists, noop),
migrations.RemoveField(
model_name='searchrule',
name='value',
),
migrations.AlterField(
model_name='emailsubscription',
name='email',
field=models.ForeignKey(to='person.Email'),
preserve_default=True,
),
migrations.RemoveField(
model_name='emailsubscription',
name='significant',
),
]

View file

@ -6,10 +6,11 @@ from django.urls import reverse as urlreverse
from ietf.doc.models import Document, DocEvent, State
from ietf.group.models import Group
from ietf.person.models import Person, Email
from ietf.utils.models import ForeignKey
class CommunityList(models.Model):
user = models.ForeignKey(User, blank=True, null=True)
group = models.ForeignKey(Group, blank=True, null=True)
user = ForeignKey(User, blank=True, null=True)
group = ForeignKey(Group, blank=True, null=True)
added_docs = models.ManyToManyField(Document)
def long_name(self):
@ -59,13 +60,13 @@ class SearchRule(models.Model):
('name_contains', 'All I-Ds with particular text/regular expression in the name'),
]
community_list = models.ForeignKey(CommunityList)
community_list = ForeignKey(CommunityList)
rule_type = models.CharField(max_length=30, choices=RULE_TYPES)
# these are filled in depending on the type
state = models.ForeignKey(State, blank=True, null=True)
group = models.ForeignKey(Group, blank=True, null=True)
person = models.ForeignKey(Person, blank=True, null=True)
state = ForeignKey(State, blank=True, null=True)
group = ForeignKey(Group, blank=True, null=True)
person = ForeignKey(Person, blank=True, null=True)
text = models.CharField(verbose_name="Text/RegExp", max_length=255, blank=True, default="")
# store a materialized view/index over which documents are matched
@ -78,8 +79,8 @@ class SearchRule(models.Model):
return "%s %s %s/%s/%s/%s" % (self.community_list, self.rule_type, self.state, self.group, self.person, self.text)
class EmailSubscription(models.Model):
community_list = models.ForeignKey(CommunityList)
email = models.ForeignKey(Email)
community_list = ForeignKey(CommunityList)
email = ForeignKey(Email)
NOTIFICATION_CHOICES = [
("all", "All changes"),

View file

@ -72,7 +72,7 @@ def reset_name_contains_index_for_rule(rule):
if not rule.rule_type == "name_contains":
return
rule.name_contains_index = Document.objects.filter(docalias__name__regex=rule.text)
rule.name_contains_index.set(Document.objects.filter(docalias__name__regex=rule.text))
def update_name_contains_indexes_with_new_doc(doc):
for r in SearchRule.objects.filter(rule_type="name_contains"):

View file

@ -1,11 +1,14 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-20 10:52
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
@ -13,14 +16,11 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='DBTemplate',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('path', models.CharField(unique=True, max_length=255)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('path', models.CharField(max_length=255, unique=True)),
('title', models.CharField(max_length=255)),
('variables', models.TextField(null=True, blank=True)),
('variables', models.TextField(blank=True, null=True)),
('content', models.TextField()),
],
options={
},
bases=(models.Model,),
),
]

View file

@ -1,28 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('group', '0001_initial'),
('name', '0001_initial'),
('dbtemplate', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='dbtemplate',
name='group',
field=models.ForeignKey(blank=True, to='group.Group', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='dbtemplate',
name='type',
field=models.ForeignKey(to='name.DBTemplateTypeName'),
preserve_default=True,
),
]

View file

@ -1,152 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def forward(apps, schema_editor):
DBTemplate = apps.get_model('dbtemplate','DBTemplate')
Group = apps.get_model('group','Group')
DBTemplate.objects.create(
path='/group/defaults/email/open_assignments.txt',
title='Default template for review team open assignment summary email',
type_id='django',
group=None,
content="""{% autoescape off %}Subject: Open review assignments in {{group.acronym}}
The following reviewers have assignments:{% for r in review_requests %}{% ifchanged r.section %}
{{r.section}}
{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer LC end Draft{% endif %}{% endifchanged %}
{{ r.reviewer.person.plain_name|ljust:"22" }} {% if r.section == 'Early review requests:' %}{{ r.deadline|date:"Y-m-d" }}{% else %}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.doc_id }}-{% if r.requested_rev %}{{ r.requested_rev }}{% else %}{{ r.doc.rev }}{% endif %} {{ r.earlier_review_mark }}{% endfor %}
* Other revision previously reviewed
** This revision already reviewed
{% if rotation_list %}Next in the reviewer rotation:
{% for p in rotation_list %} {{ p }}
{% endfor %}{% endif %}{% endautoescape %}
"""
)
DBTemplate.objects.create(
path='/group/genart/email/open_assignments.txt',
title='Genart open assignment summary',
type_id='django',
group=Group.objects.get(acronym='genart'),
content="""{% autoescape off %}Subject: Review Assignments
Hi all,
The following reviewers have assignments:{% for r in review_requests %}{% ifchanged r.section %}
{{r.section}}
{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer LC end Draft{% endif %}{% endifchanged %}
{{ r.reviewer.person.plain_name|ljust:"22" }} {% if r.section == 'Early review requests:' %}{{ r.deadline|date:"Y-m-d" }}{% else %}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.doc_id }}-{% if r.requested_rev %}{{ r.requested_rev }}{% else %}{{ r.doc.rev }}{% endif %} {{ r.earlier_review_mark }}{% endfor %}
* Other revision previously reviewed
** This revision already reviewed
{% if rotation_list %}Next in the reviewer rotation:
{% for p in rotation_list %} {{ p }}
{% endfor %}{% endif %}
The LC and Telechat review templates are included below:
-------------------------------------------------------
-- Begin LC Template --
I am the assigned Gen-ART reviewer for this draft. The General Area
Review Team (Gen-ART) reviews all IETF documents being processed
by the IESG for the IETF Chair. Please treat these comments just
like any other last call comments.
For more information, please see the FAQ at
<https://trac.ietf.org/trac/gen/wiki/GenArtfaq>.
Document:
Reviewer:
Review Date:
IETF LC End Date:
IESG Telechat date: (if known)
Summary:
Major issues:
Minor issues:
Nits/editorial comments:
-- End LC Template --
-- Begin Telechat Template --
I am the assigned Gen-ART reviewer for this draft. The General Area
Review Team (Gen-ART) reviews all IETF documents being processed
by the IESG for the IETF Chair. Please wait for direction from your
document shepherd or AD before posting a new version of the draft.
For more information, please see the FAQ at
<https://trac.ietf.org/trac/gen/wiki/GenArtfaq>.
Document:
Reviewer:
Review Date:
IETF LC End Date:
IESG Telechat date: (if known)
Summary:
Major issues:
Minor issues:
Nits/editorial comments:
-- End Telechat Template --
{% endautoescape %}
"""
)
DBTemplate.objects.create(
path='/group/secdir/email/open_assignments.txt',
title='Secdir open assignment summary',
type_id='django',
group=Group.objects.get(acronym='secdir'),
content="""{% autoescape off %}Subject: Assignments
Review instructions and related resources are at:
http://tools.ietf.org/area/sec/trac/wiki/SecDirReview{% for r in review_requests %}{% ifchanged r.section %}
{{r.section}}
{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer LC end Draft{% endif %}{% endifchanged %}
{{ r.reviewer.person.plain_name|ljust:"22" }}{{ r.earlier_review|yesno:'R, , ' }}{% if r.section == 'Early review requests:' %}{{ r.deadline|date:"Y-m-d" }}{% else %}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.doc_id }}-{% if r.requested_rev %}{{ r.requested_rev }}{% else %}{{ r.doc.rev }}{% endif %}{% endfor %}
{% if rotation_list %}Next in the reviewer rotation:
{% for p in rotation_list %} {{ p }}
{% endfor %}{% endif %}{% endautoescape %}
"""
)
def reverse(apps, schema_editor):
DBTemplate = apps.get_model('dbtemplate','DBTemplate')
DBTemplate.objects.filter(path__in=['/group/defaults/email/open_assignments.txt',
'/group/genart/email/open_assignments.txt',
'/group/secdir/email/open_assignments.txt',]).delete()
class Migration(migrations.Migration):
dependencies = [
('dbtemplate', '0002_auto_20141222_1749'),
('group', '0009_auto_20150930_0758'),
]
operations = [
migrations.RunPython(forward,reverse)
]

View file

@ -1,82 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def forward(apps, schema_editor):
DBTemplate = apps.get_model('dbtemplate','DBTemplate')
Group = apps.get_model('group','Group')
DBTemplate.objects.create(
path='/group/genart/review/content_templates/lc.txt',
title='Template for genart last call reviews',
type_id='django',
group=Group.objects.get(acronym='genart'),
content="""I am the assigned Gen-ART reviewer for this draft. The General Area
Review Team (Gen-ART) reviews all IETF documents being processed
by the IESG for the IETF Chair. Please treat these comments just
like any other last call comments.
For more information, please see the FAQ at
<https://trac.ietf.org/trac/gen/wiki/GenArtfaq>.
Document: {{ review_req.doc.name }}-??
Reviewer: {{ review_req.reviewer.person.plain_name }}
Review Date: {{ today }}
IETF LC End Date: {% if review_req.doc.most_recent_ietflc %}{{ review_req.doc.most_recent_ietflc.expires|date:"Y-m-d" }}{% else %}None{% endif %}
IESG Telechat date: {{ review_req.doc.telechat_date|default:'Not scheduled for a telechat }}
Summary:
Major issues:
Minor issues:
Nits/editorial comments:
"""
)
DBTemplate.objects.create(
path='/group/genart/review/content_templates/telechat.txt',
title='Template for genart telechat reviews',
type_id='django',
group=Group.objects.get(acronym='genart'),
content="""I am the assigned Gen-ART reviewer for this draft. The General Area
Review Team (Gen-ART) reviews all IETF documents being processed
by the IESG for the IETF Chair. Please wait for direction from your
document shepherd or AD before posting a new version of the draft.
For more information, please see the FAQ at
<https://trac.ietf.org/trac/gen/wiki/GenArtfaq>.
Document: {{ review_req.doc.name }}-??
Reviewer: {{ review_req.reviewer.person.plain_name }}
Review Date: {{ today }}
IETF LC End Date: {% if review_req.doc.most_recent_ietflc %}{{ review_req.doc.most_recent_ietflc.expires|date:"Y-m-d" }}{% else %}None{% endif %}
IESG Telechat date: {{ review_req.doc.telechat_date|default:'Not scheduled for a telechat' }}
Summary:
Major issues:
Minor issues:
Nits/editorial comments:
"""
)
def reverse(apps, schema_editor):
DBTemplate = apps.get_model('dbtemplate','DBTemplate')
DBTemplate.objects.filter(path__in=['/group/genart/review/content_templates/lc.txt','/group/genart/review/content_templates/telechat.txt']).delete()
class Migration(migrations.Migration):
dependencies = [
('dbtemplate', '0003_review_summary_email'),
]
operations = [
migrations.RunPython(forward,reverse)
]

View file

@ -1,32 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-05-24 09:30
from __future__ import unicode_literals
from django.db import migrations
def forward(apps, schema_editor):
DBTemplate = apps.get_model('dbtemplate','DBTemplate')
DBTemplate.objects.create(
path='/nomcom/defaults/topic/description',
title='Description of Topic',
variables='$topic: Topic',
type_id='rst',
content="""This is a description of the topic "$topic"
Describe the topic and add any information/instructions for the responder here.
""",
)
def reverse(apps, schema_editor):
DBTemplate = apps.get_model('dbtemplate','DBTemplate')
DBTemplate.objects.filter(path='/nomcom/defaults/topic/description').delete()
class Migration(migrations.Migration):
dependencies = [
('dbtemplate', '0004_team_review_content_templates'),
]
operations = [
migrations.RunPython(forward,reverse),
]

View file

@ -1,56 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-05-24 14:54
from __future__ import unicode_literals
from django.db import migrations
def forward(apps, schema_migration):
DBTemplate = apps.get_model('dbtemplate','DBTemplate')
t = DBTemplate.objects.get(path='/nomcom/defaults/email/feedback_receipt.txt')
t.variables="""$about: What this feedback is about
$comments: Comments on whatever the feedback is about
"""
t.content="""Hi,
Your input regarding $about has been received and registered.
The following comments have been registered:
--------------------------------------------------------------------------
$comments
--------------------------------------------------------------------------
Thank you,
"""
t.save()
def reverse(apps, schema_migration):
DBTemplate = apps.get_model('dbtemplate','DBTemplate')
t = DBTemplate.objects.get(path='/nomcom/defaults/email/feedback_receipt.txt')
t.variables="""$nominee: Full name of the nominee
$position: Nomination position
$comments: Comments on this candidate
"""
t.content="""Hi,
Your input regarding $nominee for the position of
$position has been received and registered.
The following comments have been registered:
--------------------------------------------------------------------------
$comments
--------------------------------------------------------------------------
Thank you,
"""
t.save()
class Migration(migrations.Migration):
dependencies = [
('dbtemplate', '0005_add_default_topic_description'),
]
operations = [
migrations.RunPython(forward, reverse)
]

View file

@ -2,6 +2,7 @@ from django.db import models
from ietf.group.models import Group
from ietf.name.models import DBTemplateTypeName
from ietf.utils.models import ForeignKey
TEMPLATE_TYPES = (
@ -15,9 +16,9 @@ class DBTemplate(models.Model):
path = models.CharField( max_length=255, unique=True, blank=False, null=False, )
title = models.CharField( max_length=255, blank=False, null=False, )
variables = models.TextField( blank=True, null=True, )
type = models.ForeignKey( DBTemplateTypeName, )
type = ForeignKey( DBTemplateTypeName, )
content = models.TextField( blank=False, null=False, )
group = models.ForeignKey( Group, blank=True, null=True, )
group = ForeignKey( Group, blank=True, null=True, )
def __unicode__(self):
return self.title

View file

@ -1,12 +1,18 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-20 10:52
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import ietf.utils.models
class Migration(migrations.Migration):
initial = True
dependencies = [
('name', '0001_initial'),
('person', '0001_initial'),
@ -16,7 +22,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='BallotType',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('slug', models.SlugField()),
('name', models.CharField(max_length=255)),
('question', models.TextField(blank=True)),
@ -26,88 +32,51 @@ class Migration(migrations.Migration):
options={
'ordering': ['order'],
},
bases=(models.Model,),
),
migrations.CreateModel(
name='DeletedEvent',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('json', models.TextField(help_text=b'Deleted object in JSON format, with attribute names chosen to be suitable for passing into the relevant create method.')),
('time', models.DateTimeField(default=datetime.datetime.now)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='DocAlias',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=255, db_index=True)),
('name', models.CharField(max_length=255, primary_key=True, serialize=False)),
],
options={
'verbose_name': 'document alias',
'verbose_name_plural': 'document aliases',
},
bases=(models.Model,),
),
migrations.CreateModel(
name='DocEvent',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('time', models.DateTimeField(default=datetime.datetime.now, help_text=b'When the event happened', db_index=True)),
('type', models.CharField(max_length=50, choices=[(b'new_revision', b'Added new revision'), (b'changed_document', b'Changed document metadata'), (b'added_comment', b'Added comment'), (b'deleted', b'Deleted document'), (b'changed_state', b'Changed state'), (b'changed_stream', b'Changed document stream'), (b'expired_document', b'Expired document'), (b'extended_expiry', b'Extended expiry of document'), (b'requested_resurrect', b'Requested resurrect'), (b'completed_resurrect', b'Completed resurrect'), (b'changed_consensus', b'Changed consensus'), (b'published_rfc', b'Published RFC'), (b'changed_group', b'Changed group'), (b'changed_protocol_writeup', b'Changed protocol writeup'), (b'changed_charter_milestone', b'Changed charter milestone'), (b'initial_review', b'Set initial review time'), (b'changed_review_announcement', b'Changed WG Review text'), (b'changed_action_announcement', b'Changed WG Action text'), (b'started_iesg_process', b'Started IESG process on document'), (b'created_ballot', b'Created ballot'), (b'closed_ballot', b'Closed ballot'), (b'sent_ballot_announcement', b'Sent ballot announcement'), (b'changed_ballot_position', b'Changed ballot position'), (b'changed_ballot_approval_text', b'Changed ballot approval text'), (b'changed_ballot_writeup_text', b'Changed ballot writeup text'), (b'changed_last_call_text', b'Changed last call text'), (b'requested_last_call', b'Requested last call'), (b'sent_last_call', b'Sent last call'), (b'scheduled_for_telechat', b'Scheduled for telechat'), (b'iesg_approved', b'IESG approved document (no problem)'), (b'iesg_disapproved', b'IESG disapproved document (do not publish)'), (b'approved_in_minute', b'Approved in minute'), (b'iana_review', b'IANA review comment'), (b'rfc_in_iana_registry', b'RFC is in IANA registry'), (b'rfc_editor_received_announcement', b'Announcement was received by RFC Editor'), (b'requested_publication', b'Publication at RFC Editor requested')])),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time', models.DateTimeField(db_index=True, default=datetime.datetime.now, help_text=b'When the event happened')),
('type', models.CharField(choices=[(b'new_revision', b'Added new revision'), (b'new_submission', b'Uploaded new revision'), (b'changed_document', b'Changed document metadata'), (b'added_comment', b'Added comment'), (b'added_message', b'Added message'), (b'edited_authors', b'Edited the documents author list'), (b'deleted', b'Deleted document'), (b'changed_state', b'Changed state'), (b'changed_stream', b'Changed document stream'), (b'expired_document', b'Expired document'), (b'extended_expiry', b'Extended expiry of document'), (b'requested_resurrect', b'Requested resurrect'), (b'completed_resurrect', b'Completed resurrect'), (b'changed_consensus', b'Changed consensus'), (b'published_rfc', b'Published RFC'), (b'added_suggested_replaces', b'Added suggested replacement relationships'), (b'reviewed_suggested_replaces', b'Reviewed suggested replacement relationships'), (b'changed_group', b'Changed group'), (b'changed_protocol_writeup', b'Changed protocol writeup'), (b'changed_charter_milestone', b'Changed charter milestone'), (b'initial_review', b'Set initial review time'), (b'changed_review_announcement', b'Changed WG Review text'), (b'changed_action_announcement', b'Changed WG Action text'), (b'started_iesg_process', b'Started IESG process on document'), (b'created_ballot', b'Created ballot'), (b'closed_ballot', b'Closed ballot'), (b'sent_ballot_announcement', b'Sent ballot announcement'), (b'changed_ballot_position', b'Changed ballot position'), (b'changed_ballot_approval_text', b'Changed ballot approval text'), (b'changed_ballot_writeup_text', b'Changed ballot writeup text'), (b'changed_rfc_editor_note_text', b'Changed RFC Editor Note text'), (b'changed_last_call_text', b'Changed last call text'), (b'requested_last_call', b'Requested last call'), (b'sent_last_call', b'Sent last call'), (b'scheduled_for_telechat', b'Scheduled for telechat'), (b'iesg_approved', b'IESG approved document (no problem)'), (b'iesg_disapproved', b'IESG disapproved document (do not publish)'), (b'approved_in_minute', b'Approved in minute'), (b'iana_review', b'IANA review comment'), (b'rfc_in_iana_registry', b'RFC is in IANA registry'), (b'rfc_editor_received_announcement', b'Announcement was received by RFC Editor'), (b'requested_publication', b'Publication at RFC Editor requested'), (b'sync_from_rfc_editor', b'Received updated information from RFC Editor'), (b'requested_review', b'Requested review'), (b'assigned_review_request', b'Assigned review request'), (b'closed_review_request', b'Closed review request'), (b'downref_approved', b'Downref approved')], max_length=50)),
('rev', models.CharField(blank=True, max_length=16, null=True, verbose_name=b'revision')),
('desc', models.TextField()),
],
options={
'ordering': ['-time', '-id'],
},
bases=(models.Model,),
),
migrations.CreateModel(
name='ConsensusDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('consensus', models.NullBooleanField(default=None)),
],
options={
},
bases=('doc.docevent',),
),
migrations.CreateModel(
name='BallotPositionDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('discuss', models.TextField(help_text=b'Discuss text if position is discuss', blank=True)),
('discuss_time', models.DateTimeField(help_text=b'Time discuss text was written', null=True, blank=True)),
('comment', models.TextField(help_text=b'Optional comment', blank=True)),
('comment_time', models.DateTimeField(help_text=b'Time optional comment was written', null=True, blank=True)),
],
options={
},
bases=('doc.docevent',),
),
migrations.CreateModel(
name='BallotDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='doc.DocEvent')),
],
options={
},
bases=('doc.docevent',),
),
migrations.CreateModel(
name='DocHistory',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time', models.DateTimeField(default=datetime.datetime.now)),
('title', models.CharField(max_length=255)),
('title', models.CharField(max_length=255, validators=[django.core.validators.RegexValidator(message='Please enter a string without control characters.', regex='^[^\x00-\x1f]*$')])),
('abstract', models.TextField(blank=True)),
('rev', models.CharField(max_length=16, verbose_name=b'revision', blank=True)),
('pages', models.IntegerField(null=True, blank=True)),
('order', models.IntegerField(default=1, blank=True)),
('expires', models.DateTimeField(null=True, blank=True)),
('notify', models.CharField(max_length=255, blank=True)),
('rev', models.CharField(blank=True, max_length=16, verbose_name=b'revision')),
('pages', models.IntegerField(blank=True, null=True)),
('words', models.IntegerField(blank=True, null=True)),
('order', models.IntegerField(blank=True, default=1)),
('expires', models.DateTimeField(blank=True, null=True)),
('notify', models.CharField(blank=True, max_length=255)),
('external_url', models.URLField(blank=True)),
('note', models.TextField(blank=True)),
('internal_comments', models.TextField(blank=True)),
@ -117,192 +86,223 @@ class Migration(migrations.Migration):
'verbose_name': 'document history',
'verbose_name_plural': 'document histories',
},
bases=(models.Model,),
),
migrations.CreateModel(
name='DocHistoryAuthor',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('order', models.IntegerField()),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('affiliation', models.CharField(blank=True, help_text=b'Organization/company used by author for submission', max_length=100)),
('country', models.CharField(blank=True, help_text=b'Country used by author for submission', max_length=255)),
('order', models.IntegerField(default=1)),
],
options={
'ordering': ['document', 'order'],
'abstract': False,
},
bases=(models.Model,),
),
migrations.CreateModel(
name='DocReminder',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('due', models.DateTimeField()),
('active', models.BooleanField(default=True)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Document',
fields=[
('time', models.DateTimeField(default=datetime.datetime.now)),
('title', models.CharField(max_length=255)),
('title', models.CharField(max_length=255, validators=[django.core.validators.RegexValidator(message='Please enter a string without control characters.', regex='^[^\x00-\x1f]*$')])),
('abstract', models.TextField(blank=True)),
('rev', models.CharField(max_length=16, verbose_name=b'revision', blank=True)),
('pages', models.IntegerField(null=True, blank=True)),
('order', models.IntegerField(default=1, blank=True)),
('expires', models.DateTimeField(null=True, blank=True)),
('notify', models.CharField(max_length=255, blank=True)),
('rev', models.CharField(blank=True, max_length=16, verbose_name=b'revision')),
('pages', models.IntegerField(blank=True, null=True)),
('words', models.IntegerField(blank=True, null=True)),
('order', models.IntegerField(blank=True, default=1)),
('expires', models.DateTimeField(blank=True, null=True)),
('notify', models.CharField(blank=True, max_length=255)),
('external_url', models.URLField(blank=True)),
('note', models.TextField(blank=True)),
('internal_comments', models.TextField(blank=True)),
('name', models.CharField(max_length=255, serialize=False, primary_key=True)),
('ad', models.ForeignKey(related_name='ad_document_set', verbose_name=b'area director', blank=True, to='person.Person', null=True)),
('name', models.CharField(max_length=255, primary_key=True, serialize=False, validators=[django.core.validators.RegexValidator(b'^[-a-z0-9]+$', b'Provide a valid document name consisting of lowercase letters, numbers and hyphens.', b'invalid')])),
('ad', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ad_document_set', to='person.Person', verbose_name=b'area director')),
('formal_languages', models.ManyToManyField(blank=True, help_text=b'Formal languages used in document', to='name.FormalLanguageName')),
],
options={
'abstract': False,
},
bases=(models.Model,),
),
migrations.CreateModel(
name='DocumentAuthor',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('affiliation', models.CharField(blank=True, help_text=b'Organization/company used by author for submission', max_length=100)),
('country', models.CharField(blank=True, help_text=b'Country used by author for submission', max_length=255)),
('order', models.IntegerField(default=1)),
('author', models.ForeignKey(help_text=b'Email address used by author for submission', to='person.Email')),
('document', models.ForeignKey(to='doc.Document')),
('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document')),
('email', ietf.utils.models.ForeignKey(blank=True, help_text=b'Email address used by author for submission', null=True, on_delete=django.db.models.deletion.CASCADE, to='person.Email')),
('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')),
],
options={
'ordering': ['document', 'order'],
'abstract': False,
},
bases=(models.Model,),
),
migrations.CreateModel(
name='InitialReviewDocEvent',
name='DocumentURL',
fields=[
('docevent_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('expires', models.DateTimeField(null=True, blank=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('desc', models.CharField(blank=True, default=b'', max_length=255)),
('url', models.URLField(max_length=512)),
('doc', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document')),
('tag', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.DocUrlTagName')),
],
options={
},
bases=('doc.docevent',),
),
migrations.CreateModel(
name='LastCallDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('expires', models.DateTimeField(null=True, blank=True)),
],
options={
},
bases=('doc.docevent',),
),
migrations.CreateModel(
name='NewRevisionDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('rev', models.CharField(max_length=16)),
],
options={
},
bases=('doc.docevent',),
),
migrations.CreateModel(
name='RelatedDocHistory',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('relationship', models.ForeignKey(to='name.DocRelationshipName')),
('source', models.ForeignKey(to='doc.DocHistory')),
('target', models.ForeignKey(related_name='reversely_related_document_history_set', to='doc.DocAlias')),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('relationship', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.DocRelationshipName')),
('source', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.DocHistory')),
('target', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reversely_related_document_history_set', to='doc.DocAlias')),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='RelatedDocument',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('relationship', models.ForeignKey(to='name.DocRelationshipName')),
('source', models.ForeignKey(to='doc.Document')),
('target', models.ForeignKey(to='doc.DocAlias')),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('relationship', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.DocRelationshipName')),
('source', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document')),
('target', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.DocAlias')),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='State',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('slug', models.SlugField()),
('name', models.CharField(max_length=255)),
('used', models.BooleanField(default=True)),
('desc', models.TextField(blank=True)),
('order', models.IntegerField(default=0)),
('next_states', models.ManyToManyField(related_name='previous_states', to='doc.State', blank=True)),
('next_states', models.ManyToManyField(blank=True, related_name='previous_states', to='doc.State')),
],
options={
'ordering': ['type', 'order'],
},
bases=(models.Model,),
),
migrations.CreateModel(
name='StateDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('state', models.ForeignKey(blank=True, to='doc.State', null=True)),
],
options={
},
bases=('doc.docevent',),
),
migrations.CreateModel(
name='StateType',
fields=[
('slug', models.CharField(max_length=30, serialize=False, primary_key=True)),
('slug', models.CharField(max_length=30, primary_key=True, serialize=False)),
('label', models.CharField(help_text=b'Label that should be used (e.g. in admin) for state drop-down for this type of state', max_length=255)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='AddedMessageEvent',
fields=[
('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('msgtype', models.CharField(max_length=25)),
],
bases=('doc.docevent',),
),
migrations.CreateModel(
name='BallotDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')),
],
bases=('doc.docevent',),
),
migrations.CreateModel(
name='BallotPositionDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('discuss', models.TextField(blank=True, help_text=b'Discuss text if position is discuss')),
('discuss_time', models.DateTimeField(blank=True, help_text=b'Time discuss text was written', null=True)),
('comment', models.TextField(blank=True, help_text=b'Optional comment')),
('comment_time', models.DateTimeField(blank=True, help_text=b'Time optional comment was written', null=True)),
],
bases=('doc.docevent',),
),
migrations.CreateModel(
name='ConsensusDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('consensus', models.NullBooleanField(default=None)),
],
bases=('doc.docevent',),
),
migrations.CreateModel(
name='EditedAuthorsDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('basis', models.CharField(help_text=b'What is the source or reasoning for the changes to the author list', max_length=255)),
],
bases=('doc.docevent',),
),
migrations.CreateModel(
name='InitialReviewDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('expires', models.DateTimeField(blank=True, null=True)),
],
bases=('doc.docevent',),
),
migrations.CreateModel(
name='LastCallDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('expires', models.DateTimeField(blank=True, null=True)),
],
bases=('doc.docevent',),
),
migrations.CreateModel(
name='NewRevisionDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')),
],
bases=('doc.docevent',),
),
migrations.CreateModel(
name='ReviewRequestDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')),
],
bases=('doc.docevent',),
),
migrations.CreateModel(
name='StateDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')),
],
bases=('doc.docevent',),
),
migrations.CreateModel(
name='SubmissionDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')),
],
bases=('doc.docevent',),
),
migrations.CreateModel(
name='TelechatDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('telechat_date', models.DateField(null=True, blank=True)),
('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('telechat_date', models.DateField(blank=True, null=True)),
('returning_item', models.BooleanField(default=False)),
],
options={
},
bases=('doc.docevent',),
),
migrations.CreateModel(
name='WriteupDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('text', models.TextField(blank=True)),
],
options={
},
bases=('doc.docevent',),
),
migrations.AddField(
model_name='statedocevent',
name='state_type',
field=models.ForeignKey(to='doc.StateType'),
preserve_default=True,
),
migrations.AddField(
model_name='state',
name='type',
field=models.ForeignKey(to='doc.StateType'),
preserve_default=True,
),
migrations.AddField(
model_name='document',
name='authors',
field=models.ManyToManyField(to='person.Email', through='doc.DocumentAuthor', blank=True),
preserve_default=True,
field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.StateType'),
),
]

View file

@ -1,228 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('doc', '0001_initial'),
('group', '0001_initial'),
('name', '0001_initial'),
('contenttypes', '0001_initial'),
('person', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='document',
name='group',
field=models.ForeignKey(blank=True, to='group.Group', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='document',
name='intended_std_level',
field=models.ForeignKey(verbose_name=b'Intended standardization level', blank=True, to='name.IntendedStdLevelName', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='document',
name='shepherd',
field=models.ForeignKey(related_name='shepherd_document_set', blank=True, to='person.Email', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='document',
name='states',
field=models.ManyToManyField(to='doc.State', blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='document',
name='std_level',
field=models.ForeignKey(verbose_name=b'Standardization level', blank=True, to='name.StdLevelName', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='document',
name='stream',
field=models.ForeignKey(blank=True, to='name.StreamName', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='document',
name='tags',
field=models.ManyToManyField(to='name.DocTagName', null=True, blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='document',
name='type',
field=models.ForeignKey(blank=True, to='name.DocTypeName', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='docreminder',
name='event',
field=models.ForeignKey(to='doc.DocEvent'),
preserve_default=True,
),
migrations.AddField(
model_name='docreminder',
name='type',
field=models.ForeignKey(to='name.DocReminderTypeName'),
preserve_default=True,
),
migrations.AddField(
model_name='dochistoryauthor',
name='author',
field=models.ForeignKey(to='person.Email'),
preserve_default=True,
),
migrations.AddField(
model_name='dochistoryauthor',
name='document',
field=models.ForeignKey(to='doc.DocHistory'),
preserve_default=True,
),
migrations.AddField(
model_name='dochistory',
name='ad',
field=models.ForeignKey(related_name='ad_dochistory_set', verbose_name=b'area director', blank=True, to='person.Person', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='dochistory',
name='authors',
field=models.ManyToManyField(to='person.Email', through='doc.DocHistoryAuthor', blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='dochistory',
name='doc',
field=models.ForeignKey(related_name='history_set', to='doc.Document'),
preserve_default=True,
),
migrations.AddField(
model_name='dochistory',
name='group',
field=models.ForeignKey(blank=True, to='group.Group', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='dochistory',
name='intended_std_level',
field=models.ForeignKey(verbose_name=b'Intended standardization level', blank=True, to='name.IntendedStdLevelName', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='dochistory',
name='related',
field=models.ManyToManyField(to='doc.DocAlias', through='doc.RelatedDocHistory', blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='dochistory',
name='shepherd',
field=models.ForeignKey(related_name='shepherd_dochistory_set', blank=True, to='person.Email', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='dochistory',
name='states',
field=models.ManyToManyField(to='doc.State', blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='dochistory',
name='std_level',
field=models.ForeignKey(verbose_name=b'Standardization level', blank=True, to='name.StdLevelName', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='dochistory',
name='stream',
field=models.ForeignKey(blank=True, to='name.StreamName', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='dochistory',
name='tags',
field=models.ManyToManyField(to='name.DocTagName', null=True, blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='dochistory',
name='type',
field=models.ForeignKey(blank=True, to='name.DocTypeName', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='docevent',
name='by',
field=models.ForeignKey(to='person.Person'),
preserve_default=True,
),
migrations.AddField(
model_name='docevent',
name='doc',
field=models.ForeignKey(to='doc.Document'),
preserve_default=True,
),
migrations.AddField(
model_name='docalias',
name='document',
field=models.ForeignKey(to='doc.Document'),
preserve_default=True,
),
migrations.AddField(
model_name='deletedevent',
name='by',
field=models.ForeignKey(to='person.Person'),
preserve_default=True,
),
migrations.AddField(
model_name='deletedevent',
name='content_type',
field=models.ForeignKey(to='contenttypes.ContentType'),
preserve_default=True,
),
migrations.AddField(
model_name='ballottype',
name='doc_type',
field=models.ForeignKey(blank=True, to='name.DocTypeName', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='ballottype',
name='positions',
field=models.ManyToManyField(to='name.BallotPositionName', blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='ballotpositiondocevent',
name='ad',
field=models.ForeignKey(to='person.Person'),
preserve_default=True,
),
migrations.AddField(
model_name='ballotpositiondocevent',
name='ballot',
field=models.ForeignKey(default=None, to='doc.BallotDocEvent', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='ballotpositiondocevent',
name='pos',
field=models.ForeignKey(default=b'norecord', verbose_name=b'position', to='name.BallotPositionName'),
preserve_default=True,
),
migrations.AddField(
model_name='ballotdocevent',
name='ballot_type',
field=models.ForeignKey(to='doc.BallotType'),
preserve_default=True,
),
]

View file

@ -1,50 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def forward_materials_state(apps, schema_editor):
StateType = apps.get_model('doc', 'StateType')
State = apps.get_model('doc', 'State')
StateType.objects.create(slug='reuse_policy',label='Policy')
single = State.objects.create(type_id='reuse_policy',slug='single',name='Single Meeting')
multiple = State.objects.create(type_id='reuse_policy',slug='multiple',name='Multiple Meetings')
Document = apps.get_model('doc', 'Document')
for doc in Document.objects.filter(type='slides'):
if doc.group.type.slug=='team':
doc.states.add(multiple)
else:
doc.states.add(single)
# Expected to be a no-op on current database, but just for completeness
for doc in Document.objects.filter(type='slides'):
doc.states.filter(type='slides',slug='sessonly').update(slug='active')
State.objects.filter(type_id='slides',slug='sessonly').delete()
def reverse_materials_state(apps, schema_editor):
Document = apps.get_model('doc', 'Document')
for doc in Document.objects.filter(type='slides'):
doc.states.filter(type='update_policy').delete()
StateType = apps.get_model('doc', 'StateType')
StateType.objects.filter(slug='update_policy').delete()
State = apps.get_model('doc', 'State')
State.objects.create(type='slides',slug='sessonly',name='Session Only')
class Migration(migrations.Migration):
dependencies = [
('doc', '0002_auto_20141222_1749'),
('group', '0003_auto_20150304_0743'),
]
operations = [
migrations.RunPython(forward_materials_state,reverse_materials_state),
]

View file

@ -1,37 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def set_state(doc, state):
already_set = doc.states.filter(type=state.type)
others = [s for s in already_set if s != state]
if others:
doc.states.remove(*others)
if state not in already_set:
doc.states.add(state)
doc.state_cache = None
def forward_archive_slides(apps,schema_editor):
Document = apps.get_model('doc', 'Document')
State = apps.get_model('doc','State')
archived = State.objects.get(type__slug='slides',slug='archived')
for doc in Document.objects.filter(name__startswith='slides-92-',states__type__slug='slides',states__slug='active'):
set_state(doc,archived)
def reverse_archive_slides(apps,schema_editor):
Document = apps.get_model('doc', 'Document')
State = apps.get_model('doc','State')
active = State.objects.get(type__slug='slides',slug='active')
for doc in Document.objects.filter(name__startswith='slides-92-',states__type__slug='slides',states__slug='archived'):
set_state(doc,active)
class Migration(migrations.Migration):
dependencies = [
('doc', '0003_auto_20150326_0728'),
]
operations = [
migrations.RunPython(forward_archive_slides,reverse_archive_slides),
]

View file

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('doc', '0004_auto_20150403_1235'),
]
operations = [
migrations.AlterField(
model_name='docevent',
name='type',
field=models.CharField(max_length=50, choices=[(b'new_revision', b'Added new revision'), (b'changed_document', b'Changed document metadata'), (b'added_comment', b'Added comment'), (b'deleted', b'Deleted document'), (b'changed_state', b'Changed state'), (b'changed_stream', b'Changed document stream'), (b'expired_document', b'Expired document'), (b'extended_expiry', b'Extended expiry of document'), (b'requested_resurrect', b'Requested resurrect'), (b'completed_resurrect', b'Completed resurrect'), (b'changed_consensus', b'Changed consensus'), (b'published_rfc', b'Published RFC'), (b'added_suggested_replaces', b'Added suggested replacement relationships'), (b'reviewed_suggested_replaces', b'Reviewed suggested replacement relationships'), (b'changed_group', b'Changed group'), (b'changed_protocol_writeup', b'Changed protocol writeup'), (b'changed_charter_milestone', b'Changed charter milestone'), (b'initial_review', b'Set initial review time'), (b'changed_review_announcement', b'Changed WG Review text'), (b'changed_action_announcement', b'Changed WG Action text'), (b'started_iesg_process', b'Started IESG process on document'), (b'created_ballot', b'Created ballot'), (b'closed_ballot', b'Closed ballot'), (b'sent_ballot_announcement', b'Sent ballot announcement'), (b'changed_ballot_position', b'Changed ballot position'), (b'changed_ballot_approval_text', b'Changed ballot approval text'), (b'changed_ballot_writeup_text', b'Changed ballot writeup text'), (b'changed_last_call_text', b'Changed last call text'), (b'requested_last_call', b'Requested last call'), (b'sent_last_call', b'Sent last call'), (b'scheduled_for_telechat', b'Scheduled for telechat'), (b'iesg_approved', b'IESG approved document (no problem)'), (b'iesg_disapproved', b'IESG disapproved document (do not publish)'), (b'approved_in_minute', b'Approved in minute'), (b'iana_review', b'IANA review comment'), (b'rfc_in_iana_registry', b'RFC is in IANA registry'), (b'rfc_editor_received_announcement', b'Announcement was received by RFC Editor'), (b'requested_publication', b'Publication at RFC Editor requested')]),
preserve_default=True,
),
]

View file

@ -1,30 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('doc', '0005_auto_20150721_0230'),
]
operations = [
migrations.RemoveField(
model_name='dochistory',
name='related',
),
migrations.AddField(
model_name='relateddochistory',
name='target_name',
field=models.CharField(default=b'', max_length=255),
preserve_default=True,
),
migrations.AddField(
model_name='relateddocument',
name='target_name',
field=models.CharField(default=b'', max_length=255),
preserve_default=True,
),
]

View file

@ -1,23 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
import django.db
def fill_in_docalias_relationship_names(apps, schema_editor):
with django.db.connection.cursor() as cursor:
cursor.execute("update doc_relateddocument join doc_docalias on doc_docalias.id = doc_relateddocument.target_id set doc_relateddocument.target_name = doc_docalias.name;")
cursor.execute("update doc_relateddochistory join doc_docalias on doc_docalias.id = doc_relateddochistory.target_id set doc_relateddochistory.target_name = doc_docalias.name;")
def noop(apps, schema_editor):
pass
class Migration(migrations.Migration):
dependencies = [
('doc', '0006_auto_20150929_0828'),
]
operations = [
migrations.RunPython(fill_in_docalias_relationship_names, noop)
]

View file

@ -1,32 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('doc', '0007_auto_20150929_0840'),
]
operations = [
migrations.RemoveField(
model_name='relateddochistory',
name='target',
),
migrations.RenameField(
model_name='relateddochistory',
old_name='target_name',
new_name='target',
),
migrations.RemoveField(
model_name='relateddocument',
name='target',
),
migrations.RenameField(
model_name='relateddocument',
old_name='target_name',
new_name='target',
),
]

View file

@ -1,25 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('doc', '0008_auto_20150930_0242'),
('ipr', '0006_auto_20150930_0235'),
]
operations = [
migrations.RemoveField(
model_name='docalias',
name='id',
),
migrations.AlterField(
model_name='docalias',
name='name',
field=models.CharField(max_length=255, serialize=False, primary_key=True),
preserve_default=True,
),
]

View file

@ -1,26 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('doc', '0009_auto_20150930_0248'),
]
operations = [
migrations.AlterField(
model_name='relateddochistory',
name='target',
field=models.ForeignKey(related_name='reversely_related_document_history_set', to='doc.DocAlias'),
preserve_default=True,
),
migrations.AlterField(
model_name='relateddocument',
name='target',
field=models.ForeignKey(to='doc.DocAlias'),
preserve_default=True,
),
]

View file

@ -1,23 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from django.db.models import F
def reverse(apps, schema_editor):
pass
def forward(apps, schema_editor):
Document = apps.get_model('doc','Document')
for doc in Document.objects.filter(type__in=['recording','liaison','liai-att']).exclude(docalias__name=F('name')):
doc.docalias_set.create(name=doc.name)
class Migration(migrations.Migration):
dependencies = [
('doc', '0010_auto_20150930_0251'),
]
operations = [
migrations.RunPython(forward,reverse)
]

View file

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('doc', '0011_add_missing_docaliases'),
]
operations = [
migrations.AlterField(
model_name='docevent',
name='type',
field=models.CharField(max_length=50, choices=[(b'new_revision', b'Added new revision'), (b'changed_document', b'Changed document metadata'), (b'added_comment', b'Added comment'), (b'deleted', b'Deleted document'), (b'changed_state', b'Changed state'), (b'changed_stream', b'Changed document stream'), (b'expired_document', b'Expired document'), (b'extended_expiry', b'Extended expiry of document'), (b'requested_resurrect', b'Requested resurrect'), (b'completed_resurrect', b'Completed resurrect'), (b'changed_consensus', b'Changed consensus'), (b'published_rfc', b'Published RFC'), (b'added_suggested_replaces', b'Added suggested replacement relationships'), (b'reviewed_suggested_replaces', b'Reviewed suggested replacement relationships'), (b'changed_group', b'Changed group'), (b'changed_protocol_writeup', b'Changed protocol writeup'), (b'changed_charter_milestone', b'Changed charter milestone'), (b'initial_review', b'Set initial review time'), (b'changed_review_announcement', b'Changed WG Review text'), (b'changed_action_announcement', b'Changed WG Action text'), (b'started_iesg_process', b'Started IESG process on document'), (b'created_ballot', b'Created ballot'), (b'closed_ballot', b'Closed ballot'), (b'sent_ballot_announcement', b'Sent ballot announcement'), (b'changed_ballot_position', b'Changed ballot position'), (b'changed_ballot_approval_text', b'Changed ballot approval text'), (b'changed_ballot_writeup_text', b'Changed ballot writeup text'), (b'changed_rfc_editor_note_text', b'Changed RFC Editor Note text'), (b'changed_last_call_text', b'Changed last call text'), (b'requested_last_call', b'Requested last call'), (b'sent_last_call', b'Sent last call'), (b'scheduled_for_telechat', b'Scheduled for telechat'), (b'iesg_approved', b'IESG approved document (no problem)'), (b'iesg_disapproved', b'IESG disapproved document (do not publish)'), (b'approved_in_minute', b'Approved in minute'), (b'iana_review', b'IANA review comment'), (b'rfc_in_iana_registry', b'RFC is in IANA registry'), (b'rfc_editor_received_announcement', b'Announcement was received by RFC Editor'), (b'requested_publication', b'Publication at RFC Editor requested')]),
preserve_default=True,
),
]

View file

@ -1,119 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import sys
from tqdm import tqdm
from django.db import migrations
def fix_buggy_author_foreignkey(apps, schema_editor):
DocumentAuthor = apps.get_model("doc", "DocumentAuthor")
# apparently, we have a buggy key in the DB, fix it
DocumentAuthor.objects.filter(author="[<Email: d3e3e3@gmail.com>]").update(author="d3e3e3@gmail.com")
def save_all_documents_in_history(apps, schema_editor):
State = apps.get_model("doc", "State")
Document = apps.get_model("doc", "Document")
DocHistory = apps.get_model("doc", "DocHistory")
RelatedDocument = apps.get_model("doc", "RelatedDocument")
RelatedDocHistory = apps.get_model("doc", "RelatedDocHistory")
DocumentAuthor = apps.get_model("doc", "DocumentAuthor")
DocHistoryAuthor = apps.get_model("doc", "DocHistoryAuthor")
sys.stderr.write('\n'
' Ensuring that all documents have document history entries.\n'
' This could take as much as an hour to run.\n')
def canonical_name(self):
name = self.name
state = State.objects.filter(document=self, type_id=self.type_id).first()
if self.type_id == "draft" and state.slug == "rfc":
a = self.docalias_set.filter(name__startswith="rfc")
if a:
name = a[0].name
elif self.type_id == "charter":
try:
return charter_name_for_group(self.chartered_group)
except Exception as e:
print("Exception: %s" % e)
print("Document: %s" % name)
return name
def charter_name_for_group(group):
if group.type_id == "rg":
top_org = "irtf"
else:
top_org = "ietf"
return "charter-%s-%s" % (top_org, group.acronym)
def save_document_in_history(doc):
"""Save a snapshot of document and related objects in the database."""
def get_model_fields_as_dict(obj):
return dict((field.name, getattr(obj, field.name))
for field in obj._meta.fields
if field is not obj._meta.pk)
# copy fields
fields = get_model_fields_as_dict(doc)
fields["doc"] = doc
fields["name"] = canonical_name(doc)
objs = DocHistory.objects.filter(**fields)
if objs.exists():
try:
dochist = objs.get(**fields)
except DocHistory.MultipleObjectsReturned:
dochist_list = list(objs)
for dochist in dochist_list[1:]:
dochist.delete()
dochist = dochist_list[0]
else:
dochist = DocHistory(**fields)
dochist.save()
# copy many to many
for field in doc._meta.many_to_many:
if field.rel.through and field.rel.through._meta.auto_created:
setattr(dochist, field.name, getattr(doc, field.name).all())
# copy remaining tricky many to many
def transfer_fields(obj, HistModel):
mfields = get_model_fields_as_dict(item)
# map doc -> dochist
for k, v in mfields.iteritems():
if v == doc:
mfields[k] = dochist
HistModel.objects.create(**mfields)
for item in RelatedDocument.objects.filter(source=doc):
transfer_fields(item, RelatedDocHistory)
for item in DocumentAuthor.objects.filter(document=doc):
transfer_fields(item, DocHistoryAuthor)
return dochist
from django.conf import settings
settings.DEBUG = False # prevent out-of-memory problems
docs = Document.objects.all()
for d in tqdm(docs):
save_document_in_history(d)
def noop_backward(apps, schema_editor):
pass
class Migration(migrations.Migration):
dependencies = [
('doc', '0012_auto_20160207_0537'),
('group', '0009_auto_20150930_0758'),
]
operations = [
migrations.RunPython(fix_buggy_author_foreignkey, noop_backward),
migrations.RunPython(save_all_documents_in_history, noop_backward)
]

View file

@ -1,33 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('message', '__first__'),
('doc', '0013_auto_20151027_1127'),
]
operations = [
migrations.CreateModel(
name='AddedMessageEvent',
fields=[
('docevent_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('msgtype', models.CharField(max_length=25)),
('in_reply_to', models.ForeignKey(related_name='doc_irtomanual', blank=True, to='message.Message', null=True)),
('message', models.ForeignKey(related_name='doc_manualevents', blank=True, to='message.Message', null=True)),
],
options={
},
bases=('doc.docevent',),
),
migrations.AlterField(
model_name='docevent',
name='type',
field=models.CharField(max_length=50, choices=[(b'new_revision', b'Added new revision'), (b'changed_document', b'Changed document metadata'), (b'added_comment', b'Added comment'), (b'added_message', b'Added message'), (b'deleted', b'Deleted document'), (b'changed_state', b'Changed state'), (b'changed_stream', b'Changed document stream'), (b'expired_document', b'Expired document'), (b'extended_expiry', b'Extended expiry of document'), (b'requested_resurrect', b'Requested resurrect'), (b'completed_resurrect', b'Completed resurrect'), (b'changed_consensus', b'Changed consensus'), (b'published_rfc', b'Published RFC'), (b'added_suggested_replaces', b'Added suggested replacement relationships'), (b'reviewed_suggested_replaces', b'Reviewed suggested replacement relationships'), (b'changed_group', b'Changed group'), (b'changed_protocol_writeup', b'Changed protocol writeup'), (b'changed_charter_milestone', b'Changed charter milestone'), (b'initial_review', b'Set initial review time'), (b'changed_review_announcement', b'Changed WG Review text'), (b'changed_action_announcement', b'Changed WG Action text'), (b'started_iesg_process', b'Started IESG process on document'), (b'created_ballot', b'Created ballot'), (b'closed_ballot', b'Closed ballot'), (b'sent_ballot_announcement', b'Sent ballot announcement'), (b'changed_ballot_position', b'Changed ballot position'), (b'changed_ballot_approval_text', b'Changed ballot approval text'), (b'changed_ballot_writeup_text', b'Changed ballot writeup text'), (b'changed_rfc_editor_note_text', b'Changed RFC Editor Note text'), (b'changed_last_call_text', b'Changed last call text'), (b'requested_last_call', b'Requested last call'), (b'sent_last_call', b'Sent last call'), (b'scheduled_for_telechat', b'Scheduled for telechat'), (b'iesg_approved', b'IESG approved document (no problem)'), (b'iesg_disapproved', b'IESG disapproved document (do not publish)'), (b'approved_in_minute', b'Approved in minute'), (b'iana_review', b'IANA review comment'), (b'rfc_in_iana_registry', b'RFC is in IANA registry'), (b'rfc_editor_received_announcement', b'Announcement was received by RFC Editor'), (b'requested_publication', b'Publication at RFC Editor requested'), (b'sync_from_rfc_editor', b'Received updated information from RFC Editor'),]),
preserve_default=True,
),
]

View file

@ -1,32 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('submit', '0016_fix_duplicate_upload_docevents'),
('doc', '0014_auto_20160524_2147'),
]
operations = [
migrations.CreateModel(
name='SubmissionDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('rev', models.CharField(max_length=16)),
('submission', models.ForeignKey(to='submit.Submission')),
],
options={
},
bases=('doc.docevent',),
),
migrations.AlterField(
model_name='docevent',
name='type',
field=models.CharField(max_length=50, choices=[(b'new_revision', b'Added new revision'), (b'new_submission', b'Uploaded new revision'), (b'changed_document', b'Changed document metadata'), (b'added_comment', b'Added comment'), (b'added_message', b'Added message'), (b'deleted', b'Deleted document'), (b'changed_state', b'Changed state'), (b'changed_stream', b'Changed document stream'), (b'expired_document', b'Expired document'), (b'extended_expiry', b'Extended expiry of document'), (b'requested_resurrect', b'Requested resurrect'), (b'completed_resurrect', b'Completed resurrect'), (b'changed_consensus', b'Changed consensus'), (b'published_rfc', b'Published RFC'), (b'added_suggested_replaces', b'Added suggested replacement relationships'), (b'reviewed_suggested_replaces', b'Reviewed suggested replacement relationships'), (b'changed_group', b'Changed group'), (b'changed_protocol_writeup', b'Changed protocol writeup'), (b'changed_charter_milestone', b'Changed charter milestone'), (b'initial_review', b'Set initial review time'), (b'changed_review_announcement', b'Changed WG Review text'), (b'changed_action_announcement', b'Changed WG Action text'), (b'started_iesg_process', b'Started IESG process on document'), (b'created_ballot', b'Created ballot'), (b'closed_ballot', b'Closed ballot'), (b'sent_ballot_announcement', b'Sent ballot announcement'), (b'changed_ballot_position', b'Changed ballot position'), (b'changed_ballot_approval_text', b'Changed ballot approval text'), (b'changed_ballot_writeup_text', b'Changed ballot writeup text'), (b'changed_rfc_editor_note_text', b'Changed RFC Editor Note text'), (b'changed_last_call_text', b'Changed last call text'), (b'requested_last_call', b'Requested last call'), (b'sent_last_call', b'Sent last call'), (b'scheduled_for_telechat', b'Scheduled for telechat'), (b'iesg_approved', b'IESG approved document (no problem)'), (b'iesg_disapproved', b'IESG disapproved document (do not publish)'), (b'approved_in_minute', b'Approved in minute'), (b'iana_review', b'IANA review comment'), (b'rfc_in_iana_registry', b'RFC is in IANA registry'), (b'rfc_editor_received_announcement', b'Announcement was received by RFC Editor'), (b'requested_publication', b'Publication at RFC Editor requested'), (b'sync_from_rfc_editor', b'Received updated information from RFC Editor')]),
preserve_default=True,
),
]

View file

@ -1,33 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('name', '0015_insert_review_name_data'),
('review', '0001_initial'),
('doc', '0015_auto_20161101_2313'),
]
operations = [
migrations.CreateModel(
name='ReviewRequestDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('review_request', models.ForeignKey(to='review.ReviewRequest')),
('state', models.ForeignKey(blank=True, to='name.ReviewRequestStateName', null=True)),
],
options={
},
bases=('doc.docevent',),
),
migrations.AlterField(
model_name='docevent',
name='type',
field=models.CharField(max_length=50, choices=[(b'new_revision', b'Added new revision'), (b'changed_document', b'Changed document metadata'), (b'added_comment', b'Added comment'), (b'added_message', b'Added message'), (b'deleted', b'Deleted document'), (b'changed_state', b'Changed state'), (b'changed_stream', b'Changed document stream'), (b'expired_document', b'Expired document'), (b'extended_expiry', b'Extended expiry of document'), (b'requested_resurrect', b'Requested resurrect'), (b'completed_resurrect', b'Completed resurrect'), (b'changed_consensus', b'Changed consensus'), (b'published_rfc', b'Published RFC'), (b'added_suggested_replaces', b'Added suggested replacement relationships'), (b'reviewed_suggested_replaces', b'Reviewed suggested replacement relationships'), (b'changed_group', b'Changed group'), (b'changed_protocol_writeup', b'Changed protocol writeup'), (b'changed_charter_milestone', b'Changed charter milestone'), (b'initial_review', b'Set initial review time'), (b'changed_review_announcement', b'Changed WG Review text'), (b'changed_action_announcement', b'Changed WG Action text'), (b'started_iesg_process', b'Started IESG process on document'), (b'created_ballot', b'Created ballot'), (b'closed_ballot', b'Closed ballot'), (b'sent_ballot_announcement', b'Sent ballot announcement'), (b'changed_ballot_position', b'Changed ballot position'), (b'changed_ballot_approval_text', b'Changed ballot approval text'), (b'changed_ballot_writeup_text', b'Changed ballot writeup text'), (b'changed_rfc_editor_note_text', b'Changed RFC Editor Note text'), (b'changed_last_call_text', b'Changed last call text'), (b'requested_last_call', b'Requested last call'), (b'sent_last_call', b'Sent last call'), (b'scheduled_for_telechat', b'Scheduled for telechat'), (b'iesg_approved', b'IESG approved document (no problem)'), (b'iesg_disapproved', b'IESG disapproved document (do not publish)'), (b'approved_in_minute', b'Approved in minute'), (b'iana_review', b'IANA review comment'), (b'rfc_in_iana_registry', b'RFC is in IANA registry'), (b'rfc_editor_received_announcement', b'Announcement was received by RFC Editor'), (b'requested_publication', b'Publication at RFC Editor requested'), (b'sync_from_rfc_editor', b'Received updated information from RFC Editor'), (b'requested_review', b'Requested review'), (b'assigned_review_request', b'Assigned review request'), (b'closed_review_request', b'Closed review request')]),
preserve_default=True,
),
]

View file

@ -1,67 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import debug # pyflakes:ignore
import contextlib
import os
import urllib2
from bs4 import BeautifulSoup
from tqdm import tqdm
from django.db import migrations
from django.conf import settings
def get_filename(doc):
path = settings.DOCUMENT_PATH_PATTERN.format(doc=doc)
# ! These files right now are created with no version number?
#name = '%s-%s.txt' % (doc.name,doc.rev)
name = '%s.txt' % (doc.name,)
return os.path.join(path,name)
def forward(apps,schema_editor):
# for each qualifying document
Document = apps.get_model('doc','Document')
for doc in tqdm(Document.objects.filter(type='review',external_url__contains="www.ietf.org/mail-archive/web"),desc="Pointers into Mhonarc"):
filename = get_filename(doc)
if not os.path.isfile(filename):
with contextlib.closing(urllib2.urlopen(doc.external_url)) as infile:
fullcontents = infile.read().decode('utf-8', 'ignore');
start = fullcontents.find('<!--X-Body-of-Message-->')
end = fullcontents.find('<!--X-Body-of-Message-End-->')
bodyblock=fullcontents[start+len('<!--X-Body-of-Message-->'):end]
text = BeautifulSoup(bodyblock,"lxml").get_text('\n\n') \
.replace('FAQ at <\n\nhttp://wiki.tools','FAQ at <http://wiki.tools') \
.replace('wiki/GenArtfaq\n\n>','wiki/GenArtfaq>')
with contextlib.closing(open(filename,'w')) as outfile:
outfile.write(text.encode('utf8'))
for doc in tqdm(Document.objects.filter(type='review',external_url__contains="mailarchive.ietf.org"),desc="Pointers into Mailarchive"):
filename = get_filename(doc)
if not os.path.isfile(filename):
with contextlib.closing(urllib2.urlopen(doc.external_url)) as infile:
fullcontents = infile.read().decode('utf-8', 'ignore');
soup = BeautifulSoup(fullcontents,"lxml")
divpre = soup.find('div',{"id":"msg-payload"}).find('pre')
text = divpre.get_text('\n\n')
with contextlib.closing(open(filename,'w')) as outfile:
outfile.write(text.encode('utf8'))
## After this migration, we should figure out what to do with these stragglers:
## In [29]: Document.objects.filter(type='review').exclude(Q(external_url__contains="mailarchive")|Q(external_url__contains="mail-archive")).values_list('external_url',flat=True)
## Out[29]: [u'https://art.tools.ietf.org/tools/art/genart/index.cgi/t=1909/review_edit?reviewid=2300', u'https://art.tools.ietf.org/tools/art/genart/index.cgi/t=8460/review_edit?reviewid=2735', u'https://www.ietf.org/ibin/c5i?mid=6&rid=49&gid=0&k1=933&k2=55337&tid=1296220835', u'https://www.ietf.org/mailman/private/tsv-dir/2012-February/002007.html', u'', u'']
def reverse(apps,schema_editor):
pass
class Migration(migrations.Migration):
dependencies = [
('doc', '0016_auto_20160927_0713'),
]
operations = [
migrations.RunPython(forward,reverse)
]

View file

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('doc', '0017_fill_review_document_contents'),
]
operations = [
migrations.AlterField(
model_name='docevent',
name='type',
field=models.CharField(max_length=50, choices=[(b'new_revision', b'Added new revision'), (b'new_submission', b'Uploaded new revision'), (b'changed_document', b'Changed document metadata'), (b'added_comment', b'Added comment'), (b'added_message', b'Added message'), (b'deleted', b'Deleted document'), (b'changed_state', b'Changed state'), (b'changed_stream', b'Changed document stream'), (b'expired_document', b'Expired document'), (b'extended_expiry', b'Extended expiry of document'), (b'requested_resurrect', b'Requested resurrect'), (b'completed_resurrect', b'Completed resurrect'), (b'changed_consensus', b'Changed consensus'), (b'published_rfc', b'Published RFC'), (b'added_suggested_replaces', b'Added suggested replacement relationships'), (b'reviewed_suggested_replaces', b'Reviewed suggested replacement relationships'), (b'changed_group', b'Changed group'), (b'changed_protocol_writeup', b'Changed protocol writeup'), (b'changed_charter_milestone', b'Changed charter milestone'), (b'initial_review', b'Set initial review time'), (b'changed_review_announcement', b'Changed WG Review text'), (b'changed_action_announcement', b'Changed WG Action text'), (b'started_iesg_process', b'Started IESG process on document'), (b'created_ballot', b'Created ballot'), (b'closed_ballot', b'Closed ballot'), (b'sent_ballot_announcement', b'Sent ballot announcement'), (b'changed_ballot_position', b'Changed ballot position'), (b'changed_ballot_approval_text', b'Changed ballot approval text'), (b'changed_ballot_writeup_text', b'Changed ballot writeup text'), (b'changed_rfc_editor_note_text', b'Changed RFC Editor Note text'), (b'changed_last_call_text', b'Changed last call text'), (b'requested_last_call', b'Requested last call'), (b'sent_last_call', b'Sent last call'), (b'scheduled_for_telechat', b'Scheduled for telechat'), (b'iesg_approved', b'IESG approved document (no problem)'), (b'iesg_disapproved', b'IESG disapproved document (do not publish)'), (b'approved_in_minute', b'Approved in minute'), (b'iana_review', b'IANA review comment'), (b'rfc_in_iana_registry', b'RFC is in IANA registry'), (b'rfc_editor_received_announcement', b'Announcement was received by RFC Editor'), (b'requested_publication', b'Publication at RFC Editor requested'), (b'sync_from_rfc_editor', b'Received updated information from RFC Editor'), (b'requested_review', b'Requested review'), (b'assigned_review_request', b'Assigned review request'), (b'closed_review_request', b'Closed review request')]),
preserve_default=True,
),
]

View file

@ -1,29 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('doc', '0018_auto_20161209_0421'),
]
operations = [
migrations.AlterField(
model_name='docevent',
name='type',
field=models.CharField(max_length=50, choices=[(b'new_revision', b'Added new revision'), (b'new_submission', b'Uploaded new revision'), (b'changed_document', b'Changed document metadata'), (b'added_comment', b'Added comment'), (b'added_message', b'Added message'), (b'deleted', b'Deleted document'), (b'changed_state', b'Changed state'), (b'changed_stream', b'Changed document stream'), (b'expired_document', b'Expired document'), (b'extended_expiry', b'Extended expiry of document'), (b'requested_resurrect', b'Requested resurrect'), (b'completed_resurrect', b'Completed resurrect'), (b'changed_consensus', b'Changed consensus'), (b'published_rfc', b'Published RFC'), (b'added_suggested_replaces', b'Added suggested replacement relationships'), (b'reviewed_suggested_replaces', b'Reviewed suggested replacement relationships'), (b'changed_group', b'Changed group'), (b'changed_protocol_writeup', b'Changed protocol writeup'), (b'changed_charter_milestone', b'Changed charter milestone'), (b'initial_review', b'Set initial review time'), (b'changed_review_announcement', b'Changed WG Review text'), (b'changed_action_announcement', b'Changed WG Action text'), (b'started_iesg_process', b'Started IESG process on document'), (b'created_ballot', b'Created ballot'), (b'closed_ballot', b'Closed ballot'), (b'sent_ballot_announcement', b'Sent ballot announcement'), (b'changed_ballot_position', b'Changed ballot position'), (b'changed_ballot_approval_text', b'Changed ballot approval text'), (b'changed_ballot_writeup_text', b'Changed ballot writeup text'), (b'changed_rfc_editor_note_text', b'Changed RFC Editor Note text'), (b'changed_last_call_text', b'Changed last call text'), (b'requested_last_call', b'Requested last call'), (b'sent_last_call', b'Sent last call'), (b'scheduled_for_telechat', b'Scheduled for telechat'), (b'iesg_approved', b'IESG approved document (no problem)'), (b'iesg_disapproved', b'IESG disapproved document (do not publish)'), (b'approved_in_minute', b'Approved in minute'), (b'iana_review', b'IANA review comment'), (b'rfc_in_iana_registry', b'RFC is in IANA registry'), (b'rfc_editor_received_announcement', b'Announcement was received by RFC Editor'), (b'requested_publication', b'Publication at RFC Editor requested'), (b'sync_from_rfc_editor', b'Received updated information from RFC Editor'), (b'requested_review', b'Requested review'), (b'assigned_review_request', b'Assigned review request'), (b'closed_review_request', b'Closed review request')]),
),
migrations.AlterField(
model_name='dochistory',
name='tags',
field=models.ManyToManyField(to='name.DocTagName', blank=True),
),
migrations.AlterField(
model_name='document',
name='tags',
field=models.ManyToManyField(to='name.DocTagName', blank=True),
),
]

View file

@ -1,26 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-24 02:22
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('doc', '0019_auto_20161207_1036'),
]
operations = [
migrations.AlterField(
model_name='dochistory',
name='title',
field=models.CharField(max_length=255, validators=[django.core.validators.RegexValidator(message='Please enter a string without control characters.', regex='^[^\x00-\x1f]*$')]),
),
migrations.AlterField(
model_name='document',
name='title',
field=models.CharField(max_length=255, validators=[django.core.validators.RegexValidator(message='Please enter a string without control characters.', regex='^[^\x00-\x1f]*$')]),
),
]

View file

@ -1,60 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-04 04:58
from __future__ import unicode_literals
from django.db import migrations
from django.utils.text import slugify
reordered_states = [
# old, new, slug
(8, 10, 'chair-w'),
(9, 11, 'writeupw'),
(10, 12, 'sub-pub'),
]
new_states = [
(8, "Waiting for Implementation",
"In some areas, it can be desirable to wait for multiple interoperable "
"implementations before progressing a draft to be an RFC, and in some "
"WGs this is required. This state should be entered after WG Last Call "
"has completed."),
(9, "Held by WG", "Held by WG, see document history for details.",),
]
def forwards(apps,schema_editor):
State = apps.get_model('doc', 'State')
StateType = apps.get_model('doc', 'StateType')
wg_type = StateType.objects.get(slug='draft-stream-ietf')
# change order on some existing states to make room for the new ones
for old_order, new_order, slug in reordered_states:
state = State.objects.get(type=wg_type, slug=slug)
state.order=new_order
state.save()
for order, name, desc in new_states:
slug = slugify(name)
State.objects.create(type=wg_type, slug=slug, name=name, used=True, desc=desc, order=order, )
def backwards(apps,schema_editor):
State = apps.get_model('doc', 'State')
StateType = apps.get_model('doc', 'StateType')
wg_type = StateType.objects.get(slug='draft-stream-ietf')
# change order on some existing states to make room for the new ones
for old_order, new_order, slug in reordered_states:
state = State.objects.get(type=wg_type, slug=slug)
state.order=old_order
state.save()
for order, name, desc in new_states:
slug = slugify(name)
State.objects.get(type=wg_type, slug=slug).delete()
class Migration(migrations.Migration):
dependencies = [
('doc', '0020_auto_20170224_0222'),
]
operations = [
migrations.RunPython(forwards, backwards),
]

View file

@ -1,29 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-04 08:20
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('doc', '0021_add_wg_states'),
]
operations = [
migrations.RenameField(
model_name='newrevisiondocevent',
old_name='rev',
new_name='revision',
),
migrations.RenameField(
model_name='submissiondocevent',
old_name='rev',
new_name='revision',
),
migrations.AddField(
model_name='docevent',
name='rev',
field=models.CharField(blank=True, max_length=16, verbose_name=b'revision'),
),
]

View file

@ -1,70 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-04 08:30
from __future__ import unicode_literals, print_function
from tqdm import tqdm
from django.db import migrations
import debug # pyflakes:ignore
from ietf.doc.models import DocHistory
def ename(event):
return u"%s %s by %s at %s" % (event.doc.name, event.get_type_display().lower(), event.by.name, event.time)
def get_dochistory(event):
h = DocHistory.objects.filter(time__lte=event.time,doc__name=event.doc.name).order_by('-time', '-pk')
if not h.exists():
h = DocHistory.objects.filter(time__gte=event.time,doc__name=event.doc.name).order_by('time', 'pk')
return h
def get_history_rev(e):
h = e.get_dochistory()
rev = None
if h.exists():
for i in h:
if i.rev:
break
if i and i.rev:
rev = i.rev
return rev
def forwards(apps,schema_editor):
DocEvent = apps.get_model('doc', 'DocEvent')
DocEvent.get_dochistory = get_dochistory
NewRevisionDocEvent = apps.get_model('doc', 'NewRevisionDocEvent')
SubmissionDocEvent = apps.get_model('doc', 'SubmissionDocEvent')
print("\nProcessing NewRevisionDocEvents:")
for e in tqdm(list(NewRevisionDocEvent.objects.filter(rev=''))):
if e.revision:
e.rev = e.revision
e.save()
print("\nProcessing SubmissionDocEvents:")
for e in tqdm(list(SubmissionDocEvent.objects.filter(rev=''))):
if e.revision:
e.rev = e.revision
e.save()
print("\nProcessing remaining DocEvents:")
for e in tqdm(list(DocEvent.objects.filter(rev=''))):
rev = get_history_rev(e)
if rev:
e.rev = rev
e.save()
def backwards(apps,schema_editor):
DocEvent = apps.get_model('doc', 'DocEvent')
print("\nProcessing DocEvents:")
for e in tqdm(list(DocEvent.objects.exclude(rev=''))):
e.rev = ''
e.save()
class Migration(migrations.Migration):
dependencies = [
('doc', '0022_add_docevent_rev'),
]
operations = [
migrations.RunPython(forwards, backwards),
]

View file

@ -1,23 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-04 12:10
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('doc', '0023_set_docevent_rev_data'),
]
operations = [
migrations.RemoveField(
model_name='newrevisiondocevent',
name='revision',
),
migrations.RemoveField(
model_name='submissiondocevent',
name='revision',
),
]

View file

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-07 01:46
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('doc', '0024_del_docevent_subclass_revision'),
]
operations = [
migrations.AlterField(
model_name='docevent',
name='rev',
field=models.CharField(blank=True, max_length=16, null=True, verbose_name=b'revision'),
),
]

View file

@ -1,129 +0,0 @@
# Copyright The IETF Trust 2017, All Rights Reserved
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
downref_registry_from_wiki = [
['rfc952', 'draft-hollenbeck-rfc4931bis'],
['rfc952', 'draft-hollenbeck-rfc4932bis'],
['rfc1094','draft-ietf-nfsv4-nfsdirect'],
['rfc1321','rfc3967'],
['rfc1813','draft-ietf-nfsv4-nfsdirect'],
['rfc1951','draft-ietf-lemonade-compress'],
['rfc1952','draft-sweet-rfc2911bis'],
['rfc1977','draft-sweet-rfc2911bis'],
['rfc2104','rfc3967'],
['rfc2144','draft-ietf-secsh-newmodes'],
['rfc2315','draft-eastlake-additional-xmlsec-uris'],
['rfc2330','draft-ietf-ippm-metrictest'],
['rfc2412','draft-ietf-cat-kerberos-pk-init'],
['rfc2648','draft-ietf-simple-xcap-diff'],
['rfc2683','draft-ietf-qresync-rfc5162bis'],
['rfc2702','draft-ietf-isis-admin-tags'],
['rfc2781','draft-ietf-appsawg-xml-mediatypes'],
['rfc2818','draft-dusseault-caldav'],
['rfc2898','draft-turner-asymmetrickeyformat-algs'],
['rfc2966','draft-ietf-isis-admin-tags'],
['rfc2985','rfc5750'],
['rfc2986','rfc6487'],
['rfc3032','draft-ietf-pals-rfc4447bis'],
['rfc3174','draft-harris-ssh-rsa-kex'],
['rfc3196','draft-sweet-rfc2911bis'],
['rfc3217','draft-ietf-smime-cms-rsa-kem'],
['rfc3272','draft-ietf-mpls-cosfield-def'],
['rfc3280','rfc3852'],
['rfc3281','rfc3852'],
['rfc3394','draft-ietf-smime-cms-rsa-kem'],
['rfc3447','draft-ietf-cat-kerberos-pk-init'],
['rfc3469','draft-ietf-mpls-cosfield-def'],
['rfc3548','draft-ietf-dnsext-dnssec-records'],
['rfc3564','draft-ietf-mpls-cosfield-def'],
['rfc3567','draft-ietf-pce-disco-proto-isis'],
['rfc3610','rfc4309'],
['rfc3843','rfc5953'],
['rfc3579','draft-ietf-radext-rfc4590bis'],
['rfc3618','draft-ietf-mboned-msdp-deploy'],
['rfc3713','draft-kato-ipsec-ciph-camellia'],
['rfc3784','draft-ietf-isis-admin-tags'],
['rfc3985','draft-ietf-mpls-cosfield-def'],
['rfc4050','draft-eastlake-additional-xmlsec-uris'],
['rfc4082','draft-ietf-msec-srtp-tesla'],
['rfc4226','draft-ietf-keyprov-pskc'],
['rfc4269','draft-eastlake-additional-xmlsec-uris'],
['rfc4291','draft-hollenbeck-rfc4932bis'],
['rfc4347','rfc5953'],
['rfc4357','draft-ietf-pkix-gost-cppk'],
['rfc4366','rfc5953'],
['rfc4492','draft-ietf-tls-chacha20-poly1305'],
['rfc4493','draft-songlee-aes-cmac-96'],
['rfc4627','draft-ietf-mediactrl-ivr-control-package'],
['rfc4753','draft-ietf-ipsec-ike-auth-ecdsa'],
['rfc4949','draft-ietf-oauth-v2'],
['rfc5036','draft-ietf-pals-rfc4447bis'],
['rfc5246','rfc5953'],
['rfc5280','rfc5953'],
['rfc5322','draft-hollenbeck-rfc4933bis'],
['rfc5410','draft-arkko-mikey-iana'],
['rfc5489','draft-ietf-tls-chacha20-poly1305'],
['rfc5598','draft-ietf-dkim-mailinglists'],
['rfc5649','draft-turner-asymmetrickeyformat-algs'],
['rfc5753','draft-turner-cms-symmetrickeypackage-algs'],
['rfc5781','draft-ietf-sidr-res-certs'],
['rfc5869','draft-ietf-trill-channel-tunnel'],
['rfc5890','draft-ietf-dkim-rfc4871bis'],
['rfc5911','draft-turner-asymmetrickeyformat'],
['rfc5912','draft-ietf-pkix-authorityclearanceconstraints'],
['rfc5952','rfc5953'],
['rfc6043','draft-arkko-mikey-iana'],
['rfc6090','draft-turner-akf-algs-update'],
['rfc6151','draft-ietf-netmod-system-mgmt'],
['rfc6234','draft-schaad-pkix-rfc2875-bis'],
['rfc6386','draft-ietf-rtcweb-video'],
['rfc6480','rfc6485'],
['rfc6480','rfc6489'],
['rfc6480','rfc6491'],
['rfc6480','rfc7935'],
['rfc6707','draft-ietf-cdni-metadata'],
['rfc6839','draft-ietf-appsawg-xml-mediatypes'],
['rfc7251','rfc7252'],
['rfc7358','draft-ietf-pals-rfc4447bis'],
['rfc7539','draft-ietf-tls-chacha20-poly1305'],
['rfc7612','draft-sweet-rfc2911bis'],
['rfc7748','draft-ietf-jose-cfrg-curves'],
['rfc8032','draft-ietf-jose-cfrg-curves'] ]
def addDownrefRelationships(apps,schema_editor):
DocAlias = apps.get_model('doc','DocAlias')
RelatedDocument = apps.get_model('doc','RelatedDocument')
for [fn2, fn1] in downref_registry_from_wiki:
da1 = DocAlias.objects.get(name=fn1)
da2 = DocAlias.objects.get(name=fn2)
RelatedDocument.objects.create(source=da1.document,
target=da2, relationship_id='downref-approval')
def removeDownrefRelationships(apps,schema_editor):
DocAlias = apps.get_model('doc','DocAlias')
RelatedDocument = apps.get_model('doc','RelatedDocument')
for [fn2, fn1] in downref_registry_from_wiki:
da1 = DocAlias.objects.get(name=fn1)
da2 = DocAlias.objects.get(name=fn2)
RelatedDocument.objects.filter(source=da1.document,
target=da2, relationship_id='downref-approval').delete()
class Migration(migrations.Migration):
dependencies = [
('name', '0019_add_docrelationshipname_downref_approval'),
('doc', '0025_auto_20170307_0146'),
]
operations = [
migrations.RunPython(addDownrefRelationships,removeDownrefRelationships)
]

View file

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-04-12 05:28
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('doc', '0026_add_downrefappr_from_wiki'),
]
operations = [
migrations.AlterField(
model_name='docevent',
name='type',
field=models.CharField(choices=[(b'new_revision', b'Added new revision'), (b'new_submission', b'Uploaded new revision'), (b'changed_document', b'Changed document metadata'), (b'added_comment', b'Added comment'), (b'added_message', b'Added message'), (b'deleted', b'Deleted document'), (b'changed_state', b'Changed state'), (b'changed_stream', b'Changed document stream'), (b'expired_document', b'Expired document'), (b'extended_expiry', b'Extended expiry of document'), (b'requested_resurrect', b'Requested resurrect'), (b'completed_resurrect', b'Completed resurrect'), (b'changed_consensus', b'Changed consensus'), (b'published_rfc', b'Published RFC'), (b'added_suggested_replaces', b'Added suggested replacement relationships'), (b'reviewed_suggested_replaces', b'Reviewed suggested replacement relationships'), (b'changed_group', b'Changed group'), (b'changed_protocol_writeup', b'Changed protocol writeup'), (b'changed_charter_milestone', b'Changed charter milestone'), (b'initial_review', b'Set initial review time'), (b'changed_review_announcement', b'Changed WG Review text'), (b'changed_action_announcement', b'Changed WG Action text'), (b'started_iesg_process', b'Started IESG process on document'), (b'created_ballot', b'Created ballot'), (b'closed_ballot', b'Closed ballot'), (b'sent_ballot_announcement', b'Sent ballot announcement'), (b'changed_ballot_position', b'Changed ballot position'), (b'changed_ballot_approval_text', b'Changed ballot approval text'), (b'changed_ballot_writeup_text', b'Changed ballot writeup text'), (b'changed_rfc_editor_note_text', b'Changed RFC Editor Note text'), (b'changed_last_call_text', b'Changed last call text'), (b'requested_last_call', b'Requested last call'), (b'sent_last_call', b'Sent last call'), (b'scheduled_for_telechat', b'Scheduled for telechat'), (b'iesg_approved', b'IESG approved document (no problem)'), (b'iesg_disapproved', b'IESG disapproved document (do not publish)'), (b'approved_in_minute', b'Approved in minute'), (b'iana_review', b'IANA review comment'), (b'rfc_in_iana_registry', b'RFC is in IANA registry'), (b'rfc_editor_received_announcement', b'Announcement was received by RFC Editor'), (b'requested_publication', b'Publication at RFC Editor requested'), (b'sync_from_rfc_editor', b'Received updated information from RFC Editor'), (b'requested_review', b'Requested review'), (b'assigned_review_request', b'Assigned review request'), (b'closed_review_request', b'Closed review request'), (b'downref_approved', b'Downref approved')], max_length=50),
),
]

View file

@ -1,29 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-05-04 13:15
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('doc', '0027_auto_20170412_0528'),
]
operations = [
migrations.CreateModel(
name='EditedAuthorsDocEvent',
fields=[
('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')),
('basis', models.CharField(help_text=b'What is the source or reasoning for the changes to the author list', max_length=255)),
],
bases=('doc.docevent',),
),
migrations.AlterField(
model_name='docevent',
name='type',
field=models.CharField(choices=[(b'new_revision', b'Added new revision'), (b'new_submission', b'Uploaded new revision'), (b'changed_document', b'Changed document metadata'), (b'added_comment', b'Added comment'), (b'added_message', b'Added message'), (b'edited_authors', b'Edited the documents author list'), (b'deleted', b'Deleted document'), (b'changed_state', b'Changed state'), (b'changed_stream', b'Changed document stream'), (b'expired_document', b'Expired document'), (b'extended_expiry', b'Extended expiry of document'), (b'requested_resurrect', b'Requested resurrect'), (b'completed_resurrect', b'Completed resurrect'), (b'changed_consensus', b'Changed consensus'), (b'published_rfc', b'Published RFC'), (b'added_suggested_replaces', b'Added suggested replacement relationships'), (b'reviewed_suggested_replaces', b'Reviewed suggested replacement relationships'), (b'changed_group', b'Changed group'), (b'changed_protocol_writeup', b'Changed protocol writeup'), (b'changed_charter_milestone', b'Changed charter milestone'), (b'initial_review', b'Set initial review time'), (b'changed_review_announcement', b'Changed WG Review text'), (b'changed_action_announcement', b'Changed WG Action text'), (b'started_iesg_process', b'Started IESG process on document'), (b'created_ballot', b'Created ballot'), (b'closed_ballot', b'Closed ballot'), (b'sent_ballot_announcement', b'Sent ballot announcement'), (b'changed_ballot_position', b'Changed ballot position'), (b'changed_ballot_approval_text', b'Changed ballot approval text'), (b'changed_ballot_writeup_text', b'Changed ballot writeup text'), (b'changed_rfc_editor_note_text', b'Changed RFC Editor Note text'), (b'changed_last_call_text', b'Changed last call text'), (b'requested_last_call', b'Requested last call'), (b'sent_last_call', b'Sent last call'), (b'scheduled_for_telechat', b'Scheduled for telechat'), (b'iesg_approved', b'IESG approved document (no problem)'), (b'iesg_disapproved', b'IESG disapproved document (do not publish)'), (b'approved_in_minute', b'Approved in minute'), (b'iana_review', b'IANA review comment'), (b'rfc_in_iana_registry', b'RFC is in IANA registry'), (b'rfc_editor_received_announcement', b'Announcement was received by RFC Editor'), (b'requested_publication', b'Publication at RFC Editor requested'), (b'sync_from_rfc_editor', b'Received updated information from RFC Editor'), (b'requested_review', b'Requested review'), (b'assigned_review_request', b'Assigned review request'), (b'closed_review_request', b'Closed review request'), (b'downref_approved', b'Downref approved')], max_length=50),
),
]

File diff suppressed because it is too large Load diff

View file

@ -1,115 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('name', '0020_formallanguagename'),
('doc', '0029_update_rfc_authors'),
]
operations = [
migrations.AddField(
model_name='dochistory',
name='words',
field=models.IntegerField(null=True, blank=True),
),
migrations.AddField(
model_name='document',
name='words',
field=models.IntegerField(null=True, blank=True),
),
migrations.AddField(
model_name='dochistory',
name='formal_languages',
field=models.ManyToManyField(help_text=b'Formal languages used in document', to='name.FormalLanguageName', blank=True),
),
migrations.AddField(
model_name='document',
name='formal_languages',
field=models.ManyToManyField(help_text=b'Formal languages used in document', to='name.FormalLanguageName', blank=True),
),
migrations.RemoveField(
model_name='dochistory',
name='authors',
),
migrations.RemoveField(
model_name='document',
name='authors',
),
migrations.AddField(
model_name='dochistoryauthor',
name='affiliation',
field=models.CharField(help_text=b'Organization/company used by author for submission', max_length=100, blank=True),
),
migrations.AddField(
model_name='dochistoryauthor',
name='country',
field=models.CharField(blank=True, help_text=b'Country used by author for submission', max_length=255),
),
migrations.RenameField(
model_name='dochistoryauthor',
old_name='author',
new_name='email',
),
migrations.AlterField(
model_name='dochistoryauthor',
name='email',
field=models.ForeignKey(blank=True, to='person.Email', help_text=b'Email address used by author for submission', null=True),
),
migrations.AddField(
model_name='dochistoryauthor',
name='person',
field=models.ForeignKey(blank=True, to='person.Person', null=True),
),
migrations.AddField(
model_name='documentauthor',
name='affiliation',
field=models.CharField(help_text=b'Organization/company used by author for submission', max_length=100, blank=True),
),
migrations.AddField(
model_name='documentauthor',
name='country',
field=models.CharField(blank=True, help_text=b'Country used by author for submission', max_length=255),
),
migrations.RenameField(
model_name='documentauthor',
old_name='author',
new_name='email',
),
migrations.AlterField(
model_name='documentauthor',
name='email',
field=models.ForeignKey(blank=True, to='person.Email', help_text=b'Email address used by author for submission', null=True),
),
migrations.AddField(
model_name='documentauthor',
name='person',
field=models.ForeignKey(blank=True, to='person.Person', null=True),
),
migrations.AlterField(
model_name='dochistoryauthor',
name='document',
field=models.ForeignKey(related_name='documentauthor_set', to='doc.DocHistory'),
),
migrations.AlterField(
model_name='dochistoryauthor',
name='order',
field=models.IntegerField(default=1),
),
migrations.RunSQL("update doc_documentauthor a inner join person_email e on a.email_id = e.address set a.person_id = e.person_id;", migrations.RunSQL.noop),
migrations.RunSQL("update doc_dochistoryauthor a inner join person_email e on a.email_id = e.address set a.person_id = e.person_id;", migrations.RunSQL.noop),
migrations.AlterField(
model_name='documentauthor',
name='person',
field=models.ForeignKey(to='person.Person'),
),
migrations.AlterField(
model_name='dochistoryauthor',
name='person',
field=models.ForeignKey(to='person.Person'),
),
]

View file

@ -1,58 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def fix_invalid_emails(apps, schema_editor):
Email = apps.get_model("person", "Email")
Role = apps.get_model("group", "Role")
RoleHistory = apps.get_model("group", "RoleHistory")
DocumentAuthor = apps.get_model("doc", "DocumentAuthor")
DocHistoryAuthor = apps.get_model("doc", "DocHistoryAuthor")
e = Email.objects.filter(address="unknown-email-Gigi-Karmous-Edwards").first()
if e:
# according to ftp://ietf.org/ietf/97dec/adsl-minutes-97dec.txt
new_e, _ = Email.objects.get_or_create(
address="GiGi.Karmous-Edwards@pulse.com",
primary=e.primary,
active=e.active,
person=e.person,
)
Role.objects.filter(email=e).update(email=new_e)
RoleHistory.objects.filter(email=e).update(email=new_e)
e.delete()
e = Email.objects.filter(address="unknown-email-Pat-Thaler").first()
if e:
# current chair email
new_e = Email.objects.get(address="pat.thaler@broadcom.com")
Role.objects.filter(email=e).update(email=new_e)
RoleHistory.objects.filter(email=e).update(email=new_e)
e.delete()
e = Email.objects.filter(address="unknown-email-Greg-<gregimirsky@gmail.com>>").first()
if e:
# current email
new_e = Email.objects.get(address="gregimirsky@gmail.com")
DocumentAuthor.objects.filter(email=e).update(email=new_e)
DocHistoryAuthor.objects.filter(email=e).update(email=new_e)
e.delete()
DocumentAuthor.objects.filter(email__address__startswith="unknown-email-").exclude(email__address__contains="@").update(email=None)
DocHistoryAuthor.objects.filter(email__address__startswith="unknown-email-").exclude(email__address__contains="@").update(email=None)
Email.objects.exclude(address__contains="@").filter(address__startswith="unknown-email-").delete()
assert not Email.objects.filter(address__startswith="unknown-email-")
class Migration(migrations.Migration):
dependencies = [
('doc', '0030_author_revamp_and_extra_attributes'),
('person', '0014_auto_20160613_0751'),
('group', '0009_auto_20150930_0758'),
]
operations = [
migrations.RunPython(fix_invalid_emails, migrations.RunPython.noop),
]

View file

@ -1,21 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-07-31 05:08
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('doc', '0031_remove_fake_email_adresses'),
]
operations = [
migrations.AlterField(
model_name='document',
name='name',
field=models.CharField(max_length=255, primary_key=True, serialize=False, validators=[django.core.validators.RegexValidator(b'^[-a-z0-9]+$', b'Provide a valid document name consisting of lowercase letters, numbers and hyphens.', b'invalid')]),
),
]

View file

@ -1,37 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-08-14 13:18
from __future__ import unicode_literals
from django.db import migrations
changes = [
[ 'conflict-review-irtf-samrg-common-api', '02', '2013-10-04 10:38:54', '2013-10-04 10:38:52' ],
[ 'conflict-review-irtf-dtnrg-dgram-clayer', '02', '2013-08-25 08:46:03', '2013-08-25 08:45:53' ],
[ 'conflict-review-irtf-dtnrg-dgram-clayer', '01', '2013-08-24 12:25:14', '2013-08-24 12:25:13' ],
[ 'conflict-review-hausenblas-csv-fragment', '02', '2013-10-10 10:17:53', '2013-10-10 10:17:52' ],
[ 'conflict-review-hoffine-already-dotless', '04', '2013-10-10 15:53:14', '2013-10-10 15:53:13' ],
[ 'conflict-review-irtf-sdnrg-layer-terminology', '01', '2014-10-11 06:51:30', '2014-10-11 06:51:29' ],
[ 'conflict-review-gont-dhcpv6-stable-privacy-addresses', '01', '2016-05-18 17:51:58', '2016-05-18 17:51:55' ],
]
def forward(apps, schema_editor):
DocHistory = apps.get_model('doc','DocHistory')
for name, rev, old, new in changes:
DocHistory.objects.filter(name=name,rev=rev,time=old).update(time=new)
def reverse(apps, schema_editor):
DocHistory = apps.get_model('doc','DocHistory')
for name, rev, old, new in changes:
DocHistory.objects.filter(name=name,rev=rev,time=new).update(time=old)
class Migration(migrations.Migration):
dependencies = [
('doc', '0032_auto_20170731_0508'),
]
operations = [
migrations.RunPython(forward,reverse)
]

View file

@ -1,27 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2017-09-26 05:36
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('name', '0027_docurltagname'),
('doc', '0033_fix_conflict_review_dochistory'),
]
operations = [
migrations.CreateModel(
name='DocumentURL',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('desc', models.CharField(blank=True, default=b'', max_length=255)),
('url', models.URLField()),
('doc', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document')),
('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.DocUrlTagName')),
],
),
]

View file

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2017-10-29 14:14
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('doc', '0034_documenturl'),
]
operations = [
migrations.AlterField(
model_name='documenturl',
name='url',
field=models.URLField(max_length=512),
),
]

View file

@ -27,6 +27,7 @@ from ietf.utils import log
from ietf.utils.admin import admin_link
from ietf.utils.validators import validate_no_control_chars
from ietf.utils.mail import formataddr
from ietf.utils.models import ForeignKey
logger = logging.getLogger('django')
@ -52,7 +53,7 @@ def check_statetype_slugs(app_configs, **kwargs):
return errors
class State(models.Model):
type = models.ForeignKey(StateType)
type = ForeignKey(StateType)
slug = models.SlugField()
name = models.CharField(max_length=255)
used = models.BooleanField(default=True)
@ -74,13 +75,13 @@ class DocumentInfo(models.Model):
"""Any kind of document. Draft, RFC, Charter, IPR Statement, Liaison Statement"""
time = models.DateTimeField(default=datetime.datetime.now) # should probably have auto_now=True
type = models.ForeignKey(DocTypeName, blank=True, null=True) # Draft, Agenda, Minutes, Charter, Discuss, Guideline, Email, Review, Issue, Wiki, External ...
type = ForeignKey(DocTypeName, blank=True, null=True) # Draft, Agenda, Minutes, Charter, Discuss, Guideline, Email, Review, Issue, Wiki, External ...
title = models.CharField(max_length=255, validators=[validate_no_control_chars, ])
states = models.ManyToManyField(State, blank=True) # plain state (Active/Expired/...), IESG state, stream state
tags = models.ManyToManyField(DocTagName, blank=True) # Revised ID Needed, ExternalParty, AD Followup, ...
stream = models.ForeignKey(StreamName, blank=True, null=True) # IETF, IAB, IRTF, Independent Submission
group = models.ForeignKey(Group, blank=True, null=True) # WG, RG, IAB, IESG, Edu, Tools
stream = ForeignKey(StreamName, blank=True, null=True) # IETF, IAB, IRTF, Independent Submission
group = ForeignKey(Group, blank=True, null=True) # WG, RG, IAB, IESG, Edu, Tools
abstract = models.TextField(blank=True)
rev = models.CharField(verbose_name="revision", max_length=16, blank=True)
@ -88,10 +89,10 @@ class DocumentInfo(models.Model):
words = models.IntegerField(blank=True, null=True)
formal_languages = models.ManyToManyField(FormalLanguageName, blank=True, help_text="Formal languages used in document")
order = models.IntegerField(default=1, blank=True) # This is probably obviated by SessionPresentaion.order
intended_std_level = models.ForeignKey(IntendedStdLevelName, verbose_name="Intended standardization level", blank=True, null=True)
std_level = models.ForeignKey(StdLevelName, verbose_name="Standardization level", blank=True, null=True)
ad = models.ForeignKey(Person, verbose_name="area director", related_name='ad_%(class)s_set', blank=True, null=True)
shepherd = models.ForeignKey(Email, related_name='shepherd_%(class)s_set', blank=True, null=True)
intended_std_level = ForeignKey(IntendedStdLevelName, verbose_name="Intended standardization level", blank=True, null=True)
std_level = ForeignKey(StdLevelName, verbose_name="Standardization level", blank=True, null=True)
ad = ForeignKey(Person, verbose_name="area director", related_name='ad_%(class)s_set', blank=True, null=True)
shepherd = ForeignKey(Email, related_name='shepherd_%(class)s_set', blank=True, null=True)
expires = models.DateTimeField(blank=True, null=True)
notify = models.CharField(max_length=255, blank=True)
external_url = models.URLField(blank=True) # Should be set for documents with type 'External'.
@ -482,9 +483,9 @@ class DocumentInfo(models.Model):
STATUSCHANGE_RELATIONS = ('tops','tois','tohist','toinf','tobcp','toexp')
class RelatedDocument(models.Model):
source = models.ForeignKey('Document')
target = models.ForeignKey('DocAlias')
relationship = models.ForeignKey(DocRelationshipName)
source = ForeignKey('Document')
target = ForeignKey('DocAlias')
relationship = ForeignKey(DocRelationshipName)
def action(self):
return self.relationship.name
def __unicode__(self):
@ -536,9 +537,9 @@ class RelatedDocument(models.Model):
return False
class DocumentAuthorInfo(models.Model):
person = models.ForeignKey(Person)
person = ForeignKey(Person)
# email should only be null for some historic documents
email = models.ForeignKey(Email, help_text="Email address used by author for submission", blank=True, null=True)
email = ForeignKey(Email, help_text="Email address used by author for submission", blank=True, null=True)
affiliation = models.CharField(max_length=100, blank=True, help_text="Organization/company used by author for submission")
country = models.CharField(max_length=255, blank=True, help_text="Country used by author for submission")
order = models.IntegerField(default=1)
@ -555,7 +556,7 @@ class DocumentAuthorInfo(models.Model):
ordering = ["document", "order"]
class DocumentAuthor(DocumentAuthorInfo):
document = models.ForeignKey('Document')
document = ForeignKey('Document')
def __unicode__(self):
return u"%s %s (%s)" % (self.document.name, self.person, self.order)
@ -807,28 +808,28 @@ class Document(DocumentInfo):
class DocumentURL(models.Model):
doc = models.ForeignKey(Document)
tag = models.ForeignKey(DocUrlTagName)
doc = ForeignKey(Document)
tag = ForeignKey(DocUrlTagName)
desc = models.CharField(max_length=255, default='', blank=True)
url = models.URLField(max_length=512)
class RelatedDocHistory(models.Model):
source = models.ForeignKey('DocHistory')
target = models.ForeignKey('DocAlias', related_name="reversely_related_document_history_set")
relationship = models.ForeignKey(DocRelationshipName)
source = ForeignKey('DocHistory')
target = ForeignKey('DocAlias', related_name="reversely_related_document_history_set")
relationship = ForeignKey(DocRelationshipName)
def __unicode__(self):
return u"%s %s %s" % (self.source.doc.name, self.relationship.name.lower(), self.target.name)
class DocHistoryAuthor(DocumentAuthorInfo):
# use same naming convention as non-history version to make it a bit
# easier to write generic code
document = models.ForeignKey('DocHistory', related_name="documentauthor_set")
document = ForeignKey('DocHistory', related_name="documentauthor_set")
def __unicode__(self):
return u"%s %s (%s)" % (self.document.doc.name, self.person, self.order)
class DocHistory(DocumentInfo):
doc = models.ForeignKey(Document, related_name="history_set")
doc = ForeignKey(Document, related_name="history_set")
# the name here is used to capture the canonical name at the time
# - it would perhaps be more elegant to simply call the attribute
# canonical_name and replace the function on Document with a
@ -878,7 +879,7 @@ class DocAlias(models.Model):
to by RFC number, primarily, after achieving RFC status.
"""
name = models.CharField(max_length=255, primary_key=True)
document = models.ForeignKey(Document)
document = ForeignKey(Document)
def __unicode__(self):
return "%s-->%s" % (self.name, self.document.name)
document_link = admin_link("document")
@ -887,8 +888,8 @@ class DocAlias(models.Model):
verbose_name_plural = "document aliases"
class DocReminder(models.Model):
event = models.ForeignKey('DocEvent')
type = models.ForeignKey(DocReminderTypeName)
event = ForeignKey('DocEvent')
type = ForeignKey(DocReminderTypeName)
due = models.DateTimeField()
active = models.BooleanField(default=True)
@ -972,8 +973,8 @@ class DocEvent(models.Model):
"""An occurrence for a document, used for tracking who, when and what."""
time = models.DateTimeField(default=datetime.datetime.now, help_text="When the event happened", db_index=True)
type = models.CharField(max_length=50, choices=EVENT_TYPES)
by = models.ForeignKey(Person)
doc = models.ForeignKey('doc.Document')
by = ForeignKey(Person)
doc = ForeignKey('doc.Document')
rev = models.CharField(verbose_name="revision", max_length=16, null=True, blank=True)
desc = models.TextField()
@ -998,15 +999,15 @@ class NewRevisionDocEvent(DocEvent):
pass
class StateDocEvent(DocEvent):
state_type = models.ForeignKey(StateType)
state = models.ForeignKey(State, blank=True, null=True)
state_type = ForeignKey(StateType)
state = ForeignKey(State, blank=True, null=True)
class ConsensusDocEvent(DocEvent):
consensus = models.NullBooleanField(default=None)
# IESG events
class BallotType(models.Model):
doc_type = models.ForeignKey(DocTypeName, blank=True, null=True)
doc_type = ForeignKey(DocTypeName, blank=True, null=True)
slug = models.SlugField()
name = models.CharField(max_length=255)
question = models.TextField(blank=True)
@ -1021,7 +1022,7 @@ class BallotType(models.Model):
ordering = ['order']
class BallotDocEvent(DocEvent):
ballot_type = models.ForeignKey(BallotType)
ballot_type = ForeignKey(BallotType)
def active_ad_positions(self):
"""Return dict mapping each active AD to a current ballot position (or None if they haven't voted)."""
@ -1083,9 +1084,9 @@ class BallotDocEvent(DocEvent):
return positions
class BallotPositionDocEvent(DocEvent):
ballot = models.ForeignKey(BallotDocEvent, null=True, default=None) # default=None is a temporary migration period fix, should be removed when charter branch is live
ad = models.ForeignKey(Person)
pos = models.ForeignKey(BallotPositionName, verbose_name="position", default="norecord")
ballot = ForeignKey(BallotDocEvent, null=True, default=None) # default=None is a temporary migration period fix, should be removed when charter branch is live
ad = ForeignKey(Person)
pos = ForeignKey(BallotPositionName, verbose_name="position", default="norecord")
discuss = models.TextField(help_text="Discuss text if position is discuss", blank=True)
discuss_time = models.DateTimeField(help_text="Time discuss text was written", blank=True, null=True)
comment = models.TextField(help_text="Optional comment", blank=True)
@ -1102,8 +1103,8 @@ class TelechatDocEvent(DocEvent):
returning_item = models.BooleanField(default=False)
class ReviewRequestDocEvent(DocEvent):
review_request = models.ForeignKey('review.ReviewRequest')
state = models.ForeignKey(ReviewRequestStateName, blank=True, null=True)
review_request = ForeignKey('review.ReviewRequest')
state = ForeignKey(ReviewRequestStateName, blank=True, null=True)
# charter events
class InitialReviewDocEvent(DocEvent):
@ -1111,20 +1112,20 @@ class InitialReviewDocEvent(DocEvent):
class AddedMessageEvent(DocEvent):
import ietf.message.models
message = models.ForeignKey(ietf.message.models.Message, null=True, blank=True,related_name='doc_manualevents')
message = ForeignKey(ietf.message.models.Message, null=True, blank=True,related_name='doc_manualevents')
msgtype = models.CharField(max_length=25)
in_reply_to = models.ForeignKey(ietf.message.models.Message, null=True, blank=True,related_name='doc_irtomanual')
in_reply_to = ForeignKey(ietf.message.models.Message, null=True, blank=True,related_name='doc_irtomanual')
class SubmissionDocEvent(DocEvent):
import ietf.submit.models
submission = models.ForeignKey(ietf.submit.models.Submission)
submission = ForeignKey(ietf.submit.models.Submission)
# dumping store for removed events
class DeletedEvent(models.Model):
content_type = models.ForeignKey(ContentType)
content_type = ForeignKey(ContentType)
json = models.TextField(help_text="Deleted object in JSON format, with attribute names chosen to be suitable for passing into the relevant create method.")
by = models.ForeignKey(Person)
by = ForeignKey(Person)
time = models.DateTimeField(default=datetime.datetime.now)
def __unicode__(self):

View file

@ -3,7 +3,7 @@
from __future__ import unicode_literals
from django.core.urlresolvers import reverse as urlreverse
from django.urls import reverse as urlreverse
import debug # pyflakes:ignore

View file

@ -1274,7 +1274,7 @@ class AdoptDraftTests(TestCase):
class ChangeStreamStateTests(TestCase):
def test_set_tags(self):
draft = make_test_data()
draft.tags = DocTagName.objects.filter(slug="w-expert")
draft.tags.set(DocTagName.objects.filter(slug="w-expert"))
draft.group.unused_tags.add("w-refdoc")
url = urlreverse('ietf.doc.views_draft.change_stream_state', kwargs=dict(name=draft.name, state_type="draft-stream-ietf"))

View file

@ -44,8 +44,10 @@ def save_document_in_history(doc):
# copy many to many
for field in doc._meta.many_to_many:
if field.rel.through and field.rel.through._meta.auto_created:
setattr(dochist, field.name, getattr(doc, field.name).all())
if field.remote_field.through and field.remote_field.through._meta.auto_created:
hist_field = getattr(dochist, field.name)
hist_field.clear()
hist_field.set(getattr(doc, field.name).all())
# copy remaining tricky many to many
def transfer_fields(obj, HistModel):

View file

@ -169,7 +169,7 @@ def document_main(request, name, rev=None):
can_edit_replaces = has_role(request.user, ("Area Director", "Secretariat", "IRTF Chair", "WG Chair", "RG Chair", "WG Secretary", "RG Secretary"))
is_author = request.user.is_authenticated() and doc.documentauthor_set.filter(person__user=request.user).exists()
is_author = request.user.is_authenticated and doc.documentauthor_set.filter(person__user=request.user).exists()
can_view_possibly_replaces = can_edit_replaces or is_author
rfc_number = name[3:] if name.startswith("") else None

View file

@ -2,7 +2,7 @@
from __future__ import unicode_literals
from django.core.urlresolvers import reverse as urlreverse
from django.urls import reverse as urlreverse
from django.http import HttpResponseRedirect
from django.shortcuts import render

View file

@ -1230,8 +1230,8 @@ def request_publication(request, name):
m.save()
if doc.group.acronym != "none":
m.related_groups = [doc.group]
m.related_docs = [doc]
m.related_groups.set([doc.group])
m.related_docs.set([doc])
send_mail_message(request, m)
@ -1514,7 +1514,8 @@ def change_stream_state(request, name, state_type):
new_tags = set(form.cleaned_data["tags"])
if existing_tags != new_tags:
doc.tags = new_tags
doc.tags.clear()
doc.tags.set(new_tags)
e = DocEvent(type="changed_document", doc=doc, rev=doc.rev, by=by)
added_tags = new_tags - existing_tags

View file

@ -1,12 +1,17 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-20 10:52
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
from django.db import migrations, models
import django.db.models.deletion
import ietf.utils.models
class Migration(migrations.Migration):
initial = True
dependencies = [
('name', '0001_initial'),
('person', '0001_initial'),
@ -17,184 +22,164 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Group',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time', models.DateTimeField(default=datetime.datetime.now)),
('name', models.CharField(max_length=80)),
('description', models.TextField(blank=True)),
('list_email', models.CharField(max_length=64, blank=True)),
('list_subscribe', models.CharField(max_length=255, blank=True)),
('list_archive', models.CharField(max_length=255, blank=True)),
('list_email', models.CharField(blank=True, max_length=64)),
('list_subscribe', models.CharField(blank=True, max_length=255)),
('list_archive', models.CharField(blank=True, max_length=255)),
('comments', models.TextField(blank=True)),
('acronym', models.SlugField(unique=True, max_length=40)),
('ad', models.ForeignKey(verbose_name=b'AD', blank=True, to='person.Person', null=True)),
('charter', models.OneToOneField(related_name='chartered_group', null=True, blank=True, to='doc.Document')),
('parent', models.ForeignKey(blank=True, to='group.Group', null=True)),
('state', models.ForeignKey(to='name.GroupStateName', null=True)),
('type', models.ForeignKey(to='name.GroupTypeName', null=True)),
('unused_states', models.ManyToManyField(help_text=b'Document states that have been disabled for the group', to='doc.State', blank=True)),
('unused_tags', models.ManyToManyField(help_text=b'Document tags that have been disabled for the group', to='name.DocTagName', blank=True)),
('acronym', models.SlugField(max_length=40, unique=True)),
('charter', ietf.utils.models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='chartered_group', to='doc.Document')),
('parent', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='group.Group')),
('state', ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='name.GroupStateName')),
('type', ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='name.GroupTypeName')),
('unused_states', models.ManyToManyField(blank=True, help_text=b'Document states that have been disabled for the group.', to='doc.State')),
('unused_tags', models.ManyToManyField(blank=True, help_text=b'Document tags that have been disabled for the group.', to='name.DocTagName')),
],
options={
'abstract': False,
},
bases=(models.Model,),
),
migrations.CreateModel(
name='GroupEvent',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time', models.DateTimeField(default=datetime.datetime.now, help_text=b'When the event happened')),
('type', models.CharField(max_length=50, choices=[(b'changed_state', b'Changed state'), (b'added_comment', b'Added comment'), (b'info_changed', b'Changed metadata'), (b'requested_close', b'Requested closing group'), (b'changed_milestone', b'Changed milestone'), (b'sent_notification', b'Sent notification')])),
('type', models.CharField(choices=[(b'changed_state', b'Changed state'), (b'added_comment', b'Added comment'), (b'info_changed', b'Changed metadata'), (b'requested_close', b'Requested closing group'), (b'changed_milestone', b'Changed milestone'), (b'sent_notification', b'Sent notification'), (b'status_update', b'Status update')], max_length=50)),
('desc', models.TextField()),
],
options={
'ordering': ['-time', 'id'],
},
bases=(models.Model,),
),
migrations.CreateModel(
name='ChangeStateGroupEvent',
fields=[
('groupevent_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='group.GroupEvent')),
('state', models.ForeignKey(to='name.GroupStateName')),
],
options={
},
bases=('group.groupevent',),
),
migrations.CreateModel(
name='GroupHistory',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time', models.DateTimeField(default=datetime.datetime.now)),
('name', models.CharField(max_length=80)),
('description', models.TextField(blank=True)),
('list_email', models.CharField(max_length=64, blank=True)),
('list_subscribe', models.CharField(max_length=255, blank=True)),
('list_archive', models.CharField(max_length=255, blank=True)),
('list_email', models.CharField(blank=True, max_length=64)),
('list_subscribe', models.CharField(blank=True, max_length=255)),
('list_archive', models.CharField(blank=True, max_length=255)),
('comments', models.TextField(blank=True)),
('acronym', models.CharField(max_length=40)),
('ad', models.ForeignKey(verbose_name=b'AD', blank=True, to='person.Person', null=True)),
('group', models.ForeignKey(related_name='history_set', to='group.Group')),
('parent', models.ForeignKey(blank=True, to='group.Group', null=True)),
('state', models.ForeignKey(to='name.GroupStateName', null=True)),
('type', models.ForeignKey(to='name.GroupTypeName', null=True)),
('unused_states', models.ManyToManyField(help_text=b'Document states that have been disabled for the group', to='doc.State', blank=True)),
('unused_tags', models.ManyToManyField(help_text=b'Document tags that have been disabled for the group', to='name.DocTagName', blank=True)),
('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='history_set', to='group.Group')),
('parent', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='group.Group')),
('state', ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='name.GroupStateName')),
('type', ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='name.GroupTypeName')),
('unused_states', models.ManyToManyField(blank=True, help_text=b'Document states that have been disabled for the group.', to='doc.State')),
('unused_tags', models.ManyToManyField(blank=True, help_text=b'Document tags that have been disabled for the group.', to='name.DocTagName')),
],
options={
'verbose_name_plural': 'group histories',
},
bases=(models.Model,),
),
migrations.CreateModel(
name='GroupMilestone',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('desc', models.CharField(max_length=500, verbose_name=b'Description')),
('due', models.DateField()),
('resolved', models.CharField(help_text=b'Explanation of why milestone is resolved (usually "Done"), or empty if still due', max_length=50, blank=True)),
('resolved', models.CharField(blank=True, help_text=b'Explanation of why milestone is resolved (usually "Done"), or empty if still due.', max_length=50)),
('time', models.DateTimeField(auto_now=True)),
('docs', models.ManyToManyField(to='doc.Document', blank=True)),
('group', models.ForeignKey(to='group.Group')),
('state', models.ForeignKey(to='name.GroupMilestoneStateName')),
('docs', models.ManyToManyField(blank=True, to='doc.Document')),
('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')),
('state', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.GroupMilestoneStateName')),
],
options={
'ordering': ['due', 'id'],
'abstract': False,
},
bases=(models.Model,),
),
migrations.CreateModel(
name='GroupMilestoneHistory',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('desc', models.CharField(max_length=500, verbose_name=b'Description')),
('due', models.DateField()),
('resolved', models.CharField(help_text=b'Explanation of why milestone is resolved (usually "Done"), or empty if still due', max_length=50, blank=True)),
('resolved', models.CharField(blank=True, help_text=b'Explanation of why milestone is resolved (usually "Done"), or empty if still due.', max_length=50)),
('time', models.DateTimeField()),
('docs', models.ManyToManyField(to='doc.Document', blank=True)),
('group', models.ForeignKey(to='group.Group')),
('milestone', models.ForeignKey(related_name='history_set', to='group.GroupMilestone')),
('state', models.ForeignKey(to='name.GroupMilestoneStateName')),
('docs', models.ManyToManyField(blank=True, to='doc.Document')),
('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')),
('milestone', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='history_set', to='group.GroupMilestone')),
('state', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.GroupMilestoneStateName')),
],
options={
'ordering': ['due', 'id'],
'abstract': False,
},
bases=(models.Model,),
),
migrations.CreateModel(
name='GroupStateTransitions',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('group', models.ForeignKey(to='group.Group')),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')),
('next_states', models.ManyToManyField(related_name='previous_groupstatetransitions_states', to='doc.State')),
('state', models.ForeignKey(help_text=b'State for which the next states should be overridden', to='doc.State')),
('state', ietf.utils.models.ForeignKey(help_text=b'State for which the next states should be overridden', on_delete=django.db.models.deletion.CASCADE, to='doc.State')),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='GroupURL',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('url', models.URLField()),
('group', models.ForeignKey(to='group.Group')),
('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='MilestoneGroupEvent',
fields=[
('groupevent_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='group.GroupEvent')),
('milestone', models.ForeignKey(to='group.GroupMilestone')),
],
options={
},
bases=('group.groupevent',),
),
migrations.CreateModel(
name='Role',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('email', models.ForeignKey(help_text=b'Email address used by person for this role', to='person.Email')),
('group', models.ForeignKey(to='group.Group')),
('name', models.ForeignKey(to='name.RoleName')),
('person', models.ForeignKey(to='person.Person')),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('email', ietf.utils.models.ForeignKey(help_text=b'Email address used by person for this role.', on_delete=django.db.models.deletion.CASCADE, to='person.Email')),
('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')),
('name', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.RoleName')),
('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')),
],
options={
'ordering': ['name_id'],
},
bases=(models.Model,),
),
migrations.CreateModel(
name='RoleHistory',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('email', models.ForeignKey(help_text=b'Email address used by person for this role', to='person.Email')),
('group', models.ForeignKey(to='group.GroupHistory')),
('name', models.ForeignKey(to='name.RoleName')),
('person', models.ForeignKey(to='person.Person')),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('email', ietf.utils.models.ForeignKey(help_text=b'Email address used by person for this role.', on_delete=django.db.models.deletion.CASCADE, to='person.Email')),
('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.GroupHistory')),
('name', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.RoleName')),
('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')),
],
options={
'verbose_name_plural': 'role histories',
},
bases=(models.Model,),
),
migrations.CreateModel(
name='ChangeStateGroupEvent',
fields=[
('groupevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='group.GroupEvent')),
('state', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.GroupStateName')),
],
bases=('group.groupevent',),
),
migrations.CreateModel(
name='MilestoneGroupEvent',
fields=[
('groupevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='group.GroupEvent')),
('milestone', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.GroupMilestone')),
],
bases=('group.groupevent',),
),
migrations.AddField(
model_name='groupevent',
name='by',
field=models.ForeignKey(to='person.Person'),
preserve_default=True,
field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person'),
),
migrations.AddField(
model_name='groupevent',
name='group',
field=models.ForeignKey(to='group.Group'),
preserve_default=True,
field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group'),
),
]

View file

@ -1,34 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def create_ad_roles(apps, schema_editor):
RoleName = apps.get_model('name', 'RoleName')
Group = apps.get_model('group', 'Group')
#
rolename, __ = RoleName.objects.get_or_create(slug='ad')
for group in Group.objects.exclude(ad=None):
email = None
if group.parent:
ad_rolematch = group.parent.role_set.filter(person=group.ad,name=rolename).first()
if ad_rolematch:
email = ad_rolematch.email
if not email:
email = group.ad.email_set.order_by("-active","-time").first()
try:
group.role_set.get_or_create(name=rolename,person=group.ad,email=email)
except Exception as e:
import sys
sys.stderr.write('Exeption: %s\n' % e)
raise
class Migration(migrations.Migration):
dependencies = [
('group', '0001_initial'),
]
operations = [
migrations.RunPython(create_ad_roles),
]

View file

@ -1,22 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations # pyflakes:ignore
class Migration(migrations.Migration):
dependencies = [
('group', '0002_auto_20150208_1012'),
]
operations = [
migrations.RemoveField(
model_name='group',
name='ad',
),
migrations.RemoveField(
model_name='grouphistory',
name='ad',
),
]

View file

@ -1,62 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('group', '0003_auto_20150304_0743'),
]
operations = [
migrations.AlterField(
model_name='group',
name='unused_states',
field=models.ManyToManyField(help_text=b'Document states that have been disabled for the group.', to='doc.State', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='group',
name='unused_tags',
field=models.ManyToManyField(help_text=b'Document tags that have been disabled for the group.', to='name.DocTagName', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='grouphistory',
name='unused_states',
field=models.ManyToManyField(help_text=b'Document states that have been disabled for the group.', to='doc.State', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='grouphistory',
name='unused_tags',
field=models.ManyToManyField(help_text=b'Document tags that have been disabled for the group.', to='name.DocTagName', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='groupmilestone',
name='resolved',
field=models.CharField(help_text=b'Explanation of why milestone is resolved (usually "Done"), or empty if still due.', max_length=50, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='groupmilestonehistory',
name='resolved',
field=models.CharField(help_text=b'Explanation of why milestone is resolved (usually "Done"), or empty if still due.', max_length=50, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='role',
name='email',
field=models.ForeignKey(help_text=b'Email address used by person for this role.', to='person.Email'),
preserve_default=True,
),
migrations.AlterField(
model_name='rolehistory',
name='email',
field=models.ForeignKey(help_text=b'Email address used by person for this role.', to='person.Email'),
preserve_default=True,
),
]

View file

@ -1,42 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def create_iab_roles(apps, schema_editor):
Role = apps.get_model('group','Role')
Group = apps.get_model('group','Group')
Person = apps.get_model('person','Person')
iab = Group.objects.get(acronym='iab')
iab_names = [
'Jari Arkko',
'Mary Barnes',
'Marc Blanchet',
'Ralph Droms',
'Ted Hardie',
'Joe Hildebrand',
'Russ Housley',
'Erik Nordmark',
'Robert Sparks',
'Andrew Sullivan',
'Dave Thaler',
'Brian Trammell',
'Suzanne Woolf',
]
for name in iab_names:
person = Person.objects.get(name=name)
person.role_set.add(Role(name_id='member',group=iab,person=person,email_id=person.email_set.filter(active=True).order_by('-time').first().address))
class Migration(migrations.Migration):
dependencies = [
('group', '0004_auto_20150430_0847'),
]
operations = [
migrations.RunPython(create_iab_roles),
]

View file

@ -1,51 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def add_area_descriptions(apps, schema_editor):
Group = apps.get_model("group","Group")
Group.objects.filter(acronym='gen').update(description="""The General Area consists of a few IETF WGs and other activities focused on supporting, updating and maintaining the IETF standards development process. As General AD, the IETF Chair manages the General Area Review Team (Gen-ART) and other IETF-wide directorates.""")
Group.objects.filter(acronym='int').update(description="""The primary technical topics covered by the Internet Area include IP layer (both IPv4 and IPv6), implications of IPv4 address depletion, co-existence between the IP versions, DNS, DHCP, host and router configuration, mobility, multihoming, identifier-locator separation, VPNs and pseudowires along with related MPLS issues, and various link layer technologies. The Internet Area is also responsible for specifying how IP will run over new link layer protocols.""")
Group.objects.filter(acronym='ops').update(description="""The primary technical areas covered by the Operations & Management (OPS) Area include: Network Management, AAA, and various operational issues facing the Internet such as DNS operations, IPv6 operations, operational security and Routing operations.
Unlike most IETF areas, the Operations & Management area is logically divided into two separate functions: Network Management and Operations.
The Network Management function covers Internet management and AAA, and the related protocols, including but not limited to NETCONF, SNMP, RADIUS, Diameter, and CAPWAP, and of data modeling and data modeling languages used in management such as SMI and YANG. Another important role of the Management function is to identify potential or actual management issues regarding IETF protocols and documents in all areas, and to work with the other areas to resolve those issues.
The Operations function is largely responsible for soliciting operator feedback and input regarding IETF work. Another important role of the Operations function is to identify potential or actual operational issues regarding IETF protocols and documents in all areas, and to work with the other areas to resolve those issues.
The OPS area intersects most often with the Routing, Internet and Security areas.""")
Group.objects.filter(acronym='rtg').update(description="""The Routing Area is responsible for ensuring continuous operation of the Internet routing system by maintaining the scalability and stability characteristics of the existing routing protocols, as well as developing new protocols, extensions, and bug fixes in a timely manner. Forwarding methods (such as destination-based unicast and multicast forwarding, MPLS, and pseudowire) as well as associated routing and signalling protocols (such as OSPF, IS-IS, BGP, RSVP-TE, LDP, PIM, L1-, L2-, and L3-VPNs) are within the scope of the Routing Area. Traffic engineering routing and signaling protocols are in scope, as is the architecture and protocols for the Path Computation Element that helps to select end-to-end paths for traffic-engineered routing. The Routing Area also works on Generalized MPLS used in the control plane of optical networks as well as security aspects of the routing system. The Routing Area has recently developed a routing protocol (RPL) for use in low-powered and lossy networks.
The Routing Area intersects most frequently with the Internet Area, the Operations & Management Area, and the Security Area. Interaction with the Internet Area concentrates mainly on IP Forwarding and Multicast. With the Operations & Management Area the focus is on MIB development. With the Security area the focus is on routing protocol security.
Current work in the Routing Area has some overlap with work in other SDOs, in particular interactions with the ITU-T on MPLS-TP.""")
Group.objects.filter(acronym='sec').update(description="""The Security Area is the home for working groups focused on security protocols. They provide one or more of the security services: integrity, authentication, non-repudiation, confidentiality, and access control. Since many of the security mechanisms needed to provide these security services employ cryptography, key management is also vital.
The Security Area intersects with all other IETF Areas, and the participants are frequently involved with activities in the working groups from other areas. This involvement focuses upon practical application of Security Area protocols and technologies to the protocols of other Areas.""")
Group.objects.filter(acronym='tsv').update(description="""The transport and services area - usually just called "transport area" or "TSV area" - covers a range of technical topics related to data transport in the Internet.
The Transport Area works on mechanisms related to end-to-end data transport to support Internet applications and services that exchange potentially large volumes of traffic at potentially high bandwidths. A key focus are mechanisms to detect and react to congestion in the Internet, such as the congestion control algorithms in Internet transport control protocols such as TCP, SCTP, and DCCP, as well as congestion management schemes such as PCN and CONEX.
Current and new transport work includes congestion signaling and reporting, forward error correction, multicast, QoS and reservation signaling, DiffServ? and congestion control for unresponsive flows, NAT regularization and specification, storage protocols for the Internet, peer-to-peer streaming, performance metrics for Internet paths, experimentation with congestion control schemes developed in the IRTF, multipath extensions to existing transport protocols, congestion control for "background" bulk transfers, and extensions to the IETF protocols for multimedia transport.
The transport area intersects most frequently with Internet area, the applications area, the RAI area, the security area and several IRTF research groups.""")
Group.objects.filter(acronym='art').update(description="""The ART area develops application protocols and architectures in the IETF. The work in the area falls into roughly three categories, with blurry distinctions between them. One category consists of protocols and architectures specifically designed to support delay-sensitive interpersonal communications via voice, video, instant messaging, presence, and other means, otherwise known as "real-time" applications and services. A second category consists of protocols and architectures to support applications that may be more tolerant of delay, including HTTP, email, and FTP. The third category consists of building blocks that are designed for use across a wide variety of applications and may be employed by both real-time and non-real-time applications, such as URI schemes, MIME types, authentication mechanisms, data formats, metrics, and codecs.""")
class Migration(migrations.Migration):
dependencies = [
('group', '0005_auto_20150504_0726'),
]
operations = [
migrations.RunPython(add_area_descriptions)
]

View file

@ -1,288 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
from django.db import migrations
import debug # pyflakes:ignore
definite_bof_conc = [
'afic',
'dnsevolv',
'fddifs',
'icp',
'ietfgrow',
'ios',
'ipdecide',
'mailftp',
'osiextnd',
'ramp',
'skey',
'termacct',
'tpcint',
'usm',
'vtp',
]
maybe_bof_conc = [
'ima',
'nsfnet',
'resdisc',
'shr',
'tadmin',
'tsess',
'txwg',
'x3s3.3',
]
had_no_parent = {
'acct2': 'ops-old',
'gisd': 'ops-old',
'ire': 'ops-old',
'newdom': 'ops-old',
'ucp': 'ops-old',
'dfs': 'usv',
}
make_into_team = [
'isoc-old',
'iahc',
]
change_parents = {
'bgpdepl': {'old':'ops','new':'ops-old'},
'cidrd': {'old':'ops','new':'ops-old'},
'eii': {'old':'ops','new':'ops-old'},
'netstat': {'old':'ops','new':'ops-old'},
'njm': {'old':'ops','new':'ops-old'},
'noop': {'old':'osi','new':'ops-old'},
'opstat': {'old':'ops','new':'ops-old'},
'thinosi': {'old':'app','new':'osi'},
'wpkops': {'old':'ops','new':'ops-old'},
'poised': {'old':'adm','new':'gen'},
'poised95': {'old':'adm','new':'gen'},
'ietfgrow': {'old':'adm','new':'gen'},
'stdguide': {'old':'adm','new':'usv'},
'inaparch': {'old':'adm','new':'gen'},
'intprop': {'old':'adm','new':'gen'},
'iahc': {'old':'adm', 'new':'gen' },
'newgen': {'old':'adm', 'new':'gen' },
}
def forward(apps, schema_editor):
Group = apps.get_model('group','Group')
Document = apps.get_model('doc','Document')
# Verify assumptions
for acronym in definite_bof_conc:
assert Group.objects.filter(acronym=acronym,state_id='conclude').exists(), '%s not found or not concluded'%acronym
for acronym in maybe_bof_conc:
assert Group.objects.filter(acronym=acronym,state_id='conclude').exists(), '%s not found or not concluded'%acronym
for acronym in had_no_parent:
assert Group.objects.filter(acronym=acronym,parent__isnull=True).exists(), '%s not found or has a parent' % acronym
for acronym in change_parents:
assert Group.objects.filter(acronym=acronym,parent__acronym=change_parents[acronym]['old']).exists(),'%s not found or parent is not %s'%(acronym,change_parents[acronym]['old'])
for acronym in make_into_team:
assert Group.objects.filter(acronym=acronym,type_id='wg').exists(),'%s not found or is not a WG'%acronym
Group.objects.filter(acronym__in=definite_bof_conc).update(state_id='bof-conc')
Group.objects.filter(acronym__in=maybe_bof_conc).update(state_id='bof-conc')
for acronym in had_no_parent:
g=Group.objects.get(acronym=acronym)
g.parent = Group.objects.get(acronym=had_no_parent[acronym])
g.save()
for acronym in change_parents:
g=Group.objects.get(acronym=acronym)
g.parent = Group.objects.get(acronym=change_parents[acronym]['new'])
g.save()
for acronym in make_into_team:
g=Group.objects.get(acronym=acronym)
g.type_id='team'
g.save()
gen = Group.objects.get(acronym='gen')
Document.objects.filter(name='draft-rescorla-sec-cons').update(group=gen)
Group.objects.filter(acronym='adm').delete()
def reverse(apps, schema_editor):
Group = apps.get_model('group','Group')
ChangeStateGroupEvent = apps.get_model('group','ChangeStateGroupEvent')
Person = apps.get_model('person','Person')
Document = apps.get_model('doc','Document')
# Reconstitute the adm area
adm = Group.objects.create(acronym='adm',
type_id='area',
name='ops',
state_id='unknown',
parent = Group.objects.get(acronym='iesg'),
)
Group.objects.filter(acronym__in=definite_bof_conc).update(state_id='conclude')
Group.objects.filter(acronym__in=maybe_bof_conc).update(state_id='conclude')
for acronym in had_no_parent:
g=Group.objects.get(acronym=acronym)
g.parent_id = None
g.save()
for acronym in change_parents:
g=Group.objects.get(acronym=acronym)
g.parent = Group.objects.get(acronym=change_parents[acronym]['old'])
g.save()
for acronym in make_into_team:
g=Group.objects.get(acronym=acronym)
g.type_id = 'wg'
g.save()
adm.communitylist_set.create()
create_time = datetime.datetime(2011,12,9,12,0,0)
event_time = datetime.datetime(1997,1,1,12, 0,0)
system = Person.objects.get(name='(System)')
names = [
'Dr. Borka Jerman-Blazic',
'Stephen J. Coya',
'Piet Bovenga',
'Bernhard Stockman',
'Paul-Andre Pays',
'Brian Gilmore',
'Jill Foster',
'Dr. Klaus Truoel',
'Jean-Paul Le Guigner',
'Urs Eppenberger',
'Christian Tschudin',
'David Oran',
]
persons = dict()
for name in names:
persons[name] = Person.objects.get(name=name)
adm.role_set.create(name_id='ad',person=persons['Stephen J. Coya'],email=persons['Stephen J. Coya'].email_set.first())
adm.role_set.create(name_id='ad',person=persons['David Oran'],email=persons['David Oran'].email_set.first())
g = Group.objects.create(name='Working Group on International Character Sets',
acronym='wg-char',
time=create_time,
parent=adm,
type_id='wg',
state_id='conclude')
ChangeStateGroupEvent.objects.create(group=g,time=event_time,by=system,desc='Concluded group',state_id='conclude')
g.role_set.create(name_id='chair',person=persons['Dr. Borka Jerman-Blazic'],email=persons['Dr. Borka Jerman-Blazic'].email_set.first())
g.role_set.create(name_id='ad',person=persons['Stephen J. Coya'],email=persons['Stephen J. Coya'].email_set.first())
g = Group.objects.create(name='Informational Services and User Support',
acronym='wg-isus',
time=create_time,
parent=adm,
type_id='wg',
state_id='conclude')
ChangeStateGroupEvent.objects.create(group=g,time=event_time,by=system,desc='Concluded group',state_id='conclude')
g.role_set.create(name_id='chair',person=persons['Jill Foster'],email=persons['Jill Foster'].email_set.first())
g.role_set.create(name_id='ad',person=persons['Stephen J. Coya'],email=persons['Stephen J. Coya'].email_set.first())
g = Group.objects.create(name='Lower Layers Technology',
acronym='wg-llt',
time=create_time,
parent=adm,
type_id='wg',
state_id='conclude')
ChangeStateGroupEvent.objects.create(group=g,time=event_time,by=system,desc='Concluded group',state_id='conclude')
g.role_set.create(name_id='chair',person=persons['Piet Bovenga'],email=persons['Piet Bovenga'].email_set.first())
g.role_set.create(name_id='ad',person=persons['Stephen J. Coya'],email=persons['Stephen J. Coya'].email_set.first())
g = Group.objects.create(name='Network Applications Support',
acronym='wg-nap',
time=create_time,
parent=adm,
type_id='wg',
state_id='conclude')
ChangeStateGroupEvent.objects.create(group=g,time=event_time,by=system,desc='Concluded group',state_id='conclude')
g.role_set.create(name_id='chair',person=persons['Paul-Andre Pays'],email=persons['Paul-Andre Pays'].email_set.first())
g.role_set.create(name_id='ad',person=persons['Stephen J. Coya'],email=persons['Stephen J. Coya'].email_set.first())
g = Group.objects.create(name='Network Operations',
acronym='wg-nop',
time=create_time,
parent=adm,
type_id='wg',
state_id='conclude')
ChangeStateGroupEvent.objects.create(group=g,time=event_time,by=system,desc='Concluded group',state_id='conclude')
g.role_set.create(name_id='chair',person=persons['Bernhard Stockman'],email=persons['Bernhard Stockman'].email_set.first())
g.role_set.create(name_id='ad',person=persons['Stephen J. Coya'],email=persons['Stephen J. Coya'].email_set.first())
g = Group.objects.create(name='Security Technology',
acronym='wg-sec',
time=create_time,
parent=adm,
type_id='wg',
state_id='conclude')
ChangeStateGroupEvent.objects.create(group=g,time=event_time,by=system,desc='Concluded group',state_id='conclude')
g.role_set.create(name_id='chair',person=persons['Dr. Klaus Truoel'],email=persons['Dr. Klaus Truoel'].email_set.first())
g.role_set.create(name_id='ad',person=persons['Stephen J. Coya'],email=persons['Stephen J. Coya'].email_set.first())
g = Group.objects.create(name='Message Handeling Systems',
acronym='wg1',
time=create_time,
parent=adm,
type_id='wg',
state_id='conclude')
ChangeStateGroupEvent.objects.create(group=g,time=event_time,by=system,desc='Concluded group',state_id='conclude')
g.role_set.create(name_id='chair',person=persons['Urs Eppenberger'],email=persons['Urs Eppenberger'].email_set.first())
g.role_set.create(name_id='ad',person=persons['Stephen J. Coya'],email=persons['Stephen J. Coya'].email_set.first())
g = Group.objects.create(name='File Transfer, Access and Management',
acronym='wg2',
time=create_time,
parent=adm,
type_id='wg',
state_id='conclude')
ChangeStateGroupEvent.objects.create(group=g,time=event_time,by=system,desc='Concluded group',state_id='conclude')
g.role_set.create(name_id='chair',person=persons['Jean-Paul Le Guigner'],email=persons['Jean-Paul Le Guigner'].email_set.first())
g.role_set.create(name_id='ad',person=persons['Stephen J. Coya'],email=persons['Stephen J. Coya'].email_set.first())
g = Group.objects.create(name='Network Operations and X.25',
acronym='wg4',
time=create_time,
parent=adm,
type_id='wg',
state_id='conclude')
ChangeStateGroupEvent.objects.create(group=g,time=event_time,by=system,desc='Concluded group',state_id='conclude')
g.role_set.create(name_id='chair',person=persons['Piet Bovenga'],email=persons['Piet Bovenga'].email_set.first())
g.role_set.create(name_id='ad',person=persons['Stephen J. Coya'],email=persons['Stephen J. Coya'].email_set.first())
g = Group.objects.create(name='Full Screen Services',
acronym='wg5',
time=create_time,
parent=adm,
type_id='wg',
state_id='conclude')
ChangeStateGroupEvent.objects.create(group=g,time=event_time,by=system,desc='Concluded group',state_id='conclude')
g.role_set.create(name_id='chair',person=persons['Brian Gilmore'],email=persons['Brian Gilmore'].email_set.first())
g.role_set.create(name_id='ad',person=persons['Stephen J. Coya'],email=persons['Stephen J. Coya'].email_set.first())
g = Group.objects.create(name='Management of Network Application Services',
acronym='wg8',
time=create_time,
parent=adm,
type_id='wg',
state_id='conclude')
ChangeStateGroupEvent.objects.create(group=g,time=event_time,by=system,desc='Concluded group',state_id='conclude')
g.role_set.create(name_id='chair',person=persons['Christian Tschudin'],email=persons['Christian Tschudin'].email_set.first())
g.role_set.create(name_id='ad',person=persons['Stephen J. Coya'],email=persons['Stephen J. Coya'].email_set.first())
Document.objects.filter(name='draft-rescorla-sec-cons').update(group=adm)
class Migration(migrations.Migration):
dependencies = [
('group', '0006_auto_20150718_0509'),
('doc', '0012_auto_20160207_0537'),
('person', '0005_deactivate_unknown_email'),
('community','0002_auto_20141222_1749'),
]
operations = [
migrations.RunPython(forward, reverse)
]

View file

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('group', '0007_concluded_group_cleanup'),
]
operations = [
migrations.AlterField(
model_name='groupevent',
name='type',
field=models.CharField(max_length=50, choices=[(b'changed_state', b'Changed state'), (b'added_comment', b'Added comment'), (b'info_changed', b'Changed metadata'), (b'requested_close', b'Requested closing group'), (b'changed_milestone', b'Changed milestone'), (b'sent_notification', b'Sent notification'), (b'status_update', b'Status update')]),
preserve_default=True,
),
]

View file

@ -1,120 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os, datetime
from django.db import migrations
from django.conf import settings
def rename_x3s3dot3_forwards(apps, schema_editor):
Group = apps.get_model("group", "Group")
Group.objects.filter(acronym="x3s3.3").update(acronym="x3s3dot3")
def rename_x3s3dot3_backwards(apps, schema_editor):
Group = apps.get_model("group", "Group")
Group.objects.filter(acronym="x3s3dot3").update(acronym="x3s3.3")
def get_rid_of_empty_charters(apps, schema_editor):
Group = apps.get_model("group", "Group")
for acronym in ["fun", "multrans", "cicm", "woes", "dcon", "sdn", "i2aex", "rpsreqs", "antitrust", "iprbis", "dsii"]:
group = Group.objects.get(acronym=acronym)
if group.charter:
charter = group.charter
# clean up any empty files left behind
revisions = set()
revisions.add(charter.rev)
for h in charter.history_set.all():
revisions.add(h.rev)
for rev in revisions:
path = os.path.join(settings.CHARTER_PATH, '%s-%s.txt' % (charter.name, rev))
try:
if os.path.exists(path):
with open(path, 'r') as f:
if f.read() == "":
os.remove(path)
except IOError:
pass
group.charter = None
group.save()
charter.delete()
def fix_empty_rrg_charter(apps, schema_editor):
Document = apps.get_model("doc", "Document")
DocEvent = apps.get_model("doc", "DocEvent")
NewRevisionDocEvent = apps.get_model("doc", "NewRevisionDocEvent")
Person = apps.get_model("person", "Person")
State = apps.get_model("doc", "State")
charter = Document.objects.get(name="charter-irtf-rrg")
system = Person.objects.get(name="(System)")
if charter.rev == "00-00":
charter.rev = "01"
charter.time = datetime.datetime.now()
charter.save()
NewRevisionDocEvent.objects.create(
rev=charter.rev,
doc=charter,
type="new_revision",
by=system,
desc="New version available: <b>%s-%s.txt</b>" % (charter.name, charter.rev),
time=charter.time,
)
DocEvent.objects.create(
doc=charter,
type="added_comment",
by=system,
desc="Added existing charter",
time=charter.time,
)
approved = State.objects.get(type="charter", slug="approved")
already_set = list(charter.states.filter(type="charter"))
if already_set:
charter.states.remove(*already_set)
charter.states.add(approved)
path = os.path.join(settings.CHARTER_PATH, '%s-%s.txt' % (charter.name, charter.rev))
with open(path, "w") as f:
f.write("""The Routing Research Group (RRG) is chartered to explore routing and addressing problems that are important to the development of the Internet but are not yet mature enough for engineering work within the IETF. As the Internet continues to evolve, the challenges in providing a scalable and robust global routing system will also change over time. At the moment, the Internet routing and addressing architecture is facing challenges in scalability, mobility, multi-homing, and inter-domain traffic engineering. Thus the RRG proposes to focus its effort on designing an alternate architecture to meet these challenges. Although Internet routing is a broad and active research area, a focused effort at this time is necessary to assure rapid progress towards reaching the goal.
More specifically, we propose to explore architectural alternatives, including, but not limited to, separating host location and identification information. Research and experimentation in addressing and routing algorithms will be encouraged to understand whether this new direction can provide effective solutions, to work out candidate designs as necessary for a complete solution, and to fully understand both the gains and the tradeoffs that the new solutions may bring. The group will produce a list of prioritized design goals and a recommendation for a routing and addressing architecture.
The RRG will have an open general discussion mailing list where any topic of interest to the routing research community can be discussed, and topics related to scalable routing architectures are particularly encouraged. For specific topics with widespread discussion, interested parties will be encouraged to form ad-hoc mailing lists, with summaries sent to the general mailing list quarterly. Summaries will contain the recent conclusions reached as well as the near-term agenda for future progress.
It is commonly recognized that productive design efforts can be carried out by small and focused design teams. The RRG encourages the formation of focused design teams to explore specific design choices. As with ad-hoc mailing lists, individual design teams are required to report back quarterly to the RRG with their progress and remaining open issues. Each design team is expected to produce a set of Internet Drafts that documents their current thinking.
The RRG, as a whole, will hold open meetings from time to time to solicit input from, and supply information to, the broader community. In particular, at least once per year there will be a review of the group's activities held at an IETF meeting. More frequent meetings will be held if it will speed group progress. Ad-hoc and design team meetings are strongly encouraged.
The output of the group will consist of Informational and Experimental RFCs as well as Journal Articles on the topics covered by the subgroups.""")
def fix_cicm_state(apps, schema_editor):
Group = apps.get_model("group", "Group")
Group.objects.filter(acronym="cicm").update(state="bof-conc")
def noop(apps, schema_editor):
pass
class Migration(migrations.Migration):
dependencies = [
('doc', '0010_auto_20150930_0251'),
('group', '0008_auto_20160505_0523'),
('community', '0004_cleanup_data'),
]
operations = [
migrations.RunPython(rename_x3s3dot3_forwards, rename_x3s3dot3_backwards),
migrations.RunPython(fix_empty_rrg_charter, noop),
migrations.RunPython(get_rid_of_empty_charters, noop),
migrations.RunPython(fix_cicm_state, noop),
]

View file

@ -1,689 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re
from django.db import migrations
def get_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 add_group_community_lists(apps, schema_editor, group):
DocAlias = apps.get_model("doc", "DocAlias")
State = apps.get_model("doc", "State")
CommunityList = apps.get_model("community", "CommunityList")
SearchRule = apps.get_model("community", "SearchRule")
active_state = State.objects.get(slug="active", type="draft")
rfc_state = State.objects.get(slug="rfc", type="draft")
draft_aliases = DocAlias.objects.filter(name__startswith="draft")
clist = CommunityList.objects.create(group=group)
SearchRule.objects.create(community_list=clist, rule_type="group", group=group, state=active_state)
SearchRule.objects.create(community_list=clist, rule_type="group_rfc", group=group, state=rfc_state)
r = SearchRule.objects.create(community_list=clist, rule_type="name_contains", text=r"^draft-[^-]+-%s-" % group.acronym, state=active_state)
name_re = re.compile(r.text)
r.name_contains_index = [ a.document_id for a in draft_aliases if name_re.match(a.name) ]
def addPrograms(apps, schema_editor):
Group = apps.get_model('group','Group')
Person = apps.get_model('person','Person')
Email = apps.get_model('person','Email')
for name,email in [ ('Francis Bond','bond@ieee.org'),
('Christine Runnegar', 'runnegar@isoc.org'),
('Sarmad Hussain', 'sarmad.hussain@icann.org'),
]:
if not Person.objects.filter(name=name).exists():
p = Person.objects.create(name=name,ascii=name)
p.email_set.create(address=email, primary=True, active=True)
override_find_person = {
'Patrik Faltstrom' : 'paf@netnod.se',
'Yoshiro Yoneya' : 'yone@jprs.co.jp',
}
iab = Group.objects.get(acronym='iab')
def build_group(acronym, name, description, lead, members, docs):
if Group.objects.filter(acronym=acronym).exists():
print "Warning - not creating %s: group already exists"%(acronym,)
return
g = Group.objects.create(acronym=acronym,
name=name,
state_id='active',
type_id='program',
parent = iab,
description=description,
)
add_group_community_lists(apps, schema_editor, g)
cl = g.communitylist_set.first()
for doc in docs:
cl.added_docs.add(doc)
lead_person = Person.objects.get(name=lead)
g.role_set.create(person=lead_person,name_id='lead',email=get_email(lead_person))
for name in members:
if name in override_find_person:
p = Email.objects.get(address=override_find_person[name]).person
else:
p_qs = Person.objects.filter(name=name)
if p_qs.count() == 0:
print "Warning: Couldn't find %s - not adding them to %s"%(name,g.acronym)
continue
elif p_qs.count() > 1:
print "Warning: Found more than one %s - using the first one"%(name,)
p = p_qs.first()
g.role_set.create(person=p,name_id='member',email=get_email(p))
build_group(acronym='stackevo',
name='IP Stack Evolution',
description="""
The IP Stack Evolution program covers various topics in the evolution of IPv4 and IPv6, the transport protocols running over IP, and the overall protocol stack architecture. The program addresses challenges that affect the stack in some way and where the IETF community requires architectural guidance, responding to community requests as well as actively monitoring work within IETF WGs which touch on relevant topics.
There is an observed trend of functionality moving up the stack: where the waist was once IP, now most applications run over TCP/IP, or even HTTP/TCP/IP; the stack has become increasingly ossified. This is in response both to reduced path transparency within the Internet middleboxes that limit the protocols of the traffic that can pass through them as well as insufficiently flexible interfaces for platform and application developers. The emergence of both new application requirements demanding more flexibility from the stack, especially at layer 4, as well as the increasing ubiquity of encryption to protect against pervasive surveillance, provides an opportunity to re-evaluate and reverse this trend.
This program aims to provide architectural guidance, and a point of coordination for work at the architectural level to improve the present situation of ossification in the Internet protocol stack. Where a working group relevant to a particular aspect of IP stack evolution exists, the program will facilitate cross-group and cross-area coordination. The program also produces documents on the IAB stream providing general guidance on and covering architectural aspects of stack evolution.
Current Active Work
-------------------
(1) Discussion of principles for making new protocols within the IP stack deployable, following in part on RFC 5218 What Makes for a Successful Protocol.
(2) Discussion of principles for the use of encapsulation at various layers within the protocol stack. UDP-based encapsulations are not only useful for evolution above the IP layer, but in many tunneling contexts as well. The probable commonalities among all these applications of encapsulation might be useful in simplifying their implementation, deployment, and use.
(3) Architectural guidance on the interoperability of protocol stacks for use in constrained devices, focusing on issues related to mutually incompatible interactions among application, transport, network, and link layer protocols.
Past Workshops, BoFs, etc.
--------------------------
The Program has organized several workshops, Birds of a Feather sessions, and proposed Research Groups on topics related to its areas of work:
* The IAB workshop on `Stack Evolution in a Middlebox`__ Internet (SEMI) in Zurich, January 2015. Read the Workshop Report, RFC 7663
* The `Substrate Protocol for User Datagrams`__ (SPUD) BoF at IETF 92 in Dallas, March 2015.
* The `Managing Radio Networks in an Encrypted World`__ (MaRNEW) Workshop in Atlanta, September 2015, together with GSMA.
* The Measurement and Analysis for Protocols (MAP) proposed Research Group has been meeting since IETF 93 in Prague (until IETF 94 in Yokohama as How Ossified is the Protocol Stack? (HOPS) proposed RG). Discussion is at <maprg@irtf.org>.
__ https://www.iab.org/activities/workshops/semi/
__ https://www.ietf.org/proceedings/92/spud.html
__ https://www.iab.org/activities/workshops/marnew/
Documents Published
-------------------
* `Technical Considerations for Internet Service Blocking and Filtering`__ (RFC 7754),
__ http://www.rfc-editor.org/rfc/rfc7754.txt
This program has itself evolved from the IP Evolution Program, which looked at general architectural issues in the evolution of IPv4 and IPv6 and the overall protocol stack architecture, and produced the following documents:
* `IAB Thoughts on IPv6 Network Address Translation`__ (RFC 5902)
* `Evolution of the IP Model`__ (RFC 6250)
* `Smart Objects Workshop Report`__ (RFC 6574)
* `Architectural Considerations of IP Anycast`__ (RFC 7094)
* `Report from the IAB Workshop on Internet Technology Adoption and Transition (ITAT)`__ (RFC 7305)
__ http://www.rfc-editor.org/rfc/rfc5902.txt
__ http://www.rfc-editor.org/rfc/rfc6250.txt
__ http://www.rfc-editor.org/rfc/rfc6574.txt
__ http://www.rfc-editor.org/rfc/rfc7094.txt
__ http://www.rfc-editor.org/rfc/rfc7305.txt
""",
lead="Brian Trammell",
members= ['Brian Trammell',
'Ralph Droms',
'Ted Hardie',
'Joe Hildebrand',
'Lee Howard',
'Erik Nordmark',
'Robert Sparks',
'Dave Thaler',
'Mary Barnes',
'Marc Blanchet',
'David L. Black',
'Spencer Dawkins',
'Lars Eggert',
'Aaron Falk',
'Janardhan Iyengar',
'Suresh Krishnan',
u'Mirja K\xfchlewind',
'Eliot Lear',
'Eric Rescorla',
'Natasha Rooney',
'Martin Stiemerling',
'Michael Welzl',
],
docs = [ 'draft-iab-protocol-transitions',
'rfc7754',
],
)
build_group(acronym='rfcedprog',
name='RFC Editor',
description="""
The purpose of this program is to provide a focus for the IABs responsibility to manage the RFC Editor function, including the RSE.
The details of the RSE function, and the RSOC are document in RFC 6635.
The Programs main focus is on:
* Oversight of the RFC Series
* Assisting the RSE in policy matters as needed
* Oversight of the RSE
The active membership of this program consists of the RFC Series Oversight Committee (RSOC), which is primarily charged with executing the IAB responsibility to oversee the RSE.
`Past RSOC members and chairs are listed here.`__
__ http://www.iab.org/activities/programs/rfc-editor-program/past-rsoc-members/
The `RSOC Proceedures are available online here.`__
__ http://www.iab.org/activities/programs/rfc-editor-program/rsoc-procedures/
Mailing lists
-------------
Public discussion: rsoc@ietf.org
Meeting Minutes
---------------
RSOC meeting minutes are `available to the public here`__.
__ https://www.iab.org/documents/rsocmins/
""",
lead="Robert Sparks",
members= ['Joe Hildebrand',
'Robert Sparks',
'Sarah Banks',
'Nevil Brownlee',
'Heather Flanagan',
'Joel M. Halpern',
'Tony Hansen',
'Robert M. Hinden',
'Ray Pelletier',
'Adam Roach',
],
docs = ['draft-iab-rfc5741bis',
'draft-iab-html-rfc',
'draft-iab-rfc-css',
'draft-iab-rfc-framework',
'draft-iab-rfc-nonascii',
'draft-iab-rfc-plaintext',
'draft-iab-rfc-use-of-pdf',
'draft-iab-rfcv3-preptool',
'draft-iab-svg-rfc',
'draft-iab-xml2rfc',
'draft-iab-styleguide',
'draft-iab-rfcformatreq',
],
)
build_group(acronym='privsec',
name='Privacy and Security',
description="""
The IAB Privacy and Security Program is a successor to its previous Security and Privacy programs. It provides a forum to develop, synthesize and promote security and privacy guidance within the Internet technical standards community. While security and privacy have each been explicitly and implicitly considered during the design of Internet protocols, there are three major challenges which face the community:
* most Internet protocols are developed as building blocks and will be used in a variety of situations. This means that the security and privacy protections each protocol provides may depend on adjacent protocols and substrates. The resulting security and privacy protections depend, however, on the initial assumptions remaining true as adjacent systems change. These assumptions and dependencies are commonly undocumented and may be ill-understood.
* many security approaches have presumed that attackers have resources on par with those available to those secure the system. Pervasive monitoring, distributed networks of compromised machines, and the availability of cloud compute each challenge those assumptions.
* many systems breach the confidentiality of individuals communication or request more than the minimally appropriate data from that communication in order to simplify the delivery of services or meet other requirements. When other design considerations contend with privacy considerations, privacy has historically lost.
This program seeks to consolidate, generalize, and expand understanding of Internet-scale system design considerations for privacy and security; to raise broad awareness of the changing threat models and their impact on the properties of Internet protocols; and to champion the value of privacy to users of the Internet and, through that value, as a contributor to the network effect for the Internet.
Public comments can be sent to privsec-discuss@iab.org.
Volunteers should send a statement of interest to privsec-program@iab.org, specifying which focus area or areas are of interest.
Areas of Focus
--------------
Confidentiality
===============
After helping develop initial text for the IABs statement on Internet Confidentiality, the group described the threat models related to surveillance, published as RFC 7624. The program is now working to describe the building blocks which may be used to mitigate pervasive surveillance and the impact of specific design patterns on information leakage. It will also develop a systems engineering description of how to build a confidential application which flows across the open Internet.
Work products anticipated:
* Mitigations document
* One or more design pattern documents
* Systems engineering document
Trust
=====
The programs work on trust is coordinated work with the relevant IETF and IRTF working groups. Its first related work product, on cryptographic algorithm agility, was moved to the IETF for consideration as a best current practice and eventually published as BCP 201 (RFC 7696). The program is currently working on a document examining the current Web Trust model. The program also plans to document general considerations for managing protocol systems in which there are multiple sources of truth which may provide assurances related to identity, authorization, or repudiation.
Work products anticipated:
* Examination of the Webs Trust model and implementation
* Considerations for designing protocols with multiple sources of truth.
""",
lead='Ted Hardie',
members=[
'Ted Hardie',
'Russ Housley',
'Martin Thomson',
'Brian Trammell',
'Suzanne Woolf',
'Mary Barnes',
'Richard Barnes',
'Alissa Cooper',
'Stephen Farrell',
'Joseph Lorenzo Hall',
'Christian Huitema',
'Eliot Lear',
'Xing Li',
'Lucy Lynch',
'Karen O\'Donoghue',
'Andrei Robachevsky',
'Christine Runnegar',
'Wendy Seltzer',
'Juan-Carlos Z\xfa\xf1iga',
],
docs = [ 'draft-iab-privsec-confidentiality-mitigations', ]
)
build_group(acronym='inip',
name='Names and Identifiers',
description="""
The Names and Identifiers Program covers various topics concerning naming and resolution. As RFC 6055 points out, the DNS is not the only way that naming and resolution happens. Identifiers not just domain names, but all identifiers and the resolution of them are important both to users and applications on the Internet. Further, as Internet infrastructure becomes more complex and ubiquitous, the need for powerful, flexible systems of identifiers gets more important. However, in many ways were limited by the success of the DNS: its used so widely and successfully, for so many things, that compatibility with it is essential, even as demands grow for namespace characteristics and protocol behavior that arent included in the DNS and may be fundamentally incompatible with it.
The IAB has worked on these issues before, but there are several things that have recently changed which make the topic worth revisiting. First, were pushing the limits of flexibility in the DNS in new ways: there are growing numbers of protocols and applications (some of them built outside the IETF) that are creating DNS-like naming systems, but that differ from naming rules, wire protocol, or operational restrictions implicit in DNS. Weve particularly seen cases where these protocols and applications expect to be able to use domain name slots where domain names have traditionally appeared in protocols, and the potential for subtle incompatibilities among them provides an opportunity for various forms of surprising results, from unexpected comparison failures to name collisions. In addition, it may be that as a consequence of the vast expansion of the root zone, the intended hierarchical structure of the DNS namespace could be lost, which raises not only operational concerns but also architectural questions of what characteristics are necessary in naming systems for various uses.
At the same time as that is changing, pressures to provide facilities not previously imagined for the DNS (such as bidirectional aliasing, or better protection for privacy, or context information such as localization or administrative boundaries) require that naming systems for the internet will continue to evolve.
Beyond specific stresses provided by the practical need for compatibility with DNS and its limitations, there are questions about the implications of identifier resolution more widely. For example, various methods for treating different domain names as the same have implications for email addresses, and this might have implications for identifier use and comparison more generally, including for i18n. Perhaps more broadly yet, we see an impact on naming systems as we examine needs such as support for scaling in new environments (mobile, IoT) and new priorities such as supporting widespread encryption.
The program seeks to provide a useful framework for thinking about naming and resolution issues for the internet in general, and to deliver recommendations for future naming or resolution systems.
The scope of initial investigations is deliberately somewhat open, but could include:
(a) some basic terminology: what do we mean by names, identifiers, and name resolution in the internet? What attributes of naming systems and identifiers are important with regards to comparison, search, human accessibility, and other interactions?
(b) overview: where are naming protocols and infrastructure important to the work of the IETF (and perhaps elsewhere)? Where is the DNS being used (and perhaps stretched too far)? What other identifier systems are we coming up with, and how well are those efforts working? This area will include examination of some of the naming systems under development or in use elsewhere, such as NDN, as a way of informing our thinking.
(c) For protocols (inside the IETF or outside), what should protocol designers know about re-using existing naming systems or inventing their own? Are there guidelines we can usefully provide?
Mailing Lists
-------------
* Program List: inip@iab.org
* Public Discussion List: inip-discuss@iab.org
""",
lead='Suzanne Woolf',
members=[
'Suzanne Woolf',
'Marc Blanchet',
'Ralph Droms',
'Ted Hardie',
'Joe Hildebrand',
'Erik Nordmark',
'Robert Sparks',
'Andrew Sullivan',
'Dave Thaler',
'Brian Trammell',
'Edward Lewis',
'Jon Peterson',
'Wendy Seltzer',
'Lixia Zhang',
],
docs = [ 'draft-lewis-domain-names', ],
)
build_group(acronym='i18n-program',
name='Internationalization',
description="""
Internationalization and Localization are two common aspects of user-facing systems which span locales. Efforts in these two areas typically handle how to appropriately represent data in a specific context and how to carry it between contexts. This program currently focuses on a special case of this problem: the set of systems which have no locale and how they interact with systems which rely on that context. Work in this area involves complex tradeoffs along multiple dimensions, and there is rarely a single right answer. Rather than attempting to force such an answer to emerge, the IAB will describe the problem, common patterns to analyse the trade-offs, and provide advice for managing specific instances of this issue.
This program will also maintain the IABs long term effort to maintain liaisons with relevant groups in this topic area. Among these are the Unicode Consortium, ICANN, and ISO/IEC JTC1 SC2.
Current work
------------
A number of Internet protocols and systems rely on matching a known item for operation; when these lack access to locale or the facilities to process locale, they may fail or produce surprising results in the presence of multiple character composition methods. User names, passwords, and domain labels can each present this problem. One of the most pressing issues for the general problem space noted above is resolving how internationalized names stored in the domain name system can be understood without a locale or similar context.
Internationalized names are currently stored in an ASCII-compatible encoding derived from the Unicode Standard. That standard, however, includes certain characters which are visually identical but may be composed in multiple ways, the choice of which is locale-specific. This creates an uncertainty in how a specific DNS label might be understood by other systems which rely on the DNS. This issue is not limited to the DNS, but also occurs in other systems where a known-item match is expected; username and password matching are examples. As originally described in the `related IAB statement`__, this topic is currently blocking specific updates and is the programs current priority.
__ https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-statement-on-identifiers-and-unicode-7-0-0/
Mailing list:
-------------
Public discussion: i18n-discuss@iab.org
Past IAB Actions on I18N
------------------------
* Weider, C., Preston, C., Simonsen, K., Alvestrand, H., Atkinson, R., Crispin, M., and P. Svanberg, The Report of the IAB Character Set Workshop held 29 February 1 March, 1996, `RFC 2130`__, April 1997.
* IAB and L. Daigle, Ed., A Tangled Web: Issues of I18N, Domain Names, and the Other Internet protocols, `RFC 2825`__, May 2000.
* IAB Response__ to Verisign GRS IDN Announcement, January 2003.
* IAB to ICANN IAB comments__ on ICANN IDN Guidelines, 14 October 2005.
* IAB response__ to the Unicode Technical Consortium re:Procedural Issues with the Liaison on Nextsteps, 16 June 2006.
* Klensin, J., Faltstrom, P., Karp, C., and IAB, Review and Recommendations for Internationalized Domain Names (IDNs), `RFC 4690`__, September 2006.
* IAB `liaison statement`__ to ITU-T SG17 on the Review and Recommendations for Internationalized Domain Names, 2 October 2006.
* IAB Technical Plenary on Internationalization at IETF 68 (minutes__), 22 March 2007.
* IAB Technical Plenary on Internationalization at IETF 76 (minutes__), 12 November 2009.
* Techchat on IDNA2008, Unicode, and UTR 46 (minutes__), 7 April 2010.
* IAB response__ to the IDNA appeal from JFC Morfin, 20 August 2010.
* Thaler, D., Klensin, J., and S. Cheshire, IAB Thoughts on Encodings for Internationalized Domain Names, `RFC 6055`__, February 2011.
* IAB Statement__ on The interpretation of rules in the ICANN gTLD Applicant Guidebook, 8 February 2012.
* Sullivan, A., Thaler, D., Klensin, J., and O. Kolkman, Principles for Unicode Code Point Inclusion in Labels in the DNS, `RFC 6912`__, April 2013.
* IAB `Statement on Identifiers and Unicode 7.0.0`__, 11 February 2015
__ https://datatracker.ietf.org/doc/rfc2130
__ https://datatracker.ietf.org/doc/rfc2825
__ http://iab.org/documents/docs/icann-vgrs-response.html
__ http://iab.org/documents/correspondence/2005-10-14-idn-guidelines.html
__ http://iab.org/documents/correspondence/2006-06-16-response-to-idn-liaison-issues.html
__ https://datatracker.ietf.org/doc/rfc4690
__ http://iab.org/documents/correspondence/2006-10-02-idn-to-sg17.html
__ http://www.ietf.org/proceedings/68/plenaryt.html
__ http://www.ietf.org/proceedings/76/plenaryt.html
__ http://www.ietf.org/proceedings/76/plenaryt.html
__ http://www.iab.org/appeals/2010-08-20-morfin-response.pdf
__ http://datatracker.ietf.org/doc/rfc6055
__ http://www.iab.org/documents/correspondence-reports-documents/2012-2/iab-statement-the-interpretation-of-rules-in-the-icann-gtld-applicant-guidebook/
__ http://datatracker.ietf.org/doc/rfc6912
__ https://www.iab.org/2015/01/27/iab-posts-statement-on-identifiers-and-unicode-7-0-0/
""",
lead='Ted Hardie',
members=[
'Ted Hardie',
'Joe Hildebrand',
'Andrew Sullivan',
'Dave Thaler',
'Marc Blanchet',
'Francis Bond',
'Stuart Cheshire',
'Patrik Faltstrom',
'Heather Flanagan',
'Sarmad Hussain',
'Dr. John C. Klensin',
'Olaf Kolkman',
'Barry Leiba',
'Xing Li',
'Pete Resnick',
'Peter Saint-Andre',
'Yoshiro Yoneya',
],
docs= [],
)
build_group(acronym='iproc',
name='IETF Protocol Registries Oversight',
description="""
The IETF Protocol Registries Oversight Committee (IPROC) is an IAB program, as well as subcommittee of the IETF Administrative Oversight Committee (IAOC).
The primary focus of the IPROC is oversight of operations related to processing IETF protocol parameter requests. In addition, the IPROC reviews the service level agreement (SLA) between the IETF and ICANN, which is typically updated each year to reflect current expectations.
The IPROC advises the IAB and the IAOC. The IAB is responsible for IANA oversight with respect to the protocol parameter registries. The IAOC is ultimately responsible for the fiscal and administrative support for the IANA protocol parameter registries.
The IPROC is focused on operations of the protocol parameter registries, not all of the IANA-related activities for the global Internet. For more information on IAB activities related to broader IANA topics, please see the IANA Evolution Program.
Work Items
----------
The IPROC routinely does the following:
1. Provides review and recommendations related to the annual updates to the SLA between the IETF and ICANN;
2. Oversees and reviews deliverables described in the annual SLA;
3. Reviews operational issues related to processing protocol parameter requests, IESG designated experts, and tools development; and
4. Responds to specific developments and information requests.
""",
lead='Russ Housley',
members=[
'Jari Arkko',
'Russ Housley',
'Andrew Sullivan',
'Bernard Aboba',
'Michelle S. Cotton',
'Leslie Daigle',
'Elise P. Gerich',
'Ray Pelletier',
'Jonne Soininen',
],
docs=[],
)
build_group(acronym='iana-evolution',
name='IANA Evolution',
description="""
The IANA evolution programs primary focus is the stewardship over the IANA functions for the Internet in General and the IETF in particular.
Its main focus is on:
* the contractual relations between the US DoC and ICANN and the globalization__ thereof;
* the IANA MoU (RFC2860) and related agreements between stakeholders;
* the development of a vision with respect to the future of the IANA functions; and
* implementation and interpretation of the above.
__ http://www.ntia.doc.gov/press-release/2014/ntia-announces-intent-transition-key-internet-domain-name-functions
The program acts also as a think-tank and advises the IAB on strategic and liaison issues.
In some cases this group may provide guidance and insight on matters relating ICANN in general.
The group is not responsible for daily operational guidance, such as review of the SLA between the IETF and ICANN. Those responsibilities are delegated to the `IETF Protocol Registries Oversight Committee (IPROC)`__.
__ http://www.ietf.org/iana/iproc.html
Work Items
----------
The group focuses on the following high-level work items and responsibilities:
* Identifying the desired strategic direction for the relationship of IETF, the IANA function, and other parties.
* Tracking the developments surrounding the DoC IANA function contract and its globalization
* Responding to specific developments and information requests on this topic
The group developed, maintains and advises on the implementation of the principles guiding the `Evolution on the IANA Protocol Parameter Registries`__.
__ http://www.iab.org/documents/correspondence-reports-documents/2014-2/re-guiding-the-evolution-of-the-iana-protocol-parameter-registries/
Results and References
----------------------
* `IANA MoU`__
* `IAB response to the IANA NOI`__
* `Defining the Role and Function of IETF Protocol Parameter Registry Operator (RFC6220)`__
* `ICANN-IETF Service Level Agreements`__
* `ICANN performance evaluation`__
* `Information on IANA performance`__
* `IANA oversight statement by IETF Administrative Director`__
* `RFC 7500: Principles for Operation of Internet Assigned Numbers Authority (IANA) Registries`__
* `Comments on RDAP Operational Profile for gTLD Registries and Registrars`__
* `Comments on the CCWG-Accountability 3rd Draft Report`__
* `Comments on the CCWG-Accountability 2nd Draft Report`__
* `Comments on the ICG Proposal`__
* `Comments on the CCWG-Accountability 1st Draft Report`__
* `Statement on the NETmundial Initiative`__
__ http://www.rfc-editor.org/rfc/rfc2860
__ http://www.iab.org/documents/correspondence/2011-03-30-iab-iana-noi-response.pdf
__ http://www.rfc-editor.org/rfc/rfc6220
__ http://iaoc.ietf.org/contracts.html
__ http://www.iab.org/2012/05/24/iab-submits-updated-icann-performance-evaluation/
__ http://www.iana.org/about/performance/
__ http://www.iab.org/2012/04/03/summary-of-ietf-iana-oversight-process/
__ http://www.rfc-editor.org/rfc/rfc7500.txt
__ https://www.iab.org/documents/correspondence-reports-documents/2016-2/comments-from-the-internet-architecture-board-iab-on-registration-data-access-protocol-rdap-operational-profile-for-gtld-registries-and-registrars/
__ https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-comments-on-the-ccwg-accountability-3d-draft-report/
__ https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-comments-on-ccwg-accountability/
__ https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-comments-on-icg-proposal/
__ https://www.iab.org/documents/correspondence-reports-documents/2015-2/iab-comments-on-ccwg-accountability-draft-report/
__ https://www.iab.org/documents/correspondence-reports-documents/2014-2/iab-statement-on-the-netmundial-initiative/
Related material:
`Press Announcement: Internet Technical Leaders Welcome IANA Globalization Progress`__
__ https://www.iab.org/2014/03/15/internet-technical-leaders-welcome-iana-globalization-progress/
""",
lead='Russ Housley',
members=[
'Jari Arkko',
'Marc Blanchet',
'Ted Hardie',
'Russ Housley',
'Andrew Sullivan',
'Suzanne Woolf',
'Bernard Aboba',
'Kathy Brown',
'Alissa Cooper',
'Leslie Daigle',
'Dr. John C. Klensin',
'Olaf Kolkman',
'Eliot Lear',
'Barry Leiba',
'Dr. Thomas Narten',
'Andrei Robachevsky',
'Jonne Soininen',
'Lynn St.Amour',
],
docs=[ 'draft-iab-aina-mou', 'draft-iab-iana-principles' ],
)
build_group(acronym='plenary-planning',
name='Plenary Planning',
description="""
The Plenary Planning Program seeks out topics for IETF Technical Plenary meetings. Typically, a Tech Plenary will feature one to three speakers on a topic that is of interest to at least several IETF Areas, and informs our work. The Program is always looking for interesting speakers, and suggestions are always welcome at tech-plenary@iab.org.
Program Description
-------------------
The Plenary Planning Program will identify informative and entertaining programs for the Tech Plenary at each IETF meeting. Potential presenters will normally be invited to give a Tech Chat to the IAB, as a way to familiarize the IAB with their work and presentation style.
Ideas for potential presenters may come from anywhere, but should be topical, informative, and relate to multiple areas of IETF work.
""",
lead = 'Lee Howard',
members=[
'Lee Howard',
'Lars Eggert',
'Brian Trammell',
'Suzanne Woolf',
'Dirk Kutscher',
'Allison Mankin',
'Greg Wood',
],
docs=[],
)
build_group(acronym='liaison-oversight',
name = 'Liaison Oversight',
description="""
The IETF is best served if developments in other SDOs that may overlap, or conflict with, work in the IETF are noticed early and the leadership can make informed decisions about appropriate actions to further the IETF work in the context of developments within other SDOs. Equally, if work is being proposed in the IETF that may overlap with work in other SDOs, recognition and consideration of this by the IESG and IAB is necessary.
The Liaison Oversight Program focuses on the liaison relationships between the IETF and other SDOs, as well as IETF documents and processes relating to those liaison relationships. As with other Programs, the Liaison Oversight Program develops recommendations for consideration by the IAB, and the IAB retains its oversight responsibilities under RFC 2850.
Program Description
-------------------
The Liaison Oversight Program:
==============================
* Organizes reviews of the liaison relationships with specific SDOs;
* Develops the framework for IAB management of liaison relationships;
* Assists in the recruitment of liaison managers;
* Reviews the requirements for IT systems relating to the handling of liaison statements;
* Reviews the operational experience with documents relating to liaison management and recommends changes, where appropriate. Relevant documents include (but are not limited to) RFC 4052, 4053 and 4691.
* Reviews the state of internal and external communication as well as conformance to transparency requirements;
* Prepares specific recommendations at the request of the IAB.
The framework for IAB management of liaison relationships includes:
===================================================================
* Development of processes, procedures and guidelines for liaison management;
* Coordination of the handling of liaisons within the IETF/IAB;
* Development of mechanisms to prevent inadvertent duplication of effort between the IETF and other SDOs without obstructing organizations from pursuing their own mandates;
* Development of authoritative summaries of one organizations dependencies on the others work.
Interaction with other Programs
-------------------------------
The Liaison Oversight Program does not handle the liaison tasks itself; this function is performed by the liaison manager. However, the Liaison Oversight Program may develop recommendations relating to the relationship with specific SDOs, in cooperation with the IAB liaison shepherd and the liaison manager. The Liaison Oversight Program also may provide consistent information to the IAB regarding the relationship with other SDOs (e.g. periodic reports), and may make recommendations to the IAB.
In cases where the level of interaction or its intensity are high a separate effort will be created to handle this. At the time of writing, there is a program dedicated to ITU-T topics, ITU-T Coordination Program. In addition, the relationships with Unicode and ISO/IEC JTC1 SC2 are covered by the Internationalization Program, and the relationship with the W3C is covered by the HTTP/Web Evolution Initiative.
References
----------
* Liaisons to National, Multi-National or Regional Organizations, http://iab.org/documents/docs/2003-06-10-national-liaisons.html
* IAB Processes for Management of IETF Liaison Relationships, `RFC 4052`__
* Procedures for Handling Liaison Statements to and from the IETF, `RFC 4053`__
* Guidelines for Acting as an IETF Liaison to Another Organization, `RFC 4691`__
__ http://www.rfc-editor.org/rfc/rfc4052
__ http://www.rfc-editor.org/rfc/rfc4053
__ http://www.rfc-editor.org/rfc/rfc4691
Other Links
-----------
External liaison page: http://iab.org/liaisons/index.html
""",
lead = 'Ralph Droms',
members = [ 'Ralph Droms',
'Marc Blanchet',
'Russ Housley',
'Robert Sparks',
'Suzanne Woolf',
'Scott O. Bradner',
'Ross Callon',
'Adrian Farrel',
'Dan Romascanu',
'Gonzalo Camarillo',
'Spencer Dawkins',
'Eliot Lear',
'Scott Mansfield',
'Dr. Thomas Narten',
],
docs=[],
)
def removePrograms(apps, schema_editor):
Group = apps.get_model('group','Group')
Group.objects.filter(acronym__in=(
'stackevo',
'rfcedprog',
'privsec',
'inip',
'i18n-program',
'iproc',
'iana-evolution',
'plenary-planning',
'liaison-oversight',
)
).delete()
# Intentionally not deleting the Person/Email objects that were added
class Migration(migrations.Migration):
dependencies = [
('group', '0009_auto_20150930_0758'),
('name', '0018_iab_programs'),
('person', '0014_auto_20160613_0751'),
('community','0004_cleanup_data'),
('review', '0010_auto_20161214_1537'),
]
operations = [
migrations.RunPython(addPrograms,removePrograms)
]

View file

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-01 03:32
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('group', '0010_iab_programs'),
]
operations = [
migrations.AlterModelOptions(
name='role',
options={'ordering': ['name_id']},
),
]

View file

@ -227,7 +227,8 @@ def edit_milestones(request, acronym, group_type=None, milestone_set="current"):
if not history:
history = save_milestone_in_history(m)
m.docs = new_docs
m.docs.clear()
m.docs.set(new_docs)
if len(changes) > 1:
m.save()
@ -239,7 +240,7 @@ def edit_milestones(request, acronym, group_type=None, milestone_set="current"):
set_attributes_from_form(f, m)
m.save()
m.docs = c["docs"]
m.docs.set(c["docs"])
named_milestone = 'milestone "%s"' % m.desc
if milestone_set == "charter":
@ -366,7 +367,8 @@ def reset_charter_milestones(request, group_type, acronym):
due=m.due,
resolved=m.resolved,
)
new.docs = m.docs.all()
new.docs.clear()
new.docs.set(m.docs.all())
DocEvent.objects.create(type="changed_charter_milestone",
doc=group.charter,

View file

@ -15,14 +15,15 @@ from ietf.name.models import GroupStateName, GroupTypeName, DocTagName, GroupMil
from ietf.person.models import Email, Person
from ietf.utils.mail import formataddr
from ietf.utils import log
from ietf.utils.models import ForeignKey, OneToOneField
class GroupInfo(models.Model):
time = models.DateTimeField(default=datetime.datetime.now)
name = models.CharField(max_length=80)
state = models.ForeignKey(GroupStateName, null=True)
type = models.ForeignKey(GroupTypeName, null=True)
parent = models.ForeignKey('Group', blank=True, null=True)
state = ForeignKey(GroupStateName, null=True)
type = ForeignKey(GroupTypeName, null=True)
parent = ForeignKey('Group', blank=True, null=True)
description = models.TextField(blank=True)
list_email = models.CharField(max_length=64, blank=True)
list_subscribe = models.CharField(max_length=255, blank=True)
@ -76,7 +77,7 @@ class Group(GroupInfo):
objects = GroupManager()
acronym = models.SlugField(max_length=40, unique=True, db_index=True)
charter = models.OneToOneField('doc.Document', related_name='chartered_group', blank=True, null=True)
charter = OneToOneField('doc.Document', related_name='chartered_group', blank=True, null=True)
def latest_event(self, *args, **filter_args):
"""Get latest event of optional Python type and with filter
@ -193,14 +194,14 @@ class Group(GroupInfo):
return desc
class GroupHistory(GroupInfo):
group = models.ForeignKey(Group, related_name='history_set')
group = ForeignKey(Group, related_name='history_set')
acronym = models.CharField(max_length=40)
class Meta:
verbose_name_plural="group histories"
class GroupURL(models.Model):
group = models.ForeignKey(Group)
group = ForeignKey(Group)
name = models.CharField(max_length=255)
url = models.URLField()
@ -208,12 +209,12 @@ class GroupURL(models.Model):
return u"%s (%s)" % (self.url, self.name)
class GroupMilestoneInfo(models.Model):
group = models.ForeignKey(Group)
group = ForeignKey(Group)
# a group has two sets of milestones, current milestones
# (active/under review/deleted) and charter milestones (active
# during a charter/recharter event), events for charter milestones
# are stored on the charter document
state = models.ForeignKey(GroupMilestoneStateName)
state = ForeignKey(GroupMilestoneStateName)
desc = models.CharField(verbose_name="Description", max_length=500)
due = models.DateField()
resolved = models.CharField(max_length=50, blank=True, help_text="Explanation of why milestone is resolved (usually \"Done\"), or empty if still due.")
@ -231,13 +232,13 @@ class GroupMilestone(GroupMilestoneInfo):
class GroupMilestoneHistory(GroupMilestoneInfo):
time = models.DateTimeField()
milestone = models.ForeignKey(GroupMilestone, related_name="history_set")
milestone = ForeignKey(GroupMilestone, related_name="history_set")
class GroupStateTransitions(models.Model):
"""Captures that a group has overriden the default available
document state transitions for a certain state."""
group = models.ForeignKey(Group)
state = models.ForeignKey('doc.State', help_text="State for which the next states should be overridden")
group = ForeignKey(Group)
state = ForeignKey('doc.State', help_text="State for which the next states should be overridden")
next_states = models.ManyToManyField('doc.State', related_name='previous_groupstatetransitions_states')
def __unicode__(self):
@ -255,10 +256,10 @@ GROUP_EVENT_CHOICES = [
class GroupEvent(models.Model):
"""An occurrence for a group, used for tracking who, when and what."""
group = models.ForeignKey(Group)
group = ForeignKey(Group)
time = models.DateTimeField(default=datetime.datetime.now, help_text="When the event happened")
type = models.CharField(max_length=50, choices=GROUP_EVENT_CHOICES)
by = models.ForeignKey(Person)
by = ForeignKey(Person)
desc = models.TextField()
def __unicode__(self):
@ -268,16 +269,16 @@ class GroupEvent(models.Model):
ordering = ['-time', 'id']
class ChangeStateGroupEvent(GroupEvent):
state = models.ForeignKey(GroupStateName)
state = ForeignKey(GroupStateName)
class MilestoneGroupEvent(GroupEvent):
milestone = models.ForeignKey(GroupMilestone)
milestone = ForeignKey(GroupMilestone)
class Role(models.Model):
name = models.ForeignKey(RoleName)
group = models.ForeignKey(Group)
person = models.ForeignKey(Person)
email = models.ForeignKey(Email, help_text="Email address used by person for this role.")
name = ForeignKey(RoleName)
group = ForeignKey(Group)
person = ForeignKey(Person)
email = ForeignKey(Email, help_text="Email address used by person for this role.")
def __unicode__(self):
return u"%s is %s in %s" % (self.person.plain_name(), self.name.name, self.group.acronym or self.group.name)
@ -295,10 +296,10 @@ class RoleHistory(models.Model):
# used on its own - there should always be a GroupHistory
# accompanying a change in roles, so lookup the appropriate
# GroupHistory instead
name = models.ForeignKey(RoleName)
group = models.ForeignKey(GroupHistory)
person = models.ForeignKey(Person)
email = models.ForeignKey(Email, help_text="Email address used by person for this role.")
name = ForeignKey(RoleName)
group = ForeignKey(GroupHistory)
person = ForeignKey(Person)
email = ForeignKey(Email, help_text="Email address used by person for this role.")
def __unicode__(self):
return u"%s is %s in %s" % (self.person.plain_name(), self.name.name, self.group.acronym)

View file

@ -774,7 +774,7 @@ class MilestoneTests(TestCase):
due=datetime.date.today(),
resolved="",
state_id="active")
m1.docs = [draft]
m1.docs.set([draft])
m2 = GroupMilestone.objects.create(id=2,
group=group,
@ -782,7 +782,7 @@ class MilestoneTests(TestCase):
due=datetime.date.today(),
resolved="",
state_id="charter")
m2.docs = [draft]
m2.docs.set([draft])
return (m1, m2, group)

View file

@ -192,7 +192,7 @@ def fill_in_wg_drafts(group):
group.drafts.append(a)
else:
group.rfcs.append(a)
a.rel = RelatedDocument.objects.filter(source=a.document,relationship_id__in=['obs','updates']).distinct()
a.remote_field = RelatedDocument.objects.filter(source=a.document,relationship_id__in=['obs','updates']).distinct()
a.invrel = RelatedDocument.objects.filter(target=a,relationship_id__in=['obs','updates']).distinct()
@ -1112,7 +1112,8 @@ def customize_workflow(request, group_type=None, acronym=None):
group.groupstatetransitions_set.filter(state=state).delete()
else:
transitions, _ = GroupStateTransitions.objects.get_or_create(group=group, state=state)
transitions.next_states = next_states
transitions.next_states.clear()
transitions.next_states.set(next_states)
return redirect("ietf.group.views.customize_workflow", group_type=group.type_id, acronym=group.acronym)

View file

@ -36,6 +36,7 @@ import datetime
from django.db import models
class TelechatAgendaItem(models.Model):
TYPE_CHOICES = (
(1, "Any Other Business (WG News, New Proposals, etc.)"),

View file

@ -1,320 +1,189 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-20 10:52
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
import django.db.models.deletion
import ietf.utils.models
class Migration(migrations.Migration):
initial = True
dependencies = [
('message', '__first__'),
('message', '0001_initial'),
('name', '0001_initial'),
('doc', '0002_auto_20141222_1749'),
('person', '0001_initial'),
('doc', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='IprContact',
fields=[
('contact_id', models.AutoField(serialize=False, primary_key=True)),
('contact_type', models.IntegerField(choices=[(1, b'Patent Holder Contact'), (2, b'IETF Participant Contact'), (3, b'Submitter Contact')])),
('name', models.CharField(max_length=255)),
('title', models.CharField(max_length=255, blank=True)),
('department', models.CharField(max_length=255, blank=True)),
('address1', models.CharField(max_length=255, blank=True)),
('address2', models.CharField(max_length=255, blank=True)),
('telephone', models.CharField(max_length=25, blank=True)),
('fax', models.CharField(max_length=25, blank=True)),
('email', models.EmailField(max_length=255)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='IprDetail',
fields=[
('ipr_id', models.AutoField(serialize=False, primary_key=True)),
('title', models.CharField(max_length=255, db_column=b'document_title', blank=True)),
('legacy_url_0', models.CharField(max_length=255, null=True, db_column=b'old_ipr_url', blank=True)),
('legacy_url_1', models.CharField(max_length=255, null=True, db_column=b'additional_old_url1', blank=True)),
('legacy_title_1', models.CharField(max_length=255, null=True, db_column=b'additional_old_title1', blank=True)),
('legacy_url_2', models.CharField(max_length=255, null=True, db_column=b'additional_old_url2', blank=True)),
('legacy_title_2', models.CharField(max_length=255, null=True, db_column=b'additional_old_title2', blank=True)),
('legal_name', models.CharField(max_length=255, verbose_name=b'Legal Name', db_column=b'p_h_legal_name')),
('rfc_number', models.IntegerField(null=True, editable=False, blank=True)),
('id_document_tag', models.IntegerField(null=True, editable=False, blank=True)),
('other_designations', models.CharField(max_length=255, blank=True)),
('document_sections', models.TextField(max_length=255, verbose_name=b'Specific document sections covered', db_column=b'disclouser_identify', blank=True)),
('patents', models.TextField(max_length=255, verbose_name=b'Patent Applications', db_column=b'p_applications')),
('date_applied', models.CharField(max_length=255)),
('country', models.CharField(max_length=255)),
('notes', models.TextField(verbose_name=b'Additional notes', db_column=b'p_notes', blank=True)),
('is_pending', models.IntegerField(blank=True, null=True, verbose_name=b'Unpublished Pending Patent Application', db_column=b'selecttype', choices=[(0, b'NO'), (1, b'YES'), (2, b'NO')])),
('applies_to_all', models.IntegerField(blank=True, null=True, verbose_name=b'Applies to all IPR owned by Submitter', db_column=b'selectowned', choices=[(0, b'NO'), (1, b'YES'), (2, b'NO')])),
('licensing_option', models.IntegerField(blank=True, null=True, choices=[(0, b''), (1, b'a) No License Required for Implementers.'), (2, b'b) Royalty-Free, Reasonable and Non-Discriminatory License to All Implementers.'), (3, b'c) Reasonable and Non-Discriminatory License to All Implementers with Possible Royalty/Fee.'), (4, b'd) Licensing Declaration to be Provided Later (implies a willingness to commit to the provisions of a), b), or c) above to all implementers; otherwise, the next option "Unwilling to Commit to the Provisions of a), b), or c) Above". - must be selected).'), (5, b'e) Unwilling to Commit to the Provisions of a), b), or c) Above.'), (6, b'f) See Text Below for Licensing Declaration.')])),
('lic_opt_a_sub', models.IntegerField(null=True, editable=False, choices=[(0, b''), (1, b'The licensing declaration is limited solely to standards-track IETF documents.')])),
('lic_opt_b_sub', models.IntegerField(null=True, editable=False, choices=[(0, b''), (1, b'The licensing declaration is limited solely to standards-track IETF documents.')])),
('lic_opt_c_sub', models.IntegerField(null=True, editable=False, choices=[(0, b''), (1, b'The licensing declaration is limited solely to standards-track IETF documents.')])),
('comments', models.TextField(verbose_name=b'Licensing Comments', blank=True)),
('lic_checkbox', models.BooleanField(default=False, verbose_name=b'All terms and conditions has been disclosed')),
('other_notes', models.TextField(blank=True)),
('third_party', models.BooleanField(default=False)),
('generic', models.BooleanField(default=False)),
('comply', models.BooleanField(default=False)),
('status', models.IntegerField(blank=True, null=True, choices=[(0, b'Waiting for approval'), (1, b'Approved and Posted'), (2, b'Rejected by Administrator'), (3, b'Removed by Request')])),
('submitted_date', models.DateField(blank=True)),
('update_notified_date', models.DateField(null=True, blank=True)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='IprDisclosureBase',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('compliant', models.BooleanField(default=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('compliant', models.BooleanField(default=True, verbose_name=b'Complies to RFC3979')),
('holder_legal_name', models.CharField(max_length=255)),
('notes', models.TextField(blank=True)),
('other_designations', models.CharField(max_length=255, blank=True)),
('submitter_name', models.CharField(max_length=255)),
('submitter_email', models.EmailField(max_length=75)),
('notes', models.TextField(blank=True, verbose_name=b'Additional notes')),
('other_designations', models.CharField(blank=True, max_length=255, verbose_name=b'Designations for other contributions')),
('submitter_name', models.CharField(blank=True, max_length=255)),
('submitter_email', models.EmailField(blank=True, max_length=254)),
('time', models.DateTimeField(auto_now_add=True)),
('title', models.CharField(max_length=255, blank=True)),
('title', models.CharField(blank=True, max_length=255)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='HolderIprDisclosure',
fields=[
('iprdisclosurebase_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='ipr.IprDisclosureBase')),
('ietfer_name', models.CharField(max_length=255, blank=True)),
('ietfer_contact_email', models.EmailField(max_length=75, blank=True)),
('ietfer_contact_info', models.TextField(blank=True)),
('patent_info', models.TextField()),
('has_patent_pending', models.BooleanField(default=False)),
('holder_contact_email', models.EmailField(max_length=75)),
('holder_contact_name', models.CharField(max_length=255)),
('holder_contact_info', models.TextField(blank=True)),
('licensing_comments', models.TextField(blank=True)),
('submitter_claims_all_terms_disclosed', models.BooleanField(default=False)),
('licensing', models.ForeignKey(to='name.IprLicenseTypeName')),
],
options={
},
bases=('ipr.iprdisclosurebase',),
),
migrations.CreateModel(
name='GenericIprDisclosure',
fields=[
('iprdisclosurebase_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='ipr.IprDisclosureBase')),
('holder_contact_name', models.CharField(max_length=255)),
('holder_contact_email', models.EmailField(max_length=75)),
('holder_contact_info', models.TextField(blank=True)),
('statement', models.TextField()),
],
options={
},
bases=('ipr.iprdisclosurebase',),
),
migrations.CreateModel(
name='IprDocAlias',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('rev', models.CharField(max_length=2, blank=True)),
('doc_alias', models.ForeignKey(to='doc.DocAlias')),
('ipr', models.ForeignKey(to='ipr.IprDetail')),
],
options={
'verbose_name': 'IPR document alias',
'verbose_name_plural': 'IPR document aliases',
},
bases=(models.Model,),
),
migrations.CreateModel(
name='IprDocRel',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('sections', models.TextField(blank=True)),
('revisions', models.CharField(max_length=16, blank=True)),
('revisions', models.CharField(blank=True, max_length=16)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='IprEvent',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time', models.DateTimeField(auto_now_add=True)),
('desc', models.TextField()),
('response_due', models.DateTimeField(null=True, blank=True)),
('response_due', models.DateTimeField(blank=True, null=True)),
],
options={
'ordering': ['-time', '-id'],
},
bases=(models.Model,),
),
migrations.CreateModel(
name='IprNotification',
name='RelatedIpr',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('notification', models.TextField(blank=True)),
('date_sent', models.DateField(null=True, blank=True)),
('time_sent', models.CharField(max_length=25, blank=True)),
('ipr', models.ForeignKey(to='ipr.IprDetail')),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('relationship', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.DocRelationshipName')),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='IprUpdate',
name='GenericIprDisclosure',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('status_to_be', models.IntegerField(null=True, blank=True)),
('processed', models.IntegerField(null=True, blank=True)),
('ipr', models.ForeignKey(related_name='updates', to='ipr.IprDetail')),
('updated', models.ForeignKey(related_name='updated_by', db_column=b'updated', to='ipr.IprDetail')),
('iprdisclosurebase_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='ipr.IprDisclosureBase')),
('holder_contact_name', models.CharField(max_length=255)),
('holder_contact_email', models.EmailField(max_length=254)),
('holder_contact_info', models.TextField(blank=True, help_text=b'Address, phone, etc.')),
('statement', models.TextField()),
],
options={
},
bases=(models.Model,),
bases=('ipr.iprdisclosurebase',),
),
migrations.CreateModel(
name='HolderIprDisclosure',
fields=[
('iprdisclosurebase_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='ipr.IprDisclosureBase')),
('ietfer_name', models.CharField(blank=True, max_length=255)),
('ietfer_contact_email', models.EmailField(blank=True, max_length=254)),
('ietfer_contact_info', models.TextField(blank=True)),
('patent_info', models.TextField()),
('has_patent_pending', models.BooleanField(default=False)),
('holder_contact_email', models.EmailField(max_length=254)),
('holder_contact_name', models.CharField(max_length=255)),
('holder_contact_info', models.TextField(blank=True, help_text=b'Address, phone, etc.')),
('licensing_comments', models.TextField(blank=True)),
('submitter_claims_all_terms_disclosed', models.BooleanField(default=False)),
('licensing', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.IprLicenseTypeName')),
],
bases=('ipr.iprdisclosurebase',),
),
migrations.CreateModel(
name='LegacyMigrationIprEvent',
fields=[
('iprevent_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='ipr.IprEvent')),
('iprevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='ipr.IprEvent')),
],
options={
},
bases=('ipr.iprevent',),
),
migrations.CreateModel(
name='NonDocSpecificIprDisclosure',
fields=[
('iprdisclosurebase_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='ipr.IprDisclosureBase')),
('iprdisclosurebase_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='ipr.IprDisclosureBase')),
('holder_contact_name', models.CharField(max_length=255)),
('holder_contact_email', models.EmailField(max_length=75)),
('holder_contact_info', models.TextField(blank=True)),
('holder_contact_email', models.EmailField(max_length=254)),
('holder_contact_info', models.TextField(blank=True, help_text=b'Address, phone, etc.')),
('patent_info', models.TextField()),
('has_patent_pending', models.BooleanField(default=False)),
('statement', models.TextField()),
],
options={
},
bases=('ipr.iprdisclosurebase',),
),
migrations.CreateModel(
name='RelatedIpr',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('relationship', models.ForeignKey(to='name.DocRelationshipName')),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='ThirdPartyIprDisclosure',
fields=[
('iprdisclosurebase_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='ipr.IprDisclosureBase')),
('iprdisclosurebase_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='ipr.IprDisclosureBase')),
('ietfer_name', models.CharField(max_length=255)),
('ietfer_contact_email', models.EmailField(max_length=75)),
('ietfer_contact_info', models.TextField(blank=True)),
('ietfer_contact_email', models.EmailField(max_length=254)),
('ietfer_contact_info', models.TextField(blank=True, help_text=b'Address, phone, etc.')),
('patent_info', models.TextField()),
('has_patent_pending', models.BooleanField(default=False)),
],
options={
},
bases=('ipr.iprdisclosurebase',),
),
migrations.AddField(
model_name='relatedipr',
name='source',
field=models.ForeignKey(related_name='relatedipr_source_set', to='ipr.IprDisclosureBase'),
preserve_default=True,
field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='relatedipr_source_set', to='ipr.IprDisclosureBase'),
),
migrations.AddField(
model_name='relatedipr',
name='target',
field=models.ForeignKey(related_name='relatedipr_target_set', to='ipr.IprDisclosureBase'),
preserve_default=True,
field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='relatedipr_target_set', to='ipr.IprDisclosureBase'),
),
migrations.AddField(
model_name='iprevent',
name='by',
field=models.ForeignKey(to='person.Person'),
preserve_default=True,
field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person'),
),
migrations.AddField(
model_name='iprevent',
name='disclosure',
field=models.ForeignKey(to='ipr.IprDisclosureBase'),
preserve_default=True,
field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ipr.IprDisclosureBase'),
),
migrations.AddField(
model_name='iprevent',
name='in_reply_to',
field=models.ForeignKey(related_name='irtoevents', blank=True, to='message.Message', null=True),
preserve_default=True,
field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='irtoevents', to='message.Message'),
),
migrations.AddField(
model_name='iprevent',
name='message',
field=models.ForeignKey(related_name='msgevents', blank=True, to='message.Message', null=True),
preserve_default=True,
field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='msgevents', to='message.Message'),
),
migrations.AddField(
model_name='iprevent',
name='type',
field=models.ForeignKey(to='name.IprEventTypeName'),
preserve_default=True,
field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.IprEventTypeName'),
),
migrations.AddField(
model_name='iprdocrel',
name='disclosure',
field=models.ForeignKey(to='ipr.IprDisclosureBase'),
preserve_default=True,
field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ipr.IprDisclosureBase'),
),
migrations.AddField(
model_name='iprdocrel',
name='document',
field=models.ForeignKey(to='doc.DocAlias'),
preserve_default=True,
field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.DocAlias'),
),
migrations.AddField(
model_name='iprdisclosurebase',
name='by',
field=models.ForeignKey(to='person.Person'),
preserve_default=True,
field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person'),
),
migrations.AddField(
model_name='iprdisclosurebase',
name='docs',
field=models.ManyToManyField(to='doc.DocAlias', through='ipr.IprDocRel'),
preserve_default=True,
field=models.ManyToManyField(through='ipr.IprDocRel', to='doc.DocAlias'),
),
migrations.AddField(
model_name='iprdisclosurebase',
name='rel',
field=models.ManyToManyField(to='ipr.IprDisclosureBase', through='ipr.RelatedIpr'),
preserve_default=True,
field=models.ManyToManyField(through='ipr.RelatedIpr', to='ipr.IprDisclosureBase'),
),
migrations.AddField(
model_name='iprdisclosurebase',
name='state',
field=models.ForeignKey(to='name.IprDisclosureStateName'),
preserve_default=True,
),
migrations.AddField(
model_name='iprcontact',
name='ipr',
field=models.ForeignKey(related_name='contact', to='ipr.IprDetail'),
preserve_default=True,
field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.IprDisclosureStateName'),
),
]

View file

@ -1,53 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('ipr', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='iprcontact',
name='ipr',
),
migrations.DeleteModel(
name='IprContact',
),
migrations.RemoveField(
model_name='iprdocalias',
name='doc_alias',
),
migrations.RemoveField(
model_name='iprdocalias',
name='ipr',
),
migrations.DeleteModel(
name='IprDocAlias',
),
migrations.RemoveField(
model_name='iprnotification',
name='ipr',
),
migrations.DeleteModel(
name='IprNotification',
),
migrations.RemoveField(
model_name='iprupdate',
name='ipr',
),
migrations.RemoveField(
model_name='iprupdate',
name='updated',
),
migrations.DeleteModel(
name='IprDetail',
),
migrations.DeleteModel(
name='IprUpdate',
),
]

View file

@ -1,56 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('ipr', '0002_remove_legacy_models'),
]
operations = [
migrations.AlterField(
model_name='genericiprdisclosure',
name='holder_contact_info',
field=models.TextField(help_text=b'Address, phone, etc.', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='holderiprdisclosure',
name='holder_contact_info',
field=models.TextField(help_text=b'Address, phone, etc.', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='iprdisclosurebase',
name='compliant',
field=models.BooleanField(default=True, verbose_name=b'Complies to RFC3979'),
preserve_default=True,
),
migrations.AlterField(
model_name='iprdisclosurebase',
name='notes',
field=models.TextField(verbose_name=b'Additional notes', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='iprdisclosurebase',
name='other_designations',
field=models.CharField(max_length=255, verbose_name=b'Designations for other contributions', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='nondocspecificiprdisclosure',
name='holder_contact_info',
field=models.TextField(help_text=b'Address, phone, etc.', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='thirdpartyiprdisclosure',
name='ietfer_contact_info',
field=models.TextField(help_text=b'Address, phone, etc.', blank=True),
preserve_default=True,
),
]

View file

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('ipr', '0003_auto_20150430_0847'),
]
operations = [
migrations.AddField(
model_name='iprdocrel',
name='document_name',
field=models.CharField(default=b'', max_length=255),
preserve_default=True,
),
]

View file

@ -1,22 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
import django.db
def fill_in_docalias_relationship_names(apps, schema_editor):
with django.db.connection.cursor() as cursor:
cursor.execute("update ipr_iprdocrel join doc_docalias on doc_docalias.id = ipr_iprdocrel.document_id set ipr_iprdocrel.document_name = doc_docalias.name;")
def noop(apps, schema_editor):
pass
class Migration(migrations.Migration):
dependencies = [
('ipr', '0004_iprdocrel_document_name'),
]
operations = [
migrations.RunPython(fill_in_docalias_relationship_names, noop)
]

View file

@ -1,27 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('ipr', '0005_auto_20150930_0227'),
]
operations = [
migrations.RemoveField(
model_name='iprdisclosurebase',
name='docs',
),
migrations.RemoveField(
model_name='iprdocrel',
name='document',
),
migrations.RenameField(
model_name='iprdocrel',
old_name='document_name',
new_name='document',
),
]

View file

@ -1,27 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('doc', '0010_auto_20150930_0251'),
('ipr', '0006_auto_20150930_0235'),
]
operations = [
migrations.AddField(
model_name='iprdisclosurebase',
name='docs',
field=models.ManyToManyField(to='doc.DocAlias', through='ipr.IprDocRel'),
preserve_default=True,
),
migrations.AlterField(
model_name='iprdocrel',
name='document',
field=models.ForeignKey(to='doc.DocAlias'),
preserve_default=True,
),
]

View file

@ -1,26 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('ipr', '0007_auto_20150930_0258'),
]
operations = [
migrations.AlterField(
model_name='iprdisclosurebase',
name='submitter_email',
field=models.EmailField(max_length=75, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='iprdisclosurebase',
name='submitter_name',
field=models.CharField(max_length=255, blank=True),
preserve_default=True,
),
]

View file

@ -1,44 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ipr', '0008_auto_20160720_0218'),
]
operations = [
migrations.AlterField(
model_name='genericiprdisclosure',
name='holder_contact_email',
field=models.EmailField(max_length=254),
),
migrations.AlterField(
model_name='holderiprdisclosure',
name='holder_contact_email',
field=models.EmailField(max_length=254),
),
migrations.AlterField(
model_name='holderiprdisclosure',
name='ietfer_contact_email',
field=models.EmailField(max_length=254, blank=True),
),
migrations.AlterField(
model_name='iprdisclosurebase',
name='submitter_email',
field=models.EmailField(max_length=254, blank=True),
),
migrations.AlterField(
model_name='nondocspecificiprdisclosure',
name='holder_contact_email',
field=models.EmailField(max_length=254),
),
migrations.AlterField(
model_name='thirdpartyiprdisclosure',
name='ietfer_contact_email',
field=models.EmailField(max_length=254),
),
]

View file

@ -10,21 +10,25 @@ from ietf.doc.models import DocAlias
from ietf.name.models import DocRelationshipName,IprDisclosureStateName,IprLicenseTypeName,IprEventTypeName
from ietf.person.models import Person
from ietf.message.models import Message
from ietf.utils.models import ForeignKey
class IprDisclosureBase(models.Model):
by = models.ForeignKey(Person) # who was logged in, or System if nobody was logged in
by = ForeignKey(Person) # who was logged in, or System if nobody was logged in
compliant = models.BooleanField("Complies to RFC3979", default=True)
docs = models.ManyToManyField(DocAlias, through='IprDocRel')
holder_legal_name = models.CharField(max_length=255)
notes = models.TextField("Additional notes", blank=True)
other_designations = models.CharField("Designations for other contributions", blank=True, max_length=255)
rel = models.ManyToManyField('self', through='RelatedIpr', symmetrical=False)
state = models.ForeignKey(IprDisclosureStateName)
state = ForeignKey(IprDisclosureStateName)
submitter_name = models.CharField(max_length=255,blank=True)
submitter_email = models.EmailField(blank=True)
time = models.DateTimeField(auto_now_add=True)
title = models.CharField(blank=True, max_length=255)
class Meta:
ordering = ['-time', '-id']
def __unicode__(self):
return self.title
@ -118,7 +122,7 @@ class HolderIprDisclosure(IprDisclosureBase):
holder_contact_email = models.EmailField()
holder_contact_name = models.CharField(max_length=255)
holder_contact_info = models.TextField(blank=True, help_text="Address, phone, etc.")
licensing = models.ForeignKey(IprLicenseTypeName)
licensing = ForeignKey(IprLicenseTypeName)
licensing_comments = models.TextField(blank=True)
submitter_claims_all_terms_disclosed = models.BooleanField(default=False)
@ -145,8 +149,8 @@ class GenericIprDisclosure(IprDisclosureBase):
statement = models.TextField() # includes licensing info
class IprDocRel(models.Model):
disclosure = models.ForeignKey(IprDisclosureBase)
document = models.ForeignKey(DocAlias)
disclosure = ForeignKey(IprDisclosureBase)
document = ForeignKey(DocAlias)
sections = models.TextField(blank=True)
revisions = models.CharField(max_length=16,blank=True) # allows strings like 01-07
@ -175,21 +179,21 @@ class IprDocRel(models.Model):
return u"%s which applies to %s" % (self.disclosure, self.document.name)
class RelatedIpr(models.Model):
source = models.ForeignKey(IprDisclosureBase,related_name='relatedipr_source_set')
target = models.ForeignKey(IprDisclosureBase,related_name='relatedipr_target_set')
relationship = models.ForeignKey(DocRelationshipName) # Re-use; change to a dedicated RelName if needed
source = ForeignKey(IprDisclosureBase,related_name='relatedipr_source_set')
target = ForeignKey(IprDisclosureBase,related_name='relatedipr_target_set')
relationship = ForeignKey(DocRelationshipName) # Re-use; change to a dedicated RelName if needed
def __unicode__(self):
return u"%s %s %s" % (self.source.title, self.relationship.name.lower(), self.target.title)
class IprEvent(models.Model):
time = models.DateTimeField(auto_now_add=True)
type = models.ForeignKey(IprEventTypeName)
by = models.ForeignKey(Person)
disclosure = models.ForeignKey(IprDisclosureBase)
type = ForeignKey(IprEventTypeName)
by = ForeignKey(Person)
disclosure = ForeignKey(IprDisclosureBase)
desc = models.TextField()
message = models.ForeignKey(Message, null=True, blank=True,related_name='msgevents')
in_reply_to = models.ForeignKey(Message, null=True, blank=True,related_name='irtoevents')
message = ForeignKey(Message, null=True, blank=True,related_name='msgevents')
in_reply_to = ForeignKey(Message, null=True, blank=True,related_name='irtoevents')
response_due= models.DateTimeField(blank=True,null=True)
def __unicode__(self):

View file

@ -298,7 +298,7 @@ def edit(request, id, updates=None):
else:
draft_formset = None
if request.user.is_anonymous():
if request.user.is_anonymous:
person = Person.objects.get(name="(System)")
else:
person = request.user.person
@ -482,7 +482,7 @@ def new(request, type, updates=None):
else:
draft_formset = None
if request.user.is_anonymous():
if request.user.is_anonymous:
person = Person.objects.get(name="(System)")
else:
person = request.user.person

View file

@ -10,11 +10,8 @@ from django.core.exceptions import ObjectDoesNotExist
from django.db.models.query import QuerySet
from django.forms.utils import ErrorList
from django.db.models import Q
from django.forms.widgets import RadioFieldRenderer
#from django.forms.widgets import RadioFieldRenderer
from django.core.validators import validate_email, ValidationError
from django.utils.html import format_html
from django.utils.encoding import force_text
from django.utils.safestring import mark_safe
import debug # pyflakes:ignore
@ -122,18 +119,18 @@ class AddCommentForm(forms.Form):
comment = forms.CharField(required=True, widget=forms.Textarea, strip=False)
private = forms.BooleanField(label="Private comment", required=False,help_text="If this box is checked the comment will not appear in the statement's public history view.")
class RadioRenderer(RadioFieldRenderer):
def render(self):
output = []
for widget in self:
output.append(format_html(force_text(widget)))
return mark_safe('\n'.join(output))
# class RadioRenderer(RadioFieldRenderer):
# def render(self):
# output = []
# for widget in self:
# output.append(format_html(force_text(widget)))
# return mark_safe('\n'.join(output))
class SearchLiaisonForm(forms.Form):
'''Expects initial keyword argument queryset which then gets filtered based on form data'''
text = forms.CharField(required=False)
scope = forms.ChoiceField(choices=(("all", "All text fields"), ("title", "Title field")), required=False, initial='title', widget=forms.RadioSelect(renderer=RadioRenderer))
# scope = forms.ChoiceField(choices=(("all", "All text fields"), ("title", "Title field")), required=False, initial='title')
source = forms.CharField(required=False)
destination = forms.CharField(required=False)
start_date = DatepickerDateField(date_format="yyyy-mm-dd", picker_settings={"autoclose": "1" }, label='Start date', required=False)

View file

@ -1,45 +1,113 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-20 10:52
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
import django.db.models.deletion
import ietf.utils.models
class Migration(migrations.Migration):
initial = True
dependencies = [
('doc', '0002_auto_20141222_1749'),
('group', '0001_initial'),
('name', '0001_initial'),
('person', '0001_initial'),
('name', '0007_populate_liaison_names'),
('doc', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='LiaisonStatement',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('title', models.CharField(max_length=255, blank=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=255)),
('to_contacts', models.CharField(help_text=b'Contacts at recipient group', max_length=2000)),
('response_contacts', models.CharField(blank=True, help_text=b'Where to send a response', max_length=255)),
('technical_contacts', models.CharField(blank=True, help_text=b'Who to contact for clarification', max_length=255)),
('action_holder_contacts', models.CharField(blank=True, help_text=b'Who makes sure action is completed', max_length=255)),
('cc_contacts', models.TextField(blank=True)),
('deadline', models.DateField(blank=True, null=True)),
('other_identifiers', models.TextField(blank=True, null=True)),
('body', models.TextField(blank=True)),
('deadline', models.DateField(null=True, blank=True)),
('from_name', models.CharField(help_text=b'Name of the sender body', max_length=255)),
('to_name', models.CharField(help_text=b'Name of the recipient body', max_length=255)),
('to_contact', models.CharField(help_text=b'Contacts at recipient body', max_length=255, blank=True)),
('reply_to', models.CharField(max_length=255, blank=True)),
('response_contact', models.CharField(max_length=255, blank=True)),
('technical_contact', models.CharField(max_length=255, blank=True)),
('cc', models.TextField(blank=True)),
('submitted', models.DateTimeField(null=True, blank=True)),
('modified', models.DateTimeField(null=True, blank=True)),
('approved', models.DateTimeField(null=True, blank=True)),
('action_taken', models.BooleanField(default=False)),
('attachments', models.ManyToManyField(to='doc.Document', blank=True)),
('from_contact', models.ForeignKey(blank=True, to='person.Email', null=True)),
('from_group', models.ForeignKey(related_name='liaisonstatement_from_set', blank=True, to='group.Group', help_text=b'Sender group, if it exists', null=True)),
('purpose', models.ForeignKey(to='name.LiaisonStatementPurposeName')),
('related_to', models.ForeignKey(blank=True, to='liaisons.LiaisonStatement', null=True)),
('to_group', models.ForeignKey(related_name='liaisonstatement_to_set', blank=True, to='group.Group', help_text=b'Recipient group, if it exists', null=True)),
],
),
migrations.CreateModel(
name='LiaisonStatementAttachment',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('removed', models.BooleanField(default=False)),
('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document')),
('statement', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='liaisons.LiaisonStatement')),
],
),
migrations.CreateModel(
name='LiaisonStatementEvent',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time', models.DateTimeField(auto_now_add=True)),
('desc', models.TextField()),
('by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')),
('statement', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='liaisons.LiaisonStatement')),
('type', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.LiaisonStatementEventTypeName')),
],
options={
'ordering': ['-time', '-id'],
},
bases=(models.Model,),
),
migrations.CreateModel(
name='LiaisonStatementGroupContacts',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('contacts', models.CharField(blank=True, max_length=255)),
('cc_contacts', models.CharField(blank=True, max_length=255)),
('group', ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='group.Group', unique=True)),
],
),
migrations.CreateModel(
name='RelatedLiaisonStatement',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('relationship', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.DocRelationshipName')),
('source', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='source_of_set', to='liaisons.LiaisonStatement')),
('target', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='target_of_set', to='liaisons.LiaisonStatement')),
],
),
migrations.AddField(
model_name='liaisonstatement',
name='attachments',
field=models.ManyToManyField(blank=True, through='liaisons.LiaisonStatementAttachment', to='doc.Document'),
),
migrations.AddField(
model_name='liaisonstatement',
name='from_contact',
field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='person.Email'),
),
migrations.AddField(
model_name='liaisonstatement',
name='from_groups',
field=models.ManyToManyField(blank=True, related_name='liaisonstatement_from_set', to='group.Group'),
),
migrations.AddField(
model_name='liaisonstatement',
name='purpose',
field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.LiaisonStatementPurposeName'),
),
migrations.AddField(
model_name='liaisonstatement',
name='state',
field=ietf.utils.models.ForeignKey(default=b'pending', on_delete=django.db.models.deletion.CASCADE, to='name.LiaisonStatementState'),
),
migrations.AddField(
model_name='liaisonstatement',
name='tags',
field=models.ManyToManyField(blank=True, to='name.LiaisonStatementTagName'),
),
migrations.AddField(
model_name='liaisonstatement',
name='to_groups',
field=models.ManyToManyField(blank=True, related_name='liaisonstatement_to_set', to='group.Group'),
),
]

View file

@ -1,123 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('group', '0003_auto_20150304_0743'),
('person', '0001_initial'),
('doc', '0002_auto_20141222_1749'),
('name', '0007_populate_liaison_names'),
('liaisons', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='LiaisonStatementEvent',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('time', models.DateTimeField(auto_now_add=True)),
('desc', models.TextField()),
('by', models.ForeignKey(to='person.Person')),
('statement', models.ForeignKey(to='liaisons.LiaisonStatement')),
('type', models.ForeignKey(to='name.LiaisonStatementEventTypeName')),
],
options={'ordering': ['-time', '-id']},
bases=(models.Model,),
),
migrations.CreateModel(
name='LiaisonStatementGroupContacts',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('contacts', models.CharField(max_length=255,blank=True)),
('cc_contacts', models.CharField(max_length=255,blank=True)),
('group', models.ForeignKey(to='group.Group', unique=True)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='RelatedLiaisonStatement',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('relationship', models.ForeignKey(to='name.DocRelationshipName')),
('source', models.ForeignKey(related_name='source_of_set', to='liaisons.LiaisonStatement')),
('target', models.ForeignKey(related_name='target_of_set', to='liaisons.LiaisonStatement')),
],
options={
},
bases=(models.Model,),
),
migrations.RenameField(
model_name='liaisonstatement',
old_name='cc',
new_name='cc_contacts',
),
migrations.RenameField(
model_name='liaisonstatement',
old_name='to_contact',
new_name='to_contacts',
),
migrations.RenameField(
model_name='liaisonstatement',
old_name='technical_contact',
new_name='technical_contacts',
),
migrations.RenameField(
model_name='liaisonstatement',
old_name='response_contact',
new_name='response_contacts',
),
migrations.AddField(
model_name='liaisonstatement',
name='action_holder_contacts',
field=models.CharField(help_text=b'Who makes sure action is completed', max_length=255, blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='liaisonstatement',
name='from_groups',
field=models.ManyToManyField(related_name='liaisonsatement_from_set', to='group.Group', blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='liaisonstatement',
name='other_identifiers',
field=models.TextField(null=True, blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='liaisonstatement',
name='state',
field=models.ForeignKey(default=b'pending', to='name.LiaisonStatementState'),
preserve_default=True,
),
migrations.AddField(
model_name='liaisonstatement',
name='tags',
field=models.ManyToManyField(to='name.LiaisonStatementTagName', null=True, blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='liaisonstatement',
name='to_groups',
field=models.ManyToManyField(related_name='liaisonsatement_to_set', to='group.Group', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='liaisonstatement',
name='response_contacts',
field=models.CharField(help_text=b'Where to send a response', max_length=255, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='liaisonstatement',
name='technical_contacts',
field=models.CharField(help_text=b'Who to contact for clarification', max_length=255, blank=True),
preserve_default=True,
),
]

View file

@ -1,103 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def migrate_tags(apps, schema_editor):
LiaisonStatement = apps.get_model("liaisons", "LiaisonStatement")
for s in LiaisonStatement.objects.filter(action_taken=True):
s.tags.add('taken')
def migrate_state(apps, schema_editor):
LiaisonStatement = apps.get_model("liaisons", "LiaisonStatement")
for s in LiaisonStatement.objects.all():
if s.approved:
s.state_id='posted'
else:
s.state_id='pending'
s.save()
def create_events(apps, schema_editor):
LiaisonStatement = apps.get_model("liaisons", "LiaisonStatement")
LiaisonStatementEvent = apps.get_model("liaisons", "LiaisonStatementEvent")
Person = apps.get_model("person","Person")
system = Person.objects.get(name="(system)")
for s in LiaisonStatement.objects.all():
if s.submitted:
event = LiaisonStatementEvent.objects.create(
type_id='submitted',
by=system,
statement=s,
desc='Statement Submitted')
event.time=s.submitted
event.save()
if s.approved:
# create posted event
event = LiaisonStatementEvent.objects.create(
type_id='posted',
by=system,
statement=s,
desc='Statement Posted')
event.time=s.approved
event.save()
# create approved event for outgoing only
if s.approved != s.submitted:
event = LiaisonStatementEvent.objects.create(
type_id='approved',
by=system,
statement=s,
desc='Statement Approved')
event.time=s.approved
event.save()
if s.modified and ( s.modified != s.submitted and s.modified != s.approved ):
event = LiaisonStatementEvent.objects.create(
type_id='modified',
by=system,
statement=s,
desc='Statement Modified')
event.time=s.modified
event.save()
def migrate_relations(apps, schema_editor):
LiaisonStatement = apps.get_model("liaisons", "LiaisonStatement")
RelatedLiaisonStatement = apps.get_model("liaisons", "RelatedLiaisonStatement")
for liaison in LiaisonStatement.objects.filter(related_to__isnull=False):
RelatedLiaisonStatement.objects.create(
source=liaison,
target=liaison.related_to,
relationship_id='refold')
# XXX: Now done in migrate_groups
def merge_reply_to(apps, schema_editor):
"""Merge contents of reply_to field into response_contact and create comment Event"""
LiaisonStatement = apps.get_model("liaisons", "LiaisonStatement")
LiaisonStatementEvent = apps.get_model("liaisons", "LiaisonStatementEvent")
Person = apps.get_model("person","Person")
system = Person.objects.get(name="(system)")
for liaison in LiaisonStatement.objects.exclude(reply_to=''):
if liaison.reply_to in liaison.response_contacts:
continue
LiaisonStatementEvent.objects.create(
type_id='comment',
statement=liaison,
desc='Merged reply_to field into response_contacts\nOriginal reply_to: %s\nOriginal response_contacts: %s' % (liaison.reply_to, liaison.response_contacts),
by=system
)
liaison.response_contacts += ',%s' % liaison.reply_to
liaison.save()
class Migration(migrations.Migration):
dependencies = [
('liaisons', '0002_schema_changes'),
]
operations = [
migrations.RunPython(migrate_tags),
migrations.RunPython(migrate_state),
migrations.RunPython(create_events),
migrations.RunPython(migrate_relations),
#migrations.RunPython(merge_reply_to),
]

View file

@ -1,49 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
# This migration handles converting a standard Many-to-Many field to one
# with a through table
def copy_attachments(apps, schema_editor):
LiaisonStatement = apps.get_model("liaisons", "LiaisonStatement")
LiaisonStatementAttachment = apps.get_model("liaisons", "LiaisonStatementAttachment")
for liaison in LiaisonStatement.objects.all():
for doc in liaison.attachments.all():
LiaisonStatementAttachment.objects.create(
statement=liaison,
document=doc,
removed=False)
class Migration(migrations.Migration):
dependencies = [
('liaisons', '0003_migrate_general'),
]
operations = [
migrations.CreateModel(
name='LiaisonStatementAttachment',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('removed', models.BooleanField(default=False)),
('document', models.ForeignKey(to='doc.Document')),
('statement', models.ForeignKey(to='liaisons.LiaisonStatement')),
],
options={
},
bases=(models.Model,),
),
migrations.RunPython(copy_attachments),
migrations.RemoveField(
model_name='liaisonstatement',
name='attachments',
),
migrations.AddField(
model_name='liaisonstatement',
name='attachments',
field=models.ManyToManyField(to='doc.Document', through='liaisons.LiaisonStatementAttachment', blank=True),
preserve_default=True,
),
]

View file

@ -1,792 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def create_new_groups(apps, schema_editor):
Group = apps.get_model("group","Group")
for group in NEW_GROUPS:
if group[2]:
#print "Get parent: {}".format(group[2])
parent = Group.objects.get(acronym=group[2])
else:
parent = None
Group.objects.create(
acronym=group[0],
name=group[1],
parent=parent,
type_id='sdo',
state_id=group[3])
def change_acronyms(apps, schema_editor):
'''Modify some existing groups'''
Group = apps.get_model("group","Group")
for old,new in CHANGE_ACRONYM:
group = Group.objects.get(acronym=old)
group.acronym = new
group.save()
def set_parents(apps, schema_editor):
'''Modify some existing groups'''
Group = apps.get_model("group","Group")
for child_acronym,parent_acronym in SET_PARENT:
#print "Setting parent {}:{}".format(child_acronym,parent_acronym)
child = Group.objects.get(acronym=child_acronym)
parent = Group.objects.get(acronym=parent_acronym)
child.parent = parent
child.save()
def reassign_groups(apps,schema_editor):
'''For Statements that have a multi to_group assignment, remove the group
assignment and populate the to_name field for conversion to multiple groups
in later function'''
LiaisonStatement = apps.get_model("liaisons", "LiaisonStatement")
for acronym,name in MULTI_TO_GROUPS:
for stmt in LiaisonStatement.objects.filter(to_group__acronym=acronym):
stmt.to_name=name
stmt.to_group=None
stmt.save()
def cleanup_groups(apps, schema_editor):
Group = apps.get_model("group","Group")
for group,x in MULTI_TO_GROUPS:
Group.objects.get(acronym=group).delete()
def copy_to_group(apps, schema_editor):
'''For this migration we are favoring the value in to_name over to_group. Based
on observation there are statements with multiple groups in the to_name but
restricted to one to_group.'''
LiaisonStatement = apps.get_model("liaisons", "LiaisonStatement")
Group = apps.get_model("group","Group")
for s in LiaisonStatement.objects.all():
if s.to_name and s.to_name in TO_NAME_MAPPING:
if TO_NAME_MAPPING[s.to_name]:
got_exception = False
for acronym in TO_NAME_MAPPING[s.to_name]:
try:
s.to_groups.add(Group.objects.get(acronym=acronym))
except Group.DoesNotExist:
print "Group Does Not Exist: {},{},{}".format(s.pk,s.to_name,acronym)
got_exception = True
if not got_exception:
s.to_name = ''
s.save()
else:
print "{}:{} empty to_group mapping".format(s.pk,s.to_name)
elif s.to_group:
s.to_groups.add(s.to_group)
s.to_name = ''
s.save()
def copy_from_group(apps, schema_editor):
LiaisonStatement = apps.get_model("liaisons", "LiaisonStatement")
Group = apps.get_model("group","Group")
for s in LiaisonStatement.objects.all():
if s.from_name and s.from_name in FROM_NAME_MAPPING:
if FROM_NAME_MAPPING[s.from_name]:
got_exception = False
for acronym in FROM_NAME_MAPPING[s.from_name]:
try:
s.from_groups.add(Group.objects.get(acronym=acronym))
except Group.DoesNotExist:
print "Group Does Not Exist: {}".format(acronym)
got_exception = True
if not got_exception:
s.from_name = ''
s.save()
else:
print "{}:{} empty from_group mapping".format(s.pk,s.from_name)
elif s.from_group:
s.from_groups.add(s.from_group)
s.from_name = ''
s.save()
else:
print "from_name not mapped and no from_group {}".format(s.pk)
# set from_contact
#if s.from_contact:
# for fg in s.fromgroup_set.all():
# fg.contact = s.from_contact
# fg.save()
def set_default_poc(apps, schema_editor):
"""Set default group POC if there is only one unique value"""
LiaisonStatementGroupContacts = apps.get_model("liaisons", "LiaisonStatementGroupContacts")
Group = apps.get_model("group", "Group")
for group in Group.objects.filter(liaisonstatement_to_set__isnull=False).distinct():
contacts = set()
for stmt in group.liaisonstatement_to_set.all():
if stmt.to_contacts:
contacts.add(stmt.to_contacts)
if len(contacts) == 1:
LiaisonStatementGroupContacts.objects.create(group=group,contacts=contacts.pop())
# do explicit mappings
for acronym,contacts in DEFAULT_POC.items():
group = Group.objects.get(acronym=acronym)
try:
lsgc = LiaisonStatementGroupContacts.objects.get(group=group)
lsgc.contacts = contacts
lsgc.save()
except LiaisonStatementGroupContacts.DoesNotExist:
LiaisonStatementGroupContacts.objects.create(group=group,contacts=contacts)
def set_cc_contacts(apps, schema_editor):
"""Set initial LiaisonStatementGroupContacts.cc_contacts"""
LiaisonStatementGroupContacts = apps.get_model("liaisons", "LiaisonStatementGroupContacts")
Group = apps.get_model("group", "Group")
cc_contacts = 'itu-t-liaison@iab.org'
for group in Group.objects.filter(acronym__startswith='itu'):
lsgc = group.liaisonstatementgroupcontacts_set.first()
if lsgc:
lsgc.cc_contacts = cc_contacts
lsgc.save()
else:
LiaisonStatementGroupContacts.objects.create(group=group,cc_contacts=cc_contacts)
def explicit_mappings(apps, schema_editor):
"""In some cases the to_name cannot be mapped one-to-one with a group. The
following liaison statements are modified individually
"""
#LiaisonStatementFromGroup = apps.get_model("liaisons", "LiaisonStatmentFromGroup")
LiaisonStatement = apps.get_model("liaisons", "LiaisonStatement")
Group = apps.get_model("group", "Group")
def _setgroup(to=None,frm=None,pks=None):
for pk in pks:
s = LiaisonStatement.objects.get(pk=pk)
if to:
s.to_groups.add(*Group.objects.filter(acronym__in=to))
s.to_name = ''
if frm:
#for acronym in frm:
# LiaisonStatementFromGroup.objects.create(statement=s,group=Group.objects.get(acronym=acronym))
s.from_groups.add(*Group.objects.filter(acronym__in=frm))
s.from_name = ''
s.save()
_setgroup(to=['ietf'],pks=[116,782,796,797,823,835,836,837,840])
_setgroup(to=['sipping'],pks=[809])
_setgroup(to=['ieprep'],pks=[810])
_setgroup(to=['atm-forum'],frm=['megaco'],pks=[816])
_setgroup(to=['ccamp'],pks=[827,829])
_setgroup(to=['sub','tsv'],pks=[828])
_setgroup(to=['sigtran'],pks=[830])
_setgroup(to=['irtf'],pks=[831,832,833,834])
_setgroup(to=['rmt'],pks=[838,839])
_setgroup(to=['ietf','iana'],pks=[841])
_setgroup(to=['isoc','iana'],pks=[842])
_setgroup(to=['ietf','avt'],pks=[811,812])
_setgroup(to=['avt'],pks=[822])
# 821 / 824
class Migration(migrations.Migration):
dependencies = [
('liaisons', '0004_migrate_attachments'),
]
operations = [
migrations.RunPython(change_acronyms),
migrations.RunPython(create_new_groups),
migrations.RunPython(set_parents),
migrations.RunPython(reassign_groups),
migrations.RunPython(copy_to_group),
migrations.RunPython(copy_from_group),
migrations.RunPython(set_default_poc),
migrations.RunPython(set_cc_contacts),
migrations.RunPython(cleanup_groups),
migrations.RunPython(explicit_mappings),
]
# ----------------------------------------------------------
# x_name to group mappings
# -----------------------------------------------------------
NEW_GROUPS = [
('3gpp-tsgsa','SGPP TSG SA','3gpp','active'),
('3gpp-tsgsa-sa2','3GPP TSG SA WG2','3gpp-tsgsa','active'),
('3gpp-tsgsa-sa3','3GPP TSG SA WG3','3gpp-tsgsa','active'),
('3gpp-tsgct','SGPP TSG CT','3gpp','active'),
('3gpp-tsgct-ct1','3GPP TSG CT WG1','3gpp-tsgct','active'),
('3gpp-tsgct-ct4','3GPP TSG CT WG4','3gpp-tsgct','active'),
('3gpp-tsgran','SGPP TSG RAN','3gpp','active'),
('3gpp-tsgran-ran2','3GPP TSG RAN WG2','3gpp-tsgran','active'),
('3gpp-tsgt-wg2','3GPP-TSGT-WG2','3gpp','active'),
('acif','Australian Communications Industry Forum',None,'active'),
('arib','Association of Radio Industries and Business',None,'active'),
('ashrae','American Society of Heating, Refrigerating, and Air-Conditioning Engineers',None,'active'),
('atis','ATIS',None,'active'),
('atm-forum','ATM Forum',None,'active'),
('ccsa','China Communications Standards Association',None,'active'),
('dlna','Digital Living Network Alliance',None,'active'),
('dsl-forum','DSL Forum',None,'active'),
('dsl-forum-twg','DSL Forum Architecture & Transport Working Group','dsl-forum','active'),
('dvb-tm-ipi','DVB TM-IPI',None,'active'),
('epcglobal','EPCGlobal',None,'active'),
('etsi','ETSI',None,'active'),
('etsi-at-digital','ETSI AT Digital','etsi','active'),
('etsi-bran','ETSI BRAN','etsi','active'),
('etsi-dect','ETSI DECT','etsi','active'),
('etsi-emtel','ETSI EMTEL','etsi','active'),
('etsi-tc-hf','ETSI TC HF','etsi','active'),
('etsi-tispan','ETSI TISPAN','etsi','active'),
('etsi-tispan-wg4','ETSI TISPAN WG4','etsi-tispan','active'),
('etsi-tispan-wg5','ETSI TISPAN WG5','etsi-tispan','active'),
('femto-forum','Femto Forum',None,'active'),
('gsma','GSMA',None,'active'),
('gsma-wlan','GSMA WLAN','gsma','active'),
('incits-t11-5','INCITS T11.5',None,'active'),
('isma','Internet Streaming Media Alliance',None,'active'),
('itu','ITU',None,'active'),
('itu-r-wp5a','ITU-R-WP5A','itu-r','active'),
('itu-r-wp5d','ITU-R-WP5D','itu-r','active'),
('itu-r-wp8a','ITU-R-WP8A','itu-r','active'),
('itu-r-wp8f','ITU-R-WP8F','itu-r','active'),
('itu-t-ipv6-group','ITU-T-IPV6-GROUP','itu-t','active'),
('itu-t-fg-cloud','ITU-T-FG-CLOUD','itu-t','conclude'),
('itu-t-fg-iptv','ITU-T-FG-IPTV','itu-t','conclude'),
('itu-t-fg-ngnm','ITU-T-FG-NGNM','itu-t','conclude'),
('itu-t-jca-idm','ITU-T-JCA-IDM','itu-t','active'),
('itu-t-ngnmfg','ITU-T-NGNMFG','itu-t','active'),
('itu-t-sg-4','ITU-T-SG-4','itu-t','conclude'),
('itu-t-sg-6','ITU-T-SG-6','itu-t','conclude'),
('itu-t-sg-7','ITU-T-SG-7','itu-t','conclude'),
('itu-t-sg-8','ITU-T-SG-8','itu-t','conclude'),
('itu-t-sg-9','ITU-T-SG-9','itu-t','active'),
('itu-t-sg-2-q1','ITU-T-SG-2-Q1','itu-t-sg-2','active'),
('itu-t-sg-11-q5','ITU-T-SG-11-Q5','itu-t-sg-11','active'),
('itu-t-sg-11-wp2','ITU-T-SG-11-WP2','itu-t-sg-11','active'),
('itu-t-sg-12-q12','ITU-T-SG-12-Q12','itu-t-sg-12','active'),
('itu-t-sg-12-q17','ITU-T-SG-12-Q17','itu-t-sg-12','active'),
('itu-t-sg-13-q3','ITU-T-SG-13-Q3','itu-t-sg-13','active'),
('itu-t-sg-13-q5','ITU-T-SG-13-Q5','itu-t-sg-13','active'),
('itu-t-sg-13-q7','ITU-T-SG-13-Q7','itu-t-sg-13','active'),
('itu-t-sg-13-q9','ITU-T-SG-13-Q9','itu-t-sg-13','active'),
('itu-t-sg-13-q11','ITU-T-SG-13-Q11','itu-t-sg-13','active'),
('itu-t-sg-13-wp3','ITU-T-SG-13-WP3','itu-t-sg-13','conclude'),
('itu-t-sg-13-wp4','ITU-T-SG-13-WP4','itu-t-sg-13','conclude'),
('itu-t-sg-13-wp5','ITU-T-SG-13-WP5','itu-t-sg-13','conclude'),
('itu-t-sg-14','ITU-T-SG-14','itu-t','active'),
('itu-t-sg-15-q1','ITU-T-SG-15-Q1','itu-t-sg-15','active'),
('itu-t-sg-15-q3','ITU-T-SG-15-Q3','itu-t-sg-15','active'),
('itu-t-sg-15-q4','ITU-T-SG-15-Q4','itu-t-sg-15','active'),
('itu-t-sg-15-q6','ITU-T-SG-15-Q6','itu-t-sg-15','active'),
('itu-t-sg-15-q9','ITU-T-SG-15-Q9','itu-t-sg-15','active'),
('itu-t-sg-15-q10','ITU-T-SG-15-Q10','itu-t-sg-15','active'),
('itu-t-sg-15-q11','ITU-T-SG-15-Q11','itu-t-sg-15','active'),
('itu-t-sg-15-q12','ITU-T-SG-15-Q12','itu-t-sg-15','active'),
('itu-t-sg-15-q14','ITU-T-SG-15-Q14','itu-t-sg-15','active'),
('itu-t-sg-15-q15','ITU-T-SG-15-Q15','itu-t-sg-15','active'),
('itu-t-sg-15-wp1','ITU-T-SG-15-WP1','itu-t-sg-15','active'),
('itu-t-sg-15-wp3','ITU-T-SG-15-WP3','itu-t-sg-15','active'),
('itu-t-sg-16-q8','ITU-T-SG-16-Q8','itu-t-sg-16','active'),
('itu-t-sg-16-q9','ITU-T-SG-16-Q9','itu-t-sg-16','active'),
('itu-t-sg-16-q10','ITU-T-SG-16-Q10','itu-t-sg-16','active'),
#('itu-t-sg-17-tsb','ITU-T-SG-17-TSB','itu-t-sg-17','active'),
('itu-t-sg-17-q2','ITU-T-SG-17-Q2','itu-t-sg-17','active'),
#('itu-t-sg-17-q4','ITU-T-SG-17-Q4','itu-t-sg-17','active'),
('itu-t-sg-20','ITU-T-SG-20','itu-t','active'),
('ieee','IEEE',None,'active'),
('ieee-802','IEEE 802','ieee','active'),
('ieee-802-ec','IEEE 802 Executive Committee','ieee','active'),
('ieee-802-21','IEEE 802.21','ieee-802','active'),
('ieee-sa-ngson','IEEE SA NGSON','ieee-sa','active'),
('iso-iec-jtc1','ISO/IEC JTC1',None,'active'),
('iso-iec-jtc1-sc29-wg1','ISO/IEC JTC1 SC29 WG1','iso-iec-jtc1-sc29','active'),
('iso-iec-jtc1-sc31','ISO/IEC JTC1 SC31','iso-iec-jtc1','active'),
('iso-iec-jtc1-sc31-wg4','ISO/IEC JTC1 SC31 WG4','iso-iec-jtc1-sc31','active'),
('iso-iec-jtc1-sgsn','ISO/IEC JTC1 SGSN','iso-iec-jtc1','active'),
('iso-iec-jtc1-wg7','ISO/IEC JTC1 WG7','iso-iec-jtc1','active'),
('mead','IETF MEAD Team','rtg','active'),
('mfa-forum','MFA Forum',None,'active'),
('mpeg','MPEG',None,'active'),
('mpls-forum','MPLS Forum',None,'active'),
('mfa','MPLS and Frame Relay Alliance',None,'active'),
('nanc-lnpa-wg','NANC LNPA WG',None,'active'),
('nmnro','National, Multi-National or Regional Organizations',None,'active'),
('oma','OMA',None,'active'),
('oma-bcast','OMA BCAST','oma','active'),
('oma-com-cab','OMA COM CAB','oma','active'),
('oma-com-cpm','OMA COM CPM','oma','active'),
('oma-mwg','OMA MWG','oma','active'),
('oma-mwg-mem','OMA MWG-MEM','oma-mwg','active'),
('oma-pag-wg','OMA PAG WG','oma','active'),
('oma-tp','OMA TP','oma','active'),
('opif','Open IPTV Forum',None,'active'),
('t1m1','T1M1',None,'active'),
('t1s1','T1S1',None,'active'),
('t1x1','T1X1',None,'active'),
('tia','TIA',None,'active'),
('tmoc','TMOC',None,'active'),
('w3c-geolocation-wg','W3C Geolocation WG','w3c','active'),
('w3c-mmi','W3C MMI','w3c','active'),
('wifi-alliance','Wifi Alliance',None,'active'),
('wig','WIG',None,'active'),
]
CHANGE_ACRONYM = [
('ieee-8021','ieee-802-1'),
('ieee-8023','ieee-802-3'),
('ieee-80211','ieee-802-11'),
('ieee-80216','ieee-802-16'),
('ieee-80223','ieee-802-23'),
('isoiec-jtc1-sc2','iso-iec-jtc1-sc2'),
('isoiec-jtc1-sc6','iso-iec-jtc1-sc6'),
('isoiec-jtc1-sc29','iso-iec-jtc1-sc29'),
('isoiec-jtc-1sc-29wg-11','iso-iec-jtc1-sc29-wg11'),
('itu-t-fgd','itu-t-fg-dist'),
('itu-t-sg17-q4','itu-t-sg-17-q4'),
('itu-t-sg17-tsb','itu-t-sg-17-tsb'),
('ITU-T-SG5','itu-t-sg-5'),
('3GPP-TSG-SA-WG4','3gpp-tsgsa-sa4'),
('IEEE-802-OmniRAN','ieee-802-ec-omniran'),
]
SET_PARENT = [
('itu-t','itu'),
('itu-r','itu'),
('itu-t-jca-cloud','itu-t'),
('itu-t-jca-cop','itu-t'),
('itu-t-jca-sdn','itu-t'),
('itu-t-mpls','itu-t'),
('itu-t-sg-2','itu-t'),
('itu-t-sg-3','itu-t'),
('itu-t-sg-11','itu-t'),
('itu-t-sg-12','itu-t'),
('itu-t-sg-13','itu-t'),
('itu-t-sg-15','itu-t'),
('itu-t-sg-16','itu-t'),
('itu-t-sg-17','itu-t'),
('itu-t-tsag','itu-t'),
('ieee-sa','ieee'),
('ieee-802-1','ieee-802'),
('ieee-802-3','ieee-802'),
('ieee-802-11','ieee-802'),
('ieee-802-16','ieee-802'),
('ieee-802-23','ieee-802'),
('ieee-802-ec-omniran','ieee-802-ec'),
('iso-iec-jtc1-sc2','iso-iec-jtc1'),
('iso-iec-jtc1-sc6','iso-iec-jtc1'),
('iso-iec-jtc1-sc7','iso-iec-jtc1'),
('iso-iec-jtc1-sc27','iso-iec-jtc1'),
('iso-iec-jtc1-sc29','iso-iec-jtc1'),
('iso-iec-jtc1-sc29-wg11','iso-iec-jtc1-sc29'),
]
MULTI_TO_GROUPS = [
('itu-t-sg15-q9-q10-q12-and-q14','ITU-T SG 15 Q9, Q10, Q12 and Q14'),
('itu-t-sg12-q-12-17','ITU-T SG 12, Q12, Q17'),
]
TO_NAME_MAPPING = {
u'(bwijnen@lucent.com) Bert Wijnen': [u'sming'],
u'(lyong@ciena.com)Lyndon Ong': [u'itu-t-sg-15'],
#u'(sob@harvard.edu) Scott Bradner': None, # this is a bunch (explicit)
u'(sob@harvard.edu)Scott Bradner': ['irtf'], # this is 833
u'3GPP SA WG4': [u'3gpp-tsgsa-sa4'],
u'3GPP SA2': [u'3gpp-tsgsa-sa2'],
u'3GPP TSG CT WG4': [u'3gpp-tsgct-ct4'],
u'3GPP TSG RAN WG2': [u'3gpp-tsgran-ran2'],
u'3GPP TSG SA WG4': [u'3gpp-tsgsa-sa4'],
u'3GPP, 3GPP2, ARIB, ATIS, CCSA, ETSI, ETSI-DECT, ETSI-BRAN, IEEE, IETF,': [u'ietf'],
u'3GPP/IETF and 3GPP/ITU-T Co-ordinator': ['3gpp-tsgct-ct1'],
u'ACIF, ARIB, ATIS, CCSA, ETSI, IEEE, IETF, ISACC, TIA, TTA, TTC': ['ietf'],
u'ASON-related Work': ['ccamp'],
u'ATIS': ['atis'],
u'American Society of Heating, Refrigerating, and Air-Conditioning Engineers': ['ashrae'],
u'BBF': ['broadband-forum'],
u'BMWG': [u'bmwg'],
u'Bert Wijnen and the IETF O & M Area': [u'ops'],
u'Bert Wijnen, Bernard Aboba and the IETF': [u'ietf'],
u'CCAMP WG co-chairs and IEEE-IETF': ['ccamp'],
u'CCAMP WG co-chairs and IEEE-IETF liaisons': ['ccamp'],
u'Completes action above Scott Bradner, Area co-Director (sob@harvard.edu)': ['tsv'],
u'DLNA': ['dlna'],
#u'DONE': None, # this one is explicitly mapped
u'DSL Forum': [u'dsl-forum'],
u'DSL Forum Architecture & Transport Working Group': ['dsl-forum-twg'],
u'DVB IPI': ['dvb-tm-ipi'],
u'DVB TM-IPI, ETSI TISPAN, ATIS IIF, IETF RMT, IETF FECFRAME': ['fecframe','rmt'],
u'EAP Method Update Working Group': ['emu'],
u'ETSI AT working group Digital': ['etsi-at-digital'],
u'ETSI TC HF': ['etsi-tc-hf'],
u'ETSI TISPAN': ['etsi-tispan'],
u'G.7712 Editor, ITU-T SG15Q14 Rapporteur, ITU-T SG15': ['itu-t-sg-15'],
u'Generic EAP Encapsulation': ['int'],
u'Harald Alvestrand': ['avt'], # placeholder for explicit (2)
u'IAB and IETF Routing Area Directors': [u'iab', 'rtg'],
u'IAB, IESG': [u'iab', 'iesg'],
u'IANA': [u'iana'],
u'ICANN, IETF/IAB, NRO and ACSIS': ['ietf','iab'],
u'IEEE 802': [u'ieee-802'],
u'IEEE NGSON Study Group': ['ieee-sa-ngson'],
u'IEEE802.1': [u'ieee-802-1'],
u'IESG members, IAB members': [u'iesg', u'iab'],
u'IESG, IAB, IETF MPLS WG': ['iesg','iab','mpls'],
u'IESG, IETF-RAI': [u'iesg', u'rai'],
u'IESG/IAB Chair': [u'iesg', u'iab'],
u'IETF PWE3 and TICTOC': [u'pwe3', u'tictoc'],
u'IETF (CCAMP, PCE and MPLS WGs)': [u'ccamp', u'pce', u'mpls'],
u'IETF (Management)': ['iesg'],
u'IETF (SAVI and V6OPS WGS, OPS Area and INT Area)': [u'savi', u'v6ops', u'ops', u'int'],
u'IETF (Sub-IP & Transport Areas)': [u'sub', u'tsv'],
u'IETF (and others)': [u'ietf'],
u'IETF (ccamp, pce and mpls WGs)': [u'ccamp', u'pce', u'mpls'],
u'IETF 6MAN WG, IETF Internet Area': [u'6man', u'int'],
u'IETF AVT WG, ITU-T SG11': [u'avt', u'itu-t-sg-11'],
#u'IETF CCAMP WG and Routing Area Directors': [u'ccamp', u'rtg'],
#u'IETF CCAMP WG and Sub IP Directors': [u'ccamp','sub'],
#u'IETF CCAMP WG and Sub-IP Area Directors': [u'ccamp','sub'],
u'IETF CCAMP WG, CC: IETF OSPF WG': [u'ospf','ccamp'],
u'IETF CCAMP WG, Routing Area Directors': [u'ccamp', u'rtg'],
u'IETF CCAMP and MPLS WGs': [u'ccamp', u'mpls'],
u'IETF CCAMP and MPLS WGs and the Routing Area Directors of the IETF': [u'ccamp', u'mpls', u'rtg'],
u'IETF CCAMP and PCE WGs': [u'ccamp', u'pce'],
u'IETF CCAMP, IETF Routing Area Directors': [u'ccamp', u'rtg'],
u'IETF CCAMP, PCE and MPLS WGs': [u'ccamp', u'pce', u'mpls'],
u'IETF Charter group on Authority to Citizen Alert (ATOCA)': [u'atoca'],
u'IETF DNSOP WG, SAAG, IAB': [u'dnsop', u'saag', u'iab'],
u'IETF IAB, IETF IESG': [u'iab', u'ietf', u'iesg'],
u'IETF IESG, IAB, PWE3 WG, MPLS WG, routing and internet Area Directors': [u'iesg', u'iab', u'pwe3', u'mpls', u'rtg', u'int'],
u'IETF IESG, IETF MPLS WG': [u'mpls','iesg'],
#u'IETF ISIS WG and Routing Area Directors': [u'isis','rtg'],
u'IETF IPPM, IETF AVT': [u'ippm', u'avt'],
u'IETF Internet Area; IETF MIF WG; IETF v6ops WG; IETF 6man WG; IETF softwire WG; IETF Operations and Management Area': [u'int', u'mif', u'v6ops', u'6man', u'softwire', u'ops'],
u'IETF Liaison to the ITU on MPLS and PWE3 WG Co-Chair': [u'itu-t-mpls', u'pwe3'],
u'IETF MEAD Team': [u'mead'],
u'IETF MEAD team': [u'mead'],
u'IETF MEXT WG': ['mext'],
u'IETF MIPSHOP-WG': [u'mipshop'],
u'IETF MMUSIC WG,IETF SIPPING WG': [u'sipping','mmusic'],
u'IETF MPLS & PWE3': [u'mpls', u'pwe3'],
u'IETF MPLS WG, CC: IETF CCAMP and PWE3 WGs': [u'mpls', u'ccamp', u'pwe3'],
u'IETF MPLS WG, CC: MFA Forum': ['mpls','mfa-forum'],
u'IETF MPLS WG, IAB, IESG': [u'mpls', u'iab', u'iesg'],
u'IETF MPLS WG, IETF IAB and IESG': [u'mpls', u'iab', u'iesg'],
u'IETF MPLS WG, IETF PWE3 WG, Broadband Forum': [u'mpls', u'pwe3', u'broadband-forum'],
u'IETF MPLS WG Co Chairs (Info: CCAMP WG Co Chairs, MEAD team)': [u'mpls','ccamp','mead'],
u'IETF MPLS WG Co-Chairs, CC: IETF MEAD team': [u'mpls','mead'],
u'IETF MPLS WG and OPSA WG': [u'mpls','opsawg'],
u'IETF MPLS WG and PEW3 WG': [u'mpls','pwe3'],
u'IETF MPLS WG, PWE3 WG': [u'pwe3','mpls'],
u'IETF MPLS and GMPLS': ['mpls'],
u'IETF MPLS and PWE3 WG, MFA Forum, ITU-T Q7/13': ['mpls','pwe3','mfa-forum','itu-t-sg-13-q7'],
u'IETF MPLS liaison representative': [u'mpls'],
u'IETF MPLS, CCAMP and PWE3 WGs': [u'mpls', u'ccamp', u'pwe3'],
u'IETF MPLS, CCAMP, PWE3 and L2VPN': [u'mpls', u'ccamp', u'pwe3', u'l2vpn'],
u'IETF MPLS, PWE WGs (Info: IETF MEAD team)': ['mpls','pwe3','mead'],
u'IETF Mead Team': [u'mead'],
u'IETF NSIS WG Chairs, IETF TSV Area Directors, IESG members, IAB members': [u'nsis', u'tsv', u'iesg', u'iab'],
u'IETF PWE3 and L2VPN': [u'pwe3', u'l2vpn'],
u'IETF PWE3 and L2VPN Working Groups': [u'pwe3', u'l2vpn'],
u'IETF PWE3 and MPLS WG': [u'mpls',u'pwe3'],
u'IETF PWE3 and MPLS WGs': [u'pwe3', u'mpls'],
u'IETF PWE3 and MPLS Working Groups': [u'pwe3', u'mpls'],
u'IETF PWE3, IETF L2VPN WG': ['pwe3',u'l2vpn'],
u'IETF PWE3, MPLS working groups': [u'pwe3', u'mpls'],
u'IETF RAI and IESG': [u'rai', 'iesg'],
u'IETF Real-time Applications and Infrastructure Area Director': [u'rai'],
u'IETF Routing Area, the MPLS and CCAMP working groups': [u'rtg', u'mpls', u'ccamp'],
u'IETF Routing Area (CCAMP WG) and Internet Area (L2VPN WG and L3VPN WG)': ['ccamp','l2vpn','l3vpn'],
u'IETF Routing Area Directors and IAB (CC: CCAMP WG)': ['ccamp',u'rtg','iab'],
u'IETF Routing Area Directors and IS-IS WG': ['isis'],
u'IETF Routing and Transport areas': [u'rtg', u'tsv'],
u'IETF Security Area Directors, CC: IETF CCAMP WG': [u'sec','ccamp'],
u'IETF SIP related Working Groups and IESG': ['iesg','rai'],
u'IETF Transport and Internat Areas': [u'tsv', u'int'],
u'IETF Transport Area Directors, PCN Working Group Chairs': [u'pcn'],
u'IETF WG MPLS': [u'mpls'],
u'IETF Working Groups IEPREP, TSV, NSIS': [u'ieprep', u'tsv', u'nsis'],
u'IETF and Harald Alvestrand': ['ietf'],
u'IETF and IAB': [u'ietf', u'iab'],
u'IETF avt and mmusic WG': [u'mmusic','avt'],
u'IETF ccamp and pce WG': ['ccamp',u'pce'],
u'IETF mobileip WG and mpls WG': [u'mobileip','mpls'],
u'IETF mpls WG, CC: IETF pwe3 WG': ['mpls',u'pwe3'],
u'IETF mpls and ccamp WG': ['mpls',u'ccamp'],
u'IETF pwe3 WG, CC: mpls WG': [u'mpls','pwe3'],
u'IETF pwe3, mpls WGs': [u'pwe3', u'mpls'],
u'IETF pwe3 and mpls WG': [u'mpls','pwe3'],
u'IETF re RoHC': [u'rohc'],
u'IETF \u2013 Internet Area Directors, Internet Area Working Groups': [u'int'],
u'IETF: Transport Area Directors, PCN Working Group Chairs': [u'pcn'],
u'IETF, IAB': [u'ietf', u'iab'],
u'IETF/IAB': [u'ietf', u'iab'],
u'IETF/IAB, NRO, ICANN and ACSIS': ['ietf','iab'],
u'IETF/IAB/IESG': [u'ietf', u'iab', u'iesg'],
u'IETF/PWE3 and L2VPN WGs': [u'pwe3', u'l2vpn'],
u'ISIS': [u'isis'],
u'ISMA': ['isma'],
u'ISO/IEC JTC': [u'iso-iec-jtc1'],
u'ISO/IEC JTC 1/SC 29/WG 1': [u'iso-iec-jtc1-sc29-wg1'],
u'ISOC': [u'isoc'],
u'ISOC/IAB Liaison': [u'isoc', 'iab'],
u'ITU': [u'itu'],
u'ITU IPv6 Group': [u'itu-t-ipv6-group'],
u'ITU Q12/15 and Q14/15': [u'itu-t-sg-15-q12',u'itu-t-sg-15-q14'],
u'ITU SG 16 Q8, 9, 10/16': [u'itu-t-sg-16-q8',u'itu-t-sg-16-q9',u'itu-t-sg-16-q10'],
u'ITU SG13': [u'itu-t-sg-13'],
u'ITU SG15': [u'itu-t-sg-15'],
u'ITU-R': [u'itu-r'],
u'ITU-R WP8F & IETF': [u'itu-r-wp8f',u'ietf'],
u'ITU-SG15': [u'itu-t-sg-15'],
u'ITU-SG2': [u'itu-t-sg-2'],
u'ITU-T JCA-IdM': [u'itu-t-jca-idm'],
u'ITU-T Q1/SG15': [u'itu-t-sg-15-q1'],
u'ITU-T Q10/15': [u'itu-t-sg-15-q10'],
u'ITU-T Q12/15 and Q14/15': [u'itu-t-sg-15-q12',u'itu-t-sg-15-q14'],
u'ITU-T Q14/15': [u'itu-t-sg-15-q14'],
u'ITU-T Q14/15 - Mr. Kam Lam, Rapporteur': [u'itu-t-sg-15-q14'],
u'ITU-T Q14/15, ITU-T Q11/15': [u'itu-t-sg-15-q11',u'itu-t-sg-15-q14'],
u'ITU-T Q3/15': [u'itu-t-sg-15-q3'],
u'ITU-T Q5/13 (recently renamed ITU-T Q7/13)': [u'itu-t-sg-13-q7'],
u'ITU-T Q7/SG13': [u'itu-t-sg-13-q7'],
u'ITU-T Question 14/15': [u'itu-t-sg-15-q14'],
u'ITU-T Question 3/15': [u'itu-t-sg-15-q3'],
u'ITU-T SG 11 and ITU-T TSAG': [u'itu-t-sg-11',u'itu-t-tsag'],
u'ITU-T SG 11, ITU-T Q.5/11, ITU-T WP 2/11': [u'itu-t-sg-11',u'itu-t-sg-11-q5',u'itu-t-sg-11-wp2'],
u'ITU-T SG 12, Q12, Q17': [u'itu-t-sg12-q-12-17'],
u'ITU-T SG 13 (ITU-T SG 11 and SG 12 for information)': [u'itu-t-sg-13',u'itu-t-sg-12',u'itu-t-sg-12'],
u'ITU-T SG 13 (ITU-T SG 11 for information)': [u'itu-t-sg-13',u'itu-t-sg-11'],
u'ITU-T SG 13, SG 15': [u'itu-t-sg-13', u'itu-t-sg-15'],
u'ITU-T SG 15 <tsbsg15@itu.int, greg.jones@itu.int>': [u'itu-t-sg-15'],
u'ITU-T SG 15 Q9, Q10, Q12 and Q14': [u'itu-t-sg-15-q9',u'itu-t-sg-15-q10',u'itu-t-sg-15-q12',u'itu-t-sg-15-q14'],
u'ITU-T SG 15, Q.14/15': [u'itu-t-sg-15-q14'],
u'ITU-T SG 15, Q9, Q11, Q12, Q14': [u'itu-t-sg-15-q9',u'itu-t-sg-15-q10',u'itu-t-sg-15-q12',u'itu-t-sg-15-q14'],
u'ITU-T SG 17 Q.2/17': [u'itu-t-sg-17-q2'],
u'ITU-T SG 4': [u'itu-t-sg-4'],
u'ITU-T SG 4, 9, 11, 13, 16 and IETF': [u'itu-t-sg-4',u'itu-t-sg-9',u'itu-t-sg-11',u'itu-t-sg-13',u'itu-t-sg-16',u'ietf'],
u'ITU-T SG-15': [u'itu-t-sg-15'],
u'ITU-T SG-2': [u'itu-t-sg-2'],
u'ITU-T SG11': [u'itu-t-sg-11'],
u'ITU-T SG12, SG13, ATIS, TIA, IEC, IETF ccamp WG, IEEE 802.1, 802.3, OIF, Metro Ethernet Forum, ATM Forum': ['ccamp'],
u'ITU-T SG13': [u'itu-t-sg-13'],
u'ITU-T SG13 and SG15': [u'itu-t-sg-13', u'itu-t-sg-15'],
u'ITU-T SG15': [u'itu-t-sg-15'],
u'ITU-T SG15 (Optical Control Plane)': [u'itu-t-sg-15'],
u'ITU-T SG15 Q10': [u'itu-t-sg-15-q10'],
u'ITU-T SG15 Q10, Q12': [u'itu-t-sg-15-q10',u'itu-t-sg-15-q12'],
u'ITU-T SG15 Q12': [u'itu-t-sg-15-q12'],
u'ITU-T SG15 Q14': [u'itu-t-sg-15-q14'],
u'ITU-T SG15 Q6': [u'itu-t-sg-15-q6'],
u'ITU-T SG15 Q9, Q10, Q12 and Q14': [u'itu-t-sg-15-q9',u'itu-t-sg-15-q10',u'itu-t-sg-15-q12',u'itu-t-sg-15-q14'],
u'ITU-T SG15 Q9, Q11, Q12 and Q14': [u'itu-t-sg-15-q9',u'itu-t-sg-15-q11',u'itu-t-sg-15-q12',u'itu-t-sg-15-q14'],
u'ITU-T SG15 Question 12': [u'itu-t-sg-15-q12'],
u'ITU-T SG15 Question 3': [u'itu-t-sg-15-q3'],
u'ITU-T SG15 Question 6': [u'itu-t-sg-15-q6'],
u'ITU-T SG15 Question 6, Question 12, and Question 14': [u'itu-t-sg-15-q6',u'itu-t-sg-15-q12',u'itu-t-sg-15-q14'],
u'ITU-T SG15 Question 9': [u'itu-t-sg-15-q9'],
u'ITU-T SG15 Questions 12 and 14': [u'itu-t-sg-15-q12',u'itu-t-sg-15-q14'],
u'ITU-T SG15 and Q14/15': [u'itu-t-sg-15-q14'],
u'ITU-T SG15, Q 9/15, Q 10/15, Q 12/15 and Q 14/15': [u'itu-t-sg-15-q9',u'itu-t-sg-15-q10',u'itu-t-sg-15-q12',u'itu-t-sg-15-q14'],
u'ITU-T SG15, Q 9/15, Q10/15, Q12/15 and Q14/15': [u'itu-t-sg-15-q9',u'itu-t-sg-15-q10',u'itu-t-sg-15-q12',u'itu-t-sg-15-q14'],
u'ITU-T SG15, Q9, Q11, Q12 and Q14': [u'itu-t-sg-15-q9',u'itu-t-sg-15-q11',u'itu-t-sg-15-q12',u'itu-t-sg-15-q14'],
u'ITU-T SG16': [u'itu-t-sg-16'],
u'ITU-T SG17': [u'itu-t-sg-17'],
u'ITU-T SG17 TSB': [u'itu-t-sg-17-tsb'],
u'ITU-T SG2': [u'itu-t-sg-2'],
u'ITU-T SG2 <tsbsg2@itu.int>': [u'itu-t-sg-2'],
u'ITU-T SG2 Q 1/2': [u'itu-t-sg-2-q1'],
u'ITU-T SG4': [u'itu-t-sg-4'],
u'ITU-T SG4, ITU-T SG15, ITU-T NGNM Focus group, 3GPP SA5, 3GPP2, ATIS/TMOC, TMF, IETF Management, ETSI BRAN': ['iesg'],
u'ITU-T SGs, ITU-R WGs, ITU-D SG2 and the IETF': ['ietf'],
u'ITU-T SGs: 2 (info), 4, 9, 11, 12, 13, 17, 19; ITU-R SGs: 1, 4, 5, 6; ITU-D SG 2; Focus Group on \u2018From/In/To Cars II\u2019 (ITU-T SG 12); ISO TC 22 SC3 and TC 204 ; IEEE 802, 802.11 (WiFi), 802.15.1 (Bluetooth); AUTOSAR WPII-1.1, OSGi VEG, IrDA and JSR298 Tele': ['ietf'],
u'ITU-T SQ15 Question 14': [u'itu-t-sg-15-q14'],
u'ITU-T Study Group 11': [u'itu-t-sg-11'],
u'ITU-T Study Group 11 <tsg11gen@itu.int>': [u'itu-t-sg-11'],
u'ITU-T Study Group 13': [u'itu-t-sg-13'],
u'ITU-T Study Group 15': [u'itu-t-sg-15'],
u'ITU-T Study Group 15 <greg.jones@itu.int>': [u'itu-t-sg-15'],
u'ITU-T Study Group 15 Q4 <rlstuart@ieee.org>': [u'itu-t-sg-15-q4'],
u'ITU-T Study Group 15 Question 14': [u'itu-t-sg-15-q14'],
u'ITU-T Study Group 15 Question 3': [u'itu-t-sg-15-q3'],
u'ITU-T Study Group 15 Question 6': [u'itu-t-sg-15-q6'],
u'ITU-T TSAG External Relations Group': [u'itu-t-tsag'],
u'ITU-T Working Party 3/13 and ITU-T Question 11/13': [u'itu-t-sg-13-wp3',u'itu-t-sg-13-q11'],
u'ITU-T and ITU-T Study Group 13': [u'itu-t', u'itu-t-sg-13'],
u'ITU-T, ITU SG13': [u'itu-t', u'itu-t-sg-13'],
u'ITU-T-SG13': [u'itu-t-sg-13'],
u'ITU-T/FG Cloud': ['itu-t-fg-cloud'],
u'ITU-T/SG11': [u'itu-t-sg-11'],
u'ITU-T/Study Group 11': [u'itu-t-sg-11'],
u'Kam Lam, Rapporteur for Question 14 of ITU-T SG15': [u'itu-t-sg-15-q14'],
u'Kam Lam, Rapporteur for Question 14 of ITU-T Study Group 15': [u'itu-t-sg-15-q14'],
u'Lyndon Ong (lyong@ciena.com)': [u'sigtran'],
u'MFA Forum': ['mfa-forum'],
u'MPLS and Frame Relay Alliance': ['mfa'],
u'Mr. Kam Lam, Rapporteur for Question 14 of ITU-T Study Group 15': [u'itu-t-sg-15-q14'],
u'National, Multi-National or Regional Organizations': ['nmnro'],
u'OMA': [u'oma'],
u'OMA MEM': [u'oma-mwg-mem'],
u'OMA MWG': [u'oma-mwg'],
u'OMA MWG MEM Sub Working Group': [u'oma-mwg-mem'],
u'OMA TP': [u'oma-tp'],
u'OPS ADs (Randy Bush and Bert Wijnen)': [u'ops'],
u'OPS Area Director Bert Wijnen': [u'ops'],
u'Open IPTV Forum': ['opif'],
u'Open Mobile Alliance Broadcasting Working Group': [u'oma-bcast'],
u'Open Mobile Alliance, PAG Working Group': [u'oma-pag-wg'],
u'PDNR ITU-R M.[IP CHAR]': ['ietf'], # pending robert
u'PWE WG': ['pwe3'],
u'Phase 1 report to SG 4': ['ops'],
u'Q7/13': [u'itu-t-sg-13-q7'],
u'Rao Cherukuri, Chair MPLS and Frame Relay Alliance Technical Committee': ['mfa'],
u'Rao Cherukuri, Chairman, MPLS and Frame Relay Alliance Technical Committee': ['mfa'],
u'SA2, T2, OMA TP, S3': ['3gpp-tsgsa-sa2','3gpp-tsgt-wg2',u'oma-tp','3gpp-tsgsa-sa3'],
u'SAVI WG, V6OPS WG, OPS AREA, INT AREA': [u'savi', u'v6ops', u'ops', u'int'],
u'SC 29/WG11': [u'iso-iec-jtc1-sc29-wg11'],
u'SC29/WG11': [u'iso-iec-jtc1-sc29-wg11'],
u'SG 15,Questions 3,9, 11,12, 14 and WP 3/15': [u'itu-t-sg-15-q3',u'itu-t-sg-15-q9',u'itu-t-sg-15-q11',u'itu-t-sg-15-q12',u'itu-t-sg-15-q14',u'itu-t-sg-15-wp3'],
u'SG-13, Q.3/13, Q.9/13 and TSAG': [u'itu-t-sg-13-q3',u'itu-t-sg-13-q9',u'itu-t-tsag'],
u'SG13, SG13 WP4': [u'itu-t-sg-13',u'itu-t-sg-13-wp4'],
u'SG15 Q9': [u'itu-t-sg-15-q9'],
u'SG15, Q9, Q10, Q12 and Q14': [u'itu-t-sg-15-q9',u'itu-t-sg-15-q10',u'itu-t-sg-15-q12',u'itu-t-sg-15-q14'],
u'SG15, Q9, Q10, Q12, Q14': [u'itu-t-sg-15-q9',u'itu-t-sg-15-q10',u'itu-t-sg-15-q12',u'itu-t-sg-15-q14'],
u'SG15, Q9, Q10, Q12, and Q14': [u'itu-t-sg-15-q9',u'itu-t-sg-15-q10',u'itu-t-sg-15-q12',u'itu-t-sg-15-q14'],
u'SG15, Q9, Q11, Q12 and Q14': [u'itu-t-sg-15-q9',u'itu-t-sg-15-q11',u'itu-t-sg-15-q12',u'itu-t-sg-15-q14'],
u'SG17, SG13, SG11, JCA-NID, ETSI TISPAN WG4, 3GPP TSG CT4, IESG': ['iesg'],
u'SG4': [u'itu-t-sg-4'],
u'SIP aand SIPPING WGs': [u'sip', u'sipping'],
u'SIP, SIPPING, SIMPLE WGs': [u'sip', u'sipping', u'simple'],
u'SUB-IP and Transport Areas': [u'sub', u'tsv'],
u'Scott Bradner': ['ccamp','isis','sigtran'],
u'Scott Bradner (sob@harvard.edu)': ['iesg'], # placeholder for explicit mappings
u'Scott Bradner (sob@harvard.edu) Done': ['mpls'],
u'SubIP ADs (sob@harvard.edu,bwijnen@lucent.com)': [u'sub'],
u'TEWG, MPLS, CCAMP WGs': [u'tewg', u'mpls', u'ccamp'],
u'TRILL WG co-chairs and IEEE-IETF liaisons': ['trill'],
u'TRILL WG co-chairs, ADs, and IEEE-IETF liaisons': ['trill'],
u'TSG-X Corr to IETF re MIP6 Bootstrapping': ['int'],
u'The IAB': [u'iab'],
u'The IESG': [u'iesg'],
u'The IESG and the IAB': [u'iesg', u'iab'],
u'The IETF': [u'ietf'],
u'Tom Taylor (taylor@nortelnetworks.com), Megaco WG Chair': [u'megaco'],
u'Transport ADs (Allison Mankin and Scott Bradner)': [u'tsv'],
u'Transport Area Directors': [u'tsv'],
u'Unicode Consortium': ['unicode'],
u'Unicode Technical Committee': ['unicode'],
u'Various IETF WGs': ['mobileip','pppext','avt'],
u'W3C Geolocation WG': ['w3c-geolocation-wg'],
u'W3C Geolocation Working Group': ['w3c-geolocation-wg'],
u'W3C Multimedia Interaction Work Group': ['w3c-mmi'],
u'WiFi Alliance and Wireless Broadband Alliance': ['wifi-alliance','wba'],
u'chair@ietf.org': [u'ietf'],
u'gonzalo.camarillo@ericsson.com': ['ietf'],
u'tsbdir@itu.int': ['itu-t']
}
FROM_NAME_MAPPING = {
u'3GPP TSG RAN WG2': ['3gpp-tsgran-ran2'],
u'<unknown body 0>': ['itu-t-sg-13'],
u'ATIS': ['atis'],
u'ATM Forum': [u'atm-forum'],
u'ATM Forum AIC WG': [u'afic'],
u'BBF': [u'broadband-forum'],
u'DSL Forum': [u'dsl-forum'],
u'EPCGlobal': [u'epcglobal'],
u'ETSI': ['etsi'],
u'ETSI EMTEL': ['etsi-emtel'],
u'ETSI TC HF': ['etsi-tc-hf'],
u'ETSI TISPAN': ['etsi-tispan'],
u'ETSI TISPAN WG5': ['etsi-tispan-wg5'],
u'Femto Forum': ['femto-forum'],
u'GSMA WLAN': ['gsma-wlan'],
u'IEEE 802': [u'ieee-802'],
u'IEEE 802.11': [u'ieee-802-11'],
u'IEEE 802.21': [u'ieee-802-21'],
u'IETF ADSL MIB': [u'adslmib'],
u'IETF MEAD Team': [u'mead'],
u'IETF Mead Team': [u'mead'],
u'IETF liaison on MPLS': [u'mpls'],
u'INCITS T11.5': ['incits-t11-5'],
u'ISO/IEC JTC 1 SC 29/WG 11': [u'iso-iec-jtc1-sc29-wg11'],
u'ISO/IEC JTC 1 SGSN': ['iso-iec-jtc1-sgsn'],
u'ISO/IEC JTC 1/SC31/WG 4/SG 1': ['iso-iec-jtc1-sc31-wg4'],
u'ISO/IEC JTC 1/WG 7': [u'iso-iec-jtc1-wg7'],
u'ISO/IEC JTC SC 29/WG1': [u'iso-iec-jtc1-sc29-wg1'],
u'ISO/IEC JTC SC 29/WG11': [u'iso-iec-jtc1-sc29-wg11'],
u'ISO/IEC JTC1/SC29/WG11': [u'iso-iec-jtc1-sc29-wg11'],
u'ISO/IEC JTC1/SC6': [u'iso-iec-jtc1-sc6'],
u'ITU': [u'itu'],
u'ITU IPv6 Group': [u'itu-t-ipv6-group'],
u'ITU-Q.14/15': [u'itu-t-sg-15-q14'],
u'ITU-R WP 5A': [u'itu-r-wp5a'],
u'ITU-R WP 5D': [u'itu-r-wp5d'],
u'ITU-R WP8A': [u'itu-r-wp8a'],
u'ITU-R WP8F': [u'itu-r-wp8f'],
u'ITU-SC29': ['iso-iec-jtc1-sc29-wg1'],
u'ITU-SG 15': [u'itu-t-sg-15'],
u'ITU-SG 7': [u'itu-t-sg-7'],
u'ITU-SG 8': [u'itu-t-sg-8'],
u'ITU-T FG Cloud': [u'itu-t-fg-cloud'],
u'ITU-T FG IPTV': [u'itu-t-fg-iptv'],
u'ITU-T Q.5/13': [u'itu-t-sg-13-q5'],
u'ITU-T SG 15 Q14/15': [u'itu-t-sg-15-q14'],
u'ITU-T SG 15 WP 1': [u'itu-t-sg-15-wp1'],
u'ITU-T SG 15, Q.11': [u'itu-t-sg-15-q11'],
u'ITU-T SG 15, Q.14/15': [u'itu-t-sg-15-q14'],
u'ITU-T SG 4': [u'itu-t-sg-4'],
u'ITU-T SG 6': [u'itu-t-sg-6'],
u'ITU-T SG 7': [u'itu-t-sg-7'],
u'ITU-T SG 9': [u'itu-t-sg-9'],
u'ITUT-T SG 16': [u'itu-t-sg-16'],
u'JCA-IdM': [u'itu-t-jca-idm'],
u'MFA Forum': ['mfa-forum'],
u'MPEG': ['mpeg'],
u'MPLS Forum': ['mpls-forum'],
u'MPLS and FR Alliance': ['mfa'],
u'MPLS and Frame Relay Alliance': ['mfa'],
u'NANP LNPA WG': ['nanc-lnpa-wg'],
u'NGN Management Focus Group': ['itu-t-ngnmfg'],
u'OMA': [u'oma'],
u'OMA COM-CAB SWG': [u'oma-com-cab'],
u'OMA COM-CPM Group': [u'oma-com-cpm'],
u'Open IPTV Forum': ['opif'],
u'SC 29/WG 1': [u'iso-iec-jtc1-sc29-wg1'],
u'SC 29/WG 11': [u'iso-iec-jtc1-sc29-wg11'],
u'SC29 4559': [u'iso-iec-jtc1-sc29-wg11'],
u'SC29 4561': [u'iso-iec-jtc1-sc29-wg11'],
u'SIP, SIPPING, SIMPLE WGs': [u'sip', u'sipping', u'simple'],
u'T1M1': ['t1m1'],
u'T1S1': ['t1s1'],
u'T1X1 cc: ITU-T Q. 14/15 (for info)': ['t1x1','itu-t-sg-15-q14'],
u'TIA': ['tia'],
u'TMOC': ['tmoc'],
u'The IAB': [u'iab'],
u'The IESG': [u'iesg'],
u'The IESG and the IAB': [u'iesg', u'iab'],
u'The IETF': [u'ietf'],
u'W3C Geolocation WG': ['w3c-geolocation-wg'],
u'WIG': ['wig']
}
DEFAULT_POC = {
'3gpp':'georg.mayer.huawei@gmx.com,3GPPLiaison@etsi.org',
'3gpp-tsgct':'georg.mayer.huawei@gmx.com,3GPPLiaison@etsi.org',
'3gpp-tsgct-ct1':'georg.mayer.huawei@gmx.com,3GPPLiaison@etsi.org',
'3gpp-tsgct-ct4':'georg.mayer.huawei@gmx.com,3GPPLiaison@etsi.org',
'3gpp-tsgran':'georg.mayer.huawei@gmx.com,3GPPLiaison@etsi.org',
'3gpp-tsgran-ran2':'georg.mayer.huawei@gmx.com,3GPPLiaison@etsi.org',
'3gpp-tsgsa':'georg.mayer.huawei@gmx.com,3GPPLiaison@etsi.org',
'3gpp-tsgsa-sa2':'georg.mayer.huawei@gmx.com,3GPPLiaison@etsi.org',
'3gpp-tsgsa-sa3':'georg.mayer.huawei@gmx.com,3GPPLiaison@etsi.org',
'3gpp-tsgsa-sa4':'georg.mayer.huawei@gmx.com,3GPPLiaison@etsi.org',
'3gpp-tsgt-wg2':'georg.mayer.huawei@gmx.com,3GPPLiaison@etsi.org',
'ieee-802':'Paul Nikolich <p.nikolich@ieee.org>,Pat Thaler <pthaler@broadcom.com>',
'ieee-802-1':'Paul Nikolich <p.nikolich@ieee.org>,Glen Parsons <glenn.parsons@ericsson.com>,John Messenger <jmessenger@advaoptical.com>',
'ieee-802-11':'Dorothy Stanley <dstanley@agere.com>, Adrian Stephens <adrian.p.stephens@intel.com>',
'cablelabs':'Greg White <g.white@CableLabs.com>',
'iso-iec-jtc1-sc29':'Watanabe Shinji <watanabe@itscj.ipsj.or.jp>',
'iso-iec-jtc1-sc29-wg1':'Watanabe Shinji <watanabe@itscj.ipsj.or.jp>',
'iso-iec-jtc1-sc29-wg11':'Watanabe Shinji <watanabe@itscj.ipsj.or.jp>',
'unicode':'Richard McGowan <rick@unicode.org>',
'isotc46':'sabine.donnardcusse@afnor.org',
'w3c':u'Wendy Seltzer <wseltzer@w3.org>,Philippe Le Hégaret <plh@w3.org>',
# change to m3aawg
'maawg':'Mike Adkins <madkins@fb.com>,technical-chair@mailman.m3aawg.org',
'ecma-tc39':'John Neuman <johnneumann.openstrat@gmail.com>,Istvan Sebestyen <istvan@ecma-interational.org>',
}

View file

@ -1,50 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('liaisons', '0005_migrate_groups'),
]
operations = [
migrations.RemoveField(
model_name='liaisonstatement',
name='action_taken',
),
migrations.RemoveField(
model_name='liaisonstatement',
name='approved',
),
migrations.RemoveField(
model_name='liaisonstatement',
name='from_group',
),
migrations.RemoveField(
model_name='liaisonstatement',
name='modified',
),
migrations.RemoveField(
model_name='liaisonstatement',
name='related_to',
),
migrations.RemoveField(
model_name='liaisonstatement',
name='reply_to',
),
migrations.RemoveField(
model_name='liaisonstatement',
name='submitted',
),
migrations.RemoveField(
model_name='liaisonstatement',
name='to_group',
),
#migrations.RemoveField(
# model_name='liaisonstatement',
# name='from_contact',
#),
]

View file

@ -1,26 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('liaisons', '0006_remove_fields'),
]
operations = [
migrations.AlterField(
model_name='liaisonstatement',
name='from_groups',
field=models.ManyToManyField(related_name='liaisonstatement_from_set', to='group.Group', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='liaisonstatement',
name='to_groups',
field=models.ManyToManyField(related_name='liaisonstatement_to_set', to='group.Group', blank=True),
preserve_default=True,
),
]

View file

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def create_required_tags(apps, schema_editor):
LiaisonStatement = apps.get_model("liaisons", "LiaisonStatement")
for s in LiaisonStatement.objects.filter(deadline__isnull=False):
if not s.tags.filter(slug='taken'):
s.tags.add('required')
class Migration(migrations.Migration):
dependencies = [
('liaisons', '0007_auto_20151009_1220'),
]
operations = [
migrations.RunPython(create_required_tags),
]

View file

@ -1,22 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('liaisons', '0008_auto_20151110_1352'),
]
operations = [
migrations.RemoveField(
model_name='liaisonstatement',
name='from_name',
),
migrations.RemoveField(
model_name='liaisonstatement',
name='to_name',
),
]

View file

@ -1,26 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('liaisons', '0009_remove_fields'),
]
operations = [
migrations.AlterField(
model_name='liaisonstatement',
name='title',
field=models.CharField(max_length=255),
preserve_default=True,
),
migrations.AlterField(
model_name='liaisonstatement',
name='to_contacts',
field=models.CharField(help_text=b'Contacts at recipient group', max_length=255),
preserve_default=True,
),
]

View file

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('liaisons', '0010_auto_20151119_1317'),
]
operations = [
migrations.AlterField(
model_name='liaisonstatement',
name='to_contacts',
field=models.CharField(help_text=b'Contacts at recipient group', max_length=2000),
preserve_default=True,
),
]

View file

@ -1,24 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('liaisons', '0011_auto_20161013_1034'),
]
operations = [
migrations.AlterField(
model_name='liaisonstatement',
name='tags',
field=models.ManyToManyField(to='name.LiaisonStatementTagName', blank=True),
),
migrations.AlterField(
model_name='liaisonstatementgroupcontacts',
name='group',
field=models.ForeignKey(null=True, to='group.Group', unique=True),
),
]

View file

@ -11,6 +11,7 @@ from ietf.name.models import (LiaisonStatementPurposeName, LiaisonStatementState
DocRelationshipName)
from ietf.doc.models import Document
from ietf.group.models import Group
from ietf.utils.models import ForeignKey
# maps (previous state id, new state id) to event type id
STATE_EVENT_MAPPING = {
@ -26,7 +27,7 @@ STATE_EVENT_MAPPING = {
class LiaisonStatement(models.Model):
title = models.CharField(max_length=255)
from_groups = models.ManyToManyField(Group, blank=True, related_name='liaisonstatement_from_set')
from_contact = models.ForeignKey(Email, blank=True, null=True)
from_contact = ForeignKey(Email, blank=True, null=True)
to_groups = models.ManyToManyField(Group, blank=True, related_name='liaisonstatement_to_set')
to_contacts = models.CharField(max_length=2000, help_text="Contacts at recipient group")
@ -35,14 +36,18 @@ class LiaisonStatement(models.Model):
action_holder_contacts = models.CharField(blank=True, max_length=255, help_text="Who makes sure action is completed") # incoming only?
cc_contacts = models.TextField(blank=True)
purpose = models.ForeignKey(LiaisonStatementPurposeName)
purpose = ForeignKey(LiaisonStatementPurposeName)
deadline = models.DateField(null=True, blank=True)
other_identifiers = models.TextField(blank=True, null=True) # Identifiers from other bodies
body = models.TextField(blank=True)
tags = models.ManyToManyField(LiaisonStatementTagName, blank=True)
attachments = models.ManyToManyField(Document, through='LiaisonStatementAttachment', blank=True)
state = models.ForeignKey(LiaisonStatementState, default='pending')
state = ForeignKey(LiaisonStatementState, default='pending')
class Meta:
ordering = ['id']
def __unicode__(self):
return self.title or u"<no title>"
@ -194,8 +199,8 @@ class LiaisonStatement(models.Model):
return list(set([ r.email.address for r in approval_set ]))
class LiaisonStatementAttachment(models.Model):
statement = models.ForeignKey(LiaisonStatement)
document = models.ForeignKey(Document)
statement = ForeignKey(LiaisonStatement)
document = ForeignKey(Document)
removed = models.BooleanField(default=False)
def __unicode__(self):
@ -203,16 +208,16 @@ class LiaisonStatementAttachment(models.Model):
class RelatedLiaisonStatement(models.Model):
source = models.ForeignKey(LiaisonStatement, related_name='source_of_set')
target = models.ForeignKey(LiaisonStatement, related_name='target_of_set')
relationship = models.ForeignKey(DocRelationshipName)
source = ForeignKey(LiaisonStatement, related_name='source_of_set')
target = ForeignKey(LiaisonStatement, related_name='target_of_set')
relationship = ForeignKey(DocRelationshipName)
def __unicode__(self):
return u"%s %s %s" % (self.source.title, self.relationship.name.lower(), self.target.title)
class LiaisonStatementGroupContacts(models.Model):
group = models.ForeignKey(Group, unique=True, null=True)
group = ForeignKey(Group, unique=True, null=True)
contacts = models.CharField(max_length=255,blank=True)
cc_contacts = models.CharField(max_length=255,blank=True)
@ -222,9 +227,9 @@ class LiaisonStatementGroupContacts(models.Model):
class LiaisonStatementEvent(models.Model):
time = models.DateTimeField(auto_now_add=True)
type = models.ForeignKey(LiaisonStatementEventTypeName)
by = models.ForeignKey(Person)
statement = models.ForeignKey(LiaisonStatement)
type = ForeignKey(LiaisonStatementEventTypeName)
by = ForeignKey(Person)
statement = ForeignKey(LiaisonStatement)
desc = models.TextField()
def __unicode__(self):

View file

@ -1,11 +1,53 @@
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-20 10:52
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import ietf.utils.models
from django.db import migrations
class Migration(migrations.Migration):
initial = True
dependencies = [
('person', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='List',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=32)),
('description', models.CharField(max_length=256)),
('advertised', models.BooleanField(default=True)),
],
),
migrations.CreateModel(
name='Subscribed',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time', models.DateTimeField(auto_now_add=True)),
('email', models.CharField(max_length=64, validators=[django.core.validators.EmailValidator()])),
('lists', models.ManyToManyField(to='mailinglists.List')),
],
options={
'verbose_name_plural': 'Subscribed',
},
),
migrations.CreateModel(
name='Whitelisted',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time', models.DateTimeField(auto_now_add=True)),
('email', models.CharField(max_length=64, validators=[django.core.validators.EmailValidator()], verbose_name=b'Email address')),
('by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')),
],
options={
'verbose_name_plural': 'Whitelisted',
},
),
]

View file

@ -1,52 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.core.validators
class Migration(migrations.Migration):
dependencies = [
('person', '0013_add_plain_name_aliases'),
('mailinglists', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='List',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=32)),
('description', models.CharField(max_length=256)),
('advertised', models.BooleanField(default=True)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Subscribed',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('time', models.DateTimeField(auto_now_add=True)),
('email', models.CharField(max_length=64, validators=[django.core.validators.EmailValidator()])),
('lists', models.ManyToManyField(to='mailinglists.List')),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Whitelisted',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('time', models.DateTimeField(auto_now_add=True)),
('email', models.CharField(max_length=64, verbose_name=b'Email address', validators=[django.core.validators.EmailValidator()])),
('by', models.ForeignKey(to='person.Person')),
],
options={
},
bases=(models.Model,),
),
]

Some files were not shown because too many files have changed in this diff Show more