jiridanek commented on a change in pull request #1511:
URL: https://github.com/apache/qpid-dispatch/pull/1511#discussion_r800731953



##########
File path: include/qpid/dispatch/router.h
##########
@@ -33,6 +33,8 @@
 
 #include <stdbool.h>
 
+#define QD_ROUTER_ID_MAX 127  // max length of router id in chars

Review comment:
       It's inconvenient that there is a C version and Python version of the 
constant. Is the #define actually used anywhere? I can't find any usage in this 
PR

##########
File path: python/qpid_dispatch_internal/management/qdrouter.py
##########
@@ -53,35 +54,43 @@ def validate_add(self, attributes, entities):
         entities = list(entities)  # Iterate twice
         super(QdSchema, self).validate_add(attributes, entities)
         entities.append(attributes)
-        router_mode = listener_connector_role = listener_role = None
+        router_mode = router_id = listener_connector_role = listener_role = 
None
         for e in entities:
             short_type = self.short_name(e['type'])
             if short_type == "router":
                 router_mode = e['mode']
+                if 'id' in e:
+                    router_id = e['id']

Review comment:
       ```python
   router_id = e.get('id')
   ```
   
   https://docs.python.org/3/library/stdtypes.html#dict.get




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to