|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +from __future__ import unicode_literals |
| 3 | + |
| 4 | +import datetime |
| 5 | +from django.db import migrations |
| 6 | + |
| 7 | + |
| 8 | +def backfill_91_other_meetings(apps, schema_editor): |
| 9 | + |
| 10 | + Meeting = apps.get_model('meeting', 'Meeting') |
| 11 | + Schedule = apps.get_model('meeting', 'Schedule') |
| 12 | + ScheduledSession = apps.get_model('meeting', 'ScheduledSession') |
| 13 | + Room = apps.get_model('meeting', 'Room') |
| 14 | + Group = apps.get_model('group', 'Group') |
| 15 | + Person = apps.get_model('person', 'Person') |
| 16 | + |
| 17 | + ietf91 = Meeting.objects.filter(number=91).first() |
| 18 | + |
| 19 | + if not ietf91: |
| 20 | + print "IETF91 not found, no data changed" |
| 21 | + else: |
| 22 | + agenda91 = Schedule.objects.get(meeting=ietf91,pk=ietf91.agenda.pk) |
| 23 | + |
| 24 | + south_pacific_1 = Room.objects.get(meeting=ietf91,name="South Pacific 1") |
| 25 | + south_pacific_2 = Room.objects.get(meeting=ietf91,name="South Pacific 2") |
| 26 | + rainbow_12 = Room.objects.get(meeting=ietf91,name="Rainbow Suite 1/2") |
| 27 | + lehua_suite = Room.objects.get(meeting=ietf91,name="Lehua Suite") |
| 28 | + kahili = Room.objects.get(meeting=ietf91,name="Kahili") |
| 29 | + coral_2 = Room.objects.get(meeting=ietf91,name="Coral 2") |
| 30 | + |
| 31 | + south_pacific_3 = Room.objects.create(meeting=ietf91,name="South Pacific 3",capacity=20) |
| 32 | + rainbow_suite_3 = Room.objects.create(meeting=ietf91,name="Rainbow Suite 3",capacity=20) |
| 33 | + rainbow_23 = Room.objects.create(meeting=ietf91,name="Rainbow Suite 2/3",capacity=210) |
| 34 | + south_pacific_34 = Room.objects.create(meeting=ietf91,name="South Pacific 3/4",capacity=210) |
| 35 | + iolani_67 = Room.objects.create(meeting=ietf91,name="Iolani 6/7",capacity=40) |
| 36 | + sea_pearl_12 = Room.objects.create(meeting=ietf91,name="Sea Pearl 1/2",capacity=40) |
| 37 | + sea_pearl_2 = Room.objects.create(meeting=ietf91,name="Sea Pearl 2",capacity=20) |
| 38 | + coral_lounge = Room.objects.create(meeting=ietf91,name="Coral Lounge", capacity=1200) |
| 39 | + hibiscus = Room.objects.create(meeting=ietf91,name="Hibiscus", capacity=20) |
| 40 | + tiare = Room.objects.create(meeting=ietf91,name="Tiare Suite", capacity=20) |
| 41 | + |
| 42 | + iesg = Group.objects.get(acronym='iesg') |
| 43 | + iab = Group.objects.get(acronym='iab') |
| 44 | + rsoc = Group.objects.get(acronym='rsoc') |
| 45 | + iaoc = Group.objects.get(acronym='iaoc') |
| 46 | + nomcom = Group.objects.get(acronym='nomcom2014') |
| 47 | + isoc = Group.objects.get(acronym='isoc') |
| 48 | + secr = Group.objects.get(acronym='secretariat') |
| 49 | + isocbot = Group.objects.create(acronym='isocbot',name="Internet Society Board of Trustees",state_id='active',type_id='isoc',parent=isoc) |
| 50 | + isocfell = Group.objects.create(acronym='isocfell',name="Internet Society Fellows",state_id='active',type_id='isoc',parent=isoc) |
| 51 | + |
| 52 | + system = Person.objects.get(name='(System)') |
| 53 | + |
| 54 | + for d, h, m, duration, type_id, groups, room, slotname, label in [ |
| 55 | + ( 9, 8, 0, 120, 'offagenda', [secr], rainbow_suite_3, 'WEIRDS Interop', 'WEIRDS Interop'), |
| 56 | + ( 9, 8, 30, 90, 'lead', [iesg], south_pacific_2, 'Breakfast', None), |
| 57 | + ( 9, 9, 0, 240, 'offagenda', [secr], lehua_suite, 'RMCAT Interim', 'RMCAT Interim Meeting'), |
| 58 | + ( 9, 9, 0, 60, 'lead', [nomcom], iolani_67, 'Breakfast', 'Nomcom Breakfast'), |
| 59 | + ( 9, 9, 0, 150, 'lead', [iesg], south_pacific_2, 'Meeting', None), |
| 60 | + ( 9, 9, 0, 360, 'offagenda', [secr], hibiscus, 'Meeting', 'RootOPS'), |
| 61 | + ( 9, 9, 30, 360, 'offagenda', [secr], kahili, 'TLS Interim', 'TLS WG Interim'), |
| 62 | + ( 9, 11, 0, 480, 'offagenda', [secr], coral_lounge, 'T-Shirt Distribution', 'T-shirt Distribution'), |
| 63 | + ( 9, 11, 30, 150, 'lead', [iesg,iab], south_pacific_2, 'Lunch', 'IAB/IESG Lunch'), |
| 64 | + ( 9, 12, 0, 360, 'offagenda', [secr], south_pacific_1, 'Terminal Room', 'Terminal Room Open to Attendees'), |
| 65 | + ( 9, 14, 0, 180, 'lead', [iab], south_pacific_2, 'Meeting', None), |
| 66 | + ( 9, 16, 0, 120, 'offagenda', [secr], coral_2, 'Meeting', 'Web Object Encryption'), |
| 67 | + ( 9, 17, 0, 120, 'offagenda', [secr], sea_pearl_12, 'Reception', "Companion's Reception"), # Should this appear on agenda? |
| 68 | + ( 9, 19, 0, 180, 'offagenda', [isocfell], rainbow_23, 'Dinner', 'ISOC Fellows Reception/Dinner'), |
| 69 | + ( 9, 19, 0, 180, 'offagenda', [secr], lehua_suite, 'Meeting', 'Huawei'), |
| 70 | + ( 9, 21, 0, 180, 'lead', [secr], sea_pearl_12, 'Gathering', 'AMS/IESG/IABIAOC Gathering'), |
| 71 | + ( 10, 0, 0, 1440, 'offagenda', [secr], south_pacific_1, 'Terminal Room', 'Terminal Room Open to Attendees'), |
| 72 | + ( 10, 7, 0, 120, 'lead', [iesg,iab], south_pacific_2, 'Breakfast', 'IESG/IAB Breakfast'), |
| 73 | + ( 10, 7, 0, 120, 'lead', [nomcom], iolani_67, 'Breakfast', 'Nomcom Breakfast'), |
| 74 | + ( 10, 8, 0, 600, 'offagenda', [secr], coral_lounge, 'T-shirt Distribution', 'T-shirt Distribution'), |
| 75 | + ( 10, 11, 30, 90, 'offagenda', [secr], south_pacific_2, 'Meeting', 'OPS Directorate Meeting'), |
| 76 | + ( 10, 11, 30, 90, 'offagenda', [secr], rainbow_suite_3, 'Meeting', 'IETF/3GPP Meeting'), |
| 77 | + ( 10, 11, 30, 90, 'offagenda', [secr], lehua_suite, 'Meeting', 'RTG Area Meeting'), |
| 78 | + ( 10, 19, 0, 240, 'offagenda', [secr], south_pacific_2, 'Meeting', 'Huawei'), |
| 79 | + ( 11, 0, 0, 1440, 'offagenda', [secr], south_pacific_1, 'Terminal Room', 'Terminal Room Open to Attendees'), |
| 80 | + ( 11, 7, 0, 120, 'lead', [iesg], south_pacific_2, 'Breakfast', None), |
| 81 | + ( 11, 7, 0, 120, 'lead', [nomcom], iolani_67, 'Breakfast', 'Nomcom Breakfast'), |
| 82 | + ( 11, 7, 0, 120, 'lead', [iab], rainbow_suite_3, 'Breakfast', None), |
| 83 | + ( 11, 7, 0, 60, 'lead', [iab], tiare, 'Meeting', 'Vendor Selection Committee Meeting'), |
| 84 | + ( 11, 8, 0, 600, 'offagenda', [secr], coral_lounge, 'T-shirt Distribution', 'T-shirt Distribution'), |
| 85 | + ( 11, 9, 0, 90, 'offagenda', [secr], south_pacific_2, 'Meeting', 'DHCPv6bis Team Meeting'), |
| 86 | + ( 11, 11, 30, 90, 'offagenda', [secr], south_pacific_2, 'Meeting', 'SECdir Meeting'), |
| 87 | + ( 11, 11, 30, 90, 'offagenda', [secr], rainbow_suite_3, 'Lunch', 'RSAG/ISEB Lunch'), |
| 88 | + ( 11, 16, 0, 240, 'offagenda', [secr], south_pacific_2, 'Meeting', 'Verisign Corporate Meeting'), |
| 89 | + ( 12, 0, 0, 1440, 'offagenda', [secr], south_pacific_1, 'Terminal Room', 'Terminal Room Open to Attendees'), |
| 90 | + ( 12, 7, 30, 90, 'lead', [iaoc], south_pacific_3, 'Breakfast', None), |
| 91 | + ( 12, 7, 0, 120, 'lead', [nomcom], iolani_67, 'Breakfast', 'Nomcom Breakfast'), |
| 92 | + ( 12, 8, 0, 540, 'offagenda', [secr], coral_lounge, 'T-shirt Distribution', 'T-shirt Distribution'), |
| 93 | + ( 12, 8, 0, 240, 'offagenda', [secr], south_pacific_2, 'Meeting', 'DIME WG'), |
| 94 | + ( 12, 11, 30, 90, 'offagenda', [secr], rainbow_suite_3, 'Lunch', 'RFC Editor Lunch'), |
| 95 | + ( 12, 15, 0, 120, 'offagenda', [secr], south_pacific_2, 'Meeting', 'YANG Advice'), |
| 96 | + ( 12, 17, 0, 240, 'offagenda', [secr], rainbow_suite_3, 'Meeting', 'Huawei (POC Wil Liu)'), |
| 97 | + ( 12, 20, 0, 150, 'offagenda', [secr], south_pacific_2, 'Meeting', 'ICANN SSAC'), |
| 98 | + ( 13, 0, 0, 1440, 'offagenda', [secr], south_pacific_1, 'Terminal Room', 'Terminal Room Open to Attendees'), |
| 99 | + ( 13, 7, 0, 120, 'lead', [iab], rainbow_suite_3, 'Breakfast', None), |
| 100 | + ( 13, 7, 0, 120, 'lead', [nomcom], iolani_67, 'Breakfast', 'Nomcom Breakfast'), |
| 101 | + ( 13, 11, 30, 90, 'lead', [iab], sea_pearl_2, 'Meeting', 'IAB Liaison Oversight'), |
| 102 | + ( 13, 11, 30, 90, 'lead', [rsoc], rainbow_suite_3, 'Lunch', None), |
| 103 | + ( 14, 0, 0, 900, 'offagenda', [secr], south_pacific_1, 'Terminal Room', 'Terminal Room Open to Attendees'), |
| 104 | + ( 14, 7, 0, 120, 'lead', [nomcom], iolani_67, 'Breakfast', 'Nomcom Breakfast'), |
| 105 | + ( 14, 11, 0, 360, 'offagenda', [isoc], south_pacific_34,'Meeeting', 'ISOC AC Meeting'), |
| 106 | + ( 14, 13, 30, 90, 'lead', [iesg,iab], south_pacific_2, 'Lunch', 'IESG/IAB Lunch'), |
| 107 | + ( 14, 18, 0, 60, 'offagenda', [isocbot], rainbow_23, 'Reception', 'ISOC Board Reception for IETF Leadership'), |
| 108 | + ( 14, 19, 0, 180, 'offagenda', [isocbot], rainbow_23, 'Dinner', 'ISOC Board Dinner for IETF Leadership'), |
| 109 | + ( 15, 8, 0, 60, 'offagenda', [isocbot], rainbow_12, 'Breakfast', 'ISOC Board of Trustees Breakfast'), |
| 110 | + ( 15, 8, 0, 540, 'offagenda', [isocbot], south_pacific_34,'Meeting', 'ISOC Board of Trustees Meeting'), |
| 111 | + ( 15, 12, 0, 60, 'offagenda', [isocbot], rainbow_12, 'Lunch', 'ISOC Board of Trustees Lunch'), |
| 112 | + ( 16, 8, 0, 60, 'offagenda', [isocbot], rainbow_12, 'Breakfast', 'ISOC Board of Trustees Breakfast'), |
| 113 | + ( 16, 8, 0, 540, 'offagenda', [isocbot], south_pacific_34,'Meeting', 'ISOC Board of Trustees Meeting'), |
| 114 | + ( 16, 12, 0, 60, 'offagenda', [isocbot], rainbow_12, 'Lunch', 'ISOC Board of Trustees Lunch'), |
| 115 | + ]: |
| 116 | + ts = ietf91.timeslot_set.create(type_id=type_id, name=slotname, |
| 117 | + time=datetime.datetime(2014,11,d,h,m,0), |
| 118 | + duration=datetime.timedelta(minutes=duration), |
| 119 | + location=room,show_location=(type_id not in ['lead','offagenda'])) |
| 120 | + for group in groups: |
| 121 | + session = ietf91.session_set.create(name= label or "%s %s"%(group.acronym.upper(),slotname), |
| 122 | + group=group, attendees=25, |
| 123 | + requested=datetime.datetime(2014,11,1,0,0,0), |
| 124 | + requested_by=system, status_id='sched') |
| 125 | + ScheduledSession.objects.create(schedule=agenda91, timeslot=ts, session=session) |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | +class Migration(migrations.Migration): |
| 131 | + |
| 132 | + dependencies = [ |
| 133 | + ('meeting', '0004_auto_20150308_0446'), |
| 134 | + ('name', '0004_auto_20150318_1140'), |
| 135 | + ('group', '0003_auto_20150304_0743'), |
| 136 | + ('person', '0004_auto_20150308_0440'), |
| 137 | + ] |
| 138 | + |
| 139 | + operations = [ |
| 140 | + migrations.RunPython(backfill_91_other_meetings) |
| 141 | + ] |
0 commit comments