A copy of this description, with all servers marked Unknown.
(self)
| 177 | return updated_topology_description(self, unknown_sd) |
| 178 | |
| 179 | def reset(self) -> TopologyDescription: |
| 180 | """A copy of this description, with all servers marked Unknown.""" |
| 181 | if self._topology_type == TOPOLOGY_TYPE.ReplicaSetWithPrimary: |
| 182 | topology_type = TOPOLOGY_TYPE.ReplicaSetNoPrimary |
| 183 | else: |
| 184 | topology_type = self._topology_type |
| 185 | |
| 186 | # The default ServerDescription's type is Unknown. |
| 187 | sds = {address: ServerDescription(address) for address in self._server_descriptions} |
| 188 | |
| 189 | return TopologyDescription( |
| 190 | topology_type, |
| 191 | sds, |
| 192 | self._replica_set_name, |
| 193 | self._max_set_version, |
| 194 | self._max_election_id, |
| 195 | self._topology_settings, |
| 196 | ) |
| 197 | |
| 198 | def server_descriptions(self) -> dict[_Address, ServerDescription]: |
| 199 | """dict of (address, |
nothing calls this directly
no test coverage detected