def reset(self):
        """Ensure all shards, configs, and routers are running and available."""
        # Ensure all shards by calling "reset" on each.
        for shard_id in self._shards:
            if self._shards[shard_id].get('isReplicaSet'):
                singleton = ReplicaSets()
            elif self._shards[shard_id].get('isServer'):
                singleton = Servers()
            singleton.command(self._shards[shard_id]['_id'], 'reset')
        # Ensure all config servers by calling "reset" on each.
        for config_id in self._configsvrs:
            self.configdb_singleton.command(config_id, 'reset')
        # Ensure all routers by calling "reset" on each.
        for router_id in self._routers:
            Servers().command(router_id, 'reset')
        return self.info()
def reset ( self ) : for shard_id in self . _shards : if self . _shards [ shard_id ] . get ( 'isReplicaSet' ) : singleton = ReplicaSets ( ) elif self . _shards [ shard_id ] . get ( 'isServer' ) : singleton = Servers ( ) singleton . command ( self . _shards [ shard_id ] [ '_id' ] , 'reset' ) for config_id in self . _configsvrs : self . configdb_singleton . command ( config_id , 'reset' ) for router_id in self . _routers : Servers ( ) . command ( router_id , 'reset' ) return self . info ( )
Ensure all shards, configs, and routers are running and available.