diff options
Diffstat (limited to 'tools/src/py/qpid-route')
-rwxr-xr-x | tools/src/py/qpid-route | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/src/py/qpid-route b/tools/src/py/qpid-route index f90416d7b0..0316c24322 100755 --- a/tools/src/py/qpid-route +++ b/tools/src/py/qpid-route @@ -62,6 +62,7 @@ class Config: self._ack = 0 self._connTimeout = 10 self._client_sasl_mechanism = None + self._ha_admin = False config = Config() @@ -96,7 +97,7 @@ def OptionsAndArguments(argv): parser.add_option("-t", "--transport", action="store", type="string", default="tcp", metavar="<transport>", help="Transport to use for links, defaults to tcp") parser.add_option("--client-sasl-mechanism", action="store", type="string", metavar="<mech>", help="SASL mechanism for authentication (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD, DIGEST-MD5, GSSAPI). Used when the client connects to the destination broker (not for authentication between the source and destination brokers - that is specified using the [mechanisms] argument to 'add route'). SASL automatically picks the most secure available mechanism - use this option to override.") - + parser.add_option("--ha-admin", action="store_true", help="Allow connection to a HA backup broker.") opts, encArgs = parser.parse_args(args=argv) try: @@ -128,6 +129,9 @@ def OptionsAndArguments(argv): if opts.transport: config._transport = opts.transport + if opts.ha_admin: + config._ha_admin = True + if opts.ack: config._ack = opts.ack @@ -143,7 +147,9 @@ class RouteManager: self.local = BrokerURL(localBroker) self.remote = None self.qmf = Session() - self.broker = self.qmf.addBroker(localBroker, config._connTimeout, config._client_sasl_mechanism) + client_properties = {} + if config._ha_admin: client_properties["qpid.ha-admin"] = 1 + self.broker = self.qmf.addBroker(localBroker, config._connTimeout, config._client_sasl_mechanism, client_properties=client_properties) self.broker._waitForStable() self.agent = self.broker.getBrokerAgent() |