odoo/setup/lib/environments.py

29 lines
975 B
Python

# -*- coding: utf-8 -*-
class Environment():
def __init__(self, host, port, dbname, username, pwd, admin_pw=False, basic_auth=False):
self.admin_pw = admin_pw
self.dbname = dbname
self.username = username
self.pwd = pwd
self.port = port
self.host = host
self.lang = 'de_DE'
self.basic_auth = basic_auth or ('user', 'pass') # HTTP authentification
def __str__(self):
return """==============================
Host: %s
User: %s
DB: %s
Port: %s
==============================""" % (self.host, self.username, self.dbname, self.port)
ENVIRONMENTS = {
'br': Environment('http://localhost', '8080', 'INSTANCE_1', 'admin', 'x', 'admin'),
'sk': Environment('http://localhost', '8080', 'INSTANCE_1', 'admin', 'x', 'admin'),
'test': Environment('https://INSTANCE.camadeus.at', '443', 'INSTANCE_1', 'admin', '141kcal', 'asdfasdf'),
}