svn path=/trunk/packages/sipb-xen-www/; revision=864
from webcommon import InvalidInput, CodeError, State
import controls
from getafsgroups import getAfsGroupMembers
from webcommon import InvalidInput, CodeError, State
import controls
from getafsgroups import getAfsGroupMembers
-import sipb_xen_database
-from invirt import database
+import sipb_xen_database as database
from sipb_xen_database import Machine, CDROM, ctx, connect, MachineAccess, Type, Autoinstall
from invirt.config import structs as config
from sipb_xen_database import Machine, CDROM, ctx, connect, MachineAccess, Type, Autoinstall
from invirt.config import structs as config
else:
return '<p>STDERR:</p><pre>' + str(addition) + '</pre>'
else:
return '<p>STDERR:</p><pre>' + str(addition) + '</pre>'
-Template.sipb_xen_database = sipb_xen_database
+Template.database = database
Template.helppopup = staticmethod(helppopup)
Template.err = None
Template.helppopup = staticmethod(helppopup)
Template.err = None
def __iter__(self):
start_time = time.time()
def __iter__(self):
start_time = time.time()
- sipb_xen_database.clear_cache()
sys.stderr = StringIO()
fields = cgi.FieldStorage(fp=self.environ['wsgi.input'], environ=self.environ)
operation = self.environ.get('PATH_INFO', '')
sys.stderr = StringIO()
fields = cgi.FieldStorage(fp=self.environ['wsgi.input'], environ=self.environ)
operation = self.environ.get('PATH_INFO', '')
#def cdromList($default="", $onchange=None)
#filter None
#def cdromList($default="", $onchange=None)
#filter None
-$databaseList(sorted($sipb_xen_database.CDROM.select(), key=lambda x: x.description),
+$databaseList(sorted($database.CDROM.select(), key=lambda x: x.description),
default, onchange, 'cdrom', 'cdromlist', 'cdrom_id', 'description')
#end filter
#end def
#def autoList($default="", $onchange=None)
#filter None
default, onchange, 'cdrom', 'cdromlist', 'cdrom_id', 'description')
#end filter
#end def
#def autoList($default="", $onchange=None)
#filter None
-$databaseList(sorted($sipb_xen_database.Autoinstall.select(), key=lambda x: x.description),
+$databaseList(sorted($database.Autoinstall.select(), key=lambda x: x.description),
default, onchange, 'autoinstall', 'autoinstalllist', 'autoinstall_id', 'description')
#end filter
#end def
default, onchange, 'autoinstall', 'autoinstalllist', 'autoinstall_id', 'description')
#end filter
#end def
#filter None
$full_body
#end filter
#filter None
$full_body
#end filter
-#end filter
\ No newline at end of file
"""Exceptions for the web interface."""
import time
"""Exceptions for the web interface."""
import time
-from sipb_xen_database import Machine, MachineAccess
+from invirt.database import Machine, MachineAccess
class MyException(Exception):
"""Base class for my exceptions"""
class MyException(Exception):
"""Base class for my exceptions"""