Repository: qpid-dispatch
Updated Branches:
  refs/heads/master fcf457c98 -> 413d727b6


DISPATCH-1159 - Removed the term "uplink" from the edge router implementation.


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

Branch: refs/heads/master
Commit: 413d727b6e1772d87a23f88261cdced4940d33ee
Parents: fcf457c
Author: Ted Ross <[email protected]>
Authored: Tue Oct 30 13:46:41 2018 -0400
Committer: Ted Ross <[email protected]>
Committed: Tue Oct 30 13:46:41 2018 -0400

----------------------------------------------------------------------
 include/qpid/dispatch/iterator.h                |  2 +-
 include/qpid/dispatch/router_core.h             |  2 +-
 python/qpid_dispatch/management/qdrouter.json   | 10 +--
 src/iterator.c                                  | 14 ++---
 src/router_core/agent_connection.c              |  2 +-
 src/router_core/connections.c                   | 27 ++++-----
 .../modules/edge_router/addr_proxy.c            | 64 ++++++++++----------
 .../modules/edge_router/connection_manager.c    | 32 +++++-----
 src/router_core/router_core_private.h           |  4 +-
 src/router_node.c                               |  7 +--
 tests/config-2-edge/EDGE25.conf                 |  4 +-
 tests/config-2-edge/INTA.conf                   |  2 +-
 tests/config-2-edge/INTB.conf                   |  2 +-
 tests/field_test.c                              | 16 ++---
 tests/system_tests_edge_router.py               | 16 ++---
 15 files changed, 101 insertions(+), 103 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/413d727b/include/qpid/dispatch/iterator.h
----------------------------------------------------------------------
diff --git a/include/qpid/dispatch/iterator.h b/include/qpid/dispatch/iterator.h
index 74d73ca..3bc86e1 100644
--- a/include/qpid/dispatch/iterator.h
+++ b/include/qpid/dispatch/iterator.h
@@ -99,7 +99,7 @@ typedef struct qd_iterator_t qd_iterator_t;
  *                            L^^^^^^^
  *     amqp:/_edge/<router>/<local>
  *                H^^^^^^^^          [ interior mode ]
- *         L_uplink                  [ edge mode ]
+ *         L_edge                    [ edge mode ]
  *
  * ITER_VIEW_NODE_HASH - Isolate the hashable part of a router-id, used for 
headers
  *

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/413d727b/include/qpid/dispatch/router_core.h
----------------------------------------------------------------------
diff --git a/include/qpid/dispatch/router_core.h 
b/include/qpid/dispatch/router_core.h
index 5d5ba5b..4d61275 100644
--- a/include/qpid/dispatch/router_core.h
+++ b/include/qpid/dispatch/router_core.h
@@ -153,7 +153,7 @@ typedef enum {
     QDR_ROLE_NORMAL,
     QDR_ROLE_INTER_ROUTER,
     QDR_ROLE_ROUTE_CONTAINER,
-    QDR_ROLE_EDGE_UPLINK
+    QDR_ROLE_EDGE_CONNECTION
 } qdr_connection_role_t;
 
 typedef void (*qdr_connection_bind_context_t) (qdr_connection_t *context, 
void* token);

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/413d727b/python/qpid_dispatch/management/qdrouter.json
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch/management/qdrouter.json 
b/python/qpid_dispatch/management/qdrouter.json
index 1f111bf..9a1e778 100644
--- a/python/qpid_dispatch/management/qdrouter.json
+++ b/python/qpid_dispatch/management/qdrouter.json
@@ -386,7 +386,7 @@
                         "edge"
                     ],
                     "default": "standalone",
-                    "description": "In standalone mode, the router operates as 
a single component.  It does not participate in the routing protocol and 
therefore will not cooperate with other routers. In interior mode, the router 
operates in cooperation with other interior routers in an interconnected 
network.  In edge mode, the router can make an uplink to an interior router and 
join a network without causing that network to recompute paths.",
+                    "description": "In standalone mode, the router operates as 
a single component.  It does not participate in the routing protocol and 
therefore will not cooperate with other routers. In interior mode, the router 
operates in cooperation with other interior routers in an interconnected 
network.  In edge mode, the router can make a connection to an interior router 
and join a network without causing that network to recompute paths.",
                     "create": true
                 },
                 "area": {
@@ -705,10 +705,10 @@
                         "normal",
                         "inter-router",
                         "route-container",
-                        "edge-uplink"
+                        "edge"
                     ],
                     "default": "normal",
-                    "description": "The role of an established connection. In 
the normal role, the connection is assumed to be used for AMQP clients that are 
doing normal message delivery over the connection.  In the inter-router role, 
the connection is assumed to be to another router in the network.  Inter-router 
discovery and routing protocols can only be used over inter-router connections. 
route-container role can be used for router-container connections, for example, 
a router-broker connection.  In the edge-uplink role, the connection is assumed 
to be between an edge router and an interior router.",
+                    "description": "The role of an established connection. In 
the normal role, the connection is assumed to be used for AMQP clients that are 
doing normal message delivery over the connection.  In the inter-router role, 
the connection is assumed to be to another router in the network.  Inter-router 
discovery and routing protocols can only be used over inter-router connections. 
route-container role can be used for router-container connections, for example, 
a router-broker connection.  In the edge role, the connection is assumed to be 
between an edge router and an interior router.",
                     "create": true
                 },
                 "cost": {
@@ -870,10 +870,10 @@
                         "normal",
                         "inter-router",
                         "route-container",
-                        "edge-uplink"
+                        "edge"
                     ],
                     "default": "normal",
