You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2018/02/27 22:09:16 UTC

qpid-dispatch git commit: DISPATCH-918 - Initial modifications to Python schema code to introduce and use the deprecationName attribute. Also modified dir to direction in linkRoute and autoLink and they use the deprecationName attribute. This closes #26

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master e3f025aee -> 257321d0f


DISPATCH-918 -  Initial modifications to Python schema code to introduce and use the deprecationName attribute. Also modified dir to direction in linkRoute and autoLink and they use the deprecationName attribute. This closes #261


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

Branch: refs/heads/master
Commit: 257321d0f8d0d835df47eff2004ef8d4852f46fb
Parents: e3f025a
Author: Ganesh Murthy <gm...@redhat.com>
Authored: Fri Feb 23 13:10:13 2018 -0500
Committer: Ganesh Murthy <gm...@redhat.com>
Committed: Tue Feb 27 17:04:24 2018 -0500

----------------------------------------------------------------------
 doc/book/link_routing.adoc                      |  4 +-
 doc/new-book/configuration-reference.adoc       |  4 +-
 doc/new-book/logging.adoc                       |  8 +-
 doc/new-book/managing-using-qdmanage.adoc       |  4 +-
 doc/new-book/reliability.adoc                   | 20 ++---
 doc/new-book/routing.adoc                       | 28 +++---
 python/qpid_dispatch/management/qdrouter.json   |  6 +-
 .../management/qdrouter.py                      | 36 ++++----
 .../qpid_dispatch_internal/management/schema.py | 93 ++++++++++++++-----
 .../management/schema_doc.py                    | 16 +++-
 src/router_config.c                             |  8 +-
 src/router_core/agent_config_auto_link.c        | 16 ++--
 src/router_core/agent_config_link_route.c       | 16 ++--
 tests/CMakeLists.txt                            |  1 +
 tests/config-2-broker/A.conf                    | 12 +--
 tests/system_test.py                            |  7 +-
 tests/system_tests_autolinks.py                 | 11 +--
 tests/system_tests_delivery_abort.py            |  4 +-
 tests/system_tests_deprecated.py                | 95 ++++++++++++++++++++
 tests/system_tests_distribution.py              | 24 ++---
 tests/system_tests_link_routes.py               | 41 ++++-----
 tests/system_tests_multi_tenancy.py             |  8 +-
 tests/system_tests_qdmanage.py                  | 14 +--
 tools/qdstat                                    |  8 +-
 24 files changed, 326 insertions(+), 158 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/doc/book/link_routing.adoc
----------------------------------------------------------------------
diff --git a/doc/book/link_routing.adoc b/doc/book/link_routing.adoc
index 351222e..bc52230 100644
--- a/doc/book/link_routing.adoc
+++ b/doc/book/link_routing.adoc
@@ -115,13 +115,13 @@ Now, the router must be configured to route certain addresses to B2:
 ----------------------
 linkRoute {
     prefix: b2
-    dir: in
+    direction: in
     connection: broker
 }
 
 linkRoute {
     prefix: b2
-    dir: out
+    direction: out
     connection: broker
 }
 ----------------------

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/doc/new-book/configuration-reference.adoc
----------------------------------------------------------------------
diff --git a/doc/new-book/configuration-reference.adoc b/doc/new-book/configuration-reference.adoc
index bd2dc23..e89a391 100644
--- a/doc/new-book/configuration-reference.adoc
+++ b/doc/new-book/configuration-reference.adoc
@@ -178,7 +178,7 @@ Entity type for link-route configuration. This is used to identify remote contai
 * *_containerId_* (string) : it specifies that the link route will be activated if a remote container will provide a container-id matching with this value.
 * *_connection_* (string) : The name from a connector or listener.
 * *_distribution_* (One of [`linkBalanced`], default=`linkBalanced`) : Treatment of traffic associated with the address.
-* *_dir_* (One of [`in`, `out`], required) : The permitted direction of links. It is defined from a router point of view so ‘in’ means client senders (router ingress) and ‘out’ means client receivers (router egress).
+* *_direction_* (One of [`in`, `out`], required) : The permitted direction of links. It is defined from a router point of view so ‘in’ means client senders (router ingress) and ‘out’ means client receivers (router egress).
 
 [[router_configuration_file_autolink]]
 ==== autoLink
@@ -186,7 +186,7 @@ Entity type for link-route configuration. This is used to identify remote contai
 Entity type for configuring auto-links. Auto-links are links whose lifecycle is managed by the router. These are typically used to attach to waypoints on remote containers (brokers, and so on.).
 
 * *_addr_* (string, required) : The address of the provisioned object.
-* *_dir_* (One of [`in`, `out`], required) : The direction of the link to be created. In means into the router, out means out of the router.
+* *_direction_* (One of [`in`, `out`], required) : The direction of the link to be created. In means into the router, out means out of the router.
 * *_phase_* (integer) : The address phase for this link. Defaults to `0` for `out` links and `1` for `in` links.
 * *_containerId_* (string) : ContainerID for the target container.
 * *_connection_* (string) : The name from a connector or listener.

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/doc/new-book/logging.adoc
----------------------------------------------------------------------
diff --git a/doc/new-book/logging.adoc b/doc/new-book/logging.adoc
index 1511dba..f28a7a1 100644
--- a/doc/new-book/logging.adoc
+++ b/doc/new-book/logging.adoc
@@ -202,10 +202,10 @@ In this example, on `Router.A`, `address`, `linkRoute`, and `autoLink` entities
 Tue Jun  7 15:07:32 2016 AGENT (debug) Add entity: ConnectorEntity(addr=127.0.0.1, allowRedirect=True, cost=1, host=127.0.0.1, identity=connector/127.0.0.1:5672:BROKER, idleTimeoutSeconds=16, maxFrameSize=65536, name=BROKER, port=5672, role=route-container, stripAnnotations=both, type=org.apache.qpid.dispatch.connector, verifyHostName=True)
 Tue Jun  7 15:07:32 2016 AGENT (debug) Add entity: RouterConfigAddressEntity(distribution=closest, identity=router.config.address/0, name=router.config.address/0, prefix=my_address, type=org.apache.qpid.dispatch.router.config.address, waypoint=False)
 Tue Jun  7 15:07:32 2016 AGENT (debug) Add entity: RouterConfigAddressEntity(distribution=balanced, identity=router.config.address/1, name=router.config.address/1, prefix=my_queue_wp, type=org.apache.qpid.dispatch.router.config.address, waypoint=True)
