Qpid
  1. Qpid
  2. QPID-3348

Qmf broker proxy method create() does not handle keyword arguments, only regular parameters

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.13
    • Fix Version/s: 0.14
    • Component/s: None
    • Labels:
      None

      Description

      The Qmf management methods defined in the management-schema.xml file are implemented through the console Object class _getattr_() method. This calls Object.invoke(), which in turn calls Object._sendMethodRequest().

      However, the implementation of _sendMethodRequest() accounts only for regular arguments in the args parameter, and ignores the kwargs parameter. Hence, the call to the create() call:

      <method name="create" desc="Create an object of the specified type">
      <arg name="type" dir="I" type="sstr" desc="The type of object to create"/>
      <arg name="name" dir="I" type="sstr" desc="The name of the object to create"/>
      <arg name="properties" dir="I" type="map" desc="Type specific object properties"/>
      <arg name="strict" dir="I" type="bool" desc="If specified, treat unrecognised object properties as an error"/>
      </method>

      as follows:

      broker_proxy.create("exchange", name, props, True)

      will work, but

      broker_proxy.create(type="exchange", name=name, properties=props, strict=True)

      will fail (Exception: Incorrect number of arguments: expected 4, got 0).

        Activity

        Hide
        Kim van der Riet added a comment -

        The special "meta" keyword args "_timeout" and "_async" which may be used with the management calls must also be accounted for in the processing of these args - or tests that use them will fail with too many args supplied.

        Show
        Kim van der Riet added a comment - The special "meta" keyword args "_timeout" and "_async" which may be used with the management calls must also be accounted for in the processing of these args - or tests that use them will fail with too many args supplied.
        Hide
        Kim van der Riet added a comment -

        Fixed in r.1144302

        Show
        Kim van der Riet added a comment - Fixed in r.1144302

          People

          • Assignee:
            Kim van der Riet
            Reporter:
            Kim van der Riet
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development