def __init__(self): object.__init__(self) self.cfg = PaellaConfig() self.conn = PaellaConnection() self.profile = os.environ['PAELLA_PROFILE'] self.target = os.environ['PAELLA_TARGET'] self.machine = None self.trait = None self.suite = get_suite(self.conn, self.profile) self.pr = Profile(self.conn) self.pr.set_profile(self.profile) self.traitlist = self.pr.make_traitlist() self.pe = ProfileEnvironment(self.conn, self.profile) self.tp = TraitParent(self.conn, self.suite) self.fm = Family(self.conn) self.tr = Trait(self.conn, self.suite) self.families = list( self.fm.get_related_families(self.pr.get_families())) self._envv = None self.default = DefaultEnvironment(self.conn) self.installer = TraitInstaller(self.conn, self.suite, self.cfg) if os.environ.has_key('PAELLA_MACHINE'): self.machine = os.environ['PAELLA_MACHINE'] if os.environ.has_key('PAELLA_TRAIT'): self.set_trait(os.environ['PAELLA_TRAIT'])
def __init__(self): object.__init__(self) self.cfg = PaellaConfig() self.conn = PaellaConnection() self.profile = os.environ['PAELLA_PROFILE'] self.target = os.environ['PAELLA_TARGET'] self.suite = get_suite(self.conn, self.profile) self.pe = ProfileEnvironment(self.conn, self.profile) self.tp = TraitParent(self.conn, self.suite)
def __init__(self, conn, profile): self.conn = conn self.profile = profile self.env = ProfileEnvironment(self.conn) self.env.set_profile(self.profile) RawConfigParser.__init__(self) for row in self.env.get_rows(): if row.trait not in self.sections(): self.add_trait(row.trait) self.set(row.trait, row.name, row.value)
def set_profile(self, profile): self.profile = profile os.environ['PAELLA_PROFILE'] = profile self.profiletrait.set_profile(profile) self.traits = self.profiletrait.trait_rows() self.env = ProfileEnvironment(self.conn, self.profile) self.profiledata = self.get_profile_data() self.suite = get_suite(self.conn, profile) self.installer = TraitInstaller(self.conn, self.suite, self.cfg) self.installer.log = self.log self.installer.profiledata = self.profiledata self.traitparent = TraitParent(self.conn, self.suite) self.log.info('profile set to %s' % profile)
def select_profile(self, profile): self.variables = ProfileEnvironment(self.conn, profile) self.profiletrait.set_profile(profile) self.__set_pages(profile)
from paella.gtk.utils import DownloadPoolBox as dpb from paella.admin.management import Manager, SuiteManager from paella.admin.debconf import DebconfEditorWin, DebconfBrowser cfg = Configuration() m = Manager() m.set_usize(200, 300) m.set_uposition(1050, 730) #mirror = 'http://ftp.us.debian.org/debian/dists/' mirror = 'http://paella/debian/dists.orig/' m.dbconnect(cfg['dbname']) #tm = TemplateManager(m.conn, 'woody') #dc.debconf.set_config('/var/cache/debconf/config.dat') #db = DebconfBrowser(m.conn, 'sid', 'default') from paella.profile.trait import TraitDebconf from paella.profile.profile import ProfileEnvironment pe = ProfileEnvironment(m.conn, 'paella') pe.set_trait('base') td = TraitDebconf(m.conn, 'sid') w = SuiteManager(m.conn, 'woody') s = SuiteManager(m.conn, 'sid') w.set_uposition(600, 20) s.set_uposition(600, 60)