コード例 #1
0
ファイル: scan.py プロジェクト: pombreda/rpath-tools
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
コード例 #2
0
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
コード例 #3
0
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))
コード例 #4
0
    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)
コード例 #5
0
    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)
コード例 #6
0
ファイル: scan.py プロジェクト: pombreda/rpath-tools
 def scanner(self, cfg=None):
     if not cfg:
         cfg = config.RpathToolsConfiguration()
     return Scanner(cfg)
コード例 #7
0
def main():
    cfg = config.RpathToolsConfiguration()
    cfg.topDir = '/etc/conary'
    r = Registration(cfg)
    return r.generatedUuid, r.localUuid
コード例 #8
0
 def registration(self, cfg=None):
     if not cfg:
         cfg = config.RpathToolsConfiguration()
     return Registration(cfg)