You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2014/12/20 00:58:52 UTC

svn commit: r1646903 - in /qpid/dispatch/trunk: python/qpid_dispatch/management/ python/qpid_dispatch_internal/management/ src/ tests/ tests/management/ tools/

Author: aconway
Date: Fri Dec 19 23:58:51 2014
New Revision: 1646903

URL: http://svn.apache.org/r1646903
Log:
DISPATCH-86: Management agent should enforce format of identifiers.

New behavior:
- identity is determined by the agent, always of the form type/id for some id string.
- name is left unchanged if specified, if not specified it defaults to identity.
- qdstat uses identity, not name, since name may be set to arbitrary values by user.

Modified:
    qpid/dispatch/trunk/python/qpid_dispatch/management/qdrouter.json
    qpid/dispatch/trunk/python/qpid_dispatch_internal/management/agent.py
    qpid/dispatch/trunk/python/qpid_dispatch_internal/management/config.py
    qpid/dispatch/trunk/python/qpid_dispatch_internal/management/schema.py
    qpid/dispatch/trunk/src/dispatch.c
    qpid/dispatch/trunk/src/error.c
    qpid/dispatch/trunk/src/router_agent.c
    qpid/dispatch/trunk/src/router_pynode.c
    qpid/dispatch/trunk/src/server.c
    qpid/dispatch/trunk/tests/management/qdrouter.py
    qpid/dispatch/trunk/tests/system_tests_management.py
    qpid/dispatch/trunk/tests/system_tests_one_router.py
    qpid/dispatch/trunk/tools/qdstat