-Tue Jun  7 15:07:32 2016 AGENT (debug) Add entity: RouterConfigLinkrouteEntity(connection=BROKER, dir=in, distribution=linkBalanced, identity=router.config.linkRoute/0, name=router.config.linkRoute/0, prefix=my_queue, type=org.apache.qpid.dispatch.router.config.linkRoute)
-Tue Jun  7 15:07:32 2016 AGENT (debug) Add entity: RouterConfigLinkrouteEntity(connection=BROKER, dir=out, distribution=linkBalanced, identity=router.config.linkRoute/1, name=router.config.linkRoute/1, prefix=my_queue, type=org.apache.qpid.dispatch.router.config.linkRoute)
-Tue Jun  7 15:07:32 2016 AGENT (debug) Add entity: RouterConfigAutolinkEntity(addr=my_queue_wp, connection=BROKER, dir=in, identity=router.config.autoLink/0, name=router.config.autoLink/0, type=org.apache.qpid.dispatch.router.config.autoLink)
-Tue Jun  7 15:07:32 2016 AGENT (debug) Add entity: RouterConfigAutolinkEntity(addr=my_queue_wp, connection=BROKER, dir=out, identity=router.config.autoLink/1, name=router.config.autoLink/1, type=org.apache.qpid.dispatch.router.config.autoLink)
+Tue Jun  7 15:07:32 2016 AGENT (debug) Add entity: RouterConfigLinkrouteEntity(connection=BROKER, direction=in, distribution=linkBalanced, identity=router.config.linkRoute/0, name=router.config.linkRoute/0, prefix=my_queue, type=org.apache.qpid.dispatch.router.config.linkRoute)
+Tue Jun  7 15:07:32 2016 AGENT (debug) Add entity: RouterConfigLinkrouteEntity(connection=BROKER, direction=out, distribution=linkBalanced, identity=router.config.linkRoute/1, name=router.config.linkRoute/1, prefix=my_queue, type=org.apache.qpid.dispatch.router.config.linkRoute)
+Tue Jun  7 15:07:32 2016 AGENT (debug) Add entity: RouterConfigAutolinkEntity(addr=my_queue_wp, connection=BROKER, direction=in, identity=router.config.autoLink/0, name=router.config.autoLink/0, type=org.apache.qpid.dispatch.router.config.autoLink)
+Tue Jun  7 15:07:32 2016 AGENT (debug) Add entity: RouterConfigAutolinkEntity(addr=my_queue_wp, connection=BROKER, direction=out, identity=router.config.autoLink/1, name=router.config.autoLink/1, type=org.apache.qpid.dispatch.router.config.autoLink)
 ----
 
 === The `CONTAINER` Logging Module

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/doc/new-book/managing-using-qdmanage.adoc
----------------------------------------------------------------------
diff --git a/doc/new-book/managing-using-qdmanage.adoc b/doc/new-book/managing-using-qdmanage.adoc
index c08ab14..1f3dcf1 100644
--- a/doc/new-book/managing-using-qdmanage.adoc
+++ b/doc/new-book/managing-using-qdmanage.adoc
@@ -537,7 +537,7 @@ qdmanage create --stdin
 +
 [options="nowrap",subs="+quotes"]
 ----
-[{"type":"address", "prefix":"_ADDRESS_PREFIX_", "waypoint":"yes"}, {"type":"autolink", "addr":"_ADDRESS_NAME_", "connection":"_CONNECTOR/LISTENER_NAME_", "dir":"in"}, {"type":"autolink", "addr":"_ADDRESS_NAME_", "connection":"_CONNECTOR/LISTENER_NAME_", "dir":"out"}]
+[{"type":"address", "prefix":"_ADDRESS_PREFIX_", "waypoint":"yes"}, {"type":"autolink", "addr":"_ADDRESS_NAME_", "connection":"_CONNECTOR/LISTENER_NAME_", "direction":"in"}, {"type":"autolink", "addr":"_ADDRESS_NAME_", "connection":"_CONNECTOR/LISTENER_NAME_", "direction":"out"}]
 ----
 
 |Update an address configuration
@@ -608,7 +608,7 @@ qdmanage create --stdin
 +
 [options="nowrap",subs="+quotes"]
 ----
