Exemple #1
0
 def __init__(self, name='Manager'):
     CommandBoxWindow.__init__(self)
     self.cfg = PaellaConfig('database')
     self.dialogs = {}.fromkeys(['dbname', 'suitemanager'])
     apps = [
         'profiles', 'families', 'suitemanager', 'traitmanager', 'machines',
         'traits', 'tdiff', 'sdiff', 'fdiff', 'default_environment',
         'clients', 'browser'
     ]
     self.workspace = {}.fromkeys(apps)
     self.add_menu(dbcommands, 'database', self.database_command)
     self.add_menu(self.workspace.keys(), 'edit', self.edit_command)
     self.set_size_request(150, 200)
     self.conn = None
     self.dbname = None
     self.dblist = ScrollCList()
     self.vbox.add(self.dblist)
     conn = PaellaConnection(self.cfg)
     cursor = StatementCursor(conn, 'quicky')
     self.dblist.set_rows(cursor.select(table='pg_database'))
     cursor.close()
     conn.close()
     self.tbar.add_button('profiles', 'profile manager', self.run_tbar)
     self.tbar.add_button('families', 'family manager', self.run_tbar)
     self.tbar.add_button('machines', 'machine manager', self.run_tbar)
     self.tbar.add_button('traits', 'trait manager', self.run_tbar)
     self.tbar.add_button('tdiff', 'template differ', self.run_tbar)
     self.tbar.add_button('sdiff', 'script differ', self.run_tbar)
     self.tbar.add_button('fdiff', 'family differ', self.run_tbar)
 def __init__(self, name='Manager'):
     CommandBoxWindow.__init__(self)
     self.cfg = PaellaConfig('database')
     self.dialogs = {}.fromkeys(['dbname', 'suitemanager'])
     apps = ['profiles', 'families', 'suitemanager', 'traitmanager', 'machines',
             'traits', 'tdiff', 'sdiff', 'fdiff', 'default_environment', 'clients',
             'browser']
     self.workspace = {}.fromkeys(apps)
     self.add_menu(dbcommands, 'database', self.database_command)
     self.add_menu(self.workspace.keys(), 'edit', self.edit_command)
     self.set_size_request(150,200)
     self.conn = None
     self.dbname = None
     self.dblist = ScrollCList()
     self.vbox.add(self.dblist)
     conn = PaellaConnection(self.cfg)
     cursor = StatementCursor(conn, 'quicky')
     self.dblist.set_rows(cursor.select(table='pg_database'))
     cursor.close()
     conn.close()
     self.tbar.add_button('profiles', 'profile manager', self.run_tbar)
     self.tbar.add_button('families', 'family manager', self.run_tbar)
     self.tbar.add_button('machines', 'machine manager', self.run_tbar)
     self.tbar.add_button('traits', 'trait manager', self.run_tbar)
     self.tbar.add_button('tdiff', 'template differ', self.run_tbar)
     self.tbar.add_button('sdiff', 'script differ', self.run_tbar)
     self.tbar.add_button('fdiff', 'family differ', self.run_tbar)
 def __init__(self, conn):
     CommandBoxWindow.__init__(self)
     self.tbar.set_orientation('vertical')
     self.conn = conn
     commands = ['machines', 'machine types', 'filesystems', 'disks',
                 'mounts', 'kernels']
     for c in commands:
         self.tbar.add_button(c, c, self.toolbar_button_pressed)
Exemple #4
0
 def __init__(self, conn):
     CommandBoxWindow.__init__(self)
     self.tbar.set_orientation('vertical')
     self.conn = conn
     commands = ['machines', 'machine types', 'filesystems', 'disks',
                 'mounts', 'kernels']
     for c in commands:
         self.tbar.add_button(c, c, self.toolbar_button_pressed)
Exemple #5
0
 def __init__(self):
     CommandBoxWindow.__init__(self)
     self.scroll = ScrolledWindow()
     self.vbox.add(self.scroll)
     self.scroll.show()
     if hasattr(self, 'menu'):
         HasListbox.__init__(self, self.scroll, rcmenu=self.menu)
     else:
         HasListbox.__init__(self, self.scroll)
 def __init__(self, conn):
     CommandBoxWindow.__init__(self)
     self.conn = conn
     self.suites = Suites(self.conn)
     self.add_menu(["all", "profile"], "selection", self.set_trait_selection)
     self.tbar.add_button("suite", "select suite", self.suite_selection)
     self.dialogs = {}.fromkeys(["select suite"])
     self.browser = TraitManagerBrowser(self.conn)
     self.vbox.add(self.browser)
