Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1142

Expose more methods to like getReplicationInfo to pymongo and other drivers

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      """
      I know how to use db.command(cmd) for commands like 'dbstats' from
      within Pymongo but how can I call e.g. printReplicationInfo()
      or the underlying getReplicationInfo()
      """

      """

      Those are not commands but queries on the oplog, so you'd have to
      implement some of that logic manually (unless we decide to support
      them w/in pymongo, but not sure if that makes sense).

      To view the source of getReplicationInfo type:

      db.getReplicationInfo

      in the shell (note no parens). You should be able to translate this to
      python code w/ pymongo pretty easily.
      """
      """
      I think it does make sense. There is actually no clean way to extract
      replication related information w/o reimplementing the wheel on the
      Python level. The output of 'serverStatus' can be accessed as JSON
      through a db.command() call and such function calls could be wrapped in
      a similar way.
      """

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            yet@gmx.de Andreas Jung
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: