DISPATCH-990: Add hostname translation to settings lookup

Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/82cef3ab
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/82cef3ab
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/82cef3ab

Branch: refs/heads/master
Commit: 82cef3abff91857871ba7e9ca88177a39db0f7a0
Parents: 2b0f3d0
Author: Chuck Rolke <[email protected]>
Authored: Mon May 14 14:11:30 2018 -0400
Committer: Chuck Rolke <[email protected]>
Committed: Mon May 14 14:11:30 2018 -0400

----------------------------------------------------------------------
 python/qpid_dispatch_internal/policy/policy_local.py | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/82cef3ab/python/qpid_dispatch_internal/policy/policy_local.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/policy/policy_local.py 
b/python/qpid_dispatch_internal/policy/policy_local.py
index 6f8dbb3..4f33fc6 100644
--- a/python/qpid_dispatch_internal/policy/policy_local.py
+++ b/python/qpid_dispatch_internal/policy/policy_local.py
@@ -703,9 +703,16 @@ class PolicyLocal(object):
         """
         try:
             vhost = vhost_in
+            if self.use_hostname_patterns:
+                agent = self._manager.get_agent()
+                vhost = 
agent.qd.qd_dispatch_policy_host_pattern_lookup(agent.dispatch, vhost)
             if vhost not in self.rulesetdb:
                 if self.default_vhost_enabled():
                     vhost = self._default_vhost
+            if vhost != vhost_in:
+                self._manager.log_debug(
+                    "AMQP Open lookup settings for user '%s', rhost '%s', 
vhost '%s': "
+                    "proceeds using vhost '%s' ruleset" % (user, rhost, 
vhost_in, vhost))
 
             if vhost not in self.rulesetdb:
                 self._manager.log_info(


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

Reply via email to