[
https://issues.apache.org/jira/browse/DISPATCH-2310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17488157#comment-17488157
]
ASF GitHub Bot commented on DISPATCH-2310:
------------------------------------------
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]
> Enforce a limit to the length of a router's id
> ----------------------------------------------
>
> Key: DISPATCH-2310
> URL: https://issues.apache.org/jira/browse/DISPATCH-2310
> Project: Qpid Dispatch
> Issue Type: Improvement
> Components: Router Node
> Affects Versions: 1.18.0
> Reporter: Ken Giusti
> Assignee: Ken Giusti
> Priority: Major
> Fix For: 1.19.0
>
>
> Do not allow router id names of > 255 characters.
> 255 characters should be enough for everybody.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]