[Commits] act-server branch master updated.

C. Scott Ananian cscott at laptop.org
Tue Dec 2 16:24:08 EST 2008


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "/home/cscott/public_git/act-server".

The branch, master has been updated
       via  958fb3d90add56a42b0cd77d0692f891f1918503 (commit)
       via  5e2eb3771b7b52db0b60ae6b23575fc13f2ba70c (commit)
       via  bcdfdc45db0b7192aba675763181e4058fd5416f (commit)
      from  357134940c1d9eca6d45f3774f2cd1478e2cdeef (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

 oats/devkey/views.py        |    9 ++++++++-
 scripts/last-import-mfg.txt |   36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 958fb3d90add56a42b0cd77d0692f891f1918503
Author: C. Scott Ananian <cscott at laptop.org>
Date:   Tue Dec 2 16:23:02 2008 -0500

    Delay dev keys to Uruguay machines.
    
    This is to allow Uruguay to vet the request through their antitheft system
    before the dev key is granted.  Really we should be using a database table
    and a laptop group for this, but hack in a test based on the LOC tag in the
    mfg-data for now.

diff --git a/oats/devkey/views.py b/oats/devkey/views.py
index 0e09e3e..b32c793 100644
--- a/oats/devkey/views.py
+++ b/oats/devkey/views.py
@@ -6,7 +6,7 @@ from django.template import RequestContext, loader
 from django.db import transaction
 from django import forms
 from django.utils.translation import ugettext as _
-from oats.gts.models import Laptop
+from oats.gts.models import Laptop, MfgData
 from oats.request.models import Request, RequestedLease
 from oats.gts.utils import serial_number_regex, uuid_regex
 from models import DevKeyRequest
@@ -16,6 +16,7 @@ from datetime import datetime, timedelta
 from random import SystemRandom
 
 DEVKEY_DELAY = timedelta(days=1)
+DEVKEY_URY_DELAY = timedelta(days=14)
 
 def render_to_response(request, template, **vardict):
     """Tweaked version of render_to_reponse that creates a RequestContext."""
@@ -103,6 +104,12 @@ def post(request):
                      (request=r, laptop=l, disposition='DA', days=None,
                       cur_date=None, lease=None, warnings=None)
                 release_date = datetime.now() + DEVKEY_DELAY
+                # use a delay which varies based on the LOC tag in the mfgdata
+                # ideally we should use a database table keyed to laptop groups
+                # but this will do for now.
+                for md in MfgData.objects.filter(laptop=l, tag='LOC'):
+                    if md.data == 'URY':
+                        release_date = datetime.now() + DEVKEY_URY_DELAY
                 # 8-character slug = 62^8 ~ 48 bits, which should be sufficient
                 # to prevent guessing.  After about 16 million dev keys are
                 # requested (~2^24) we should have a dev key request fail

commit 5e2eb3771b7b52db0b60ae6b23575fc13f2ba70c
Author: C. Scott Ananian <cscott at laptop.org>
Date:   Tue Dec 2 15:51:00 2008 -0500

    Import gts-dump13.json.

diff --git a/scripts/last-import-mfg.txt b/scripts/last-import-mfg.txt
index b229c53..7245ff6 100644
--- a/scripts/last-import-mfg.txt
+++ b/scripts/last-import-mfg.txt
@@ -277,3 +277,15 @@ Mismatched UUID for SHC84301C8F:
 71314/71314
 Last laptop imported was manufactured on 20081117T092627Z
 $
+---
+$ ./json-import-mfg.py -l 20081116 gts-dump13.json
+Longest mfgdata tag: 5
+Longest mfgdata data: 36
+Most recent mfgdate: 20081202T154855Z
+Laptops added: 6413
+$ ./django-import-json.py gts-dump13.json 
+Mismatched UUID for SHC8480087E:
+   6D0CCD4C-8D53-4B03-9154-1751A32D1B01
+   757A99A8-B5DF-4D07-A571-0973E0184F2A
+6413/6413
+Last laptop imported was manufactured on 20081202T154855Z

commit bcdfdc45db0b7192aba675763181e4058fd5416f
Author: C. Scott Ananian <cscott at laptop.org>
Date:   Tue Dec 2 14:40:15 2008 -0500

    Import of gts-dump12.json.

diff --git a/scripts/last-import-mfg.txt b/scripts/last-import-mfg.txt
index 03a38ae..b229c53 100644
--- a/scripts/last-import-mfg.txt
+++ b/scripts/last-import-mfg.txt
@@ -253,3 +253,27 @@ Last laptop imported was manufactured on 20080928T101249Z
 $
 ---
 
+$ ./json-import-mfg.py -l 20080927 gts-dump12.json
+Longest mfgdata tag: 5
+Longest mfgdata data: 36
+Most recent mfgdate: 20081117T092627Z
+Laptops added: 71314
+$ ./django-import-json.py gts-dump12.json
+Mismatched UUID for SHC84402FA1:
+   CB816407-60B3-4B3F-9238-E7A52075EDCE
+   7A4F3418-1B05-4870-9B3D-9AF33F2C1462
+Mismatched UUID for SHC84101ACF:
+   8745FAE0-1838-499E-ADE2-102F8E17216E
+   1F10BF82-CDE1-4824-A3DD-D799EC92FD5E
+Mismatched UUID for SHC84101741:
+   CC6446BC-E61C-485A-93C7-803B3EEF26E2
+   55436F05-5050-46A3-82EE-85AABBE662FD
+Mismatched UUID for SHC844009D4:
+   453B9FB7-01A2-4C14-AE34-08F6A8D5B5A4
+   3988846E-401A-4751-839B-BAB5EAD21819
+Mismatched UUID for SHC84301C8F:
+   EDC1CED4-343F-4A0E-A150-4E9E662DCF80
+   B010D068-BED4-4B51-BDAD-CB56D10C1743
+71314/71314
+Last laptop imported was manufactured on 20081117T092627Z
+$
-----------------------------------------------------------------------


--
/home/cscott/public_git/act-server


More information about the Commits mailing list