Modified: qpid/dispatch/trunk/python/qpid_dispatch/management/qdrouter.json
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpid_dispatch/management/qdrouter.json?rev=1646903&r1=1646902&r2=1646903&view=diff
==============================================================================
--- qpid/dispatch/trunk/python/qpid_dispatch/management/qdrouter.json (original)
+++ qpid/dispatch/trunk/python/qpid_dispatch/management/qdrouter.json Fri Dec 19 23:58:51 2014
@@ -81,16 +81,14 @@
             "attributes": {
                 "name": {
                     "type": "String",
-                    "required": true,
+                    "required": false,
                     "unique": true,
-                    "default": "$identity",
                     "description": "Unique name, can be changed."
                 },
                 "identity": {
                     "type": "String",
-                    "required": true,
+                    "required": false,
                     "unique": true,
-                    "default": "$name",
                     "description": "Unique identity, will not change."
                 },
                 "type": {

Modified: qpid/dispatch/trunk/python/qpid_dispatch_internal/management/agent.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpid_dispatch_internal/management/agent.py?rev=1646903&r1=1646902&r2=1646903&view=diff
==============================================================================
--- qpid/dispatch/trunk/python/qpid_dispatch_internal/management/agent.py (original)
+++ qpid/dispatch/trunk/python/qpid_dispatch_internal/management/agent.py Fri Dec 19 23:58:51 2014
@@ -85,31 +85,47 @@ class AtomicCount(object):
 
     def next(self):
         with self.lock:
+            n = self.count
             self.count += 1
-            return self.count
+            return n
 
 class AgentEntity(SchemaEntity):
     """
     Base class for agent entities with operations as well as attributes.
     """
 
-    def __init__(self, agent, entity_type, attributes=None, validate=True, base_id=None):
+    def __init__(self, agent, entity_type, attributes, validate=True):
         """
         @para agent: Containing L{Agent}
         @param entity_type: L{EntityType}
         @param attributes: Attribute name:value map
         @param validate: If true, validate the entity.
-        @param base_id: Use as base identifier for name and identifier.
         """
-        if base_id:
-            full_id = "%s/%s" % (entity_type.short_name, base_id)
-            attributes['name'] = attributes['identity'] = full_id
         super(AgentEntity, self).__init__(entity_type, attributes, validate=validate)
         # Direct __dict__ access to avoid validation as schema attributes
         self.__dict__['_agent'] = agent
         self.__dict__['_qd'] = agent.qd
         self.__dict__['_dispatch'] = agent.dispatch
 
+    def validate(self):
+        # Set default identity and name if not already set.
+        prefix = self.entity_type.short_name + "/"
+        if self.attributes.get('identity') is None:
+            self.attributes['identity'] = prefix + str(self._identifier(self.attributes))
+        elif not self.attributes['identity'].startswith(prefix):
+            self.attributes['identity'] = prefix + self.attributes['identity']
+        self.attributes.setdefault('name', self.attributes['identity'])
+        super(AgentEntity, self).validate()
+
+    def _identifier(self, attributes):
+        """
+        Generate identifier from attributes. identity=type/identifier.
+        Default is per-type counter, derived classes can override.
+        """
+        try: counter = type(self)._identifier_count
+        except AttributeError: counter = type(self)._identifier_count = AtomicCount()
+        return str(counter.next())
+
     def _refresh(self):
         """Refresh self.attributes from C implementation. No-op if no C impl pointer"""
         return False # Replaced by _set_pointer
@@ -163,9 +179,15 @@ class ContainerEntity(AgentEntity):
 
 class RouterEntity(AgentEntity):
     def __init__(self, agent, entity_type, attributes=None):
-        super(RouterEntity, self).__init__(agent, entity_type, attributes, validate=False, base_id=attributes.get('routerId'))
+        super(RouterEntity, self).__init__(agent, entity_type, attributes, validate=False)
+        # Router is a mix of configuration and operational entity.
+        # The "area" attribute is operational not configured.
+        # FIXME aconway 2014-12-19: clean this up.
         self._set_pointer(self._dispatch)
 
+    def _identifier(self, attributes):
+        return attributes.get('routerId')
+
     def create(self):
         self._qd.qd_dispatch_configure_router(self._dispatch, self)
 
@@ -176,7 +198,9 @@ class LogEntity(AgentEntity):
         if attributes.get("module") == "DEFAULT":
             defaults = dict(level="info", timestamp=True, source=False, output="stderr")
             attributes = dict(defaults, **attributes)
-        super(LogEntity, self).__init__(agent, entity_type, attributes, validate=True, base_id=attributes.get('module'))
+        super(LogEntity, self).__init__(agent, entity_type, attributes, validate=True)
+
+    def _identifier(self, attributes): return attributes.get('module')
 
     def create(self):
         self._qd.qd_log_entity(self)
@@ -212,13 +236,6 @@ class WaypointEntity(AgentEntity):
 
 class DummyEntity(AgentEntity):
 
-    id_count = AtomicCount()
-
-    def create(self):
-        self['identity'] = self.next_id()
-
-    def next_id(self): return self.type+str(self.id_count.next())
-
     def callme(self, request):
         return (OK, dict(**request.properties))
 
@@ -228,39 +245,21 @@ class CEntity(AgentEntity):
     Entity that is registered from C code rather than created via management.
     """
     def __init__(self, agent, entity_type, pointer):
-        def prefix(prefix, name):
-            if not str(name).startswith(prefix):
-                name = "%s/%s" % (prefix, name)
-            return name
-
-        super(CEntity, self).__init__(agent, entity_type, validate=False)
+        super(CEntity, self).__init__(agent, entity_type, {}, validate=False)
         self._set_pointer(pointer)
         self._refresh()
-        identity = self.attributes.get('identity')
-        if identity is None: identity = str(self.id_count.next())
-        self.attributes['identity'] = prefix(entity_type.short_name, identity)
         self.validate()
 
 
-class RouterLinkEntity(CEntity):
-    id_count = AtomicCount()
-
-
-class RouterNodeEntity(CEntity):
-    id_count = AtomicCount()
+class RouterLinkEntity(CEntity): pass
 
+class RouterNodeEntity(CEntity): pass
 
-class RouterAddressEntity(CEntity):
-    id_count = AtomicCount()
+class RouterAddressEntity(CEntity): pass
 
+class ConnectionEntity(CEntity): pass
 
-class ConnectionEntity(CEntity):
-    id_count = AtomicCount()
-
-
-class AllocatorEntity(CEntity):
-    id_count = AtomicCount()
-
+class AllocatorEntity(CEntity): pass
 
 class EntityCache(object):
     """
@@ -289,6 +288,7 @@ class EntityCache(object):
     def add(self, entity, pointer=None):
         """Add an entity. Provide pointer if it is associated with a C entity"""
         self.log(LOG_DEBUG, "Add entity: %s" % entity)
+        entity.validate()       # Fill in defaults etc.
         # Validate in the context of the existing entities for uniqueness
         self.schema.validate_full(chain(iter([entity]), iter(self.entities)))
         self.entities.append(entity)
@@ -386,7 +386,10 @@ class Agent(object):
 
     def create_entity(self, attributes):
         """Create an instance of the implementation class for an entity"""
-        if 'type' not in attributes:
+
+        if attributes.get('identity') is not None:
+            raise BadRequestStatus("'identity' attribute cannot be specified %s" % attributes)
+        if attributes.get('type') is None:
             raise BadRequestStatus("No 'type' attribute in %s" % attributes)
         entity_type = self.schema.entity_type(attributes['type'])
         return self.entity_class(entity_type)(self, entity_type, attributes)

Modified: qpid/dispatch/trunk/python/qpid_dispatch_internal/management/config.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpid_dispatch_internal/management/config.py?rev=1646903&r1=1646902&r2=1646903&view=diff
==============================================================================
--- qpid/dispatch/trunk/python/qpid_dispatch_internal/management/config.py (original)
+++ qpid/dispatch/trunk/python/qpid_dispatch_internal/management/config.py Fri Dec 19 23:58:51 2014
@@ -39,7 +39,7 @@ class Config(object):
             try:
                 self.load(filename)
             except Exception, e:
-                raise Exception("Cannot load configuration file %s: %s" % (filename, e))
+                raise Exception, "Cannot load configuration file %s: %s" % (filename, e), sys.exc_info()[2]
         else:
             self.entities = []
 
@@ -91,29 +91,6 @@ class Config(object):
         return [_expand_section(s, annotations) for s in content
                 if self.schema.is_configuration(self.schema.entity_type(s[0], False))]
 
-    def _default_ids(self, content):
-        """
-        Set default name and identity where missing.
-        - If entity has no name/identity, set both to "<entity-type>:<i>"
-        - If entity has one of name/identity set the other to be the same.
-        - If entity has both, do nothing
-        """
-        counts = dict((et.short_name, 0) for et in self.config_types)
-        for section in content:
-            section_name, attrs = section
-            count = counts[section_name]
-            counts[section_name] += 1
-            if 'name' in attrs and 'identity' in attrs:
-                continue
-            elif 'name' in attrs:
-                attrs['identity'] = attrs['name']
-            elif 'identity' in attrs:
-                attrs['name'] = attrs['identity']
-            else:
-                identity = "%s/%d"%(section_name, count)
-                attrs['name'] = attrs['identity'] = identity
-        return content
-
     def load(self, source):
         """
         Load a configuration file.
@@ -133,7 +110,6 @@ class Config(object):
                 if et.singleton and not [s for s in sections if s[0] == et.short_name]:
                     sections.append((et.short_name, {}))
             sections = self._expand(sections)
-            sections = self._default_ids(sections)
             entities = [dict(type=self.schema.long_name(s[0]), **s[1]) for s in sections]
             self.schema.validate_all(entities)
             self.entities = entities

Modified: qpid/dispatch/trunk/python/qpid_dispatch_internal/management/schema.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpid_dispatch_internal/management/schema.py?rev=1646903&r1=1646902&r2=1646903&view=diff
==============================================================================
--- qpid/dispatch/trunk/python/qpid_dispatch_internal/management/schema.py (original)
+++ qpid/dispatch/trunk/python/qpid_dispatch_internal/management/schema.py Fri Dec 19 23:58:51 2014
@@ -414,7 +414,7 @@ class EntityType(AttrsAndOps):
         try:
             # Add missing values
             for attr in self.attributes.itervalues():
-                if attr.name not in attributes or attributes[attr.name] is None:
+                if attributes.get(attr.name) is None:
                     value = attr.missing_value(**kwargs)
                     if value is not None: attributes[attr.name] = value
                     if value is None and attr.name in attributes:

Modified: qpid/dispatch/trunk/src/dispatch.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/dispatch.c?rev=1646903&r1=1646902&r2=1646903&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/dispatch.c (original)
+++ qpid/dispatch/trunk/src/dispatch.c Fri Dec 19 23:58:51 2014
@@ -134,7 +134,6 @@ qd_error_t qd_dispatch_prepare(qd_dispat
     return qd_error_code();
 }
 
-/* FIXME aconway 2014-12-05: cleanup */
 void qd_dispatch_set_agent(qd_dispatch_t *qd, void *agent) {
     assert(agent);
     assert(!qd->agent);

Modified: qpid/dispatch/trunk/src/error.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/error.c?rev=1646903&r1=1646902&r2=1646903&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/error.c (original)
+++ qpid/dispatch/trunk/src/error.c Fri Dec 19 23:58:51 2014
@@ -63,13 +63,12 @@ qd_error_t qd_error_impl(qd_error_t code
     if (code) {
         char *begin = ts.error_message;
         char *end = begin + ERROR_MAX;
-        /* FIXME aconway 2014-12-10:  */
         (void)aprintf;
-        /* const char* name = qd_error_name(code); */
-        /* if (name) */
-        /*     aprintf(&begin, end, "%s: ", name); */
-        /* else */
-        /*     aprintf(&begin, end, "%d: ", code); */
+        const char* name = qd_error_name(code);
+        if (name)
+            aprintf(&begin, end, "%s: ", name);
+        else
+            aprintf(&begin, end, "%d: ", code);
         va_list arglist;
         va_start(arglist, fmt);
         vaprintf(&begin, end, fmt, arglist);

Modified: qpid/dispatch/trunk/src/router_agent.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/router_agent.c?rev=1646903&r1=1646902&r2=1646903&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/router_agent.c (original)
+++ qpid/dispatch/trunk/src/router_agent.c Fri Dec 19 23:58:51 2014
@@ -41,9 +41,7 @@ ENUM_DEFINE(qd_router_mode, qd_router_mo
 qd_error_t qd_entity_refresh_router(qd_entity_t* entity, void *impl) {
     qd_dispatch_t *qd = (qd_dispatch_t*) impl;
     qd_router_t *router = qd->router;
-    if (qd_entity_set_stringf(entity, "name", "%s/%s", QD_ROUTER_TYPE, router->router_id) == 0 &&
-        qd_entity_set_stringf(entity, "identity", "%s/%s", QD_ROUTER_TYPE, router->router_id) == 0 &&
-        
+    if ((qd_entity_has(entity, "identity") || qd_entity_set_string(entity, "identity", router->router_id) == 0) &&
         qd_entity_set_string(entity, "area", router->router_area) == 0 &&
         qd_entity_set_string(entity, "mode", qd_router_mode_name(router->router_mode)) == 0 &&
         qd_entity_set_long(entity, "addrCount", DEQ_SIZE(router->addrs)) == 0 &&
@@ -61,8 +59,7 @@ static const char *address_text(qd_addre
 
 qd_error_t qd_entity_refresh_router_address(qd_entity_t* entity, void *impl) {
     qd_address_t *addr = (qd_address_t*) impl;
-    if ((qd_entity_has(entity, "identity") ||
-         qd_entity_set_string(entity, "identity", address_text(addr)) == 0) &&
+    if ((qd_entity_has(entity, "identity") || qd_entity_set_string(entity, "identity", address_text(addr)) == 0) &&
         qd_entity_set_bool(entity, "inProcess", addr->handler != 0) == 0 &&
         qd_entity_set_long(entity, "subscriberCount", DEQ_SIZE(addr->rlinks)) == 0 &&
         qd_entity_set_long(entity, "remoteCount", DEQ_SIZE(addr->rnodes)) == 0 &&

Modified: qpid/dispatch/trunk/src/router_pynode.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/router_pynode.c?rev=1646903&r1=1646902&r2=1646903&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/router_pynode.c (original)
+++ qpid/dispatch/trunk/src/router_pynode.c Fri Dec 19 23:58:51 2014
@@ -467,7 +467,6 @@ static PyObject* qd_unmap_destination(Py
     return Py_None;
 }
 
-/* FIXME aconway 2014-12-05:  */
 static PyObject* qd_get_agent(PyObject *self, PyObject *args) {
     RouterAdapter *adapter = (RouterAdapter*) self;
     PyObject *agent = adapter->router->qd->agent;

Modified: qpid/dispatch/trunk/src/server.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/server.c?rev=1646903&r1=1646902&r2=1646903&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/server.c (original)
+++ qpid/dispatch/trunk/src/server.c Fri Dec 19 23:58:51 2014
@@ -93,7 +93,6 @@ qd_error_t qd_entity_refresh_connection(
             entity, "container",
             conn->pn_conn ? pn_connection_remote_container(conn->pn_conn) : 0) == 0 &&
         connection_entity_update_host(entity, conn) == 0 &&
-        /* FIXME aconway 2014-10-14: change attr name to sasl-mechanisms for consistency? */
         qd_entity_set_string(entity, "sasl", config->sasl_mechanisms) == 0 &&
         qd_entity_set_string(entity, "role", config->role) == 0 &&
         qd_entity_set_string(entity, "dir", conn->connector ? "out" : "in") == 0)

Modified: qpid/dispatch/trunk/tests/management/qdrouter.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/management/qdrouter.py?rev=1646903&r1=1646902&r2=1646903&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/management/qdrouter.py (original)
+++ qpid/dispatch/trunk/tests/management/qdrouter.py Fri Dec 19 23:58:51 2014
@@ -100,23 +100,10 @@ class QdrouterTest(unittest.TestCase):
         ]
         self.assertEqual(content, expect)
 
-        content = conf._default_ids(content)
-        self.assertEqual(content, [
-            [u"router", {u"mode":u"standalone", u"name":u"router/0", u"identity":u"router/0"}],
-            [u"listener", {u"name":u"l0", u"identity":u"l0", u"saslMechanisms":u"ANONYMOUS", u"password":u"secret"}],
-            [u"listener", {u"name":u"l1", u"identity":u"l1", u"saslMechanisms":u"ANONYMOUS", u"port":u"1234"}],
-            [u"listener", {u"name":u"listener/2", u"identity":u"listener/2", u"saslMechanisms":u"ANONYMOUS", u"port":u"4567"}]
-        ])
-
         conf.load(text.split(u"\n"))
         router = conf.by_type('router').next()
-        self.assertEqual(router['name'], 'router/0')
-        self.assertEqual(router['identity'], 'router/0')
         listeners = list(conf.by_type('listener'))
         self.assertEqual(len(listeners), 3)
-        self.assertEqual(listeners[0]['name'], 'l0')
-        self.assertEqual(listeners[2]['name'], 'listener/2')
-        self.assertEqual(listeners[2]['identity'], 'listener/2')
 
     def test_qdrouter_parse_dash(self):
         self.do_test_qdrouter_parse(conf_text)

Modified: qpid/dispatch/trunk/tests/system_tests_management.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/system_tests_management.py?rev=1646903&r1=1646902&r2=1646903&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/system_tests_management.py (original)
+++ qpid/dispatch/trunk/tests/system_tests_management.py Fri Dec 19 23:58:51 2014
@@ -124,7 +124,7 @@ class ManagementTest(system_test.TestCas
         # Note qdrouter schema defines port as string not int, since it can be a service name.
         attributes = {'name':'foo', 'port':str(port), 'role':'normal', 'saslMechanisms': 'ANONYMOUS'}
         entity = self.assert_create_ok(LISTENER, 'foo', attributes)
-        self.assertEqual(entity['identity'], attributes['name'])
+        self.assertEqual(entity['name'], 'foo')
         self.assertEqual(entity['addr'], '0.0.0.0')
 
         # Connect via the new listener
@@ -220,12 +220,10 @@ class ManagementTest(system_test.TestCas
     def test_entity(self):
         entity = self.node.read(type=LISTENER, name='l0')
         self.assertEqual('l0', entity.name)
-        self.assertEqual('l0', entity.identity)
         self.assertEqual(str(self.router.ports[0]), entity.port)
 
-        entity = self.node.read(type=LISTENER, identity='l1')
+        entity = self.node.read(type=LISTENER, identity='listener/1')
         self.assertEqual('l1', entity.name)
-        self.assertEqual('l1', entity.identity)
         self.assertEqual(str(self.router.ports[1]), entity.port)
 
         # Bad type

Modified: qpid/dispatch/trunk/tests/system_tests_one_router.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/system_tests_one_router.py?rev=1646903&r1=1646902&r2=1646903&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/system_tests_one_router.py (original)
+++ qpid/dispatch/trunk/tests/system_tests_one_router.py Fri Dec 19 23:58:51 2014
@@ -521,7 +521,7 @@ class RouterTest(TestCase):
         M.recv()
         M.get(response)
 
-        assert response.properties['statusCode'] == 200, response.properties['statusDescription']
+        assert response.properties['statusCode'] == 200, response.properties['statusCode']
         self.assertEqual(response.correlation_id, "C1")
         self.assertEqual(response.body, [])
 

Modified: qpid/dispatch/trunk/tools/qdstat
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tools/qdstat?rev=1646903&r1=1646902&r2=1646903&view=diff
==============================================================================
--- qpid/dispatch/trunk/tools/qdstat (original)
+++ qpid/dispatch/trunk/tools/qdstat Fri Dec 19 23:58:51 2014
@@ -134,13 +134,13 @@ class BusManager(Node):
             return addr[1]
         return ''
 
-    def _name_clean(self, name):
-        if not name:
+    def _identity_clean(self, identity):
+        if not identity:
             return "-"
-        pos = name.find('/')
+        pos = identity.find('/')
         if pos >= 0:
-            return name[pos + 1:]
-        return name
+            return identity[pos + 1:]
+        return identity
 
     def displayGeneral(self):
         disp = Display(prefix="  ")
@@ -154,7 +154,7 @@ class BusManager(Node):
         router = objects[0]
         rows.append(('Mode',          router.mode))
         rows.append(('Area',          router.area))
-        rows.append(('Router Id',     self._name_clean(router.name)))
+        rows.append(('Router Id',     self._identity_clean(router.identity)))
         rows.append(('Address Count', router.addrCount))
         rows.append(('Link Count',    router.linkCount))
         rows.append(('Node Count',    router.nodeCount))
@@ -183,7 +183,7 @@ class BusManager(Node):
             row.append(link.linkType)
             row.append(link.linkDir)
             if link.linkType == "inter-router":
-                row.append(self._name_clean(link.name))
+                row.append(self._identity_clean(link.identity))
             else:
                 row.append('-')
             row.append(self._addr_class(link.owningAddr))
@@ -213,10 +213,10 @@ class BusManager(Node):
 
         nodes = {}
         for node in objects:
-            nodes[self._name_clean(node.name)] = node
+            nodes[self._identity_clean(node.identity)] = node
             node.addr = self._addr_text(node.addr)
 
-        rows.append([self._name_clean(attached.name), '-', '(self)', ''])
+        rows.append([self._identity_clean(attached.identity), '-', '(self)', ''])
         for node in objects:
             row = []
             row.append(node.addr)
@@ -261,9 +261,9 @@ class BusManager(Node):
 
         for addr in objects:
             row = []
-            row.append(self._addr_class(self._name_clean(addr.name)))
-            row.append(self._addr_text(self._name_clean(addr.name)))
-            row.append(self._addr_phase(self._name_clean(addr.name)))
+            row.append(self._addr_class(self._identity_clean(addr.identity)))
+            row.append(self._addr_text(self._identity_clean(addr.identity)))
+            row.append(self._addr_phase(self._identity_clean(addr.identity)))
             row.append(addr.inProcess)
             row.append(addr.subscriberCount)
             row.append(addr.remoteCount)
@@ -295,7 +295,7 @@ class BusManager(Node):
 
         for t in objects:
             row = []
-            row.append(self._name_clean(t.name))
+            row.append(self._identity_clean(t.identity))
             row.append(t.typeSize)
             row.append(t.transferBatchSize)
             row.append(t.localFreeListMax)
@@ -309,7 +309,7 @@ class BusManager(Node):
         dispRows = sorter.getSorted()
         disp.formattedTable(title, heads, dispRows)
 
-    def displayMain(self, names, main):
+    def displayMain(self, identitys, main):
         if   main == 'l': self.displayRouterLinks()
         elif main == 'n': self.displayRouterNodes()
         elif main == 'a': self.displayAddresses()
@@ -317,8 +317,8 @@ class BusManager(Node):
         elif main == 'g': self.displayGeneral()
         elif main == 'c': self.displayConnections()
 
-    def display(self, names):
-        self.displayMain(names, config._types)
+    def display(self, identitys):
+        self.displayMain(identitys, config._types)
 
 def run(argv):
     args = OptionsAndArguments(argv)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org