(nodes: Sized, options: Mapping[str, Any])
| 458 | |
| 459 | |
| 460 | def _check_options(nodes: Sized, options: Mapping[str, Any]) -> None: |
| 461 | # Ensure directConnection was not True if there are multiple seeds. |
| 462 | if len(nodes) > 1 and options.get("directconnection"): |
| 463 | raise ConfigurationError("Cannot specify multiple hosts with directConnection=true") |
| 464 | |
| 465 | if options.get("loadbalanced"): |
| 466 | if len(nodes) > 1: |
| 467 | raise ConfigurationError("Cannot specify multiple hosts with loadBalanced=true") |
| 468 | if options.get("directconnection"): |
| 469 | raise ConfigurationError("Cannot specify directConnection=true with loadBalanced=true") |
| 470 | if options.get("replicaset"): |
| 471 | raise ConfigurationError("Cannot specify replicaSet with loadBalanced=true") |
| 472 | |
| 473 | |
| 474 | def _parse_kms_tls_options( |
no test coverage detected