Exemple #7
0
 def __init__(self):
     CommandBoxWindow.__init__(self)
     self.scroll = ScrolledWindow()
     self.vbox.add(self.scroll)
     self.scroll.show()
     if hasattr(self, 'menu'):
         HasListbox.__init__(self, self.scroll, rcmenu=self.menu)
     else:
         HasListbox.__init__(self, self.scroll)
Exemple #8
0
 def __init__(self, conn):
     CommandBoxWindow.__init__(self)
     self.conn = conn
     self.suites = Suites(self.conn)
     self.add_menu(['all', 'profile'], 'selection', self.set_trait_selection)
     self.tbar.add_button('suite', 'select suite', self.suite_selection)
     self.dialogs = {}.fromkeys(['select suite'])
     self.browser = TraitManagerBrowser(self.conn)
     self.vbox.add(self.browser)
Exemple #9
0
 def __init__(self, conn, suite, name='DebconfBrowser'):
     CommandBoxWindow.__init__(self, name=name)
     self.tdcbox = TraitDebconfBrowser(conn, suite, name=name)
     self.vbox.add(self.tdcbox)
     self.conn = conn
     self.suite = suite
     self.dc = TraitDebconf(self.conn, self.suite)
     self.tbar.add_button('update', 'update', self.reset_rows)
     self.tbar.add_button('delete', 'delete', self.delete_row)
     self.reset_rows()
Exemple #10
0
 def __init__(self, conn):
     CommandBoxWindow.__init__(self)
     self.conn = conn
     self.defenv = DefaultEnvironment(self.conn)
     self.add_menu(['load', 'edit', 'save'], 'main', self.main_menu_selected)
     self.cursor = StatementCursor(self.conn)
     self.cursor.set_table('default_environment')
     self.view = ScrollCList()
     self.vbox.add(self.view)
     self.reset_rows()
Exemple #11
0
 def __init__(self, conn, name='FamilyWin'):
     if name is None:
         name = '.'.join([suite, 'traits'])
     CommandBoxWindow.__init__(self, name=name)
     self.conn = conn
     self.set_title(name)
     self.browser = FamilyBrowser(self.conn)
     self.__make_menus__()
     self.vbox.pack_start(self.menu_bar, 0, 0, 0)
     self.vbox.add(self.browser)
     self.dialogs = {}.fromkeys(['create'])
Exemple #12
0
 def __init__(self, conn, type, name='DifferWin'):
     CommandBoxWindow.__init__(self, name=name)
     self.conn = conn
     self.set_title(name)
     if type == 'template':
         self.browser = TemplateDiffer(self.conn)
     elif type == 'family':
         self.browser = FamilyDiffer(self.conn)
     else:
         self.browser = ScriptDiffer(self.conn)
     self.vbox.add(self.browser)
Exemple #13
0
 def __init__(self, conn, type, name='DifferWin'):
     CommandBoxWindow.__init__(self, name=name)
     self.conn = conn
     self.set_title(name)
     if type == 'template':
         self.browser = TemplateDiffer(self.conn)
     elif type == 'family':
         self.browser = FamilyDiffer(self.conn)
     else:
         self.browser = ScriptDiffer(self.conn)
     self.vbox.add(self.browser)