-[{"type":"linkRoute", "prefix":"_ADDRESS_PREFIX_", "connection":"_CONNECTOR/LISTENER_NAME_", "dir":"in", ...}, {"type":"linkRoute", "prefix":"_ADDRESS_PREFIX_", "connection":"_CONNECTOR/LISTENER_NAME_", "dir":"out", ...}]
+[{"type":"linkRoute", "prefix":"_ADDRESS_PREFIX_", "connection":"_CONNECTOR/LISTENER_NAME_", "direction":"in", ...}, {"type":"linkRoute", "prefix":"_ADDRESS_PREFIX_", "connection":"_CONNECTOR/LISTENER_NAME_", "direction":"out", ...}]
 ----
 
 |Update a link route

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/doc/new-book/reliability.adoc
----------------------------------------------------------------------
diff --git a/doc/new-book/reliability.adoc b/doc/new-book/reliability.adoc
index 434e7ee..61ffa7b 100644
--- a/doc/new-book/reliability.adoc
+++ b/doc/new-book/reliability.adoc
@@ -284,13 +284,13 @@ address {
 autoLink {
     addr: my_queue
     connection: BROKER
-    dir: in
+    direction: in
 }
 
 autoLink {
     addr: my_queue
     connection: BROKER
-    dir: out
+    direction: out
 }
 ----
 
@@ -411,8 +411,8 @@ Using the `qdmanage` tool, it is possible to configure the waypoint on `my_queue
 [
 { "type":"connector", "name":"BROKER", "port":5672, "role":"route-container" },
 { "type":"address", "prefix":"my_queue", "waypoint":"yes" },
-{ "type":"autoLink", "addr":"my_queue", "connection":"BROKER", "dir":"in" },
-{ "type":"autoLink", "addr":"my_queue", "connection":"BROKER", "dir":"out" }
+{ "type":"autoLink", "addr":"my_queue", "connection":"BROKER", "direction":"in" },
+{ "type":"autoLink", "addr":"my_queue", "connection":"BROKER", "direction":"out" }
 ]
 [
   {
@@ -448,7 +448,7 @@ Using the `qdmanage` tool, it is possible to configure the waypoint on `my_queue
     "type": "org.apache.qpid.dispatch.router.config.autoLink",
     "operStatus": "inactive",
     "connection": "BROKER",
-    "dir": "in",
+    "direction": "in",
     "phase": 1,
     "lastError": null,
     "externalAddr": null,
@@ -462,7 +462,7 @@ Using the `qdmanage` tool, it is possible to configure the waypoint on `my_queue
     "type": "org.apache.qpid.dispatch.router.config.autoLink",
     "operStatus": "inactive",
     "connection": "BROKER",
-    "dir": "out",
+    "direction": "out",
     "phase": 0,
     "lastError": null,
     "externalAddr": null,
@@ -613,25 +613,25 @@ address {
 autoLink {
     addr: my_queue
     connection: BROKER1
-    dir: in
+    direction: in
 }
 
 autoLink {
     addr: my_queue
     connection: BROKER1
-    dir: out
+    direction: out
 }
 
 autoLink {
     addr: my_queue
     connection: BROKER2
-    dir: in
+    direction: in
 }
 
 autoLink {
     addr: my_queue
     connection: BROKER2
-    dir: out
+    direction: out
 }
 ----
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/doc/new-book/routing.adoc
----------------------------------------------------------------------
diff --git a/doc/new-book/routing.adoc b/doc/new-book/routing.adoc
index 265facf..243df10 100644
--- a/doc/new-book/routing.adoc
+++ b/doc/new-book/routing.adoc
@@ -357,7 +357,7 @@ For information about additional attributes, see xref:router_configuration_file_
 autoLink {
     addr: _ADDRESS_
     connection: _CONNECTOR_NAME_
-    dir: out
+    direction: out
     ...
 }
 ----
@@ -365,7 +365,7 @@ autoLink {
 `addr`:: The address of the broker queue. When the autolink is created, it will be attached to this address.
 `externalAddr`:: An optional alternate address for the broker queue. You use an external address if the broker queue should have a different address than that which the sender uses. In this scenario, senders send messages to the `addr` address, and then the router routes them to the broker queue represented by the `externalAddr` address.
 `connection` | `containerID`:: How the router should connect to the broker. You can specify either an outgoing connection (`connection`) or the container ID of the broker (`containerID`).
-`dir`:: Set this attribute to `out` to specify that this autolink can send messages from the router to the broker.
+`direction`:: Set this attribute to `out` to specify that this autolink can send messages from the router to the broker.
 
 For information about additional attributes, see xref:router_configuration_file_autolink[autoLink] in the _Configuration Reference_.
 --
@@ -378,7 +378,7 @@ For information about additional attributes, see xref:router_configuration_file_
 autoLink {
     addr: _ADDRESS_
     connection: _CONNECTOR_NAME_
-    dir: in
+    direction: in
     ...
 }
 ----
@@ -386,7 +386,7 @@ autoLink {
 `addr`:: The address of the broker queue. When the autolink is created, it will be attached to this address.
 `externalAddr`:: An optional alternate address for the broker queue. You use an external address if the broker queue should have a different address than that which the receiver uses. In this scenario, receivers receive messages from the `addr` address, and the router retrieves them from the broker queue represented by the `externalAddr` address.
 `connection` | `containerID`:: How the router should connect to the broker. You can specify either an outgoing connection (`connection`) or the container ID of the broker (`containerID`).
-`dir`:: Set this attribute to `in` to specify that this autolink can receive messages from the broker to the router.
+`direction`:: Set this attribute to `in` to specify that this autolink can receive messages from the broker to the router.
 
 For information about additional attributes, see xref:router_configuration_file_autolink[autoLink] in the _Configuration Reference_.
 --
@@ -414,25 +414,25 @@ address {  // <2>
 
 autoLink {  // <3>
     addr: queue.first
-    dir: in
+    direction: in
     connection: broker
 }
 
 autoLink {  // <4>
     addr: queue.first
-    dir: out
+    direction: out
     connection: broker
 }
 
 autoLink {  // <5>
     addr: queue.second
-    dir: in
+    direction: in
     connection: broker
 }
 
 autoLink {  // <6>
     addr: queue.second
-    dir: out
+    direction: out
     connection: broker
 }
 ----
@@ -583,7 +583,7 @@ For information about additional attributes, see xref:router_configuration_file_
 linkRoute {
     prefix: __ADDRESS_PREFIX__
     connection: __CONNECTOR_NAME__
-    dir: in
+    direction: in
     ...
 }
 ----
@@ -598,7 +598,7 @@ include::routing.adoc[tags=pattern-matching]
 +
 If multiple brokers are connected to the router through this connection, requests for addresses matching the link route's prefix or pattern are balanced across the brokers. Alternatively, if you want to specify a particular broker, use `containerID` and add the broker's container ID.
 
-`dir`:: Set this attribute to `in` to specify that clients can send messages into the router network on this link route.
+`direction`:: Set this attribute to `in` to specify that clients can send messages into the router network on this link route.
 
 For information about additional attributes, see xref:router_configuration_file_linkroute[linkRoute] in the _Configuration Reference_.
 --
@@ -611,7 +611,7 @@ For information about additional attributes, see xref:router_configuration_file_
 linkRoute {
     prefix: __ADDRESS_PREFIX__
     connection: __CONNECTOR_NAME__
-    dir: out
+    direction: out
     ...
 }
 ----
@@ -625,7 +625,7 @@ include::routing.adoc[tags=pattern-matching]
 `connection` | `containerID`:: How the router should connect to the broker. You can specify either an outgoing connection (`connection`) or the container ID of the broker (`containerID`).
 +
 If multiple brokers are connected to the router through this connection, requests for addresses matching the link route's prefix or pattern are balanced across the brokers. Alternatively, if you want to specify a particular broker, use `containerID` and add the broker's container ID.
-`dir`:: Set this attribute to `out` to specify that this link route is for receivers.
+`direction`:: Set this attribute to `out` to specify that this link route is for receivers.
 
 For information about additional attributes, see xref:router_configuration_file_linkroute[linkRoute] in the _Configuration Reference_.
 --
@@ -685,13 +685,13 @@ connector {  // <1>
 
 linkRoute {  // <2>
     prefix: b2
-    dir: in
+    direction: in
     connection: broker
 }
 
 linkRoute {  // <3>
     prefix: b2   
-    dir: out
+    direction: out
     connection: broker
 }
 ----

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/python/qpid_dispatch/management/qdrouter.json
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch/management/qdrouter.json b/python/qpid_dispatch/management/qdrouter.json
index 2e0acdb..ebe5291 100644
--- a/python/qpid_dispatch/management/qdrouter.json
+++ b/python/qpid_dispatch/management/qdrouter.json
@@ -1053,10 +1053,11 @@
                     "required": false,
                     "default": "linkBalanced"
                 },
-                "dir": {
+                "direction": {
                     "type": ["in", "out"],
                     "description": "The permitted direction of links: 'in' means client senders; 'out' means client receivers",
                     "create": true,
+                    "deprecationName": "dir",
                     "required": true
                 },
                 "operStatus": {
@@ -1078,10 +1079,11 @@
                     "create": true,
                     "required": true
                 },
-                "dir": {
+                "direction": {
                     "type": ["in", "out"],
                     "description": "The direction of the link to be created.  In means into the router, out means out of the router.",
                     "create": true,
+                    "deprecationName": "dir",
                     "required": true
                 },
                 "phase": {

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/python/qpid_dispatch_internal/management/qdrouter.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/management/qdrouter.py b/python/qpid_dispatch_internal/management/qdrouter.py
index 2590b64..efb9965 100644
--- a/python/qpid_dispatch_internal/management/qdrouter.py
+++ b/python/qpid_dispatch_internal/management/qdrouter.py
@@ -1,21 +1,21 @@
-##
-## 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
+#
 
 """
 Qpid Dispatch Router management schema and config file parsing.

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/python/qpid_dispatch_internal/management/schema.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/management/schema.py b/python/qpid_dispatch_internal/management/schema.py
index 590b33e..01e0884 100644
--- a/python/qpid_dispatch_internal/management/schema.py
+++ b/python/qpid_dispatch_internal/management/schema.py
@@ -1,21 +1,21 @@
-##
-## 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
+#
 
 """
 Schema for AMQP management entity types.
@@ -27,9 +27,17 @@ A Schema can be loaded/dumped to a json file.
 """
 
 import sys
+import traceback
 from qpid_dispatch.management.entity import EntityBase
 from qpid_dispatch.management.error import NotImplementedStatus
 from ..compat import OrderedDict
+try:
+    from ..dispatch import LogAdapter, LOG_WARNING
+    logger_available = True
+except:
+    # We need to do this because at compile time the schema is pulled using this code and at that time the
+    # LogAdapter is not loaded. When running the router, the LogAdapter is available.
+    logger_available = False
 
 class ValidationError(Exception):
     """Error raised if schema validation fails"""
@@ -185,7 +193,7 @@ class AttributeType(object):
     """
 
     def __init__(self, name, type=None, defined_in=None, default=None,
-                 required=False, unique=False, hidden=False, deprecated=False,
+                 required=False, unique=False, hidden=False, deprecated=False, deprecationName=None,
                  value=None, description="", create=False, update=False, graph=False):
         """
         See L{AttributeType} instance variables.
@@ -199,6 +207,7 @@ class AttributeType(object):
             self.hidden = hidden
             self.deprecated = deprecated
             self.default = default
+            self.deprecation_name = deprecationName
             self.value = value
             self.unique = unique
             self.description = description
@@ -312,6 +321,10 @@ class EntityType(object):
                 self.name = self.short_name = name
             self.attributes = OrderedDict((k, AttributeType(k, defined_in=self, **v))
                                               for k, v in (attributes or {}).iteritems())
+            self.deprecation_names = []
+            for attr in self.attributes.itervalues():
+                self.deprecation_names.append(attr.deprecation_name)
+
             self.operations = operations or []
             # Bases are resolved in self.init()
             self.base = extends
@@ -360,10 +373,13 @@ class EntityType(object):
 
     def attribute(self, name):
         """Get the AttributeType for name"""
-        if not name in self.attributes:
+        if not name in self.attributes and not name in self.deprecation_names:
             raise ValidationError("Unknown attribute '%s' for '%s'" % (name, self))
         return self.attributes[name]
 
+    def log(self, level, text):
+        self.schema.log(level, text)
+
     @property
     def my_attributes(self):
         """Return only attribute types defined in this entity type"""
@@ -381,10 +397,32 @@ class EntityType(object):
             # Add missing values
             for attr in self.attributes.itervalues():
                 if attributes.get(attr.name) is None:
-                    value = attr.missing_value()
-                    if value is not None: attributes[attr.name] = value
+                    value = None
+                    deprecation_name = attr.deprecation_name
+                    if deprecation_name:
+                        value = attributes.get(deprecation_name)
+                        if value:
+                            if logger_available:
+                                self.log(LOG_WARNING, "Attribute '%s' of entity '%s' has been deprecated."
+                                                      " Use '%s' instead"%(deprecation_name, self.short_name, attr.name))
+                            del attributes[deprecation_name]
+
+                    if not value:
+                        value = attr.missing_value()
+                    if value is not None:
+                        attributes[attr.name] = value
                     if value is None and attr.name in attributes:
                         del attributes[attr.name]
+                else:
+                    deprecation_name = attr.deprecation_name
+                    if deprecation_name:
+                        value = attributes.get(deprecation_name)
+                        if value:
+                            # Both name and deprecation name have values
+                            # For example, both dir and direction of linkRoute have been specified, This is
+                            # illegal. Just fail.
+                            raise ValidationError("Both '%s' and '%s' cannot be specified for entity '%s'" %
+                                                  (deprecation_name, attr.name, self.short_name))
 
             # Validate attributes.
             for name, value in attributes.iteritems():
@@ -453,6 +491,11 @@ class Schema(object):
         @param entity_types: Map of  { entityTypeName: { singleton:, attributes:{...}}}
         @param description: Human readable description.
         """
+        if logger_available:
+            self.log_adapter = LogAdapter("AGENT")
+        else:
+            self.log_adapter = None
+
         if prefix:
             self.prefix = prefix.strip('.')
             self.prefixdot = self.prefix + '.'
@@ -472,6 +515,12 @@ class Schema(object):
             e.init()
             self.all_attributes.update(e.attributes.keys())
 
+    def log(self, level, text):
+        if not self.log_adapter:
+            return
+        info = traceback.extract_stack(limit=2)[0] # Caller frame info
+        self.log_adapter.log(level, text, info[0], info[1])
+
     def short_name(self, name):
         """Remove prefix from name if present"""
         if not name: return name

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/python/qpid_dispatch_internal/management/schema_doc.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/management/schema_doc.py b/python/qpid_dispatch_internal/management/schema_doc.py
index a9a0881..676fe50 100644
--- a/python/qpid_dispatch_internal/management/schema_doc.py
+++ b/python/qpid_dispatch_internal/management/schema_doc.py
@@ -21,6 +21,7 @@
 
 from collections import namedtuple
 import sys
+from .schema import AttributeType
 
 class SchemaWriter(object):
     """Write the schema as an asciidoc document"""
@@ -72,7 +73,20 @@ class SchemaWriter(object):
         self.writeln()
 
     def attribute_types(self, holder):
-        for attr in holder.my_attributes:
+        holder_attributes = holder.my_attributes
+        for attr in holder_attributes:
+            if attr.deprecation_name:
+                deprecated_attr = AttributeType(attr.deprecation_name, type=attr.type, defined_in=attr.defined_in,
+                                                default=attr.default, required=attr.required, unique=attr.unique,
+                                                hidden=attr.hidden, deprecated=True, value=attr.value,
+                                                description="(DEPRECATED) " + attr.description
+                                                            + " This attribute has been deprecated. Use " +
+                                                            attr.name + " instead.",
+                                                create=attr.create, update=attr.update,
+                                                graph=attr.graph)
+                holder_attributes.append(deprecated_attr)
+
+        for attr in holder_attributes:
             self.attribute_type(attr, holder)
 
     def operation_def(self, op, holder):

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/src/router_config.c
----------------------------------------------------------------------
diff --git a/src/router_config.c b/src/router_config.c
index 0bc5b95..da5bb97 100644
--- a/src/router_config.c
+++ b/src/router_config.c
@@ -149,7 +149,7 @@ qd_error_t qd_router_configure_link_route(qd_router_t *router, qd_entity_t *enti
         container = qd_entity_opt_string(entity, "containerId", 0);  QD_ERROR_BREAK();
         c_name    = qd_entity_opt_string(entity, "connection", 0);   QD_ERROR_BREAK();
         distrib   = qd_entity_opt_string(entity, "distribution", 0); QD_ERROR_BREAK();
-        dir       = qd_entity_opt_string(entity, "dir", 0);          QD_ERROR_BREAK();
+        dir       = qd_entity_opt_string(entity, "direction", 0);    QD_ERROR_BREAK();
 
         prefix    = qd_entity_opt_string(entity, "prefix", 0);
         pattern   = qd_entity_opt_string(entity, "pattern", 0);
@@ -203,7 +203,7 @@ qd_error_t qd_router_configure_link_route(qd_router_t *router, qd_entity_t *enti
         }
 
         if (dir) {
-            qd_compose_insert_string(body, "dir");
+            qd_compose_insert_string(body, "direction");
             qd_compose_insert_string(body, dir);
         }
 
@@ -237,7 +237,7 @@ qd_error_t qd_router_configure_auto_link(qd_router_t *router, qd_entity_t *entit
     do {
         name      = qd_entity_opt_string(entity, "name", 0);         QD_ERROR_BREAK();
         addr      = qd_entity_get_string(entity, "addr");            QD_ERROR_BREAK();
-        dir       = qd_entity_get_string(entity, "dir");             QD_ERROR_BREAK();
+        dir       = qd_entity_get_string(entity, "direction");       QD_ERROR_BREAK();
         container = qd_entity_opt_string(entity, "containerId", 0);  QD_ERROR_BREAK();
         c_name    = qd_entity_opt_string(entity, "connection", 0);   QD_ERROR_BREAK();
         ext_addr  = qd_entity_opt_string(entity, "externalAddr", 0); QD_ERROR_BREAK();
@@ -260,7 +260,7 @@ qd_error_t qd_router_configure_auto_link(qd_router_t *router, qd_entity_t *entit
         }
 
         if (dir) {
-            qd_compose_insert_string(body, "dir");
+            qd_compose_insert_string(body, "direction");
             qd_compose_insert_string(body, dir);
         }
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/src/router_core/agent_config_auto_link.c
----------------------------------------------------------------------
diff --git a/src/router_core/agent_config_auto_link.c b/src/router_core/agent_config_auto_link.c
index 4754623..651b596 100644
--- a/src/router_core/agent_config_auto_link.c
+++ b/src/router_core/agent_config_auto_link.c
@@ -27,7 +27,7 @@
 #define QDR_CONFIG_AUTO_LINK_IDENTITY      1
 #define QDR_CONFIG_AUTO_LINK_TYPE          2
 #define QDR_CONFIG_AUTO_LINK_ADDR          3
-#define QDR_CONFIG_AUTO_LINK_DIR           4
+#define QDR_CONFIG_AUTO_LINK_DIRECTION     4
 #define QDR_CONFIG_AUTO_LINK_PHASE         5
 #define QDR_CONFIG_AUTO_LINK_CONNECTION    6
 #define QDR_CONFIG_AUTO_LINK_CONTAINER_ID  7
@@ -41,7 +41,7 @@ const char *qdr_config_auto_link_columns[] =
      "identity",
      "type",
      "addr",
-     "dir",
+     "direction",
      "phase",
      "connection",
      "containerId",
@@ -87,7 +87,7 @@ static void qdr_config_auto_link_insert_column_CT(qdr_auto_link_t *al, int col,
             qd_compose_insert_null(body);
         break;
 
-    case QDR_CONFIG_AUTO_LINK_DIR:
+    case QDR_CONFIG_AUTO_LINK_DIRECTION:
         text = al->dir == QD_INCOMING ? "in" : "out";
         qd_compose_insert_string(body, text);
         break;
@@ -261,9 +261,9 @@ static const char *qdra_auto_link_direction_CT(qd_parsed_field_t *field, qd_dire
             *dir = QD_OUTGOING;
             return 0;
         }
-        return "Invalid value for 'dir'";
+        return "Invalid value for 'direction'";
     }
-    return "Missing value for 'dir'";
+    return "Missing value for 'direction'";
 }
 
 
@@ -368,7 +368,7 @@ void qdra_config_auto_link_create_CT(qdr_core_t        *core,
         // Extract the fields from the request
         //
         qd_parsed_field_t *addr_field       = qd_parse_value_by_key(in_body, qdr_config_auto_link_columns[QDR_CONFIG_AUTO_LINK_ADDR]);
-        qd_parsed_field_t *dir_field        = qd_parse_value_by_key(in_body, qdr_config_auto_link_columns[QDR_CONFIG_AUTO_LINK_DIR]);
+        qd_parsed_field_t *dir_field        = qd_parse_value_by_key(in_body, qdr_config_auto_link_columns[QDR_CONFIG_AUTO_LINK_DIRECTION]);
         qd_parsed_field_t *phase_field      = qd_parse_value_by_key(in_body, qdr_config_auto_link_columns[QDR_CONFIG_AUTO_LINK_PHASE]);
         qd_parsed_field_t *connection_field = qd_parse_value_by_key(in_body, qdr_config_auto_link_columns[QDR_CONFIG_AUTO_LINK_CONNECTION]);
         qd_parsed_field_t *container_field  = qd_parse_value_by_key(in_body, qdr_config_auto_link_columns[QDR_CONFIG_AUTO_LINK_CONTAINER_ID]);
@@ -383,11 +383,11 @@ void qdra_config_auto_link_create_CT(qdr_core_t        *core,
 
 
         //
-        // Addr and dir fields are mandatory.  Fail if they're not both here.
+        // Addr and direction fields are mandatory.  Fail if they're not both here.
         //
         if (!addr_field || !dir_field) {
             query->status = QD_AMQP_BAD_REQUEST;
-            query->status.description = "addr and dir fields are mandatory";
+            query->status.description = "addr and direction fields are mandatory";
             qd_log(core->agent_log, QD_LOG_ERROR, "Error performing CREATE of %s: %s", CONFIG_AUTOLINK_TYPE, query->status.description);
             break;
         }

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/src/router_core/agent_config_link_route.c
----------------------------------------------------------------------
diff --git a/src/router_core/agent_config_link_route.c b/src/router_core/agent_config_link_route.c
index 92ef02f..d7f47bd 100644
--- a/src/router_core/agent_config_link_route.c
+++ b/src/router_core/agent_config_link_route.c
@@ -30,7 +30,7 @@
 #define QDR_CONFIG_LINK_ROUTE_DISTRIBUTION  4
 #define QDR_CONFIG_LINK_ROUTE_CONNECTION    5
 #define QDR_CONFIG_LINK_ROUTE_CONTAINER_ID  6
-#define QDR_CONFIG_LINK_ROUTE_DIR           7
+#define QDR_CONFIG_LINK_ROUTE_DIRECTION     7
 #define QDR_CONFIG_LINK_ROUTE_OPER_STATUS   8
 #define QDR_CONFIG_LINK_ROUTE_PATTERN       9
 
@@ -42,7 +42,7 @@ const char *qdr_config_link_route_columns[] =
      "distribution",
      "connection",
      "containerId",
-     "dir",
+     "direction",
      "operStatus",
      "pattern",
      0};
@@ -129,7 +129,7 @@ static void qdr_config_link_route_insert_column_CT(qdr_link_route_t *lr, int col
         qd_compose_insert_null(body);
         break;
 
-    case QDR_CONFIG_LINK_ROUTE_DIR:
+    case QDR_CONFIG_LINK_ROUTE_DIRECTION:
         text = lr->dir == QD_INCOMING ? "in" : "out";
         qd_compose_insert_string(body, text);
         break;
@@ -280,9 +280,9 @@ static const char *qdra_link_route_direction_CT(qd_parsed_field_t *field, qd_dir
             *dir = QD_OUTGOING;
             return 0;
         }
-        return "Invalid value for 'dir'";
+        return "Invalid value for 'direction'";
     }
-    return "Missing value for 'dir'";
+    return "Missing value for 'direction'";
 }
 
 
@@ -391,7 +391,7 @@ void qdra_config_link_route_create_CT(qdr_core_t        *core,
         qd_parsed_field_t *distrib_field    = qd_parse_value_by_key(in_body, qdr_config_link_route_columns[QDR_CONFIG_LINK_ROUTE_DISTRIBUTION]);
         qd_parsed_field_t *connection_field = qd_parse_value_by_key(in_body, qdr_config_link_route_columns[QDR_CONFIG_LINK_ROUTE_CONNECTION]);
         qd_parsed_field_t *container_field  = qd_parse_value_by_key(in_body, qdr_config_link_route_columns[QDR_CONFIG_LINK_ROUTE_CONTAINER_ID]);
-        qd_parsed_field_t *dir_field        = qd_parse_value_by_key(in_body, qdr_config_link_route_columns[QDR_CONFIG_LINK_ROUTE_DIR]);
+        qd_parsed_field_t *dir_field        = qd_parse_value_by_key(in_body, qdr_config_link_route_columns[QDR_CONFIG_LINK_ROUTE_DIRECTION]);
 
         //
         // Both connection and containerId cannot be specified because both can represent different connections. Only one those
@@ -405,13 +405,13 @@ void qdra_config_link_route_create_CT(qdr_core_t        *core,
         }
 
         //
-        // The dir field is mandatory.
+        // The direction field is mandatory.
         // Either a prefix or a pattern field is mandatory.  However prefix and pattern
         // are mutually exclusive. Fail if either both or none are given.
         //
         const char *msg = NULL;
         if (!dir_field) {
-            msg = "No 'dir' attribute provided - it is mandatory";
+            msg = "No 'direction' attribute provided - it is mandatory";
         } else if (!prefix_field && !pattern_field) {
             msg = "Either a 'prefix' or 'pattern' attribute must be provided";
         } else if (prefix_field && pattern_field) {

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 7312ba7..1d4d1c8 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -84,6 +84,7 @@ foreach(py_test_module
     system_tests_one_router
     system_tests_handle_failover
     system_tests_default_distribution
+    system_tests_deprecated
     system_tests_policy
     system_tests_protocol_family
     system_tests_protocol_settings

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/tests/config-2-broker/A.conf
----------------------------------------------------------------------
diff --git a/tests/config-2-broker/A.conf b/tests/config-2-broker/A.conf
index 0c3fcd5..ec3729f 100644
--- a/tests/config-2-broker/A.conf
+++ b/tests/config-2-broker/A.conf
@@ -57,37 +57,37 @@ connector {
 
 linkRoute {
    prefix: queue.
-   dir: in
+   direction: in
    connection: broker
 }
 
 linkRoute {
    prefix: queue.
-   dir: out
+   direction: out
   connection: broker
 }
 
 linkRoute {
    prefix: exchange.
-   dir: in
+   direction: in
   connection: broker
 }
 
 linkRoute {
    prefix: exchange.
-   dir: out
+   direction: out
   connection: broker
 }
 
 linkRoute {
    prefix: qmf.
-   dir: in
+   direction: in
   connection: broker
 }
 
 linkRoute {
    prefix: qmf.
-   dir: out
+   direction: out
   connection: broker
 }
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/tests/system_test.py
----------------------------------------------------------------------
diff --git a/tests/system_test.py b/tests/system_test.py
index 31a71a9..71abbc7 100755
--- a/tests/system_test.py
+++ b/tests/system_test.py
@@ -300,13 +300,14 @@ class Qdrouterd(Process):
             self.defaults()
             return "".join(["%s {\n%s}\n"%(n, props(p)) for n, p in self])
 
-    def __init__(self, name=None, config=Config(), pyinclude=None, wait=True):
+    def __init__(self, name=None, config=Config(), pyinclude=None, wait=True, perform_teardown=True):
         """
         @param name: name used for for output files, default to id from config.
         @param config: router configuration
         @keyword wait: wait for router to be ready (call self.wait_ready())
         """
         self.config = copy(config)
+        self.perform_teardown = perform_teardown
         if not name: name = self.config.router_id
         assert name
         default_log = [l for l in config if (l[0] == 'log' and l[1]['module'] == 'DEFAULT')]
@@ -336,6 +337,10 @@ class Qdrouterd(Process):
         if self._management:
             try: self._management.close()
             except: pass
+
+        if not self.perform_teardown:
+            return
+
         super(Qdrouterd, self).teardown()
 
     @property

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/tests/system_tests_autolinks.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_autolinks.py b/tests/system_tests_autolinks.py
index a8e1d5c..07dc3f6 100644
--- a/tests/system_tests_autolinks.py
+++ b/tests/system_tests_autolinks.py
@@ -53,17 +53,18 @@ class AutolinkTest(TestCase):
             #
             # Create a pair of default auto-links for 'node.1'
             #
-            ('autoLink', {'addr': 'node.1', 'containerId': 'container.1', 'dir': 'in'}),
-            ('autoLink', {'addr': 'node.1', 'containerId': 'container.1', 'dir': 'out'}),
+            ('autoLink', {'addr': 'node.1', 'containerId': 'container.1', 'direction': 'in'}),
+            ('autoLink', {'addr': 'node.1', 'containerId': 'container.1', 'direction': 'out'}),
 
             #
             # Create a pair of auto-links on non-default phases for container-to-container transfers
             #
-            ('autoLink', {'addr': 'xfer.2', 'containerId': 'container.2', 'dir': 'in',  'phase': '4'}),
-            ('autoLink', {'addr': 'xfer.2', 'containerId': 'container.3', 'dir': 'out', 'phase': '4'}),
+            ('autoLink', {'addr': 'xfer.2', 'containerId': 'container.2', 'direction': 'in',  'phase': '4'}),
+            ('autoLink', {'addr': 'xfer.2', 'containerId': 'container.3', 'direction': 'out', 'phase': '4'}),
 
             #
             # Create a pair of auto-links with a different external address
+            # Leave the direction as dir to test backward compatibility.
             #
             ('autoLink', {'addr': 'node.2', 'externalAddr': 'ext.2', 'containerId': 'container.4', 'dir': 'in'}),
             ('autoLink', {'addr': 'node.2', 'externalAddr': 'ext.2', 'containerId': 'container.4', 'dir': 'out'}),
@@ -517,7 +518,7 @@ class ManageAutolinksTest(MessagingHandler):
                 props = {'operation': 'CREATE',
                          'type': 'org.apache.qpid.dispatch.router.config.autoLink',
                          'name': 'AL.%d' % self.n_created }
-                body  = {'dir': 'out',
+                body  = {'direction': 'out',
                          'containerId': 'container.new',
                          'addr': 'node.%d' % self.n_created }
                 msg = Message(properties=props, body=body, reply_to=self.reply_to)

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/tests/system_tests_delivery_abort.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_delivery_abort.py b/tests/system_tests_delivery_abort.py
index 30c7a13..451cbd3 100644
--- a/tests/system_tests_delivery_abort.py
+++ b/tests/system_tests_delivery_abort.py
@@ -45,8 +45,8 @@ class RouterTest(TestCase):
                 ('router', {'mode': 'interior', 'id': name, 'allowUnsettledMulticast': 'yes'}),
                 ('listener', {'port': cls.tester.get_port(), 'stripAnnotations': 'no'}),
                 ('listener', {'port': cls.tester.get_port(), 'stripAnnotations': 'no', 'role': 'route-container'}),
-                ('linkRoute', {'prefix': 'link', 'dir': 'in', 'containerId': 'LRC'}),
-                ('linkRoute', {'prefix': 'link', 'dir': 'out', 'containerId': 'LRC'}),
+                ('linkRoute', {'prefix': 'link', 'direction': 'in', 'containerId': 'LRC'}),
+                ('linkRoute', {'prefix': 'link', 'direction': 'out', 'containerId': 'LRC'}),
                 ('address', {'prefix': 'closest', 'distribution': 'closest'}),
                 ('address', {'prefix': 'spread', 'distribution': 'balanced'}),
                 ('address', {'prefix': 'multicast', 'distribution': 'multicast'}),

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/tests/system_tests_deprecated.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_deprecated.py b/tests/system_tests_deprecated.py
new file mode 100644
index 0000000..818d12d
--- /dev/null
+++ b/tests/system_tests_deprecated.py
@@ -0,0 +1,95 @@
+#
+# 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.
+#
+
+from system_test import TestCase, Qdrouterd
+
+
+class RouterTestDeprecatedLinkRoute(TestCase):
+
+    @classmethod
+    def setUpClass(cls):
+        """
+
+        :return:
+        """
+        super(RouterTestDeprecatedLinkRoute, cls).setUpClass()
+
+        name = "test-router"
+
+        config = Qdrouterd.Config([
+            ('router', {'mode': 'standalone', 'id': 'QDR.A'}),
+            # We are trying to declare a link route with both 'dir' and 'direction' attributes.
+            # The router must not start in this case.
+            ('linkRoute', {'prefix': 'org.apache', 'containerId': 'QDR.A', 'direction': 'in', 'dir': 'in'}),
+            ('linkRoute', {'prefix': 'org.apache', 'containerId': 'QDR.A', 'direction': 'out'}),
+            ('listener', {'port': cls.tester.get_port(), 'maxFrameSize': '2048', 'stripAnnotations': 'in'}),
+        ])
+
+        cls.router = cls.tester.qdrouterd(name, config, wait=False, perform_teardown=False)
+
+        # Try connecting for 4 seconds. If unable to connect, just move on.
+        try:
+            cls.router.wait_ready(timeout=4)
+        except:
+            pass
+
+    def test_deprecated_link_route(self):
+        with open('../setUpClass/test-router-2.out', 'r') as router_log:
+            log_lines = router_log.read().split("\n")
+            search_lines = [s for s in log_lines if "org.apache.qpid.dispatch.router.config.linkRoute: Both 'dir' and 'direction' cannot be specified for entity 'linkRoute'" in s]
+            self.assertEqual(len(search_lines), 4)
+
+
+class RouterTestDeprecatedLAutoLink(TestCase):
+
+    @classmethod
+    def setUpClass(cls):
+        super(RouterTestDeprecatedLAutoLink, cls).setUpClass()
+
+        name = "test-autolink"
+
+        config = Qdrouterd.Config([
+            ('router', {'mode': 'standalone', 'id': 'QDR.B'}),
+            # We are trying to declare a link route with both 'dir' and 'direction' attributes.
+            # The router must not start in this case.
+            ('autoLink', {'addr': 'node.1', 'containerId': 'container.1', 'dir': 'in',  'direction': 'in'}),
+            ('autoLink', {'addr': 'node.1', 'containerId': 'container.1', 'direction': 'out'}),
+            ('listener', {'port': cls.tester.get_port()}),
+        ])
+
+        cls.router = cls.tester.qdrouterd(name, config, wait=False, perform_teardown=False)
+
+        # Try connecting for 4 seconds. If unable to connect, just move on.
+        try:
+            cls.router.wait_ready(timeout=4)
+        except:
+            pass
+
+    def test_deprecated_auto_link(self):
+        with open('../setUpClass/test-autolink-1.out', 'r') as router_log:
+            log_lines = router_log.read().split("\n")
+            search_lines = [s for s in log_lines if
+                            "org.apache.qpid.dispatch.router.config.autoLink: Both 'dir' and 'direction' cannot be specified for entity 'autoLink'" in s]
+            self.assertEqual(len(search_lines), 4)
+
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/tests/system_tests_distribution.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_distribution.py b/tests/system_tests_distribution.py
index ed5307e..ea714ba 100644
--- a/tests/system_tests_distribution.py
+++ b/tests/system_tests_distribution.py
@@ -138,13 +138,13 @@ class DistributionTests ( TestCase ):
         [
             ( 'linkRoute',
               { 'prefix': cls.linkroute_prefix,
-                'dir': 'in',
+                'direction': 'in',
                 'containerId': cls.container_ids[0]
               }
             ),
             ( 'linkRoute',
               { 'prefix': cls.linkroute_prefix,
-                'dir': 'out',
+                'direction': 'out',
                 'containerId': cls.container_ids[0]
               }
             )
@@ -161,13 +161,13 @@ class DistributionTests ( TestCase ):
             ( 'autoLink',
               { 'addr': cls.waypoint_prefix_1 + '.waypoint',
                 'containerId': cls.container_ids[1],
-                'dir': 'in'
+                'direction': 'in'
               }
             ),
             ( 'autoLink',
               { 'addr': cls.waypoint_prefix_1 + '.waypoint',
                 'containerId': cls.container_ids[1],
-                'dir': 'out'
+                'direction': 'out'
               }
             )
         ]
@@ -206,14 +206,14 @@ class DistributionTests ( TestCase ):
               { 'addr': cls.waypoint_prefix_2 + '.waypoint',
                 'phase' : 0,
                 'containerId': cls.container_ids[2],
-                'dir': 'out'    # out-of-router
+                'direction': 'out'    # out-of-router
               }
             ),
             ( 'autoLink',
               { 'addr': cls.waypoint_prefix_2 + '.waypoint',
                 'phase' : 1,
                 'containerId': cls.container_ids[2],
-                'dir': 'in'    # into-router
+                'direction': 'in'    # into-router
               }
             ),
 
@@ -222,14 +222,14 @@ class DistributionTests ( TestCase ):
               { 'addr': cls.waypoint_prefix_2 + '.waypoint',
                 'phase' : 1,   # out-of-router
                 'containerId': cls.container_ids[2],
-                'dir': 'out'
+                'direction': 'out'
               }
             ),
             ( 'autoLink',
               { 'addr': cls.waypoint_prefix_2 + '.waypoint',
                 'phase' : 2,   # into-router
                 'containerId': cls.container_ids[2],
-                'dir': 'in'
+                'direction': 'in'
               }
             )
         ]
@@ -256,13 +256,13 @@ class DistributionTests ( TestCase ):
             ( 'autoLink',
               { 'addr': cls.waypoint_prefix_3 + '.waypoint',
                 'containerId': cls.container_ids[3],
-                'dir': 'in'
+                'direction': 'in'
               }
             ),
             ( 'autoLink',
               { 'addr': cls.waypoint_prefix_3 + '.waypoint',
                 'containerId': cls.container_ids[3],
-                'dir': 'out'
+                'direction': 'out'
               }
             ),
 
@@ -270,13 +270,13 @@ class DistributionTests ( TestCase ):
             ( 'autoLink',
               { 'addr': cls.waypoint_prefix_3 + '.waypoint',
                 'containerId': cls.container_ids[3],
-                'dir': 'in'
+                'direction': 'in'
               }
             ),
             ( 'autoLink',
               { 'addr': cls.waypoint_prefix_3 + '.waypoint',
                 'containerId': cls.container_ids[3],
-                'dir': 'out'
+                'direction': 'out'
               }
             )
         ]

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/tests/system_tests_link_routes.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_link_routes.py b/tests/system_tests_link_routes.py
index afee3a5..f882329 100644
--- a/tests/system_tests_link_routes.py
+++ b/tests/system_tests_link_routes.py
@@ -104,18 +104,19 @@ class LinkRouteTest(TestCase):
                    # This is an on-demand connection made from QDR.B's ephemeral port to d_listener_port
                    ('connector', {'name': 'routerD', 'role': 'route-container', 'host': '0.0.0.0', 'port': d_listener_port, 'saslMechanisms': 'ANONYMOUS'}),
 
-                   #('linkRoute', {'prefix': 'org.apache', 'connection': 'broker', 'dir': 'in'}),
-                   ('linkRoute', {'prefix': 'org.apache', 'containerId': 'QDR.A', 'dir': 'in'}),
-                   ('linkRoute', {'prefix': 'org.apache', 'containerId': 'QDR.A', 'dir': 'out'}),
+                   #('linkRoute', {'prefix': 'org.apache', 'connection': 'broker', 'direction': 'in'}),
+                   ('linkRoute', {'prefix': 'org.apache', 'containerId': 'QDR.A', 'direction': 'in'}),
+                   ('linkRoute', {'prefix': 'org.apache', 'containerId': 'QDR.A', 'direction': 'out'}),
 
-                   ('linkRoute', {'prefix': 'pulp.task', 'connection': 'test-tag', 'dir': 'in'}),
-                   ('linkRoute', {'prefix': 'pulp.task', 'connection': 'test-tag', 'dir': 'out'}),
+                   ('linkRoute', {'prefix': 'pulp.task', 'connection': 'test-tag', 'direction': 'in'}),
+                   ('linkRoute', {'prefix': 'pulp.task', 'connection': 'test-tag', 'direction': 'out'}),
 
                    # addresses matching pattern 'a.*.toA.#' route to QDR.A
-                   ('linkRoute', {'pattern': 'a.*.toA.#', 'containerId': 'QDR.A', 'dir': 'in'}),
-                   ('linkRoute', {'pattern': 'a.*.toA.#', 'containerId': 'QDR.A', 'dir': 'out'}),
+                   ('linkRoute', {'pattern': 'a.*.toA.#', 'containerId': 'QDR.A', 'direction': 'in'}),
+                   ('linkRoute', {'pattern': 'a.*.toA.#', 'containerId': 'QDR.A', 'direction': 'out'}),
 
                    # addresses matching pattern 'a.*.toD.#' route to QDR.D
+                   # Dont change dir to direction here so we can make sure that the dir attribute is still working.
                    ('linkRoute', {'pattern': 'a.*.toD.#', 'containerId': 'QDR.D', 'dir': 'in'}),
                    ('linkRoute', {'pattern': 'a.*.toD.#', 'containerId': 'QDR.D', 'dir': 'out'})
 
@@ -130,17 +131,17 @@ class LinkRouteTest(TestCase):
                    ('listener', {'host': '0.0.0.0', 'role': 'inter-router', 'port': c_listener_port, 'saslMechanisms': 'ANONYMOUS'}),
                    # The dot(.) at the end is ignored by the address hashing scheme.
 
-                   ('linkRoute', {'prefix': 'org.apache.', 'dir': 'in'}),
-                   ('linkRoute', {'prefix': 'org.apache.', 'dir': 'out'}),
+                   ('linkRoute', {'prefix': 'org.apache.', 'direction': 'in'}),
+                   ('linkRoute', {'prefix': 'org.apache.', 'direction': 'out'}),
 
-                   ('linkRoute', {'prefix': 'pulp.task', 'dir': 'in'}),
-                   ('linkRoute', {'prefix': 'pulp.task', 'dir': 'out'}),
+                   ('linkRoute', {'prefix': 'pulp.task', 'direction': 'in'}),
+                   ('linkRoute', {'prefix': 'pulp.task', 'direction': 'out'}),
 
-                   ('linkRoute', {'pattern': 'a.*.toA.#', 'dir': 'in'}),
-                   ('linkRoute', {'pattern': 'a.*.toA.#', 'dir': 'out'}),
+                   ('linkRoute', {'pattern': 'a.*.toA.#', 'direction': 'in'}),
+                   ('linkRoute', {'pattern': 'a.*.toA.#', 'direction': 'out'}),
 
-                   ('linkRoute', {'pattern': 'a.*.toD.#', 'dir': 'in'}),
-                   ('linkRoute', {'pattern': 'a.*.toD.#', 'dir': 'out'})
+                   ('linkRoute', {'pattern': 'a.*.toD.#', 'direction': 'in'}),
+                   ('linkRoute', {'pattern': 'a.*.toD.#', 'direction': 'out'})
 
                 ]
                )
@@ -191,8 +192,8 @@ class LinkRouteTest(TestCase):
         out = self.run_qdmanage(cmd=cmd, address=self.routers[1].addresses[0])
 
         # Make sure there is a dir of in and out.
-        self.assertTrue('"dir": "in"' in out)
-        self.assertTrue('"dir": "out"' in out)
+        self.assertTrue('"direction": "in"' in out)
+        self.assertTrue('"direction": "out"' in out)
         self.assertTrue('"containerId": "QDR.A"' in out)
 
         # Use the long type and make sure that qdmanage does not mess up the long type
@@ -200,8 +201,8 @@ class LinkRouteTest(TestCase):
         out = self.run_qdmanage(cmd=cmd, address=self.routers[1].addresses[0])
 
         # Make sure there is a dir of in and out.
-        self.assertTrue('"dir": "in"' in out)
-        self.assertTrue('"dir": "out"' in out)
+        self.assertTrue('"direction": "in"' in out)
+        self.assertTrue('"direction": "out"' in out)
         self.assertTrue('"containerId": "QDR.A"' in out)
 
         identity = out[out.find("identity") + 12: out.find("identity") + 13]
@@ -231,7 +232,7 @@ class LinkRouteTest(TestCase):
 
         self.assertTrue(exception_occurred)
 
-        cmd = 'CREATE --type=autoLink addr=127.0.0.1 dir=in connection=routerC'
+        cmd = 'CREATE --type=autoLink addr=127.0.0.1 direction=in connection=routerC'
         out = self.run_qdmanage(cmd=cmd, address=self.routers[1].addresses[0])
 
         identity = out[out.find("identity") + 12: out.find("identity") + 14]

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/tests/system_tests_multi_tenancy.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_multi_tenancy.py b/tests/system_tests_multi_tenancy.py
index a555f81..b838de6 100644
--- a/tests/system_tests_multi_tenancy.py
+++ b/tests/system_tests_multi_tenancy.py
@@ -46,10 +46,10 @@ class RouterTest(TestCase):
                 ('listener', {'port': cls.tester.get_port(), 'stripAnnotations': 'no'}),
                 ('listener', {'port': cls.tester.get_port(), 'stripAnnotations': 'no', 'multiTenant': 'yes'}),
                 ('listener', {'port': cls.tester.get_port(), 'stripAnnotations': 'no', 'role': 'route-container'}),
-                ('linkRoute', {'prefix': '0.0.0.0/link', 'dir': 'in', 'containerId': 'LRC'}),
-                ('linkRoute', {'prefix': '0.0.0.0/link', 'dir': 'out', 'containerId': 'LRC'}),
-                ('autoLink', {'addr': '0.0.0.0/queue.waypoint', 'containerId': 'ALC', 'dir': 'in'}),
-                ('autoLink', {'addr': '0.0.0.0/queue.waypoint', 'containerId': 'ALC', 'dir': 'out'}),
+                ('linkRoute', {'prefix': '0.0.0.0/link', 'direction': 'in', 'containerId': 'LRC'}),
+                ('linkRoute', {'prefix': '0.0.0.0/link', 'direction': 'out', 'containerId': 'LRC'}),
+                ('autoLink', {'addr': '0.0.0.0/queue.waypoint', 'containerId': 'ALC', 'direction': 'in'}),
+                ('autoLink', {'addr': '0.0.0.0/queue.waypoint', 'containerId': 'ALC', 'direction': 'out'}),
                 ('address', {'prefix': 'closest', 'distribution': 'closest'}),
                 ('address', {'prefix': 'spread', 'distribution': 'balanced'}),
                 ('address', {'prefix': 'multicast', 'distribution': 'multicast'}),

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/tests/system_tests_qdmanage.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_qdmanage.py b/tests/system_tests_qdmanage.py
index e4c50c7..f9834ff 100644
--- a/tests/system_tests_qdmanage.py
+++ b/tests/system_tests_qdmanage.py
@@ -47,8 +47,8 @@ class QdmanageTest(TestCase):
             ('listener', {'port': cls.tester.get_port()}),
             ('connector', {'role': 'inter-router', 'port': cls.inter_router_port}),
             ('address', {'name': 'test-address', 'prefix': 'abcd', 'distribution': 'multicast'}),
-            ('linkRoute', {'name': 'test-link-route', 'prefix': 'xyz', 'dir': 'in'}),
-            ('autoLink', {'name': 'test-auto-link', 'addr': 'mnop', 'dir': 'out'}),
+            ('linkRoute', {'name': 'test-link-route', 'prefix': 'xyz', 'direction': 'in'}),
+            ('autoLink', {'name': 'test-auto-link', 'addr': 'mnop', 'direction': 'out'}),
             ('listener', {'port': cls.tester.get_port(), 'sslProfile': 'server-ssl'}),
             ('address', {'name': 'pattern-address', 'pattern': 'a/*/b/#/c', 'distribution': 'closest'})
         ])
@@ -296,12 +296,12 @@ class QdmanageTest(TestCase):
         query_command = 'QUERY --type=' + long_type
         output = json.loads(self.run_qdmanage(query_command))
         self.assertEqual(output[0]['name'], "test-link-route")
-        self.assertEqual(output[0]['dir'], "in")
+        self.assertEqual(output[0]['direction'], "in")
         self.assertEqual(output[0]['prefix'], "xyz")
 
     def test_specify_container_id_connection_link_route(self):
         long_type = 'org.apache.qpid.dispatch.router.config.linkRoute'
-        create_command = 'CREATE --type=' + long_type + ' prefix=abc containerId=id1 connection=conn1 dir=out'
+        create_command = 'CREATE --type=' + long_type + ' prefix=abc containerId=id1 connection=conn1 direction=out'
         output = self.run_qdmanage(create_command, expect=Process.EXIT_FAIL)
         self.assertIn("Both connection and containerId cannot be specified", output)
 
@@ -310,18 +310,18 @@ class QdmanageTest(TestCase):
         query_command = 'QUERY --type=' + long_type
         output = json.loads(self.run_qdmanage(query_command))
         self.assertEqual(output[0]['name'], "test-auto-link")
-        self.assertEqual(output[0]['dir'], "out")
+        self.assertEqual(output[0]['direction'], "out")
         self.assertEqual(output[0]['addr'], "mnop")
 
     def test_create_auto_link_with_phase(self):
         long_type = 'org.apache.qpid.dispatch.router.config.autoLink'
-        create_command = 'CREATE --type=' + long_type + ' addr=xyz containerId=id1 dir=out phase=2'
+        create_command = 'CREATE --type=' + long_type + ' addr=xyz containerId=id1 direction=out phase=2'
         output = json.loads(self.run_qdmanage(create_command))
         self.assertEqual(output['phase'], 2)
 
     def test_specify_container_id_connection_auto_link(self):
         long_type = 'org.apache.qpid.dispatch.router.config.autoLink'
-        create_command = 'CREATE --type=' + long_type + ' addr=abc containerId=id1 connection=conn1 dir=out'
+        create_command = 'CREATE --type=' + long_type + ' addr=abc containerId=id1 connection=conn1 direction=out'
         output = self.run_qdmanage(create_command, expect=Process.EXIT_FAIL)
         self.assertIn("Both connection and containerId cannot be specified", output)
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/257321d0/tools/qdstat
----------------------------------------------------------------------
diff --git a/tools/qdstat b/tools/qdstat
index 839b0be..98862d7 100755
--- a/tools/qdstat
+++ b/tools/qdstat
@@ -425,14 +425,14 @@ class BusManager(Node):
         heads.append(Header("status"))
         heads.append(Header("lastErr"))
         rows = []
-        cols = ('addr', 'dir', 'phase', 'externalAddr', 'linkRef', 'operStatus', 'lastError')
+        cols = ('addr', 'direction', 'phase', 'externalAddr', 'linkRef', 'operStatus', 'lastError')
 
         objects = self.query('org.apache.qpid.dispatch.router.config.autoLink', cols, limit=self.opts.limit)
 
         for al in objects:
             row = []
             row.append(al.addr)
-            row.append(al.dir)
+            row.append(al.direction)
             row.append(al.phase)
             row.append(al.externalAddr)
             row.append(al.linkRef)
@@ -452,14 +452,14 @@ class BusManager(Node):
         heads.append(Header("distrib"))
         heads.append(Header("status"))
         rows = []
-        cols = ('prefix', 'dir', 'distribution', 'operStatus', 'pattern')
+        cols = ('prefix', 'direction', 'distribution', 'operStatus', 'pattern')
 
         link_routes = self.query('org.apache.qpid.dispatch.router.config.linkRoute', cols, limit=self.opts.limit)
 
         for link_route in link_routes:
             row = []
             row.append(link_route.prefix if link_route.prefix else link_route.pattern)
-            row.append(link_route.dir)
+            row.append(link_route.direction)
             row.append(link_route.distribution)
             row.append(link_route.operStatus)
             rows.append(row)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org