Ejemplo n.º 1
0
 def _initRepoStorage(self, ainstConf):
     if not ainstConf or len(ainstConf.repoConfigItems) == 0:
         return None
     repoStorage = RepoStorage()
     for repoid, item in ainstConf.repoConfigItems.iteritems():
         yumRepo = YumRepository(repoid, item, ainstConf.maxfilelength, ainstConf.retrytime, ainstConf.sockettimeout)
         yumRepo.cachedir = ainstConf.cachedir
         yumRepo.expireTime = ainstConf.expiretime
         repoStorage.addRepo(yumRepo)
     return repoStorage
Ejemplo n.º 2
0
 def _initRepoStorage(self, ainstConf):
     if not ainstConf or len(ainstConf.repoConfigItems) == 0:
         return None
     repoStorage = RepoStorage()
     for repoid, item in ainstConf.repoConfigItems.iteritems():
         yumRepo = YumRepository(repoid, item, ainstConf.maxfilelength,
                                 ainstConf.retrytime,
                                 ainstConf.sockettimeout)
         yumRepo.cachedir = ainstConf.cachedir
         yumRepo.expireTime = ainstConf.expiretime
         repoStorage.addRepo(yumRepo)
     return repoStorage
Ejemplo n.º 3
0
 def _getRepoStorage(self, ainstConf, repos):
     if not ainstConf or len(ainstConf.repoConfigItems) == 0:
         Log.cout(Log.ERROR, 'Ainst config is invalid')
         return None
     repoStorage = RepoStorage()
     for repoid, item in ainstConf.repoConfigItems.iteritems():
         yumRepo = YumRepository(repoid, item, ainstConf.maxfilelength,
                                 ainstConf.retrytime, ainstConf.sockettimeout)
         yumRepo.cachedir = ainstConf.cachedir
         yumRepo.expireTime = ainstConf.expiretime
         repoStorage.addRepo(yumRepo)
     repoStorage.processDisableEnable(repos)
     return repoStorage
Ejemplo n.º 4
0
 def _getRepoStorage(self, ainstConf, repos):
     if not ainstConf or len(ainstConf.repoConfigItems) == 0:
         Log.cout(Log.ERROR, 'Ainst config is invalid')
         return None
     repoStorage = RepoStorage()
     for repoid, item in ainstConf.repoConfigItems.iteritems():
         yumRepo = YumRepository(repoid, item, ainstConf.maxfilelength,
                                 ainstConf.retrytime,
                                 ainstConf.sockettimeout)
         yumRepo.cachedir = ainstConf.cachedir
         yumRepo.expireTime = ainstConf.expiretime
         repoStorage.addRepo(yumRepo)
     repoStorage.processDisableEnable(repos)
     return repoStorage