-                    "description": "The role of an established connection. In 
the normal role, the connection is assumed to be used for AMQP clients that are 
doing normal message delivery over the connection.  In the inter-router role, 
the connection is assumed to be to another router in the network.  Inter-router 
discovery and routing protocols can only be used over inter-router connections. 
route-container role can be used for router-container connections, for example, 
a router-broker connection.  In the edge-uplink role, the connection is assumed 
to be between and edge router and an interior router.",
+                    "description": "The role of an established connection. In 
the normal role, the connection is assumed to be used for AMQP clients that are 
doing normal message delivery over the connection.  In the inter-router role, 
the connection is assumed to be to another router in the network.  Inter-router 
discovery and routing protocols can only be used over inter-router connections. 
route-container role can be used for router-container connections, for example, 
a router-broker connection.  In the edge role, the connection is assumed to be 
between and edge router and an interior router.",
                     "create": true
                 },
                 "cost": {

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/413d727b/src/iterator.c
----------------------------------------------------------------------
diff --git a/src/iterator.c b/src/iterator.c
index 910aa19..bed686f 100644
--- a/src/iterator.c
+++ b/src/iterator.c
@@ -88,14 +88,14 @@ static const char    *SEPARATORS = "./";
 static const uint32_t HASH_INIT  = 5381;
 
 
-static void set_to_uplink(qd_iterator_t *iter)
+static void set_to_edge_connection(qd_iterator_t *iter)
 {
-    static const char *UPLINK = "_uplink";
+    static const char *EDGE_CONNECTION = "_edge";
     iter->prefix = QD_ITER_HASH_PREFIX_LOCAL;
     iter->state  = STATE_AT_PREFIX;
     iter->view_start_pointer.buffer    = 0;
-    iter->view_start_pointer.cursor    = (unsigned char*) UPLINK;
-    iter->view_start_pointer.remaining = (int) strlen(UPLINK);
+    iter->view_start_pointer.cursor    = (unsigned char*) EDGE_CONNECTION;
+    iter->view_start_pointer.remaining = (int) strlen(EDGE_CONNECTION);
     iter->view_pointer = iter->view_start_pointer;
 }
 
@@ -138,7 +138,7 @@ static void parse_address_view(qd_iterator_t *iter)
                 }
 
                 if (edge_mode)
-                    set_to_uplink(iter);
+                    set_to_edge_connection(iter);
                 else {
                     iter->prefix = QD_ITER_HASH_PREFIX_ROUTER;
                     iter->state  = STATE_AT_PREFIX;
@@ -148,7 +148,7 @@ static void parse_address_view(qd_iterator_t *iter)
             }
 
             if (edge_mode)
