From 459f48df9d6b62a0f72be50c8ce082c1317c736e Mon Sep 17 00:00:00 2001 From: Kenneth Anthony Giusti Date: Thu, 8 Jul 2010 20:29:52 +0000 Subject: QMF: add api to get agent id, and new object id constructor that uses agent id. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@961919 13f79535-47bb-0310-9956-ffa450edef68 --- extras/qmf/src/py/qmf/console.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'extras') diff --git a/extras/qmf/src/py/qmf/console.py b/extras/qmf/src/py/qmf/console.py index 57e992418b..385cfdfedd 100644 --- a/extras/qmf/src/py/qmf/console.py +++ b/extras/qmf/src/py/qmf/console.py @@ -1782,6 +1782,13 @@ class ObjectId: self.agentEpoch = (first & 0x0FFF000000000000) >> 48 self.objectName = str(second) + def _create(cls, agent_name, object_name, epoch=0): + oid = {"_agent_name": agent_name, + "_object_name": object_name, + "_agent_epoch": epoch} + return cls(oid) + create = classmethod(_create) + def __cmp__(self, other): if other == None or not isinstance(other, ObjectId) : return 1 -- cgit v1.2.1