# HG changeset patch # User Jeff Hammel # Date 1341942489 25200 # Node ID 2d883dd59a1a03990e5781669db9e9307f1b0ed8 # Parent 1bc78676fb3a7040b5a3b8b70eb9fc3de4167702 stub tbpl_mapping diff -r 1bc78676fb3a -r 2d883dd59a1a talosnames/api.py --- 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():