-                set_to_uplink(iter);
+                set_to_edge_connection(iter);
             else {
                 iter->prefix = QD_ITER_HASH_PREFIX_AREA;
                 iter->state  = STATE_AT_PREFIX;
@@ -165,7 +165,7 @@ static void parse_address_view(qd_iterator_t *iter)
             }
 
             if (edge_mode) {
-                set_to_uplink(iter);
+                set_to_edge_connection(iter);
                 return;
             } else {
                 iter->prefix = QD_ITER_HASH_PREFIX_EDGE_SUMMARY;

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/413d727b/src/router_core/agent_connection.c
----------------------------------------------------------------------
diff --git a/src/router_core/agent_connection.c 
b/src/router_core/agent_connection.c
index 6c19345..9ab6d7a 100644
--- a/src/router_core/agent_connection.c
+++ b/src/router_core/agent_connection.c
@@ -48,7 +48,7 @@ const char *qdr_connection_roles[] =
     {"normal",
      "inter-router",
      "route-container",
-     "edge-uplink",
+     "edge",
      0};
 
 const char *qdr_connection_columns[] =

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/413d727b/src/router_core/connections.c
----------------------------------------------------------------------
diff --git a/src/router_core/connections.c b/src/router_core/connections.c
index bbd7a27..ef2e236 100644
--- a/src/router_core/connections.c
+++ b/src/router_core/connections.c
@@ -484,7 +484,7 @@ qdr_link_t *qdr_link_first_attach(qdr_connection_t *conn,
         link->link_type = QD_LINK_ROUTER;
     else if (qdr_terminus_has_capability(local_terminus, 
QD_CAPABILITY_EDGE_DOWNLINK)) {
         if (conn->core->router_mode == QD_ROUTER_MODE_INTERIOR &&
-            conn->role == QDR_ROLE_EDGE_UPLINK &&
+            conn->role == QDR_ROLE_EDGE_CONNECTION &&
             dir == QD_OUTGOING)
             link->link_type = QD_LINK_EDGE_DOWNLINK;
     }
@@ -1299,8 +1299,9 @@ static void qdr_connection_opened_CT(qdr_core_t *core, 
qdr_action_t *action, boo
 
                 if (!conn->incoming) {
                     //
-                    // The connector-side of inter-router/edge-uplink 
connections is responsible for setting up the
-                    // inter-router links:  Two (in and out) for control, 2 * 
QDR_N_PRIORITIES for routed-message transfer.
+                    // The connector-side of inter-router connections is 
responsible for setting up the
+                    // inter-router links:  Two (in and out) for control, 2 * 
QDR_N_PRIORITIES for
+                    // routed-message transfer.
                     //
                     (void) qdr_create_link_CT(core, conn, QD_LINK_CONTROL, 
QD_INCOMING, qdr_terminus_router_control(), qdr_terminus_router_control());
                     (void) qdr_create_link_CT(core, conn, QD_LINK_CONTROL, 
QD_OUTGOING, qdr_terminus_router_control(), qdr_terminus_router_control());
@@ -1524,16 +1525,16 @@ static void qdr_link_inbound_first_attach_CT(qdr_core_t 
*core, qdr_action_t *act
     qdr_add_link_ref(&conn->links, link, QDR_LINK_LIST_CLASS_CONNECTION);
 
     //
-    // Mark the link as an edge link if it's inside an edge-uplink connection.
+    // Mark the link as an edge link if it's inside an edge connection.
     //
-    link->edge = (conn->role == QDR_ROLE_EDGE_UPLINK);
+    link->edge = (conn->role == QDR_ROLE_EDGE_CONNECTION);
 
     //
     // Reject any attaches of inter-router links that arrive on connections 
that are not inter-router.
     //
     if (((link->link_type == QD_LINK_CONTROL || link->link_type == 
QD_LINK_ROUTER) &&
-         (conn->role != QDR_ROLE_INTER_ROUTER && conn->role != 
QDR_ROLE_EDGE_UPLINK))) {
-        link->link_type = QD_LINK_ENDPOINT; // Demote the link type to 
endpoint if this is not an inter-router/edge-uplink connection
+         conn->role != QDR_ROLE_INTER_ROUTER)) {
+        link->link_type = QD_LINK_ENDPOINT; // Demote the link type to 
endpoint if this is not an inter-router connection
         qdr_link_outbound_detach_CT(core, link, 0, QDR_CONDITION_FORBIDDEN, 
true);
         qdr_terminus_free(source);
         qdr_terminus_free(target);
@@ -1545,8 +1546,6 @@ static void qdr_link_inbound_first_attach_CT(qdr_core_t 
*core, qdr_action_t *act
     // CONTROL link on the connection.  This will prevent endpoints from using 
inter-router
     // listeners for normal traffic but will not prevent routed-links from 
being established.
     //
-    // EDGE_TODO: Prevent endpoint links on edge-uplink connections
-    //
     if (conn->role == QDR_ROLE_INTER_ROUTER && link->link_type == 
QD_LINK_ENDPOINT &&
         core->control_links_by_mask_bit[conn->mask_bit] == 0) {
         qdr_link_outbound_detach_CT(core, link, 0, QDR_CONDITION_WRONG_ROLE, 
true);
@@ -1652,10 +1651,10 @@ static void qdr_link_inbound_first_attach_CT(qdr_core_t 
*core, qdr_action_t *act
                     }
 
                     //
-                    // If this link came through an edge-uplink connection, 
raise a link event to
+                    // If this link came through an edge connection, raise a 
link event to
                     // herald that fact.
                     //
-                    if (link->conn->role == QDR_ROLE_EDGE_UPLINK)
+                    if (link->conn->role == QDR_ROLE_EDGE_CONNECTION)
                         qdrc_event_link_raise(core, 
QDRC_EVENT_LINK_EDGE_DATA_ATTACHED, link);
                 }
             }
@@ -1761,9 +1760,9 @@ static void qdr_link_inbound_second_attach_CT(qdr_core_t 
*core, qdr_action_t *ac
     link->oper_status = QDR_LINK_OPER_UP;
 
     //
-    // Mark the link as an edge link if it's inside an edge-uplink connection.
+    // Mark the link as an edge link if it's inside an edge connection.
     //
-    link->edge = (conn->role == QDR_ROLE_EDGE_UPLINK);
+    link->edge = (conn->role == QDR_ROLE_EDGE_CONNECTION);
 
     if (link->core_endpoint) {
         qdrc_endpoint_do_second_attach_CT(core, link->core_endpoint, source, 
target);
@@ -1942,7 +1941,7 @@ static void qdr_link_inbound_detach_CT(qdr_core_t *core, 
qdr_action_t *action, b
                     //
                     // If this is an edge data link, raise a link event to 
indicate its detachment.
                     //
-                    if (link->conn->role == QDR_ROLE_EDGE_UPLINK)
+                    if (link->conn->role == QDR_ROLE_EDGE_CONNECTION)
                         qdrc_event_link_raise(core, 
QDRC_EVENT_LINK_EDGE_DATA_DETACHED, link);
                 }
                 break;

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/413d727b/src/router_core/modules/edge_router/addr_proxy.c
----------------------------------------------------------------------
diff --git a/src/router_core/modules/edge_router/addr_proxy.c 
b/src/router_core/modules/edge_router/addr_proxy.c
index 2f82b94..df25621 100644
--- a/src/router_core/modules/edge_router/addr_proxy.c
+++ b/src/router_core/modules/edge_router/addr_proxy.c
@@ -35,26 +35,26 @@
 //
 //   Related to dynamic (topological) addresses:
 //
-//    1) When an uplink becomes active, the "_uplink" address is properly 
linked to an
-//       outgoing anonymous link on the active uplink connection.
+//    1) When an edge connection becomes active, the "_edge" address is 
properly linked to an
+//       outgoing anonymous link on the active edge connection.
 //
-//    2) When an uplink becomes active, an incoming link is established over 
the uplink
+//    2) When an edge connection becomes active, an incoming link is 
established over the edge
 //       connection that is used to transfer deliveries to topological 
(dynamic) addresses
 //       on the edge router.
 //
 //  Related to mobile addresses:
 //
-//    3) Ensure that if there is an active uplink, that uplink should have one 
incoming
+//    3) Ensure that if there is an active edge connection, that connection 
should have one incoming
 //       link for every mobile address for which there is at least one local 
consumer.
 //
-//    4) Ensure that if there is an active uplink, that uplink should have one 
outgoing
+//    4) Ensure that if there is an active edge connection, that connection 
should have one outgoing
 //       link for every mobile address for which there is at least one local 
producer.
 //
 //    5) Maintain an incoming link for edge-address-tracking attached to the 
edge-address-tracker
 //       in the connected interior router.
 //
 //    6) Handle address tracking updates indicating which producer-addresses 
have destinations
-//       reachable via the edge uplink.
+//       reachable via the edge connection.
 //
 
 #define INITIAL_CREDIT 32
@@ -62,9 +62,9 @@
 struct qcm_edge_addr_proxy_t {
     qdr_core_t                *core;
     qdrc_event_subscription_t *event_sub;
-    bool                       uplink_established;
-    qdr_address_t             *uplink_addr;
-    qdr_connection_t          *uplink_conn;
+    bool                       edge_conn_established;
+    qdr_address_t             *edge_conn_addr;
+    qdr_connection_t          *edge_conn;
     qdrc_endpoint_t           *tracking_endpoint;
     qdrc_endpoint_desc_t       endpoint_descriptor;
 };
@@ -92,7 +92,7 @@ static qdr_terminus_t *qdr_terminus_normal(const char *addr)
 static void add_inlink(qcm_edge_addr_proxy_t *ap, const char *key, 
qdr_address_t *addr)
 {
     if (addr->edge_inlink == 0) {
-        qdr_link_t *link = qdr_create_link_CT(ap->core, ap->uplink_conn, 
QD_LINK_ENDPOINT, QD_INCOMING,
+        qdr_link_t *link = qdr_create_link_CT(ap->core, ap->edge_conn, 
QD_LINK_ENDPOINT, QD_INCOMING,
                                               qdr_terminus_normal(key + 2), 
qdr_terminus_normal(0));
         qdr_core_bind_address_link_CT(ap->core, addr, link);
         addr->edge_inlink = link;
@@ -119,7 +119,7 @@ static void add_outlink(qcm_edge_addr_proxy_t *ap, const 
char *key, qdr_address_
         // happen later when the interior tells us that there are upstream 
destinations
         // for the address (see on_transfer below).
         //
-        qdr_link_t *link = qdr_create_link_CT(ap->core, ap->uplink_conn, 
QD_LINK_ENDPOINT, QD_OUTGOING,
+        qdr_link_t *link = qdr_create_link_CT(ap->core, ap->edge_conn, 
QD_LINK_ENDPOINT, QD_OUTGOING,
                                               qdr_terminus_normal(0), 
qdr_terminus_normal(key + 2));
         addr->edge_outlink = link;
     }
@@ -144,10 +144,10 @@ static void on_conn_event(void *context, qdrc_event_t 
event, qdr_connection_t *c
     switch (event) {
     case QDRC_EVENT_CONN_EDGE_ESTABLISHED : {
         //
-        // Flag the uplink as being established.
+        // Flag the edge connection as being established.
         //
-        ap->uplink_established = true;
-        ap->uplink_conn        = conn;
+        ap->edge_conn_established = true;
+        ap->edge_conn             = conn;
 
         //
         // Attach an anonymous sending link to the interior router.
@@ -157,14 +157,14 @@ static void on_conn_event(void *context, qdrc_event_t 
event, qdr_connection_t *c
                                                   qdr_terminus(0), 
qdr_terminus(0));
 
         //
-        // Associate the anonymous sender with the uplink address.  This will 
cause
-        // all deliveries destined off-edge to be sent to the interior via the 
uplink.
+        // Associate the anonymous sender with the edge connection address.  
This will cause
+        // all deliveries destined off-edge to be sent to the interior via the 
edge connection.
         //
-        qdr_core_bind_address_link_CT(ap->core, ap->uplink_addr, out_link);
+        qdr_core_bind_address_link_CT(ap->core, ap->edge_conn_addr, out_link);
 
         //
         // Attach a receiving link for edge summary.  This will cause all 
deliveries
-        // destined for this router to be delivered via the uplink.
+        // destined for this router to be delivered via the edge connection.
         //
         (void) qdr_create_link_CT(ap->core, conn,
                                   QD_LINK_ENDPOINT, QD_INCOMING,
@@ -188,7 +188,7 @@ static void on_conn_event(void *context, qdrc_event_t 
event, qdr_connection_t *c
             if (*key == QD_ITER_HASH_PREFIX_MOBILE) {
                 //
                 // Nullify the edge link references in case there are any left 
over from an earlier
-                // instance of an edge uplink.
+                // instance of an edge connection.
                 //
                 addr->edge_inlink  = 0;
                 addr->edge_outlink = 0;
@@ -200,7 +200,7 @@ static void on_conn_event(void *context, qdrc_event_t 
event, qdr_connection_t *c
                 if (DEQ_SIZE(addr->rlinks) > 0) {
                     if (DEQ_SIZE(addr->rlinks) == 1) {
                         qdr_link_ref_t *ref = DEQ_HEAD(addr->rlinks);
-                        if (ref->link->conn != ap->uplink_conn)
+                        if (ref->link->conn != ap->edge_conn)
                             add_inlink(ap, key, addr);
                     } else
                         add_inlink(ap, key, addr);
@@ -213,7 +213,7 @@ static void on_conn_event(void *context, qdrc_event_t 
event, qdr_connection_t *c
                 if (DEQ_SIZE(addr->inlinks) > 0) {
                     if (DEQ_SIZE(addr->inlinks) == 1) {
                         qdr_link_ref_t *ref = DEQ_HEAD(addr->inlinks);
-                        if (ref->link->conn != ap->uplink_conn)
+                        if (ref->link->conn != ap->edge_conn)
                             add_outlink(ap, key, addr);
                     } else
                         add_outlink(ap, key, addr);
@@ -225,8 +225,8 @@ static void on_conn_event(void *context, qdrc_event_t 
event, qdr_connection_t *c
     }
 
     case QDRC_EVENT_CONN_EDGE_LOST :
-        ap->uplink_established = false;
-        ap->uplink_conn        = 0;
+        ap->edge_conn_established = false;
+        ap->edge_conn             = 0;
         break;
 
     default:
@@ -242,9 +242,9 @@ static void on_addr_event(void *context, qdrc_event_t 
event, qdr_address_t *addr
     qdr_link_ref_t        *link_ref;
 
     //
-    // If we don't have an established uplink, there is no further work to be 
done.
+    // If we don't have an established edge connection, there is no further 
work to be done.
     //
-    if (!ap->uplink_established)
+    if (!ap->edge_conn_established)
         return;
 
     //
@@ -257,11 +257,11 @@ static void on_addr_event(void *context, qdrc_event_t 
event, qdr_address_t *addr
     switch (event) {
     case QDRC_EVENT_ADDR_BECAME_LOCAL_DEST :
         //
-        // Add an uplink for this address only if the local destination is
+        // Add an edge connection for this address only if the local 
destination is
         // not the link to the interior.
         //
         link_ref = DEQ_HEAD(addr->rlinks);
-        if (link_ref->link->conn != ap->uplink_conn)
+        if (link_ref->link->conn != ap->edge_conn)
             add_inlink(ap, key, addr);
         break;
 
@@ -275,7 +275,7 @@ static void on_addr_event(void *context, qdrc_event_t 
event, qdr_address_t *addr
         // remove the inlink for this address.
         //
         link_ref = DEQ_HEAD(addr->rlinks);
-        if (link_ref->link->conn == ap->uplink_conn)
+        if (link_ref->link->conn == ap->edge_conn)
             del_inlink(ap, addr);
         break;
 
@@ -285,7 +285,7 @@ static void on_addr_event(void *context, qdrc_event_t 
event, qdr_address_t *addr
 
     case QDRC_EVENT_ADDR_BECAME_SOURCE :
         link_ref = DEQ_HEAD(addr->inlinks);
-        if (link_ref->link->conn != ap->uplink_conn)
+        if (link_ref->link->conn != ap->edge_conn)
             add_outlink(ap, key, addr);
         break;
 
@@ -299,7 +299,7 @@ static void on_addr_event(void *context, qdrc_event_t 
event, qdr_address_t *addr
 
     case QDRC_EVENT_ADDR_ONE_SOURCE :
         link_ref = DEQ_HEAD(addr->inlinks);
-        if (link_ref->link->conn == ap->uplink_conn)
+        if (link_ref->link->conn == ap->edge_conn)
             del_outlink(ap, addr);
         break;
 
@@ -391,9 +391,9 @@ qcm_edge_addr_proxy_t *qcm_edge_addr_proxy(qdr_core_t *core)
     ap->endpoint_descriptor.on_cleanup       = on_cleanup;
 
     //
-    // Establish the uplink address to represent destinations reachable via 
the edge uplink
+    // Establish the edge connection address to represent destinations 
reachable via the edge connection
     //
-    ap->uplink_addr = qdr_add_local_address_CT(core, 'L', "_uplink", 
QD_TREATMENT_ANYCAST_CLOSEST);
+    ap->edge_conn_addr = qdr_add_local_address_CT(core, 'L', "_edge", 
QD_TREATMENT_ANYCAST_CLOSEST);
 
     //
     // Subscribe to the core events we'll need to drive this component

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/413d727b/src/router_core/modules/edge_router/connection_manager.c
----------------------------------------------------------------------
diff --git a/src/router_core/modules/edge_router/connection_manager.c 
b/src/router_core/modules/edge_router/connection_manager.c
index 4fc3d47..ca39421 100644
--- a/src/router_core/modules/edge_router/connection_manager.c
+++ b/src/router_core/modules/edge_router/connection_manager.c
@@ -27,12 +27,12 @@
 // This is the Connection Manager component of the Edge Router module.
 //
 // The Connection Manager is responsible for keeping track of all of the
-// edge-uplink connections to Interior routers and choosing one to be the
-// active uplink.  An edge router may maintain multiple "edge-uplink"
+// edge connections to Interior routers and choosing one to be the active
+// edge connection.  An edge router may maintain multiple "edge-connection"
 // connections to different Interior routers.  Only one of those connections
-// will be designated as active and carry uplink traffic.  This component
-// identifies the active uplink and generates outbound core events to notify
-// other interested parties:
+// will be designated as active and carry edge traffic.  This component
+// identifies the active edge connection and generates outbound core events
+// to notify other interested parties:
 //
 //     QDRC_EVENT_CONN_EDGE_ESTABLISHED
 //     QDRC_EVENT_CONN_EDGE_LOST
@@ -41,7 +41,7 @@
 struct qcm_edge_conn_mgr_t {
     qdr_core_t                *core;
     qdrc_event_subscription_t *event_sub;
-    qdr_connection_t          *active_uplink;
+    qdr_connection_t          *active_edge_connection;
 };
 
 
@@ -51,30 +51,30 @@ static void on_conn_event(void *context, qdrc_event_t 
event, qdr_connection_t *c
 
     switch (event) {
     case QDRC_EVENT_CONN_OPENED :
-        if (cm->active_uplink == 0 && conn->role == QDR_ROLE_EDGE_UPLINK) {
-            qd_log(cm->core->log, QD_LOG_INFO, "Edge uplink (id=%"PRIu64") to 
interior established", conn->identity);
-            cm->active_uplink = conn;
+        if (cm->active_edge_connection == 0 && conn->role == 
QDR_ROLE_EDGE_CONNECTION) {
+            qd_log(cm->core->log, QD_LOG_INFO, "Edge connection (id=%"PRIu64") 
to interior established", conn->identity);
+            cm->active_edge_connection = conn;
             qdrc_event_conn_raise(cm->core, QDRC_EVENT_CONN_EDGE_ESTABLISHED, 
conn);
         }
         break;
 
     case QDRC_EVENT_CONN_CLOSED :
-        if (cm->active_uplink == conn) {
+        if (cm->active_edge_connection == conn) {
             qdrc_event_conn_raise(cm->core, QDRC_EVENT_CONN_EDGE_LOST, conn);
             qdr_connection_t *alternate = DEQ_HEAD(cm->core->open_connections);
-            while (alternate && (alternate == conn || alternate->role != 
QDR_ROLE_EDGE_UPLINK))
+            while (alternate && (alternate == conn || alternate->role != 
QDR_ROLE_EDGE_CONNECTION))
                 alternate = DEQ_NEXT(alternate);
             if (alternate) {
                 qd_log(cm->core->log, QD_LOG_INFO,
-                       "Edge uplink (id=%"PRIu64") to interior lost, 
activating alternate id=%"PRIu64"",
+                       "Edge connection (id=%"PRIu64") to interior lost, 
activating alternate id=%"PRIu64"",
                        conn->identity, alternate->identity);
-                cm->active_uplink = alternate;
+                cm->active_edge_connection = alternate;
                 qdrc_event_conn_raise(cm->core, 
QDRC_EVENT_CONN_EDGE_ESTABLISHED, alternate);
             } else {
                 qd_log(cm->core->log, QD_LOG_INFO,
-                       "Edge uplink (id=%"PRIu64") to interior lost, no 
alternate uplink available",
+                       "Edge connection (id=%"PRIu64") to interior lost, no 
alternate connection available",
                        conn->identity);
-                cm->active_uplink = 0;
+                cm->active_edge_connection = 0;
             }
         }
         break;
@@ -97,7 +97,7 @@ qcm_edge_conn_mgr_t *qcm_edge_conn_mgr(qdr_core_t *core)
                                             0,
                                             0,
                                             cm);
-    cm->active_uplink = 0;
+    cm->active_edge_connection = 0;
 
     return cm;
 }

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/413d727b/src/router_core/router_core_private.h
----------------------------------------------------------------------
diff --git a/src/router_core/router_core_private.h 
b/src/router_core/router_core_private.h
index 6dfdca9..d87aec6 100644
--- a/src/router_core/router_core_private.h
+++ b/src/router_core/router_core_private.h
@@ -373,7 +373,7 @@ struct qdr_delivery_t {
     qdr_subscription_list_t subscriptions;
     qdr_delivery_ref_list_t peers;             /// Use this list if there if 
the delivery has more than one peer.
     bool                    multicast;         /// True if this delivery is 
targeted for a multicast address.
-    bool                    via_edge;          /// True if this delivery 
arrived via an edge-uplink connection.
+    bool                    via_edge;          /// True if this delivery 
arrived via an edge-connection.
 };
 
 ALLOC_DECLARE(qdr_delivery_t);
@@ -429,7 +429,7 @@ struct qdr_link_t {
     bool                     drain_mode;
     bool                     stalled_outbound;  ///< Indicates that this link 
is stalled on outbound buffer backpressure
     bool                     detach_received;
-    bool                     edge;              ///< True if this link is in 
an edge-uplink connection
+    bool                     edge;              ///< True if this link is in 
an edge-connection
     char                    *strip_prefix;
     char                    *insert_prefix;
     bool                     terminus_survives_disconnect;

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/413d727b/src/router_node.c
----------------------------------------------------------------------
diff --git a/src/router_node.c b/src/router_node.c
index d19afb9..96525ee 100644
--- a/src/router_node.c
+++ b/src/router_node.c
@@ -37,7 +37,7 @@ const char *QD_ROUTER_LINK_TYPE = "router.link";
 
 static char *router_role    = "inter-router";
 static char *container_role = "route-container";
-static char *edge_role      = "edge-uplink";
+static char *edge_role      = "edge";
 static char *direct_prefix;
 static char *node_id;
 
@@ -147,7 +147,7 @@ static void qd_router_connection_get_config(const 
qd_connection_t  *conn,
         } else if (cf && (strcmp(cf->role, edge_role) == 0)) {
             *strip_annotations_in  = false;
             *strip_annotations_out = false;
-            *role = QDR_ROLE_EDGE_UPLINK;
+            *role = QDR_ROLE_EDGE_CONNECTION;
             *cost = cf->inter_router_cost;
         } else if (cf && (strcmp(cf->role, container_role) == 0))  // backward 
compat
             *role = QDR_ROLE_ROUTE_CONTAINER;
@@ -939,11 +939,10 @@ static void AMQP_opened_handler(qd_router_t *router, 
qd_connection_t *conn, bool
 
     pn_data_t *props = pn_conn ? pn_connection_remote_properties(pn_conn) : 0;
 
-    if (role == QDR_ROLE_INTER_ROUTER || role == QDR_ROLE_EDGE_UPLINK) {
+    if (role == QDR_ROLE_INTER_ROUTER || role == QDR_ROLE_EDGE_CONNECTION) {
         //
         // Check the remote properties for an inter-router cost value.
         //
-
         if (props) {
             pn_data_rewind(props);
             pn_data_next(props);

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/413d727b/tests/config-2-edge/EDGE25.conf
----------------------------------------------------------------------
diff --git a/tests/config-2-edge/EDGE25.conf b/tests/config-2-edge/EDGE25.conf
index b43ef12..281ac23 100644
--- a/tests/config-2-edge/EDGE25.conf
+++ b/tests/config-2-edge/EDGE25.conf
@@ -35,11 +35,11 @@ listener {
 connector {
     host: 127.0.0.1
     port: 15001
-    role: edge-uplink
+    role: edge
 }
 
 connector {
     host: 127.0.0.1
     port: 15002
-    role: edge-uplink
+    role: edge
 }

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/413d727b/tests/config-2-edge/INTA.conf
----------------------------------------------------------------------
diff --git a/tests/config-2-edge/INTA.conf b/tests/config-2-edge/INTA.conf
index 6f44f73..2e26fb5 100644
--- a/tests/config-2-edge/INTA.conf
+++ b/tests/config-2-edge/INTA.conf
@@ -43,7 +43,7 @@ listener {
 listener {
     host: 0.0.0.0
     port: 15001
-    role: edge-uplink
+    role: edge
     authenticatePeer: no
     saslMechanisms: ANONYMOUS
 }

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/413d727b/tests/config-2-edge/INTB.conf
----------------------------------------------------------------------
diff --git a/tests/config-2-edge/INTB.conf b/tests/config-2-edge/INTB.conf
index a8525dd..9f111a2 100644
--- a/tests/config-2-edge/INTB.conf
+++ b/tests/config-2-edge/INTB.conf
@@ -41,7 +41,7 @@ connector {
 listener {
     host: 0.0.0.0
     port: 15002
-    role: edge-uplink
+    role: edge
     authenticatePeer: no
     saslMechanisms: ANONYMOUS
 }

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/413d727b/tests/field_test.c
----------------------------------------------------------------------
diff --git a/tests/field_test.c b/tests/field_test.c
index 490b70e..74fb681 100644
--- a/tests/field_test.c
+++ b/tests/field_test.c
@@ -345,22 +345,22 @@ static char* test_view_address_hash_edge(void *context)
     struct {const char *addr; const char *view;} cases[] = {
     {"amqp:/_local/my-addr/sub",                "Lmy-addr/sub"},
     {"amqp:/_local/my-addr",                    "Lmy-addr"},
-    {"amqp:/_topo/area/router/local/sub",       "L_uplink"},
-    {"amqp:/_topo/my-area/router/local/sub",    "L_uplink"},
+    {"amqp:/_topo/area/router/local/sub",       "L_edge"},
+    {"amqp:/_topo/my-area/router/local/sub",    "L_edge"},
     {"amqp:/_topo/my-area/my-router/local/sub", "Llocal/sub"},
-    {"amqp:/_topo/area/all/local/sub",          "L_uplink"},
+    {"amqp:/_topo/area/all/local/sub",          "L_edge"},
     {"amqp:/_topo/my-area/all/local/sub",       "Tlocal/sub"},
     {"amqp:/_topo/all/all/local/sub",           "Tlocal/sub"},
     {"amqp://host:port/_local/my-addr",         "Lmy-addr"},
-    {"_topo/area/router/my-addr",               "L_uplink"},
-    {"_topo/my-area/router/my-addr",            "L_uplink"},
+    {"_topo/area/router/my-addr",               "L_edge"},
+    {"_topo/my-area/router/my-addr",            "L_edge"},
     {"_topo/my-area/my-router/my-addr",         "Lmy-addr"},
-    {"_topo/my-area/router",                    "L_uplink"},
+    {"_topo/my-area/router",                    "L_edge"},
     {"amqp:/mobile",                            "M1mobile"},
     {"mobile",                                  "M1mobile"},
     {"/mobile",                                 "M1mobile"},
-    {"amqp:/_edge/router/sub",                  "L_uplink"},
-    {"_edge/router/sub",                        "L_uplink"},
+    {"amqp:/_edge/router/sub",                  "L_edge"},
+    {"_edge/router/sub",                        "L_edge"},
     {"amqp:/_edge/my-router/sub",               "Lsub"},
     {"_edge/my-router/sub",                     "Lsub"},
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/413d727b/tests/system_tests_edge_router.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_edge_router.py 
b/tests/system_tests_edge_router.py
index 215bc08..d7d16ae 100644
--- a/tests/system_tests_edge_router.py
+++ b/tests/system_tests_edge_router.py
@@ -61,13 +61,13 @@ class RouterTest(TestCase):
         edge_port_B       = cls.tester.get_port()
 
         router('INT.A', 'interior', ('listener', {'role': 'inter-router', 
'port': inter_router_port}),
-               ('listener', {'role': 'edge-uplink', 'port': edge_port_A}))
+               ('listener', {'role': 'edge', 'port': edge_port_A}))
         router('INT.B', 'interior', ('connector', {'name': 'connectorToA', 
'role': 'inter-router', 'port': inter_router_port}),
-               ('listener', {'role': 'edge-uplink', 'port': edge_port_B}))
-        router('EA1',   'edge',     ('connector', {'name': 'uplink', 'role': 
'edge-uplink', 'port': edge_port_A}))
-        router('EA2',   'edge',     ('connector', {'name': 'uplink', 'role': 
'edge-uplink', 'port': edge_port_A}))
-        router('EB1',   'edge',     ('connector', {'name': 'uplink', 'role': 
'edge-uplink', 'port': edge_port_B}))
-        router('EB2',   'edge',     ('connector', {'name': 'uplink', 'role': 
'edge-uplink', 'port': edge_port_B}))
+               ('listener', {'role': 'edge', 'port': edge_port_B}))
+        router('EA1',   'edge',     ('connector', {'name': 'edge', 'role': 
'edge', 'port': edge_port_A}))
+        router('EA2',   'edge',     ('connector', {'name': 'edge', 'role': 
'edge', 'port': edge_port_A}))
+        router('EB1',   'edge',     ('connector', {'name': 'edge', 'role': 
'edge', 'port': edge_port_B}))
+        router('EB2',   'edge',     ('connector', {'name': 'edge', 'role': 
'edge', 'port': edge_port_B}))
 
         cls.routers[0].wait_router_connected('INT.B')
         cls.routers[1].wait_router_connected('INT.A')
@@ -228,10 +228,10 @@ class ConnectivityTest(MessagingHandler):
             connections = response.results
             count = 0
             for conn in connections:
-                if conn.role == 'edge-uplink' and conn.container == 
self.edge_id:
+                if conn.role == 'edge' and conn.container == self.edge_id:
                     count += 1
             if count != 1:
-                self.error = "Incorrect uplink count for container-id.  
Expected 1, got %d" % count
+                self.error = "Incorrect edge count for container-id.  Expected 
1, got %d" % count
             self.interior_conn.close()
             self.edge_conn.close()
             self.timer.cancel()


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

Reply via email to