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/10/10 23:59:44 UTC
[jira] Created: (QPID-1350) Object dereference feature in the QMF
Console API
Object dereference feature in the QMF Console API
-------------------------------------------------
Key: QPID-1350
URL: https://issues.apache.org/jira/browse/QPID-1350
Project: Qpid
Issue Type: New Feature
Components: C++ Broker, Python Client
Affects Versions: M4
Reporter: Ted Ross
Assignee: Ted Ross
Priority: Minor
Fix For: M4
This new feature lets users of the Python QMF API easily follow references in objects.
For example:
Start a QMF console session and connect to the broker on the local host:
>>> s = Session()
>>> b = s.addBroker()
Get the first in the list of queue objects:
>>> queue = s.getObjects(_class="queue")[0]
Look at the queue's properties:
>>> queue.getProperties()
[(vhostRef, 0-0-1-0-1152921504606846979), (name, 'reply-kids-pc.localdomain.19302'), (durable, False), (autoDelete, True), (exclusive, True), (arguments, {})]
Note that the vhostRef is an objectId. Now there's a very easy way to get the referenced vhost object:
>>> vhost = queue.vhostRef
>>> vhost.getProperties()
[(brokerRef, 0-0-1-0-1152921504606846978), (name, '/')]
Likewise, we can get the broker object:
>>> queue.vhostRef.brokerRef.getProperties()
[(systemRef, 0-0-1-0-1152921504606846977), (port, 5672), (workerThreads, 5), (maxConns, 500), (connBacklog, 10), (stagingThreshold, 5000000), (mgmtPubInterval, 10), (version, '0.3'), (dataDir, '/home/ross/.qpidd')]
Or even invoke a method on the broker:
>>> queue.vhostRef.brokerRef.echo(1,"text")
OK (0) - {'body': u'text', 'sequence': 1}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (QPID-1350) Object dereference feature in the QMF
Console API
Posted by "Ted Ross (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-1350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639878#action_12639878 ]
Ted Ross commented on QPID-1350:
--------------------------------
There's a problem with this feature in that there is no way *not* to dereference reference values. Some applications want to get the reference for comparison purposes and not dereference to the referenced object.
To fix this problem, I've changed the syntax for dereferencing so it is optional. From the example above, to get the objectId (not dereferenced) use:
vhostId = queue.vhostRef
To follow the reference to the vhost object:
vhostObj = queue._vhostRef_
I will edit the example in the main text above to reflect this new reality.
-Ted
> Object dereference feature in the QMF Console API
> -------------------------------------------------
>
> Key: QPID-1350
> URL: https://issues.apache.org/jira/browse/QPID-1350
> Project: Qpid
> Issue Type: New Feature
> Components: C++ Broker, Python Client
> Affects Versions: M4
> Reporter: Ted Ross
> Assignee: Ted Ross
> Priority: Minor
> Fix For: M4
>
>
> This new feature lets users of the Python QMF API easily follow references in objects.
> For example:
> Start a QMF console session and connect to the broker on the local host:
> >>> s = Session()
> >>> b = s.addBroker()
> Get the first in the list of queue objects:
> >>> queue = s.getObjects(_class="queue")[0]
> Look at the queue's properties:
> >>> queue.getProperties()
> [(vhostRef, 0-0-1-0-1152921504606846979), (name, 'reply-kids-pc.localdomain.19302'), (durable, False), (autoDelete, True), (exclusive, True), (arguments, {})]
> Note that the vhostRef is an objectId. Now there's a very easy way to get the referenced vhost object:
> >>> vhost = queue.vhostRef
> >>> vhost.getProperties()
> [(brokerRef, 0-0-1-0-1152921504606846978), (name, '/')]
> Likewise, we can get the broker object:
> >>> queue.vhostRef.brokerRef.getProperties()
> [(systemRef, 0-0-1-0-1152921504606846977), (port, 5672), (workerThreads, 5), (maxConns, 500), (connBacklog, 10), (stagingThreshold, 5000000), (mgmtPubInterval, 10), (version, '0.3'), (dataDir, '/home/ross/.qpidd')]
> Or even invoke a method on the broker:
> >>> queue.vhostRef.brokerRef.echo(1,"text")
> OK (0) - {'body': u'text', 'sequence': 1}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (QPID-1350) Object dereference feature in the QMF
Console API
Posted by "Ted Ross (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-1350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Ross updated QPID-1350:
---------------------------
Status: Ready To Review (was: In Progress)
> Object dereference feature in the QMF Console API
> -------------------------------------------------
>
> Key: QPID-1350
> URL: https://issues.apache.org/jira/browse/QPID-1350
> Project: Qpid
> Issue Type: New Feature
> Components: C++ Broker, Python Client
> Affects Versions: M4
> Reporter: Ted Ross
> Assignee: Ted Ross
> Priority: Minor
> Fix For: M4
>
>
> This new feature lets users of the Python QMF API easily follow references in objects.
> For example:
> Start a QMF console session and connect to the broker on the local host:
> >>> s = Session()
> >>> b = s.addBroker()
> Get the first in the list of queue objects:
> >>> queue = s.getObjects(_class="queue")[0]
> Look at the queue's properties:
> >>> queue.getProperties()
> [(vhostRef, 0-0-1-0-1152921504606846979), (name, 'reply-kids-pc.localdomain.19302'), (durable, False), (autoDelete, True), (exclusive, True), (arguments, {})]
> Note that the vhostRef is an objectId. Now there's a very easy way to get the referenced vhost object:
> >>> vhost = queue._vhostRef_
> >>> vhost.getProperties()
> [(brokerRef, 0-0-1-0-1152921504606846978), (name, '/')]
> Note the "_" added before and after the property name. Without the underscores, the value returned will be simply the objectId. With the underscores, the reference will be followed and the referenced object returned.
> Likewise, we can get the broker object:
> >>> queue._vhostRef_._brokerRef_.getProperties()
> [(systemRef, 0-0-1-0-1152921504606846977), (port, 5672), (workerThreads, 5), (maxConns, 500), (connBacklog, 10), (stagingThreshold, 5000000), (mgmtPubInterval, 10), (version, '0.3'), (dataDir, '/home/ross/.qpidd')]
> Or even invoke a method on the broker:
> >>> queue._vhostRef_._brokerRef_.echo(1,"text")
> OK (0) - {'body': u'text', 'sequence': 1}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (QPID-1350) Object dereference feature in the QMF
Console API
Posted by "Ted Ross (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-1350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Ross updated QPID-1350:
---------------------------
Description:
This new feature lets users of the Python QMF API easily follow references in objects.
For example:
Start a QMF console session and connect to the broker on the local host:
>>> s = Session()
>>> b = s.addBroker()
Get the first in the list of queue objects:
>>> queue = s.getObjects(_class="queue")[0]
Look at the queue's properties:
>>> queue.getProperties()
[(vhostRef, 0-0-1-0-1152921504606846979), (name, 'reply-kids-pc.localdomain.19302'), (durable, False), (autoDelete, True), (exclusive, True), (arguments, {})]
Note that the vhostRef is an objectId. Now there's a very easy way to get the referenced vhost object:
>>> vhost = queue._vhostRef_
>>> vhost.getProperties()
[(brokerRef, 0-0-1-0-1152921504606846978), (name, '/')]
Note the "_" added before and after the property name. Without the underscores, the value returned will be simply the objectId. With the underscores, the reference will be followed and the referenced object returned.
Likewise, we can get the broker object:
>>> queue._vhostRef_._brokerRef_.getProperties()
[(systemRef, 0-0-1-0-1152921504606846977), (port, 5672), (workerThreads, 5), (maxConns, 500), (connBacklog, 10), (stagingThreshold, 5000000), (mgmtPubInterval, 10), (version, '0.3'), (dataDir, '/home/ross/.qpidd')]
Or even invoke a method on the broker:
>>> queue._vhostRef_._brokerRef_.echo(1,"text")
OK (0) - {'body': u'text', 'sequence': 1}
was:
This new feature lets users of the Python QMF API easily follow references in objects.
For example:
Start a QMF console session and connect to the broker on the local host:
>>> s = Session()
>>> b = s.addBroker()
Get the first in the list of queue objects:
>>> queue = s.getObjects(_class="queue")[0]
Look at the queue's properties:
>>> queue.getProperties()
[(vhostRef, 0-0-1-0-1152921504606846979), (name, 'reply-kids-pc.localdomain.19302'), (durable, False), (autoDelete, True), (exclusive, True), (arguments, {})]
Note that the vhostRef is an objectId. Now there's a very easy way to get the referenced vhost object:
>>> vhost = queue.vhostRef
>>> vhost.getProperties()
[(brokerRef, 0-0-1-0-1152921504606846978), (name, '/')]
Likewise, we can get the broker object:
>>> queue.vhostRef.brokerRef.getProperties()
[(systemRef, 0-0-1-0-1152921504606846977), (port, 5672), (workerThreads, 5), (maxConns, 500), (connBacklog, 10), (stagingThreshold, 5000000), (mgmtPubInterval, 10), (version, '0.3'), (dataDir, '/home/ross/.qpidd')]
Or even invoke a method on the broker:
>>> queue.vhostRef.brokerRef.echo(1,"text")
OK (0) - {'body': u'text', 'sequence': 1}
> Object dereference feature in the QMF Console API
> -------------------------------------------------
>
> Key: QPID-1350
> URL: https://issues.apache.org/jira/browse/QPID-1350
> Project: Qpid
> Issue Type: New Feature
> Components: C++ Broker, Python Client
> Affects Versions: M4
> Reporter: Ted Ross
> Assignee: Ted Ross
> Priority: Minor
> Fix For: M4
>
>
> This new feature lets users of the Python QMF API easily follow references in objects.
> For example:
> Start a QMF console session and connect to the broker on the local host:
> >>> s = Session()
> >>> b = s.addBroker()
> Get the first in the list of queue objects:
> >>> queue = s.getObjects(_class="queue")[0]
> Look at the queue's properties:
> >>> queue.getProperties()
> [(vhostRef, 0-0-1-0-1152921504606846979), (name, 'reply-kids-pc.localdomain.19302'), (durable, False), (autoDelete, True), (exclusive, True), (arguments, {})]
> Note that the vhostRef is an objectId. Now there's a very easy way to get the referenced vhost object:
> >>> vhost = queue._vhostRef_
> >>> vhost.getProperties()
> [(brokerRef, 0-0-1-0-1152921504606846978), (name, '/')]
> Note the "_" added before and after the property name. Without the underscores, the value returned will be simply the objectId. With the underscores, the reference will be followed and the referenced object returned.
> Likewise, we can get the broker object:
> >>> queue._vhostRef_._brokerRef_.getProperties()
> [(systemRef, 0-0-1-0-1152921504606846977), (port, 5672), (workerThreads, 5), (maxConns, 500), (connBacklog, 10), (stagingThreshold, 5000000), (mgmtPubInterval, 10), (version, '0.3'), (dataDir, '/home/ross/.qpidd')]
> Or even invoke a method on the broker:
> >>> queue._vhostRef_._brokerRef_.echo(1,"text")
> OK (0) - {'body': u'text', 'sequence': 1}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (QPID-1350) Object dereference feature in the QMF
Console API
Posted by "Ted Ross (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-1350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Ross resolved QPID-1350.
----------------------------
Resolution: Fixed
> Object dereference feature in the QMF Console API
> -------------------------------------------------
>
> Key: QPID-1350
> URL: https://issues.apache.org/jira/browse/QPID-1350
> Project: Qpid
> Issue Type: New Feature
> Components: C++ Broker, Python Client
> Affects Versions: M4
> Reporter: Ted Ross
> Assignee: Ted Ross
> Priority: Minor
> Fix For: M4
>
>
> This new feature lets users of the Python QMF API easily follow references in objects.
> For example:
> Start a QMF console session and connect to the broker on the local host:
> >>> s = Session()
> >>> b = s.addBroker()
> Get the first in the list of queue objects:
> >>> queue = s.getObjects(_class="queue")[0]
> Look at the queue's properties:
> >>> queue.getProperties()
> [(vhostRef, 0-0-1-0-1152921504606846979), (name, 'reply-kids-pc.localdomain.19302'), (durable, False), (autoDelete, True), (exclusive, True), (arguments, {})]
> Note that the vhostRef is an objectId. Now there's a very easy way to get the referenced vhost object:
> >>> vhost = queue._vhostRef_
> >>> vhost.getProperties()
> [(brokerRef, 0-0-1-0-1152921504606846978), (name, '/')]
> Note the "_" added before and after the property name. Without the underscores, the value returned will be simply the objectId. With the underscores, the reference will be followed and the referenced object returned.
> Likewise, we can get the broker object:
> >>> queue._vhostRef_._brokerRef_.getProperties()
> [(systemRef, 0-0-1-0-1152921504606846977), (port, 5672), (workerThreads, 5), (maxConns, 500), (connBacklog, 10), (stagingThreshold, 5000000), (mgmtPubInterval, 10), (version, '0.3'), (dataDir, '/home/ross/.qpidd')]
> Or even invoke a method on the broker:
> >>> queue._vhostRef_._brokerRef_.echo(1,"text")
> OK (0) - {'body': u'text', 'sequence': 1}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.