=== removed file 'lava-schedulerd' --- lava-schedulerd 2011-05-17 19:59:20 +0000 +++ lava-schedulerd 1970-01-01 00:00:00 +0000 @@ -1,41 +0,0 @@ -#!/usr/bin/env python -import os -import sys -import lava.scheduler.daemon as schedulerd - -from optparse import OptionParser - -if __name__ == "__main__": - - usage = "usage: %prog [options] start|stop|restart \ - \n\nRequires config file from this default path: \ - \n/etc/lava/lava-daemon.conf" - - parser = OptionParser(usage=usage) - parser.add_option("-c", "--config", dest="config_path", - help="path to config file, overrides default path", - metavar="FILE", - default="/etc/lava/lava-daemon.conf") - - (options, args) = parser.parse_args() - - if os.path.exists(options.config_path): - schedulerd.init(options.config_path) - else: - parser.error("Config file missing at path %s" % options.config_path) - - if len(args) == 1: - if 'start' == args[0]: - schedulerd.start() - elif 'stop' == args[0]: - schedulerd.stop() - elif 'restart' == args[0]: - schedulerd.restart() - else: - parser.error("Unknown command") - sys.exit(2) - sys.exit(0) - else: - parser.print_help() - sys.exit(2) - === removed directory 'lava/scheduler' === removed file 'lava/scheduler/__init__.py' === removed directory 'lava/scheduler/daemon' === removed file 'lava/scheduler/daemon/__init__.py' --- lava/scheduler/daemon/__init__.py 2011-05-17 19:59:20 +0000 +++ lava/scheduler/daemon/__init__.py 1970-01-01 00:00:00 +0000 @@ -1,149 +0,0 @@ -#!/usr/bin/env python - -import ConfigParser -import logging -import daemon -import signal -import time -import sys -import os - -#Find and import PIDLockFile -try: - from lockfile.pidlockfile import PIDLockFile -except ImportError: - from daemon.pidlockfile import PIDLockFile - -logger = None -pidfile = None -debug_mode = 0 -fh = None - -def init(config_path): - global logger - global pidfile - global debug_mode - global fh - - #Create config parser - config = ConfigParser.ConfigParser() - config.read(config_path) - - #Get config params - pidfile = config.get('files', 'pidfile') - logfile = config.get('files', 'logfile') - debug_mode = config.get('debug', 'debug_mode') - log_level = config.get('debug', 'log_level') - - #Create daemon logger - logger = logging.getLogger('lava.scheduler.daemon') - - #Set logging level - if log_level is '1': - logger.setLevel(logging.DEBUG) - else: - logger.setLevel(logging.INFO) - - #Create formatter - formatter = logging.Formatter( - '%(asctime)s - %(name)s - %(levelname)s - %(message)s') - - #Create file handler and add it to logger - fh = logging.FileHandler(logfile) - fh.setFormatter(formatter) - logger.addHandler(fh) - - if debug_mode is '1': - #Create and add console handler if debug mode - ch = logging.StreamHandler() - ch.setFormatter(formatter) - logger.addHandler(ch) - -def cleanup(signum, stack): - """ - Cleanup and exit function - """ - logger.info('Exiting LAVA Scheduler daemon') - raise SystemExit() - -def start(): - """ - Start the daemon - """ - logger.info('Starting LAVA Scheduler daemon') - - #Check for pid to see if the daemon already runs - pid = None - if os.path.exists(pidfile): - with open(pidfile) as fd: - pid = int(fd.read().strip()) - - if pid is not None: - message = "pidfile %s exists, daemon already running?\n" - logger.info(message % pidfile) - sys.exit(1) - - #Create signal map - signal_map = { - signal.SIGTERM: cleanup, - signal.SIGHUP: 'terminate', - } - - #Configure execution mode - if debug_mode is '1': - #Debug mode logs both to file and console - files_preserve = [fh.stream, sys.stdout, sys.stderr] - std_out = sys.stdout - std_err = sys.stderr - else: - #Default mode logs only to file - files_preserve = [fh.stream] - std_out = None - std_err = None - - #Prepare daemon context - context = {'working_directory': '.', - 'detach_process': True, - 'signal_map': signal_map, - 'files_preserve': files_preserve, - 'stdout': std_out, - 'stderr': std_err, - 'umask': 0o002, - 'pidfile': PIDLockFile(pidfile)} - - with daemon.DaemonContext(**context): - #Non-functional placeholder for upcoming scheduler code - while True: - logger.info("Placeholder for scheduler code") - time.sleep(60) - -def stop(): - """ - Stop the daemon - """ - logger.info('Stopping LAVA Scheduler daemon') - - #Get pid from the pidfile - pid = None - if os.path.exists(pidfile): - with open(pidfile) as fd: - pid = int(fd.read().strip()) - - if pid is None: - message = "pidfile %s does not exist, daemon not running?\n" - logger.warning(message % pidfile) - return #Not an error in a restart - - #Kill the daemon now - try: - os.kill(pid, signal.SIGTERM) - except OSError, err: - logger.error(str(err)) - sys.exit(1) - -def restart(): - """ - Restart the daemon - """ - stop() - start() === removed file 'lava/scheduler/daemon/example.cfg' --- lava/scheduler/daemon/example.cfg 2011-05-17 19:59:20 +0000 +++ lava/scheduler/daemon/example.cfg 1970-01-01 00:00:00 +0000 @@ -1,17 +0,0 @@ -############################################################################## -# LAVA daemon configuration file -############################################################################## - -[files] -pidfile=/tmp/schedulerd.pid -logfile=/tmp/schedulerd.log - -#Debug and logging options, changes require restart of the daemon -[debug] -# log_level=0 gives INFO level (default) -# log_level=1 gives DEBUG level -log_level=0 - -# debug_mode=0 prints logs to file only (default) -# debug_mode=1 prints logs both to file and console -debug_mode=0 === removed directory 'lava/scheduler/interface' === removed file 'lava/scheduler/interface/__init__.py' === removed file 'lava/scheduler/interface/context_processors.py' --- lava/scheduler/interface/context_processors.py 2011-04-08 05:26:38 +0000 +++ lava/scheduler/interface/context_processors.py 1970-01-01 00:00:00 +0000 @@ -1,12 +0,0 @@ -from django.conf import settings -from django.contrib.auth import REDIRECT_FIELD_NAME -from django.utils.http import urlquote - -def handy_urls(request): - path = urlquote(request.get_full_path()) - login_url = '%s?%s=%s' % (settings.LOGIN_URL, REDIRECT_FIELD_NAME, path) - logout_url = '%s?%s=/' % (settings.LOGOUT_URL, REDIRECT_FIELD_NAME) - return { - 'login_url': login_url, - 'logout_url': logout_url, - } === removed file 'lava/scheduler/interface/manage.py' --- lava/scheduler/interface/manage.py 2011-04-07 01:21:51 +0000 +++ lava/scheduler/interface/manage.py 1970-01-01 00:00:00 +0000 @@ -1,11 +0,0 @@ -#!/usr/bin/env python -from django.core.management import execute_manager -try: - import settings # Assumed to be in the same directory. -except ImportError: - import sys - sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) - sys.exit(1) - -def run(): - execute_manager(settings) === removed file 'lava/scheduler/interface/settings.py' --- lava/scheduler/interface/settings.py 2011-04-19 02:17:44 +0000 +++ lava/scheduler/interface/settings.py 1970-01-01 00:00:00 +0000 @@ -1,105 +0,0 @@ -# Django settings for lava project. -import os - -from django.conf import global_settings - -BASE_DIR = os.path.dirname(os.path.abspath(__file__)) - -DEBUG = True -TEMPLATE_DEBUG = DEBUG - -ADMINS = ( - # ('Your Name', 'your_email@domain.com'), -) - -MANAGERS = ADMINS - -DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. -DATABASE_NAME = 'database.db' # Or path to database file if using sqlite3. -DATABASE_USER = '' # Not used with sqlite3. -DATABASE_PASSWORD = '' # Not used with sqlite3. -DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. -DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. - -# Local time zone for this installation. Choices can be found here: -# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name -# although not all choices may be available on all operating systems. -# On Unix systems, a value of None will cause Django to use the same -# timezone as the operating system. -# If running in a Windows environment this must be set to the same as your -# system time zone. -TIME_ZONE = 'America/Chicago' - -# Language code for this installation. All choices can be found here: -# http://www.i18nguy.com/unicode/language-identifiers.html -LANGUAGE_CODE = 'en-us' - -SITE_ID = 1 - -# If you set this to False, Django will make some optimizations so as not -# to load the internationalization machinery. -USE_I18N = True - -# Absolute path to the directory that holds media. -# Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = os.path.join(BASE_DIR, 'static/') - -# URL that handles the media served from MEDIA_ROOT. Make sure to use a -# trailing slash if there is a path component (optional in other cases). -# Examples: "http://media.lawrence.com", "http://example.com/media/" -MEDIA_URL = '/static/' - -# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a -# trailing slash. -# Examples: "http://foo.com/media/", "/media/". -ADMIN_MEDIA_PREFIX = '/media/' - -# Make this unique, and don't share it with anybody. -SECRET_KEY = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' - -# List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.load_template_source', - 'django.template.loaders.app_directories.load_template_source', -# 'django.template.loaders.eggs.load_template_source', -) - -MIDDLEWARE_CLASSES = ( - 'django.middleware.common.CommonMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', -) - -ROOT_URLCONF = 'lava.scheduler.interface.urls' - -TEMPLATE_DIRS = ( - os.path.join(BASE_DIR, 'templates'), - # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". - # Always use forward slashes, even on Windows. - # Don't forget to use absolute paths, not relative paths. -) - -INSTALLED_APPS = ( - 'django.contrib.auth', - 'django_openid_auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.sites', - 'lava.scheduler.scheduler_app', - # Uncomment the next line to enable the admin: - 'django.contrib.admin', -) - -TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + ( - 'lava.scheduler.interface.context_processors.handy_urls', -) - -OPENID_SSO_SERVER_URL = 'https://login.ubuntu.com/' -OPENID_CREATE_USERS = True -OPENID_UPDATE_DETAILS_FROM_SREG = True -AUTHENTICATION_BACKENDS = ( - 'django_openid_auth.auth.OpenIDBackend', -) -LOGIN_REDIRECT_URL = '/' -LOGIN_URL = '/openid/login' -LOGOUT_URL = '/logout' === removed directory 'lava/scheduler/interface/static' === removed directory 'lava/scheduler/interface/static/assets' === removed file 'lava/scheduler/interface/static/assets/default.css' --- lava/scheduler/interface/static/assets/default.css 2011-04-12 23:40:58 +0000 +++ lava/scheduler/interface/static/assets/default.css 1970-01-01 00:00:00 +0000 @@ -1,360 +0,0 @@ -body { - /* TODO Windows XP look and feel check in IE 7 */ - /* TODO iPhone look and feel check */ - /* TODO iPad look and feel check */ - background-color: #222; - color: #F5F4E1; - font-size: 10pt; - margin: 0; - min-width: 650px; - padding: 25pt 15pt 2em 15pt; -} - -body, p, input, th, td { - font-family: Ubuntu, Helvetica Neue, Verdana, sans-serif; -} - - -#master_container { - border-radius: 7pt; - box-shadow: 0 0 15pt black; - -moz-border-radius: 7pt; - -webkit-border-radius: 7pt; - -moz-box-shadow: 0 0 15pt black; - -webkit-box-shadow: 0 0 15pt black; - border-collapse: collapse; - border-spacing: 0; - width: 100%; -} - -#header { - background-color: #D44917; - color: #F5F4E1; - margin: 0; - padding: 3pt 7pt; - - border-radius: 7pt 7pt 0 0; - -moz-border-radius: 7pt 7pt 0 0; - -webkit-border-radius: 7pt 7pt 0 0; - background: -moz-linear-gradient( - center bottom, - rgb(212,52,16) 6%, - rgb(212,74,23) 75% - ); - background: -webkit-gradient( - linear, - left top, - left bottom, - color-stop(0.06, rgb(212, 52, 16)), - color-stop(0.75, rgb(212, 74, 23)) - ); -} - -#header #account_info { - float: right; - font-size: 8pt; - font-weight: bold; - padding-top: 5pt; - text-align: right; - text-shadow: #541d09 1px 1px; -} - -#header #account_info a.change_password, -#header #account_info a.sign_in, -#header #account_info a.admin_site, -#header #account_info a.sign_out { - background-color: #943310; - color: #F5F4E1; - padding: 5pt; - - border-radius: 5pt; - -moz-border-radius: 5pt; - -webkit-border-radius: 5pt; -} - -#header #account_info a { - color: #F5F4E1; - text-decoration: none; -} - -#header #account_info a:hover { - text-decoration: underline; -} - -#header #product_logo a { - color: #F5F4E1; - display: block; - font-size: 25pt; - font-weight: bold; - padding: 0.5em 0.5em 0.1em 0.5em; - text-decoration: none; - text-shadow: #541d09 2px 2px; -} - -#header #product_logo a span.version{ - display: block; - font-size: 10pt; - font-weight: normal; - left: 1em; - position: relative; - text-shadow: #541d09 1px 1px; - top: -0.5em; -} - - -#navigation { - font-size: 12pt; - font-weight: bold; - margin: 0; - padding: 0; - background-color: #541D09; - color: #F5F4E1; -} - -#navigation ul { - display: block; - margin: 0; - padding: 0; -} - -#navigation ul li { - display: block; - float: left; - margin: 0; - padding: 2pt 5pt 2pt 5pt; -} - -#navigation ul li a { - color: #F5F4E1; - text-decoration: none; -} - -#navigation ul li a:hover { - text-decoration: underline; -} - -#navigation ul li span.bubble { - background-color: red; - color: white; - font-size: 8pt; - font-weight: bold; - padding: 3pt; - position: relative; - top: -10pt; - left: -1pt; - min-width: 10pt; - min-height: 10pt; - text-align: center; - border: 2pt solid white; - border-radius: 10pt; - -moz-border-radius: 10pt; - -webkit-border-radius: 10pt; - box-shadow: 0pt 1pt 3pt rgba(0, 0, 0, 0.8); - -moz-box-shadow: 0pt 1pt 3pt rgba(0, 0, 0, 0.8); - -webkit-box-shadow: 0pt 1pt 3pt rgba(0, 0, 0, 0.8); -} - - -#breadcrumbs { - clear: both; - font-size: 9pt; - font-weight: normal; - margin: 0; - padding: 0 5pt; -} - -#breadcrumbs ul { - display: inline; - margin: 0; - padding: 0; -} - -#breadcrumbs ul li { - display: inline; - margin: 0; - padding: 0.2em 0.2em 0.2em 0; -} - -#breadcrumbs ul li a { - color: #F5F4E1; - text-decoration: none; -} - -#breadcrumbs ul li:before { - content: "ยป"; - margin: 0 2pt; -} - -#breadcrumbs ul li:first-child:before { - content: ""; - margin: 0; -} - - -#content { - color: #202020; - padding-top: 0.5em; - padding: 5pt; - width: 78%; - - background-color: #F5F4E1; - background: -webkit-gradient( - linear, - left top, - left bottom, - color-stop(0, #CFCEBE), - color-stop(0.1, #F5F4E1) - ); - background: -moz-linear-gradient( - center top, - #CFCEBE 0, - #F5F4E1 10pt - ); - vertical-align: top; -} - -#content dl { - display block; - margin: 1em 0; -} - -#content dt { - font-weight: bold; - margin: 0; -} - -#content dd { -} - -/* Nested list, used in custom attributes */ - -#content dl dl { - margin-top: 0; -} - - -#content dl dl dt { - margin-left: 0em; -} - -#content dl dl dd { - margin-left: 2em; -} - - - -#sidebar { - color: white; - font-size: smaller; - width: 18%; - padding: 5pt; - - background-color: #75756C; - background: -webkit-gradient( - linear, - left top, - left bottom, - color-stop(0, #5B5B54), - color-stop(0.1, #75756C) - ); - background: -moz-linear-gradient( - center top, - #5B5B54 0, - #75756C 10pt - ); - vertical-align: top; -} - -#sidebar a { - color: white; -} - -#sidebar p.hint { - font-size: larger; -} - -#content_footer { - background-color: #F5F4E1; - height: 10pt; - - border-radius: 0 0 0 7pt; - -moz-border-radius: 0 0 0 7pt; - -webkit-border-radius: 0 0 0 7pt; -} - -#sidebar_footer { - background-color: #75756C; - height: 10pt; - - border-radius: 0 0 7pt 0; - -moz-border-radius: 0 0 7pt 0; - -webkit-border-radius: 0 0 7pt 0; -} - -#content p { - text-align: justify; -} - -#content table.data { - width: 100%; - border: 1px solid gray; - border-collapse: collapse; -} - -#content table.data th, -#content table.data td { - border: 1px solid gray; - margin: 0; - padding: 3pt; -} - -#content table.data th { - font-weight: bold; -} - -#content div.pagination { - margin-top: 0.5em; - text-align: center; -} - -#sidebar dl, -#sidebar dl dt, -#sidebar dl dd, -#sidebar ul, -#sidebar p { - padding: 0; - margin: 1em 0 0 0; -} - -#sidebar dl dt { - margin: 0; - padding: 0; - font-weight: bold; -} - -#sidebar dl dd, #sidebar ul li { - margin: 0 0 0 2em; - padding: 0; -} - -#footer { - font-size: smaller; - margin-top: 1em; - margin: auto; - padding: 0 12pt; - text-align: justify; -} - -#footer a { - color: #F5F4E1; -} - -.deserialization_failure_reason { - margin-top: 0.25em; - font-style: italic; - font-size: smaller; - cursor: help; - border-bottom: 1px dotted; - display: inline; -} - === removed directory 'lava/scheduler/interface/static/js' === removed file 'lava/scheduler/interface/static/js/prototype.js' --- lava/scheduler/interface/static/js/prototype.js 2011-03-21 17:49:27 +0000 +++ lava/scheduler/interface/static/js/prototype.js 1970-01-01 00:00:00 +0000 @@ -1,6082 +0,0 @@ -/* Prototype JavaScript framework, version 1.7 - * (c) 2005-2010 Sam Stephenson - * - * Prototype is freely distributable under the terms of an MIT-style license. - * For details, see the Prototype web site: http://www.prototypejs.org/ - * - *--------------------------------------------------------------------------*/ - -var Prototype = { - - Version: '1.7', - - Browser: (function(){ - var ua = navigator.userAgent; - var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]'; - return { - IE: !!window.attachEvent && !isOpera, - Opera: isOpera, - WebKit: ua.indexOf('AppleWebKit/') > -1, - Gecko: ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') === -1, - MobileSafari: /Apple.*Mobile/.test(ua) - } - })(), - - BrowserFeatures: { - XPath: !!document.evaluate, - - SelectorsAPI: !!document.querySelector, - - ElementExtensions: (function() { - var constructor = window.Element || window.HTMLElement; - return !!(constructor && constructor.prototype); - })(), - SpecificElementExtensions: (function() { - if (typeof window.HTMLDivElement !== 'undefined') - return true; - - var div = document.createElement('div'), - form = document.createElement('form'), - isSupported = false; - - if (div['__proto__'] && (div['__proto__'] !== form['__proto__'])) { - isSupported = true; - } - - div = form = null; - - return isSupported; - })() - }, - - ScriptFragment: ' - - {% block extrahead %} - - - {% endblock %} - -
-
- {% block header %}
-
- {% if user.is_authenticated %}
- Signed in as {{ user.username }}
- {% trans "Sign out" %}
- {% else %}
- {% trans "You are not signed in" %}
- {% trans "Sign in" %}
- {% endif %}
-
-
-{% endblock %}
- |
- |
- {% block navigation %} - | - - {% endblock %} - - -|
- {% block content %}{% endblock %} - | -- {% block sidebar %}{% endblock %} - | -
- | - |