コード例 #1
0
 def __init__(self, kvstore=None, cp=None, service=None):
     self.kvstore = kvstore
     self.cp = cp
     self.service = service
     self.hostname = socket.gethostname()
     self.name = 'cassandra-{}'.format(self.hostname)
     self.ip = get_ip()
コード例 #2
0
 def __init__(self, mysql=None, cp=None, consul=None):
     self.mysql = mysql
     self.consul = consul
     self.cp = cp
     self.hostname = socket.gethostname()
     self.name = 'mysql-{}'.format(self.hostname)
     self.ip = get_ip(env('INTERFACE', 'net1'))
コード例 #3
0
ファイル: manage.py プロジェクト: luccasmenezes/mysql
    def __init__(self, mysql=None, cp=None, consul=None, backup_store=None):
        self.mysql = mysql
        self.consul = consul
        self.backup_store = backup_store
        self.cp = cp

        self.hostname = socket.gethostname()
        self.name = 'mysql-{}'.format(self.hostname)
        self.ip = get_ip()
コード例 #4
0
    def __init__(self, mysql=None, cp=None, consul=None, manta=None):
        self.mysql = mysql
        self.consul = consul
        self.manta = manta
        self.cp = cp

        self.hostname = socket.gethostname()
        self.name = 'mysql-{}'.format(self.hostname)
        self.ip = get_ip()
コード例 #5
0
    def __init__(self, mysql=None, cp=None, consul=None, manta=None):
        self.mysql = mysql
        self.consul = consul
        self.manta = manta
        self.cp = cp

        self.hostname = socket.gethostname()
        self.name = 'mysql-{}'.format(self.hostname)
        self.ip = get_ip()
コード例 #6
0
    def __init__(self, envs=os.environ):
        self.mysql_db = env('MYSQL_DATABASE', None, envs)
        self.mysql_user = env('MYSQL_USER', None, envs)
        self.mysql_password = env('MYSQL_PASSWORD', None, envs)
        self.mysql_root_password = env('MYSQL_ROOT_PASSWORD', '', envs)
        self.mysql_random_root_password = env('MYSQL_RANDOM_ROOT_PASSWORD',
                                              True, envs, to_flag)
        self.mysql_onetime_password = env('MYSQL_ONETIME_PASSWORD', False,
                                          envs, to_flag)
        self.repl_user = env('MYSQL_REPL_USER', None, envs)
        self.repl_password = env('MYSQL_REPL_PASSWORD', None, envs)
        self.datadir = env('MYSQL_DATADIR', '/var/lib/mysql', envs)
        self.pool_size = env('INNODB_BUFFER_POOL_SIZE', 0, envs, fn=int)

        # state
        self.ip = get_ip()
        self._conn = None
        self._query_buffer = OrderedDict()
コード例 #7
0
ファイル: libmysql.py プロジェクト: autopilotpattern/mysql
    def __init__(self, envs=os.environ):
        self.mysql_db = env('MYSQL_DATABASE', None, envs)
        self.mysql_user = env('MYSQL_USER', None, envs)
        self.mysql_password = env('MYSQL_PASSWORD', None, envs)
        self.mysql_root_password = env('MYSQL_ROOT_PASSWORD', '', envs)
        self.mysql_random_root_password = env('MYSQL_RANDOM_ROOT_PASSWORD',
                                              True, envs, to_flag)
        self.mysql_onetime_password = env('MYSQL_ONETIME_PASSWORD',
                                          False, envs, to_flag)
        self.repl_user = env('MYSQL_REPL_USER', None, envs)
        self.repl_password = env('MYSQL_REPL_PASSWORD', None, envs)
        self.datadir = env('MYSQL_DATADIR', '/var/lib/mysql', envs)
        self.pool_size = env('INNODB_BUFFER_POOL_SIZE', 0, envs, fn=int)

        # state
        self.ip = get_ip()
        self._conn = None
        self._query_buffer = OrderedDict()