Пример #1
0
from redesign.interim.models import *
from ietf.name.models import *
from ietf.name.utils import name

dont_save_queries()

# assumptions:
#  - persons have been imported
#  - groups have been imported
#  - regular meetings have been imported

database = "ietf_ams"

system_person = Person.objects.get(name="(System)")

agenda_doctype = name(DocTypeName, "agenda", "Agenda")
minutes_doctype = name(DocTypeName, "minutes", "Minutes")
slides_doctype = name(DocTypeName, "slides", "Slides")

group_meetings_in_year = {}

for o in InterimMeetings.objects.using(database).order_by("start_date"):
    print "importing InterimMeeting", o.pk

    group = Group.objects.get(pk=o.group_acronym_id)
    meeting_key = "%s-%s" % (group.acronym, o.start_date.year)
    if not group.acronym in group_meetings_in_year:
        group_meetings_in_year[meeting_key] = 0

    group_meetings_in_year[meeting_key] += 1
Пример #2
0
import_meetings_from = None
if len(sys.argv) > 1:
    import_meetings_from = datetime.datetime.strptime(sys.argv[1], "%Y-%m-%d")

dont_save_queries()

# imports Meeting, MeetingVenue, MeetingRoom, NonSession,
# WgMeetingSession, WgAgenda, Minute, Slide, upload events from
# WgProceedingsActivities, NotMeetingGroup

# assumptions:
#  - persons have been imported
#  - groups have been imported

ietf_meeting = name(MeetingTypeName, "ietf", "IETF")
interim_meeting = name(MeetingTypeName, "interim", "Interim")

session_status_mapping = {
    1: name(SessionStatusName, "schedw", "Waiting for Scheduling"),
    2: name(SessionStatusName, "apprw", "Waiting for Approval"),
    3: name(SessionStatusName, "appr", "Approved"),
    4: name(SessionStatusName, "sched", "Scheduled"),
    5: name(SessionStatusName, "canceled", "Canceled"),
    6: name(SessionStatusName, "disappr", "Disapproved"),
}

status_not_meeting = name(SessionStatusName, "notmeet", "Not meeting")
status_deleted = name(SessionStatusName, "deleted", "Deleted")

