Modified: qpid/trunk/qpid/doc/book/src/schemas.xml URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/doc/book/src/schemas.xml?rev=1297234&r1=1297233&r2=1297234&view=diff ============================================================================== --- qpid/trunk/qpid/doc/book/src/schemas.xml (original) +++ qpid/trunk/qpid/doc/book/src/schemas.xml Mon Mar 5 21:31:58 2012 @@ -1,23 +1,23 @@ <?xml version="1.0"?> <!-- - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - + +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. + --> <locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0"> @@ -26,76 +26,77 @@ <uri resource="Programming-In-Apache-Qpid.xml" typeId="DocBook"/> <uri resource="queue-state-replication.xml" typeId="DocBook"/> <uri resource="AMQP-Messaging-Broker-Java-Book.xml" typeId="DocBook"/> + <uri resource="AMQP-Messaging-Broker-CPP-Book.xml" typeId="DocBook"/> <uri resource="High-Level-API.xml" typeId="DocBook"/> <uri resource="High-Level-API.xml" typeId="DocBook"/> <uri resource="Java-JMS-Selector-Syntax.xml" typeId="DocBook"/> - <uri resource="ACL.xml" typeId="DocBook"/> - <uri resource="Add-New-Users.xml" typeId="DocBook"/> - <uri resource="AMQP-C++-Messaging-Client.xml" typeId="DocBook"/> - <uri resource="AMQP-Compatibility.xml" typeId="DocBook"/> - <uri resource="AMQP-Java-JMS-Messaging-Client.xml" typeId="DocBook"/> - <uri resource="AMQP-Messaging-Broker-CPP.xml" typeId="DocBook"/> - <uri resource="AMQP-Messaging-Broker-Java.xml" typeId="DocBook"/> - <uri resource="AMQP-.NET-Messaging-Client.xml" typeId="DocBook"/> - <uri resource="AMQP-Python-Messaging-Client.xml" typeId="DocBook"/> - <uri resource="AMQP-Ruby-Messaging-Client.xml" typeId="DocBook"/> - <uri resource="AMQP.xml" typeId="DocBook"/> - <uri resource="Binding-URL-Format.xml" typeId="DocBook"/> - <uri resource="Book-Info.xml" typeId="DocBook"/> - <uri resource="Book.xml" typeId="DocBook"/> - <uri resource="Broker-CPP.xml" typeId="DocBook"/> - <uri resource="Broker-Java.xml" typeId="DocBook"/> - <uri resource="Cheat-Sheet-for-configuring-Exchange-Options.xml" typeId="DocBook"/> - <uri resource="Cheat-Sheet-for-configuring-Queue-Options.xml" typeId="DocBook"/> - <uri resource="Clients.xml" typeId="DocBook"/> - <uri resource="Configure-ACLs.xml" typeId="DocBook"/> - <uri resource="Configure-Java-Qpid-to-use-a-SSL-connection.xml" typeId="DocBook"/> - <uri resource="Configure-Log4j-CompositeRolling-Appender.xml" typeId="DocBook"/> - <uri resource="Configure-the-Broker-via-config.xml.xml" typeId="DocBook"/> - <uri resource="Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml" typeId="DocBook"/> - <uri resource="Configuring-Management-Users.xml" typeId="DocBook"/> - <uri resource="Configuring-Qpid-JMX-Management-Console.xml" typeId="DocBook"/> - <uri resource="Connection-URL-Format.xml" typeId="DocBook"/> - <uri resource="Debug-using-log4j.xml" typeId="DocBook"/> - <uri resource="Download.xml" typeId="DocBook"/> - <uri resource="Excel-AddIn.xml" typeId="DocBook"/> - <uri resource="FAQ.xml" typeId="DocBook"/> - <uri resource="foo.xml" typeId="DocBook"/> - <uri resource="f.xml" typeId="DocBook"/> - <uri resource="Getting-Started.xml" typeId="DocBook"/> - <uri resource="How-to-Tune-M3-Java-Broker-Performance.xml" typeId="DocBook"/> - <uri resource="How-to-Use-JNDI.xml" typeId="DocBook"/> - <uri resource="Introduction.xml" typeId="DocBook"/> - <uri resource="Java-Broker-Feature-Guide.xml" typeId="DocBook"/> - <uri resource="Java-Environment-Variables.xml" typeId="DocBook"/> - <uri resource="LVQ.xml" typeId="DocBook"/> - <uri resource="Management-Console-Security.xml" typeId="DocBook"/> - <uri resource="Management-Design-notes.xml" typeId="DocBook"/> - <uri resource="Managing-CPP-Broker.xml" typeId="DocBook"/> - <uri resource="MessageStore-Tool.xml" typeId="DocBook"/> - <uri resource="NET-User-Guide.xml" typeId="DocBook"/> - <uri resource="PythonBrokerTest.xml" typeId="DocBook"/> - <uri resource="QMan-Qpid-Management-bridge.xml" typeId="DocBook"/> - <uri resource="QMF-Python-Console-Tutorial.xml" typeId="DocBook"/> - <uri resource="Qpid-ACLs.xml" typeId="DocBook"/> - <uri resource="Qpid-Interoperability-Documentation.xml" typeId="DocBook"/> - <uri resource="Qpid-Java-Broker-Management-CLI.xml" typeId="DocBook"/> - <uri resource="Qpid-Java-Build-How-To.xml" typeId="DocBook"/> - <uri resource="Qpid-Java-FAQ.xml" typeId="DocBook"/> - <uri resource="Qpid-JMX-Management-Console-FAQ.xml" typeId="DocBook"/> - <uri resource="Qpid-JMX-Management-Console-User-Guide.xml" typeId="DocBook"/> - <uri resource="Qpid-JMX-Management-Console.xml" typeId="DocBook"/> - <uri resource="Qpid-Management-Features.xml" typeId="DocBook"/> - <uri resource="Qpid-Management-Framework.xml" typeId="DocBook"/> - <uri resource="Qpid-Troubleshooting-Guide.xml" typeId="DocBook"/> - <uri resource="queue-state-replication.xml" typeId="DocBook"/> - <uri resource="Running-CPP-Broker.xml" typeId="DocBook"/> - <uri resource="SASL-Compatibility.xml" typeId="DocBook"/> - <uri resource="SSL.xml" typeId="DocBook"/> - <uri resource="Starting-a-cluster.xml" typeId="DocBook"/> - <uri resource="System-Properties.xml" typeId="DocBook"/> - <uri resource="Use-Priority-Queues.xml" typeId="DocBook"/> - <uri resource="Using-Broker-Federation.xml" typeId="DocBook"/> - <uri resource="Using-Qpid-with-other-JNDI-Providers.xml" typeId="DocBook"/> - <uri resource="WCF.xml" typeId="DocBook"/> + <uri resource="ACL.xml" typeId="DocBook"/> + <uri resource="Add-New-Users.xml" typeId="DocBook"/> + <uri resource="AMQP-C++-Messaging-Client.xml" typeId="DocBook"/> + <uri resource="AMQP-Compatibility.xml" typeId="DocBook"/> + <uri resource="AMQP-Java-JMS-Messaging-Client.xml" typeId="DocBook"/> + <uri resource="AMQP-Messaging-Broker-CPP.xml" typeId="DocBook"/> + <uri resource="AMQP-Messaging-Broker-Java.xml" typeId="DocBook"/> + <uri resource="AMQP-.NET-Messaging-Client.xml" typeId="DocBook"/> + <uri resource="AMQP-Python-Messaging-Client.xml" typeId="DocBook"/> + <uri resource="AMQP-Ruby-Messaging-Client.xml" typeId="DocBook"/> + <uri resource="AMQP.xml" typeId="DocBook"/> + <uri resource="Binding-URL-Format.xml" typeId="DocBook"/> + <uri resource="Book-Info.xml" typeId="DocBook"/> + <uri resource="Book.xml" typeId="DocBook"/> + <uri resource="Broker-CPP.xml" typeId="DocBook"/> + <uri resource="Broker-Java.xml" typeId="DocBook"/> + <uri resource="Cheat-Sheet-for-configuring-Exchange-Options.xml" typeId="DocBook"/> + <uri resource="Cheat-Sheet-for-configuring-Queue-Options.xml" typeId="DocBook"/> + <uri resource="Clients.xml" typeId="DocBook"/> + <uri resource="Configure-ACLs.xml" typeId="DocBook"/> + <uri resource="Configure-Java-Qpid-to-use-a-SSL-connection.xml" typeId="DocBook"/> + <uri resource="Configure-Log4j-CompositeRolling-Appender.xml" typeId="DocBook"/> + <uri resource="Configure-the-Broker-via-config.xml.xml" typeId="DocBook"/> + <uri resource="Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml" typeId="DocBook"/> + <uri resource="Configuring-Management-Users.xml" typeId="DocBook"/> + <uri resource="Configuring-Qpid-JMX-Management-Console.xml" typeId="DocBook"/> + <uri resource="Connection-URL-Format.xml" typeId="DocBook"/> + <uri resource="Debug-using-log4j.xml" typeId="DocBook"/> + <uri resource="Download.xml" typeId="DocBook"/> + <uri resource="Excel-AddIn.xml" typeId="DocBook"/> + <uri resource="FAQ.xml" typeId="DocBook"/> + <uri resource="foo.xml" typeId="DocBook"/> + <uri resource="f.xml" typeId="DocBook"/> + <uri resource="Getting-Started.xml" typeId="DocBook"/> + <uri resource="How-to-Tune-M3-Java-Broker-Performance.xml" typeId="DocBook"/> + <uri resource="How-to-Use-JNDI.xml" typeId="DocBook"/> + <uri resource="Introduction.xml" typeId="DocBook"/> + <uri resource="Java-Broker-Feature-Guide.xml" typeId="DocBook"/> + <uri resource="Java-Environment-Variables.xml" typeId="DocBook"/> + <uri resource="LVQ.xml" typeId="DocBook"/> + <uri resource="Management-Console-Security.xml" typeId="DocBook"/> + <uri resource="Management-Design-notes.xml" typeId="DocBook"/> + <uri resource="Managing-CPP-Broker.xml" typeId="DocBook"/> + <uri resource="MessageStore-Tool.xml" typeId="DocBook"/> + <uri resource="NET-User-Guide.xml" typeId="DocBook"/> + <uri resource="PythonBrokerTest.xml" typeId="DocBook"/> + <uri resource="QMan-Qpid-Management-bridge.xml" typeId="DocBook"/> + <uri resource="QMF-Python-Console-Tutorial.xml" typeId="DocBook"/> + <uri resource="Qpid-ACLs.xml" typeId="DocBook"/> + <uri resource="Qpid-Interoperability-Documentation.xml" typeId="DocBook"/> + <uri resource="Qpid-Java-Broker-Management-CLI.xml" typeId="DocBook"/> + <uri resource="Qpid-Java-Build-How-To.xml" typeId="DocBook"/> + <uri resource="Qpid-Java-FAQ.xml" typeId="DocBook"/> + <uri resource="Qpid-JMX-Management-Console-FAQ.xml" typeId="DocBook"/> + <uri resource="Qpid-JMX-Management-Console-User-Guide.xml" typeId="DocBook"/> + <uri resource="Qpid-JMX-Management-Console.xml" typeId="DocBook"/> + <uri resource="Qpid-Management-Features.xml" typeId="DocBook"/> + <uri resource="Qpid-Management-Framework.xml" typeId="DocBook"/> + <uri resource="Qpid-Troubleshooting-Guide.xml" typeId="DocBook"/> + <uri resource="queue-state-replication.xml" typeId="DocBook"/> + <uri resource="Running-CPP-Broker.xml" typeId="DocBook"/> + <uri resource="SASL-Compatibility.xml" typeId="DocBook"/> + <uri resource="SSL.xml" typeId="DocBook"/> + <uri resource="Active-Active-Cluster.xml" typeId="DocBook"/> + <uri resource="System-Properties.xml" typeId="DocBook"/> + <uri resource="Use-Priority-Queues.xml" typeId="DocBook"/> + <uri resource="Using-Broker-Federation.xml" typeId="DocBook"/> + <uri resource="Using-Qpid-with-other-JNDI-Providers.xml" typeId="DocBook"/> + <uri resource="WCF.xml" typeId="DocBook"/> </locatingRules>
Modified: qpid/trunk/qpid/tools/src/py/qpid-config URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/tools/src/py/qpid-config?rev=1297234&r1=1297233&r2=1297234&view=diff ============================================================================== --- qpid/trunk/qpid/tools/src/py/qpid-config (original) +++ qpid/trunk/qpid/tools/src/py/qpid-config Mon Mar 5 21:31:58 2012 @@ -74,10 +74,10 @@ Replication levels: none - no replication configuration - replicate queue and exchange existence and bindings, but not messages. - messages - replicate configuration and messages + all - replicate configuration and messages """ -REPLICATION_LEVELS= ["none", "configuration", "messages"] +REPLICATE_LEVELS= ["none", "configuration", "all"] class Config: def __init__(self): @@ -87,7 +87,7 @@ class Config: self._ignoreDefault = False self._altern_ex = None self._durable = False - self._replication = None + self._replicate = None self._ha_admin = False self._clusterDurable = False self._if_empty = True @@ -110,7 +110,7 @@ class Config: self._msgGroupHeader = None self._sharedMsgGroup = False self._extra_arguments = [] - self._replicate_from = None + self._start_replica = None self._returnCode = 0 config = Config() @@ -131,7 +131,7 @@ FLOW_STOP_SIZE = "qpid.flow_stop_size FLOW_RESUME_SIZE = "qpid.flow_resume_size" MSG_GROUP_HDR_KEY = "qpid.group_header_key" SHARED_MSG_GROUP = "qpid.shared_msg_group" -REPLICATION = "qpid.replicate" +REPLICATE = "qpid.replicate" #There are various arguments to declare that have specific program #options in this utility. However there is now a generic mechanism for #passing arguments as well. The SPECIAL_ARGS list contains the @@ -142,7 +142,7 @@ SPECIAL_ARGS=[ FILECOUNT,FILESIZE,MAX_QUEUE_SIZE,MAX_QUEUE_COUNT,POLICY_TYPE,CLUSTER_DURABLE, LVQ_KEY,MSG_SEQUENCE,IVE,QUEUE_EVENT_GENERATION, FLOW_STOP_COUNT,FLOW_STOP_SIZE,FLOW_RESUME_SIZE, - MSG_GROUP_HDR_KEY,SHARED_MSG_GROUP,REPLICATION] + MSG_GROUP_HDR_KEY,SHARED_MSG_GROUP,REPLICATE] class JHelpFormatter(IndentedHelpFormatter): """Format usage and description without stripping newlines from usage strings @@ -186,7 +186,7 @@ def OptionsAndArguments(argv): group2 = OptionGroup(parser, "Options for Adding Exchanges and Queues") group2.add_option("--alternate-exchange", action="store", type="string", metavar="<aexname>", help="Name of the alternate-exchange for the new queue or exchange. Exchanges route messages to the alternate exchange if they are unable to route them elsewhere. Queues route messages to the alternate exchange if they are rejected by a subscriber or orphaned by queue deletion.") group2.add_option("--durable", action="store_true", help="The new queue or exchange is durable.") - group2.add_option("--replication", action="store", metavar="<level>", help="Enable automatic replication in a HA cluster. <level> is 'none', 'configuration' or 'messages').") + group2.add_option("--replicate", action="store", metavar="<level>", help="Enable automatic replication in a HA cluster. <level> is 'none', 'configuration' or 'all').") group2.add_option("--ha-admin", action="store_true", help="Allow connection to a HA backup broker.") parser.add_option_group(group2) @@ -213,7 +213,7 @@ def OptionsAndArguments(argv): help="Allow message group consumption across multiple consumers.") group3.add_option("--argument", dest="extra_arguments", action="append", default=[], metavar="<NAME=VALUE>", help="Specify a key-value pair to add to queue arguments") - group3.add_option("--replicate-from", metavar="<broker-url>", help="Replicate from the same-named queue at <broker-url>") + group3.add_option("--start-replica", metavar="<broker-url>", help="Start replication from the same-named queue at <broker-url>") # no option for declaring an exclusive queue - which can only be used by the session that creates it. parser.add_option_group(group3) @@ -254,10 +254,10 @@ def OptionsAndArguments(argv): config._altern_ex = opts.alternate_exchange if opts.durable: config._durable = True - if opts.replication: - if not opts.replication in REPLICATION_LEVELS: - raise Exception("Invalid replication level '%s', should be one of: %s" % (opts.replication, ", ".join(REPLICATION_LEVELS))) - config._replication = opts.replication + if opts.replicate: + if not opts.replicate in REPLICATE_LEVELS: + raise Exception("Invalid replication level '%s', should be one of: %s" % (opts.replicate, ", ".join(REPLICATE_LEVELS))) + config._replicate = opts.replicate if opts.ha_admin: config._ha_admin = True if opts.cluster_durable: config._clusterDurable = True @@ -304,8 +304,8 @@ def OptionsAndArguments(argv): config._sharedMsgGroup = True if opts.extra_arguments: config._extra_arguments = opts.extra_arguments - if opts.replicate_from: - config._replicate_from = opts.replicate_from + if opts.start_replica: + config._start_replica = opts.start_replica return args @@ -416,6 +416,7 @@ class BrokerManager: args = ex.arguments if not args: args = {} if ex.durable: print "--durable", + if REPLICATE in args: print "--replicate=%s" % args[REPLICATE], if MSG_SEQUENCE in args and args[MSG_SEQUENCE] == 1: print "--sequence", if IVE in args and args[IVE] == 1: print "--ive", if ex.altExchange: @@ -468,7 +469,7 @@ class BrokerManager: args = q.arguments if not args: args = {} if q.durable: print "--durable", - if REPLICATION in args: print "--replication=%s" % args[REPLICATION], + if REPLICATE in args: print "--replicate=%s" % args[REPLICATE], if CLUSTER_DURABLE in args and args[CLUSTER_DURABLE] == 1: print "--cluster-durable", if q.autoDelete: print "auto-del", if q.exclusive: print "excl", @@ -530,8 +531,8 @@ class BrokerManager: declArgs['alternate-exchange'] = config._altern_ex if config._durable: declArgs['durable'] = 1 - if config._replication: - declArgs[REPLICATION] = config._replication + if config._replicate: + declArgs[REPLICATE] = config._replicate self.broker.addExchange(etype, ename, declArgs) @@ -598,11 +599,11 @@ class BrokerManager: declArgs['alternate-exchange'] = config._altern_ex if config._durable: declArgs['durable'] = 1 - if config._replication: - declArgs[REPLICATION] = config._replication + if config._replicate: + declArgs[REPLICATE] = config._replicate self.broker.addQueue(qname, declArgs) - if config._replicate_from: # Start replication - self.broker._method("replicate", {"broker":config._replicate_from, "queue":qname}, "org.apache.qpid.ha:habroker:ha-broker") + if config._start_replica: # Start replication + self.broker._method("replicate", {"broker":config._start_replica, "queue":qname}, "org.apache.qpid.ha:habroker:ha-broker") def DelQueue(self, args): if len(args) < 1: Modified: qpid/trunk/qpid/tools/src/py/qpid-ha URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/tools/src/py/qpid-ha?rev=1297234&r1=1297233&r2=1297234&view=diff ============================================================================== --- qpid/trunk/qpid/tools/src/py/qpid-ha (original) +++ qpid/trunk/qpid/tools/src/py/qpid-ha Mon Mar 5 21:31:58 2012 @@ -19,7 +19,7 @@ # under the License. # -import qmf.console, optparse, sys, time +import qmf.console, optparse, sys, time, os from qpid.management import managementChannel, managementClient from qpid.messaging import Connection from qpid.messaging import Message as QpidMessage @@ -125,12 +125,12 @@ class QueryCmd(Command): print "%-20s %s"%(x[0], x[1]) QueryCmd() -def print_usage(name): - print "usage: %s <command> [<arguments>]\n\nCommands are:\n"%name +def print_usage(prog): + print "usage: %s <command> [<arguments>]\n\nCommands are:\n"%prog for name, command in Command.commands.iteritems(): help = command.help print " %-12s %s."%(name, help.split(".")[0]) - print "\nFor help with a command: %s <command> --help\n"%name + print "\nFor help with a command type: %s <command> --help\n"%prog def find_command(args): """Find a command among the arguments and options""" @@ -148,7 +148,7 @@ def main(argv): return 1 command = find_command(args) if not command: - print_usage(argv[0]); + print_usage(os.path.basename(argv[0])); return 1; if command.execute(): return 1 except Exception, e: --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
