Create a client and grab essential information from the server.
(self)
| 97 | MULTI_MONGOS_LB_URI = MULTI_MONGOS_LB_URI |
| 98 | |
| 99 | def __init__(self): |
| 100 | """Create a client and grab essential information from the server.""" |
| 101 | self.connection_attempts = [] |
| 102 | self.connected = False |
| 103 | self.w = None |
| 104 | self.nodes = set() |
| 105 | self.replica_set_name = None |
| 106 | self.cmd_line = None |
| 107 | self.server_status = None |
| 108 | self.version = Version(-1) # Needs to be comparable with Version |
| 109 | self.auth_enabled = False |
| 110 | self.test_commands_enabled = False |
| 111 | self.server_parameters = {} |
| 112 | self._hello = None |
| 113 | self.is_mongos = False |
| 114 | self.mongoses = [] |
| 115 | self.is_rs = False |
| 116 | self.has_ipv6 = False |
| 117 | self.tls = False |
| 118 | self.tlsCertificateKeyFile = False |
| 119 | self.server_is_resolvable = is_server_resolvable() |
| 120 | self.default_client_options: Dict = {} |
| 121 | self.sessions_enabled = False |
| 122 | self.client = None # type: ignore |
| 123 | self.conn_lock = threading.Lock() |
| 124 | self.load_balancer = TEST_LOADBALANCER |
| 125 | self._fips_enabled = None |
| 126 | if self.load_balancer: |
| 127 | self.default_client_options["loadBalanced"] = True |
| 128 | if COMPRESSORS: |
| 129 | self.default_client_options["compressors"] = COMPRESSORS |
| 130 | if MONGODB_API_VERSION: |
| 131 | server_api = ServerApi(MONGODB_API_VERSION) |
| 132 | self.default_client_options["server_api"] = server_api |
| 133 | |
| 134 | @property |
| 135 | def client_options(self): |
nothing calls this directly
no test coverage detected