You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Kim van der Riet (JIRA)" <ji...@apache.org> on 2011/07/07 22:20:17 UTC

[jira] [Created] (QPID-3348) Qmf broker proxy method create() does not handle keyword arguments, only regular parameters

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

                 Key: QPID-3348
                 URL: https://issues.apache.org/jira/browse/QPID-3348
             Project: Qpid
          Issue Type: Bug
            Reporter: Kim van der Riet
            Priority: Minor


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).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3348) Qmf broker proxy method create() does not handle keyword arguments, only regular parameters

Posted by "Kim van der Riet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kim van der Riet updated QPID-3348:
-----------------------------------

    Affects Version/s: 0.13
        Fix Version/s: 0.14

> Qmf broker proxy method create() does not handle keyword arguments, only regular parameters
> -------------------------------------------------------------------------------------------
>
>                 Key: QPID-3348
>                 URL: https://issues.apache.org/jira/browse/QPID-3348
>             Project: Qpid
>          Issue Type: Bug
>    Affects Versions: 0.13
>            Reporter: Kim van der Riet
>            Assignee: Kim van der Riet
>            Priority: Minor
>             Fix For: 0.14
>
>
> 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).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3348) Qmf broker proxy method create() does not handle keyword arguments, only regular parameters

Posted by "Andrew Stitcher (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Stitcher updated QPID-3348:
----------------------------------

    Fix Version/s: 0.14

> Qmf broker proxy method create() does not handle keyword arguments, only regular parameters
> -------------------------------------------------------------------------------------------
>
>                 Key: QPID-3348
>                 URL: https://issues.apache.org/jira/browse/QPID-3348
>             Project: Qpid
>          Issue Type: Bug
>    Affects Versions: 0.13
>            Reporter: Kim van der Riet
>            Assignee: Kim van der Riet
>            Priority: Minor
>             Fix For: 0.14
>
>
> 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).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3348) Qmf broker proxy method create() does not handle keyword arguments, only regular parameters

Posted by "Andrew Stitcher (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Stitcher updated QPID-3348:
----------------------------------

    Fix Version/s:     (was: 0.14)

> Qmf broker proxy method create() does not handle keyword arguments, only regular parameters
> -------------------------------------------------------------------------------------------
>
>                 Key: QPID-3348
>                 URL: https://issues.apache.org/jira/browse/QPID-3348
>             Project: Qpid
>          Issue Type: Bug
>    Affects Versions: 0.13
>            Reporter: Kim van der Riet
>            Assignee: Kim van der Riet
>            Priority: Minor
>
> 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).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Resolved] (QPID-3348) Qmf broker proxy method create() does not handle keyword arguments, only regular parameters

Posted by "Kim van der Riet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kim van der Riet resolved QPID-3348.
------------------------------------

    Resolution: Fixed

Fixed in r.1144302

> Qmf broker proxy method create() does not handle keyword arguments, only regular parameters
> -------------------------------------------------------------------------------------------
>
>                 Key: QPID-3348
>                 URL: https://issues.apache.org/jira/browse/QPID-3348
>             Project: Qpid
>          Issue Type: Bug
>            Reporter: Kim van der Riet
>            Assignee: Kim van der Riet
>            Priority: Minor
>
> 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).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Assigned] (QPID-3348) Qmf broker proxy method create() does not handle keyword arguments, only regular parameters

Posted by "Kim van der Riet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kim van der Riet reassigned QPID-3348:
--------------------------------------

    Assignee: Kim van der Riet

> Qmf broker proxy method create() does not handle keyword arguments, only regular parameters
> -------------------------------------------------------------------------------------------
>
>                 Key: QPID-3348
>                 URL: https://issues.apache.org/jira/browse/QPID-3348
>             Project: Qpid
>          Issue Type: Bug
>            Reporter: Kim van der Riet
>            Assignee: Kim van der Riet
>            Priority: Minor
>
> 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).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3348) Qmf broker proxy method create() does not handle keyword arguments, only regular parameters

Posted by "Kim van der Riet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061911#comment-13061911 ] 

Kim van der Riet commented on QPID-3348:
----------------------------------------

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.

> Qmf broker proxy method create() does not handle keyword arguments, only regular parameters
> -------------------------------------------------------------------------------------------
>
>                 Key: QPID-3348
>                 URL: https://issues.apache.org/jira/browse/QPID-3348
>             Project: Qpid
>          Issue Type: Bug
>            Reporter: Kim van der Riet
>            Assignee: Kim van der Riet
>            Priority: Minor
>
> 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).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org