def main(cfg=None): if not cfg: cfg = config.RpathToolsConfiguration() cfg.topDir = '/etc/conary' r = Scanner(cfg) r.scanSystem() return r.surveyScanner.uuid, r.surveyPath
def main(cfg=None, configurators=None): if not cfg: cfg = config.RpathToolsConfiguration() cfg.topDir = '/etc/conary' r = Configurator(cfg, configurators) result = r.run() return result
def updatePollFile(logger=None): try: rPathToolsConfig = config.RpathToolsConfiguration(readConfigFiles=True) pollFile = open(rPathToolsConfig.lastPollFilePath, 'w') pollFile.write(str(time.time())) pollFile.close() except Exception, e: if logger: logger.log_error('Failed updating poll file at %s' % \ rPathToolsConfig.lastPollFilePath) logger.log_error(str(e))
def __init__(self, configFile=None, event_uuid=None): self.event_uuid = event_uuid self.cfg = config.RpathToolsConfiguration(readConfigFiles = True) if configFile is not None: self.cfg.read(configFile) self.hwData = hardware.HardwareData(self.cfg) self.registration = register.Registration(self.cfg) remote = self.registration.getRemote() localIp = self.hwData.getLocalIp(remote) deviceName = self.hwData.getDeviceName(localIp) self.registration.setDeviceName(deviceName)
def scan(self, job, desiredTopLevelItems): from rpath_tools.client import config from rpath_tools.client.scan import Scanner cfg = config.RpathToolsConfiguration() cfg.topDir = '/etc/conary' r = Scanner(cfg) r.scanSystemCIM(desiredTopLevelItems) job.content = str(r.surveyUuid)
def scanner(self, cfg=None): if not cfg: cfg = config.RpathToolsConfiguration() return Scanner(cfg)
def main(): cfg = config.RpathToolsConfiguration() cfg.topDir = '/etc/conary' r = Registration(cfg) return r.generatedUuid, r.localUuid
def registration(self, cfg=None): if not cfg: cfg = config.RpathToolsConfiguration() return Registration(cfg)