We should add a MongoClient helper to access the current TopologyDescription. Like:
>>> client.topology_description <TopologyDescription id: 5ff38c18626b97e99fdd1224, topology_type: Single, servers: [<ServerDescription ('localhost', 27017) server_type: RSPrimary, rtt: 0.000817559481098>]>
This is useful for debugging and also can replace a lot of the other MongoClient helpers like client.is_primary, is_mongos, nodes, arbiters, etc...
For example, this ticket would resolve PYTHON-2476.
- is related to
-
PYTHON-2164 Rethink MongoClient read only configuration attributes
- Closed
- related to
-
PYTHON-2476 Check server type is Standalone
- Closed