#
# Temporary unused script disigned for read and manage
# db configuration file tnsnames.ora
#


import re


class Config:


	db = None


	def getDatabase(self):

		if (self.db is None):
			self.db = Config.Database()

		return self.db


	class Database:


		tnsnamesOra = '/etc/tnsnames.ora'
		regexpOra   = '^(\w+?)\s?=.*?HOST\s?=\s?(.+?)\).*?PORT\s?=\s?(\d+?)\).*?SERVICE_NAME\s?=\s?(.+?)\)'
		connections = {}


		def __init__(self):

			tnsnames = open(self.tnsnamesOra, 'r').read()

			for match in re.finditer(self.regexpOra, tnsnames, re.M + re.S):
				matches = match.groups()

				self.connections[matches[0]] = {
					'host'    : matches[1],
					'port'    : matches[2],
					'service' : matches[3],
					'url'     : '%s:%s/%s' % matches[1:]
				}

		def getConnection(self, name):

			return self.connections[name]

c21d89d244debed6272b18154cbb340d96f53777
<mask token>

<mask token>


class Config:
    <mask token>

    def getDatabase(self):
        if self.db is None:
            self.db = Config.Database()
        return self.db


    class Database:
        tnsnamesOra = '/etc/tnsnames.ora'
        regexpOra = (
            '^(\\w+?)\\s?=.*?HOST\\s?=\\s?(.+?)\\).*?PORT\\s?=\\s?(\\d+?)\\).*?SERVICE_NAME\\s?=\\s?(.+?)\\)'
            )
        connections = {}

        def __init__(self):
            tnsnames = open(self.tnsnamesOra, 'r').read()
            for match in re.finditer(self.regexpOra, tnsnames, re.M + re.S):
                matches = match.groups()
                self.connections[matches[0]] = {'host': matches[1], 'port':
                    matches[2], 'service': matches[3], 'url': '%s:%s/%s' %
                    matches[1:]}

        def getConnection(self, name):
            return self.connections[name]

<mask token>


class Config:
    db = None

    def getDatabase(self):
        if self.db is None:
            self.db = Config.Database()
        return self.db


    class Database:
        tnsnamesOra = '/etc/tnsnames.ora'
        regexpOra = (
            '^(\\w+?)\\s?=.*?HOST\\s?=\\s?(.+?)\\).*?PORT\\s?=\\s?(\\d+?)\\).*?SERVICE_NAME\\s?=\\s?(.+?)\\)'
            )
        connections = {}

        def __init__(self):
            tnsnames = open(self.tnsnamesOra, 'r').read()
            for match in re.finditer(self.regexpOra, tnsnames, re.M + re.S):
                matches = match.groups()
                self.connections[matches[0]] = {'host': matches[1], 'port':
                    matches[2], 'service': matches[3], 'url': '%s:%s/%s' %
                    matches[1:]}

        def getConnection(self, name):
            return self.connections[name]

import re


class Config:
    db = None

    def getDatabase(self):
        if self.db is None:
            self.db = Config.Database()
        return self.db


    class Database:
        tnsnamesOra = '/etc/tnsnames.ora'
        regexpOra = (
            '^(\\w+?)\\s?=.*?HOST\\s?=\\s?(.+?)\\).*?PORT\\s?=\\s?(\\d+?)\\).*?SERVICE_NAME\\s?=\\s?(.+?)\\)'
            )
        connections = {}

        def __init__(self):
            tnsnames = open(self.tnsnamesOra, 'r').read()
            for match in re.finditer(self.regexpOra, tnsnames, re.M + re.S):
                matches = match.groups()
                self.connections[matches[0]] = {'host': matches[1], 'port':
                    matches[2], 'service': matches[3], 'url': '%s:%s/%s' %
                    matches[1:]}

        def getConnection(self, name):
            return self.connections[name]

#
# Temporary unused script disigned for read and manage
# db configuration file tnsnames.ora
#


import re


class Config:


	db = None


	def getDatabase(self):

		if (self.db is None):
			self.db = Config.Database()

		return self.db


	class Database:


		tnsnamesOra = '/etc/tnsnames.ora'
		regexpOra   = '^(\w+?)\s?=.*?HOST\s?=\s?(.+?)\).*?PORT\s?=\s?(\d+?)\).*?SERVICE_NAME\s?=\s?(.+?)\)'
		connections = {}


		def __init__(self):

			tnsnames = open(self.tnsnamesOra, 'r').read()

			for match in re.finditer(self.regexpOra, tnsnames, re.M + re.S):
				matches = match.groups()

				self.connections[matches[0]] = {
					'host'    : matches[1],
					'port'    : matches[2],
					'service' : matches[3],
					'url'     : '%s:%s/%s' % matches[1:]
				}

		def getConnection(self, name):

			return self.connections[name]
