Ejemplo n.º 1
0
    def __init__(self, current_agent_path=None):
        self.utilcmds = utilcmds.UtilCmds()
        self.current_agent_path = current_agent_path

        if not self.current_agent_path:
            file_path = os.path.abspath(__file__)

            if '/opt/TopPatch/agent' in file_path:
                self.current_agent_path = '/opt/TopPatch/agent'
            else:
                self.current_agent_path = None
                logger.error("Could not find Application's path.")

        self.update_directory = None
Ejemplo n.º 2
0
    def __init__(self):
        # Initialize mac table stuff.
        #self._macsqlite = SqliteMac()
        #self._macsqlite.recreate_update_data_table()
        self.utilcmds = utilcmds.UtilCmds()

        self._catalog_directory = \
            os.path.join(settings.AgentDirectory, 'catalogs')

        self._updates_plist = \
            os.path.join(settings.TempDirectory, 'updates.plist')

        if not os.path.isdir(self._catalog_directory):
            os.mkdir(self._catalog_directory)

        self.pkg_installer = PkgInstaller()
        self.dmg_installer = DmgInstaller()
        self.plist = PlistInterface()
        self.updates_catalog = UpdatesCatalog(
            self._catalog_directory,
            os.path.join(settings.TempDirectory, 'updates_catalog.json'))
Ejemplo n.º 3
0
 def __init__(self):
     self.utilcmds = utilcmds.UtilCmds()
Ejemplo n.º 4
0
    def __init__(self):
        self.utilcmds = utilcmds.UtilCmds()

        self._install_security_plugin()
        self.yum_parse = YumParse()