You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Ted Ross (JIRA)" <qp...@incubator.apache.org> on 2008/12/16 22:44:44 UTC
[jira] Assigned: (QPID-1541) Add object() and first_object()
convenience APIs to qmf
[ https://issues.apache.org/jira/browse/QPID-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Ross reassigned QPID-1541:
------------------------------
Assignee: Ted Ross
> Add object() and first_object() convenience APIs to qmf
> -------------------------------------------------------
>
> Key: QPID-1541
> URL: https://issues.apache.org/jira/browse/QPID-1541
> Project: Qpid
> Issue Type: Improvement
> Components: Qpid Managment Framework
> Reporter: Ian Main
> Assignee: Ted Ross
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Here is a patch to add object() and first_object() to the ruby qmf console. Similar would have to be done for python but it should be very easy.
> diff --git a/lib/qpid/qmf.rb b/lib/qpid/qmf.rb
> index d2e2651..f341da7 100644
> --- a/lib/qpid/qmf.rb
> +++ b/lib/qpid/qmf.rb
> @@ -390,6 +390,18 @@ module Qpid::Qmf
> @result
> end
>
> + # Return one and only one object or nil.
> + def object(kwargs)
> + objs = objects(kwargs)
> + return objs.length == 1 ? objs[0] : nil
> + end
> +
> + # Return the first of potentially many objects.
> + def first_object(kwargs)
> + objs = objects(kwargs)
> + return objs.length > 0 ? objs[0] : nil
> + end
> +
> def set_event_filter(kwargs); end
>
> def handle_broker_connect(broker); end
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.