def _get_db2_home_path(self, context):
     fileSystem = file_system.createFileSystem(context.client)
     path_tool = file_system.getPathTool(fileSystem)
     if self._main_process.executablePath:
         exe_path = file_system.Path(self._main_process.executablePath,
                                     path_tool)
         return exe_path.get_parent().get_parent()
def read_pf(shell, pf_path):
    '@types: Shell, str -> tuple[File, sap_discoverer.IniDocument]'
    try:
        pathtool = file_system.getPathTool(file_system.createFileSystem(shell))
        name = pathtool.baseName(pf_path)
        file_ = file_topology.File(name, False)
        file_.content = shell.safecat(pf_path)
        file_.path = pf_path
    except Exception, e:
        logger.warnException("Failed to read profile: %s" % e)
def read_pf(shell, pf_path):
    '@types: Shell, str -> tuple[File, sap_discoverer.IniDocument]'
    try:
        pathtool = file_system.getPathTool(file_system.createFileSystem(shell))
        name = pathtool.baseName(pf_path)
        file_ = file_topology.File(name, False)
        file_.content = shell.safecat(pf_path)
        file_.path = pf_path
    except Exception, e:
        logger.warnException("Failed to read profile: %s" % e)
    def discover(self, name, driverName, scope, shell):
        DSNRegistryEntryDiscoverer.discover(self, name, driverName, scope, shell)
        fs = file_system.createFileSystem(shell)
        path_tool = file_system.getPathTool(fs)
        db2_home_bin = file_system.Path(self._raw_object.Driver, path_tool).get_parent()
        if db2_home_bin:
            self.__db2_home = db2_home_bin.get_parent()

            instance_name = self.__parseInstanceName(driverName)
            self.__address, self.__port, self.__database = self.__discoverAliasInfo(scope, self.__db2_home, shell, instance_name)

        if not self.__address:
            raise flow.DiscoveryException("Address is empty")
Beispiel #5
0
    def discover(self, name, driverName, scope, shell):
        DSNRegistryEntryDiscoverer.discover(self, name, driverName, scope, shell)
        fs = file_system.createFileSystem(shell)
        path_tool = file_system.getPathTool(fs)
        oracle_home_bin = file_system.Path(self._raw_object.Driver, path_tool).get_parent()
        logger.debug("Oracle home bin folder:%s" % oracle_home_bin)
        if oracle_home_bin:
            self.__oracle_home = oracle_home_bin.get_parent()
            logger.debug("Oracle home:%s" % oracle_home_bin)
            self.__address, self.__port, self.__database = self.__discoverAliasInfo(scope, self.__oracle_home, shell)

        if not self.__address:
            raise flow.DiscoveryException("Address is empty")
    def discover(self, name, driverName, scope, shell):
        DSNRegistryEntryDiscoverer.discover(self, name, driverName, scope,
                                            shell)
        fs = file_system.createFileSystem(shell)
        path_tool = file_system.getPathTool(fs)
        db2_home_bin = file_system.Path(self._raw_object.Driver,
                                        path_tool).get_parent()
        if db2_home_bin:
            self.__db2_home = db2_home_bin.get_parent()

            instance_name = self.__parseInstanceName(driverName)
            self.__address, self.__port, self.__database = self.__discoverAliasInfo(
                scope, self.__db2_home, shell, instance_name)

        if not self.__address:
            raise flow.DiscoveryException("Address is empty")
Beispiel #7
0
 def pathtool(filesystem):
     return file_system.getPathTool(filesystem)
Beispiel #8
0
 def pathtool(filesystem):
     return file_system.getPathTool(filesystem)