changeset 5:2d883dd59a1a

stub tbpl_mapping
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 10 Jul 2012 10:48:09 -0700
parents 1bc78676fb3a
children 82aad57c7d1d
files talosnames/api.py
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/talosnames/api.py	Tue Jul 10 10:35:28 2012 -0700
+++ b/talosnames/api.py	Tue Jul 10 10:48:09 2012 -0700
@@ -5,6 +5,10 @@
     graphserver_sql = 'http://hg.mozilla.org/graphs/raw-file/tip/sql/data.sql'
     schema = 'http://hg.mozilla.org/graphs/raw-file/tip/sql/schema.sql'
 
+    # mapping file from builbot-configs name to tbpl codes:
+    # http://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/file/tip/js/Config.js
+    tbpl_mapping = 'http://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/raw-file/tip/js/Data.js'
+
     tables = {'os_list': '(id, name text)',
               'branches': '(id, name text)',
               'machines': '(id, os_id int, is_throttling int, cpu_speed text, name text, is_active int, date_added int)',
@@ -13,6 +17,10 @@
               }
 
     def __init__(self):
+        self.setup_database()
+        self.tbpl_mapping()
+
+    def setup_database():
         self.db = sqlite3.connect(':memory:')
         sql_lines = urllib2.urlopen(self.graphserver_sql).readlines()
 
@@ -39,6 +47,9 @@
                 self.chrome.add(short_name)
         cursor.close()
 
+    def tbpl_mapping(self):
+        pass
+
     def __call__(self, name=None):
         retval = []
         for short_name, graphserver_name in self.names.items():