Description
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