def getConnect(self,conn_type): if conn_type == "redis": config = ConfigurationHelper().config host = config.get("redis","host") port = config.get("redis","port") rd = redis.Redis(host,port) return redis.Redis(host,port)
def __init__(self, host=None, header_name=None, header_value=None, cookie=None): """ Constructor of the class. """ self.rest_client = RESTClientObject() self.default_headers = {} if header_name is not None: self.default_headers[header_name] = header_value if host is None: config = ConfigurationHelper().config self.host = config.get("dso","url") else: self.host = host self.cookie = cookie # Set default User-Agent. self.user_agent = 'Python-Swagger/1.0.0'