Exemple #14
0
 def __init__(self, conn, suite, cfg=None, name='SuiteManager'):
     if cfg is None:
         cfg = PaellaConfig()
     CommandBoxWindow.__init__(self, name=name)
     self.set_title('%s toolbar' % suite)
     self.cfg = cfg
     self.conn = conn
     self.suite = suite
     self.tbar.add_button('traits', 'trait manager', self.traitgen)
     self.tbar.add_button('templates', 'template manager', self.templates)
     self.tbar.add_button('environ', 'environment manager', self.environ)
     #self.tbar.add_button('debconf', 'debconf manager', self.debconf)
     self.tbar.add_button('scripts', 'script manager', self.scripts)
 def __init__(self, conn, suite, cfg=None, name='SuiteManager'):
     if cfg is None:
         cfg = PaellaConfig()
     CommandBoxWindow.__init__(self, name=name)
     self.set_title('%s toolbar' % suite)
     self.cfg = cfg
     self.conn = conn
     self.suite = suite
     self.tbar.add_button('traits', 'trait manager', self.traitgen)
     self.tbar.add_button('templates', 'template manager', self.templates)
     self.tbar.add_button('environ', 'environment manager', self.environ)
     #self.tbar.add_button('debconf', 'debconf manager', self.debconf)
     self.tbar.add_button('scripts', 'script manager', self.scripts)
 def __init__(self, conn, name='ClientManager'):
     CommandBoxWindow.__init__(self)
     self.set_title('Client Manager')
     self.conn = conn
     self.cfg = PaellaConfig()
     client_cmds = ['import', 'export', 'remove']
     self.add_menu(client_cmds, 'client', self.menu_command)
     self.client_view = ScrollCList()
     self.vbox.add(self.client_view)
     self.client_path = self.cfg.get('management_gui', 'client_path')
     self.client_cfg = Configuration(files=[os.path.join(self.client_path, 'config')])
     self.clients = self.client_cfg.sections()
     self.client_view.set_rows(self.clients, ['client'])
     self.dialogs = {}.fromkeys(client_cmds)
Exemple #17
0
 def __init__(self, conn, name='ClientManager'):
     CommandBoxWindow.__init__(self)
     self.set_title('Client Manager')
     self.conn = conn
     self.cfg = PaellaConfig()
     client_cmds = ['import', 'export', 'remove']
     self.add_menu(client_cmds, 'client', self.menu_command)
     self.client_view = ScrollCList()
     self.vbox.add(self.client_view)
     self.client_path = self.cfg.get('management_gui', 'client_path')
     self.client_cfg = Configuration(
         files=[os.path.join(self.client_path, 'config')])
     self.clients = self.client_cfg.sections()
     self.client_view.set_rows(self.clients, ['client'])
     self.dialogs = {}.fromkeys(client_cmds)
 def __init__(self, conn, name='ProfileGenWin'):
     actions = ['create', 'copy', 'export', 'import']
     CommandBoxWindow.__init__(self, name=name)
     self.set_title(name)
     self.cfg = PaellaConfig()
     self.conn = conn
     self.cmd = StatementCursor(conn, name)
     self.suites = [x.suite for x in self.cmd.select(table='suites')]
     self.profiles = StatementCursor(conn, 'profiles')
     self.profiles.set_table('profiles')
     self.menu_bar = SimpleMenuBar()
     self.vbox.pack_start(self.menu_bar, 0, 0, 0)
     self.dialogs = {}.fromkeys(actions)
     self.add_menu(actions, 'main', self.ask_dialog)
     self.add_menu(self.suites, 'traits', self.show_traits)
     self.tbar.add_button('families', 'show all families', self.families_window)
     self.add_menu(self.suites, 'traitgen', self.show_traitgen)
     self.browser = ProfileBrowser(self.conn, self.suites)
     self.vbox.add(self.browser)
     self.set_size_request(400, 300)
Exemple #19
0
 def __init__(self, conn, name='ProfileGenWin'):
     actions = ['create', 'copy', 'export', 'import']
     CommandBoxWindow.__init__(self, name=name)
     self.set_title(name)
     self.cfg = PaellaConfig()
     self.conn = conn
     self.cmd = StatementCursor(conn, name)
     self.suites = [x.suite for x in self.cmd.select(table='suites')]
     self.profiles = StatementCursor(conn, 'profiles')
     self.profiles.set_table('profiles')
     self.menu_bar = SimpleMenuBar()
     self.vbox.pack_start(self.menu_bar, 0, 0, 0)
     self.dialogs = {}.fromkeys(actions)
     self.add_menu(actions, 'main', self.ask_dialog)
     self.add_menu(self.suites, 'traits', self.show_traits)
     self.tbar.add_button('families', 'show all families',
                          self.families_window)
     self.add_menu(self.suites, 'traitgen', self.show_traitgen)
     self.browser = ProfileBrowser(self.conn, self.suites)
     self.vbox.add(self.browser)
     self.set_size_request(400, 300)
Exemple #20
0
 def __init__(self, conn, browser):
     CommandBoxWindow.__init__(self)
     self.conn = conn
     self.browser = browser
     self.vbox.add(self.browser)
Exemple #21
0
 def __init__(self, conn, browser):
     CommandBoxWindow.__init__(self)
     self.conn = conn
     self.browser = browser
     self.vbox.add(self.browser)