session_status_mapping[0] = session_status_mapping[
Пример #3
0
from ietf.doc.models import Document
from ietf.name.utils import name
from redesign.importing.utils import old_person_to_person, make_revision_event
from ietf.idtracker.models import AreaGroup, IETFWG, Area, AreaGroup, Acronym, AreaWGURL, IRTF, ChairsHistory, Role, AreaDirector
from ietf.liaisons.models import SDOs
from ietf.iesg.models import TelechatDates, Telechat, TelechatDate
from ietf.wgcharter.utils import set_or_create_charter
import workflows.utils

# imports IETFWG, Area, AreaGroup, Acronym, IRTF, AreaWGURL, SDOs, TelechatDates, dates from Telechat

# also creates nomcom groups

# assumptions: persons and states have been imported

doc_type_charter = name(DocTypeName, "charter", "Charter")

state_names = dict(
    bof=name(GroupStateName, slug="bof", name="BOF"),
    proposed=name(GroupStateName, slug="proposed", name="Proposed"),
    active=name(GroupStateName, slug="active", name="Active"),
    dormant=name(GroupStateName, slug="dormant", name="Dormant"),
    conclude=name(GroupStateName, slug="conclude", name="Concluded"),
    unknown=name(GroupStateName, slug="unknown", name="Unknown"),
    )

type_names = dict(
    ietf=name(GroupTypeName, slug="ietf", name="IETF"),
    area=name(GroupTypeName, slug="area", name="Area"),
    ag=name(GroupTypeName, slug="ag", name="AG", desc="Area group"),
    wg=name(GroupTypeName, slug="wg", name="WG", desc="Working group"),
Пример #4
0
from ietf.person.models import *
from redesign.importing.utils import old_person_to_person, make_revision_event
from ietf.name.models import *
from ietf.name.utils import name


# imports LiaisonDetail, OutgoingLiaisonApproval, Uploads

# todo: LiaisonStatementManager, LiaisonManagers, SDOAuthorizedIndividual

# assumptions:
#  - persons have been imported
#  - groups have been imported

purpose_mapping = {
    1: name(LiaisonStatementPurposeName, "action", "For action", order=1),
    2: name(LiaisonStatementPurposeName, "comment", "For comment", order=2),
    3: name(LiaisonStatementPurposeName, "info", "For information", order=3),
    4: name(LiaisonStatementPurposeName, "response", "In response", order=4),
    # we drop the "other" category here, it was virtuall unused in the old schema
    }

liaison_attachment_doctype = name(DocTypeName, "liai-att", "Liaison Attachment")

purpose_mapping[None] = purpose_mapping[0] = purpose_mapping[3] # map unknown to "For information"
purpose_mapping[5] = purpose_mapping[3] # "Other" is mapped to "For information" as default

system_email = Email.objects.get(person__name="(System)")
system_person = Person.objects.get(name="(System)")
obviously_bogus_date = datetime.date(1970, 1, 1)
Пример #5
0
import_meetings_from = None
if len(sys.argv) > 1:
    import_meetings_from = datetime.datetime.strptime(sys.argv[1], "%Y-%m-%d")


dont_save_queries()

# imports Meeting, MeetingVenue, MeetingRoom, NonSession,
# WgMeetingSession, WgAgenda, Minute, Slide, upload events from
# WgProceedingsActivities, NotMeetingGroup

# assumptions:
#  - persons have been imported
#  - groups have been imported

ietf_meeting = name(MeetingTypeName, "ietf", "IETF")
interim_meeting = name(MeetingTypeName, "interim", "Interim")

session_status_mapping = {
    1: name(SessionStatusName, "schedw", "Waiting for Scheduling"),
    2: name(SessionStatusName, "apprw", "Waiting for Approval"),
    3: name(SessionStatusName, "appr", "Approved"),
    4: name(SessionStatusName, "sched", "Scheduled"),
    5: name(SessionStatusName, "canceled", "Canceled"),
    6: name(SessionStatusName, "disappr", "Disapproved"),
    }

status_not_meeting = name(SessionStatusName, "notmeet", "Not meeting")
status_deleted = name(SessionStatusName, "deleted", "Deleted")

session_status_mapping[0] = session_status_mapping[1] # assume broken statuses of 0 are actually cancelled
Пример #6
0
from ietf.doc.models import Document
from ietf.name.utils import name
from redesign.importing.utils import old_person_to_person, make_revision_event
from ietf.idtracker.models import AreaGroup, IETFWG, Area, AreaGroup, Acronym, AreaWGURL, IRTF, ChairsHistory, Role, AreaDirector
from ietf.liaisons.models import SDOs
from ietf.iesg.models import TelechatDates, Telechat, TelechatDate
from ietf.wgcharter.utils import set_or_create_charter
import workflows.utils

# imports IETFWG, Area, AreaGroup, Acronym, IRTF, AreaWGURL, SDOs, TelechatDates, dates from Telechat

# also creates nomcom groups

# assumptions: persons and states have been imported

doc_type_charter = name(DocTypeName, "charter", "Charter")

state_names = dict(
    bof=name(GroupStateName, slug="bof", name="BOF"),
    proposed=name(GroupStateName, slug="proposed", name="Proposed"),
    active=name(GroupStateName, slug="active", name="Active"),
    dormant=name(GroupStateName, slug="dormant", name="Dormant"),
    conclude=name(GroupStateName, slug="conclude", name="Concluded"),
    unknown=name(GroupStateName, slug="unknown", name="Unknown"),
)

type_names = dict(
    ietf=name(GroupTypeName, slug="ietf", name="IETF"),
    area=name(GroupTypeName, slug="area", name="Area"),
    ag=name(GroupTypeName, slug="ag", name="AG", desc="Area group"),
    wg=name(GroupTypeName, slug="wg", name="WG", desc="Working group"),
Пример #7
0
from redesign.interim.models import *
from ietf.name.models import *
from ietf.name.utils import name

dont_save_queries()

# assumptions:
#  - persons have been imported
#  - groups have been imported
#  - regular meetings have been imported

database = "ietf_ams"

system_person = Person.objects.get(name="(System)")

agenda_doctype = name(DocTypeName, "agenda", "Agenda")
minutes_doctype = name(DocTypeName, "minutes", "Minutes")
slides_doctype = name(DocTypeName, "slides", "Slides")

group_meetings_in_year = {}

for o in InterimMeetings.objects.using(database).order_by("start_date"):
    print "importing InterimMeeting", o.pk

    group = Group.objects.get(pk=o.group_acronym_id)
    meeting_key = "%s-%s" % (group.acronym, o.start_date.year)
    if not group.acronym in group_meetings_in_year:
        group_meetings_in_year[meeting_key] = 0

    group_meetings_in_year[meeting_key] += 1
Пример #8
0
from ietf.idtracker.models import IESGLogin, AreaDirector, PersonOrOrgInfo, WGChair, WGEditor, WGSecretary, WGTechAdvisor, ChairsHistory, Role as OldRole, Acronym, IRTFChair
from ietf.liaisons.models import LiaisonManagers, SDOAuthorizedIndividual
from ietf.wgchairs.models import WGDelegate
from ietf.proceedings.models import IESGHistory
from ietf.utils.history import *

# assumptions:
#  - persons have been imported
#  - groups have been imported

# imports roles from IESGLogin, AreaDirector, WGEditor, WGChair,
# IRTFChair, WGSecretary, WGTechAdvisor, NomCom chairs from
# ChairsHistory, IESGHistory, Role, LiaisonManagers,
# SDOAuthorizedIndividual, WGDelegate

area_director_role = name(RoleName, "ad", "Area Director")
pre_area_director_role = name(RoleName, "pre-ad", "Incoming Area Director")
chair_role = name(RoleName, "chair", "Chair")
editor_role = name(RoleName, "editor", "Editor")
secretary_role = name(RoleName, "secr", "Secretary")
techadvisor_role = name(RoleName, "techadv", "Tech Advisor")
exec_director_role = name(RoleName, "execdir", "Executive Director")
adm_director_role = name(RoleName, "admdir", "Administrative Director")
liaison_manager_role = name(RoleName, "liaiman", "Liaison Manager")
authorized_role = name(RoleName, "auth", "Authorized Individual")
delegate_role = name(RoleName, "delegate", "Delegate")

# import IANA authorized individuals
for o in User.objects.using("legacy").filter(groups__name="IANA"):
    print "Importing IANA group member", o