odoo/setup/lib/environments.py

34 lines
1.2 KiB
Python

# -*- coding: utf-8 -*-
class Environment():
def __init__(self, host, port, dbname, username, pwd=None, super_admin_pw=None, demo=False):
self.host = host
self.port = port
self.dbname = dbname
self.username = username
# The password for the user named username
# During create the user is created with this password,
# otherwise it's used to authenticate during login.
self.pwd = pwd
self.super_admin_pw = super_admin_pw
self.demo = demo
def __str__(self):
return """==============================
Host: %s
User: %s
DB: %s
Port: %s
==============================""" % (self.host, self.username, self.dbname, self.port)
ENVIRONMENTS = {
# Local environments are listed with passwords
'br': Environment('http://localhost', '8080', 'tz-austria_1', 'admin', 'x', 'admin'),
'aa': Environment('http://localhost', '8080', 'tz-austria_1', 'admin', 'x', 'admin'),
# Remote environments are always listed without passwords!
# Do not store them here, you have to type them anyway!
'test': Environment('https://tz-austria.datenpol.at', '443', 'tz-austria_1', 'admin'),
}