Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-5932

Python console's sendMethodRequest() should handle arguments that have default values in the schema

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.22
    • 0.32
    • Python Client
    • None

    Description

      The python console's sendMethodRequest() should handle some cases where the number of arguments supplied do not match the number of arguments required by the schema.

      When there are too many arguments supplied, the assumption is that the client is aware of a new argument, but the broker isn't. This is currently the case when qpid-route is dealing with an older broker and calls link.bridge(). The console will look for a named argument that was supplied, but isn't in the broker's schema. If one is found, it is removed. This requires that the new argument be named when it is passed to console. Otherwise we would have to assume the last argument supplied was the extra one, and that would be risky.

      When there are too few arguments supplied, the assumption is that client is out of date and isn't aware a new argument that the schema requires. This is currently the case when an old qpid-route is dealing with a new broker and calls link.bridge(). The console will look for arguments in the schema that have default values (starting at the end of the schema). If one is found, it is added with the default value. This requires that all new arguments be given a default value in the schema.

      Attachments

        1. bz1120081.svn.patch
          8 kB
          Ernest Allen

        Activity

          People

            kgiusti Ken Giusti
            eallen Ernest Allen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: