You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2016/07/26 14:09:51 UTC

[1/3] qpid-dispatch git commit: DISPATCH-311: Rename applicationName to vhostName

Repository: qpid-dispatch
Updated Branches:
  refs/heads/crolke-DISPATCH-311 e30c85021 -> 9d82b839f


DISPATCH-311: Rename applicationName to vhostName


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

Branch: refs/heads/crolke-DISPATCH-311
Commit: 68e05589f4df6969368813c323216326e520eb2f
Parents: e30c850
Author: Chuck Rolke <cr...@redhat.com>
Authored: Mon Jul 25 16:33:01 2016 -0400
Committer: Chuck Rolke <cr...@redhat.com>
Committed: Mon Jul 25 16:33:01 2016 -0400

----------------------------------------------------------------------
 python/qpid_dispatch/management/qdrouter.json        | 12 ++++++------
 python/qpid_dispatch_internal/management/agent.py    |  4 ++--
 python/qpid_dispatch_internal/policy/policy_local.py | 10 +++++-----
 tests/policy-1/management-access.json                |  6 +++---
 tests/policy-1/policy-boardwalk.json                 |  2 +-
 tests/policy-1/policy-safari.json                    |  2 +-
 tests/policy-2/test-router-with-policy.json.in       |  8 ++++----
 tests/policy-3/test-sender-receiver-limits.json      |  6 +++---
 8 files changed, 25 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/68e05589/python/qpid_dispatch/management/qdrouter.json
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch/management/qdrouter.json b/python/qpid_dispatch/management/qdrouter.json
index 37f7a3c..31e7d92 100644
--- a/python/qpid_dispatch/management/qdrouter.json
+++ b/python/qpid_dispatch/management/qdrouter.json
@@ -1381,13 +1381,13 @@
         },
 
         "vhost": {
-            "description": "Per application definition of the locations from which users may connect and the groups to which users belong.",
+            "description": "AMQP virtual host policy definition of users, user groups, allowed remote hosts, and AMQP restrictions.",
             "extends": "configurationEntity",
             "operations": ["CREATE"],
             "attributes": {
-                "applicationName": {
+                "vhostName": {
                     "type": "string",
-                    "description": "The application name.",
+                    "description": "The vhost name.",
                     "required": true
                 },
                 "maxConnections": {
@@ -1446,12 +1446,12 @@
         },
 
         "policyStats": {
-            "description": "Per application connection and access statistics.",
+            "description": "Virtual host connection and access statistics.",
             "extends": "operationalEntity",
             "attributes": {
-                "applicationName": {
+                "vhostName": {
                     "type": "string",
-                    "description": "The application name."
+                    "description": "The vhost name."
                 },
                 "connectionsApproved": {"type": "integer", "graph": true},
                 "connectionsDenied": {"type": "integer", "graph": true},

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/68e05589/python/qpid_dispatch_internal/management/agent.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/management/agent.py b/python/qpid_dispatch_internal/management/agent.py
index 01f52cb..41b7064 100644
--- a/python/qpid_dispatch_internal/management/agent.py
+++ b/python/qpid_dispatch_internal/management/agent.py
@@ -317,12 +317,12 @@ class VhostEntity(EntityAdapter):
         self._policy.create_ruleset(self.attributes)
 
     def _identifier(self):
-        return self.attributes.get('applicationName')
+        return self.attributes.get('vhostName')
 
 
 class PolicyStatsEntity(EntityAdapter):
     def _identifier(self):
-        return self.attributes.get('applicationName')
+        return self.attributes.get('vhostName')
 
 
 def _host_port_name_identifier(entity):

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/68e05589/python/qpid_dispatch_internal/policy/policy_local.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/policy/policy_local.py b/python/qpid_dispatch_internal/policy/policy_local.py
index 52339ca..8705048 100644
--- a/python/qpid_dispatch_internal/policy/policy_local.py
+++ b/python/qpid_dispatch_internal/policy/policy_local.py
@@ -38,7 +38,7 @@ class PolicyKeys(object):
     KW_IGNORED_NAME             = "name"
     KW_IGNORED_IDENTITY         = "identity"
     KW_IGNORED_TYPE             = "type"
-    KW_APPLICATION_NAME         = "applicationName"
+    KW_VHOST_NAME         = "vhostName"
 
     # Policy ruleset key words
     KW_MAXCONN                     = "maxConnections"
@@ -100,7 +100,7 @@ class PolicyCompiler(object):
         PolicyKeys.KW_IGNORED_NAME,
         PolicyKeys.KW_IGNORED_IDENTITY,
         PolicyKeys.KW_IGNORED_TYPE,
-        PolicyKeys.KW_APPLICATION_NAME,
+        PolicyKeys.KW_VHOST_NAME,
         PolicyKeys.KW_MAXCONN,
         PolicyKeys.KW_MAXCONNPERHOST,
         PolicyKeys.KW_MAXCONNPERUSER,
@@ -410,7 +410,7 @@ class AppStats(object):
     def refresh_entity(self, attributes):
         """Refresh management attributes"""
         entitymap = {}
-        entitymap[PolicyKeys.KW_APPLICATION_NAME] =     self.my_id
+        entitymap[PolicyKeys.KW_VHOST_NAME] =     self.my_id
         entitymap[PolicyKeys.KW_CONNECTIONS_APPROVED] = self.conn_mgr.connections_approved
         entitymap[PolicyKeys.KW_CONNECTIONS_DENIED] =   self.conn_mgr.connections_denied
         entitymap[PolicyKeys.KW_CONNECTIONS_CURRENT] =  self.conn_mgr.connections_active
@@ -503,7 +503,7 @@ class PolicyLocal(object):
         warnings = []
         diag = []
         candidate = {}
-        name = attributes[PolicyKeys.KW_APPLICATION_NAME]
+        name = attributes[PolicyKeys.KW_VHOST_NAME]
         result = self._policy_compiler.compile_access_ruleset(name, attributes, candidate, warnings, diag)
         if not result:
             raise PolicyError( "Policy '%s' is invalid: %s" % (name, diag[0]) )
@@ -729,7 +729,7 @@ class PolicyLocal(object):
         Test function to load a policy.
         @return:
         """
-        ruleset_str = '["policyAccessRuleset", {"applicationName": "photoserver","maxConnections": 50,"maxConnPerUser": 5,"maxConnPerHost": 20,"userGroups": {"anonymous":       "anonymous","users":           "u1, u2","paidsubscribers": "p1, p2","test":            "zeke, ynot","admin":           "alice, bob","superuser":       "ellen"},"ingressHostGroups": {"Ten18":     "10.18.0.0-10.18.255.255","EllensWS":  "72.135.2.9","TheLabs":   "10.48.0.0-10.48.255.255, 192.168.100.0-192.168.100.255","localhost": "127.0.0.1, ::1","TheWorld":  "*"},"ingressPolicies": {"anonymous":       "TheWorld","users":           "TheWorld","paidsubscribers": "TheWorld","test":            "TheLabs","admin":           "Ten18, TheLabs, localhost","superuser":       "EllensWS, localhost"},"connectionAllowDefault": true,'
+        ruleset_str = '["policyAccessRuleset", {"vhostName": "photoserver","maxConnections": 50,"maxConnPerUser": 5,"maxConnPerHost": 20,"userGroups": {"anonymous":       "anonymous","users":           "u1, u2","paidsubscribers": "p1, p2","test":            "zeke, ynot","admin":           "alice, bob","superuser":       "ellen"},"ingressHostGroups": {"Ten18":     "10.18.0.0-10.18.255.255","EllensWS":  "72.135.2.9","TheLabs":   "10.48.0.0-10.48.255.255, 192.168.100.0-192.168.100.255","localhost": "127.0.0.1, ::1","TheWorld":  "*"},"ingressPolicies": {"anonymous":       "TheWorld","users":           "TheWorld","paidsubscribers": "TheWorld","test":            "TheLabs","admin":           "Ten18, TheLabs, localhost","superuser":       "EllensWS, localhost"},"connectionAllowDefault": true,'
         ruleset_str += '"settings": {'
         ruleset_str += '"anonymous":      {"maxFrameSize": 111111,"maxMessageSize":   111111,"maxSessionWindow": 111111,"maxSessions":           1,"maxSenders":           11,"maxReceivers":         11,"allowDynamicSrc":      false,"allowAnonymousSender": false,"sources": "public",                           "targets": ""},'
         ruleset_str += '"users":          {"maxFrameSize": 222222,"maxMessageSize":   222222,"maxSessionWindow": 222222,"maxSessions":           2,"maxSenders":           22,"maxReceivers":         22,"allowDynamicSrc":      false,"allowAnonymousSender": false,"sources": "public, private",                  "targets": "public"},'

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/68e05589/tests/policy-1/management-access.json
----------------------------------------------------------------------
diff --git a/tests/policy-1/management-access.json b/tests/policy-1/management-access.json
index 48e544a..b58f1cb 100644
--- a/tests/policy-1/management-access.json
+++ b/tests/policy-1/management-access.json
@@ -24,7 +24,7 @@
 #    unnamed host- proton 0.13
 [
   ["vhost", {
-      "applicationName": "",
+      "vhostName": "",
       "maxConnections": 50,
       "maxConnPerUser": 5,
       "maxConnPerHost": 20,
@@ -46,7 +46,7 @@
     }
   ],
   ["vhost", {
-      "applicationName": "0.0.0.0",
+      "vhostName": "0.0.0.0",
       "maxConnections": 50,
       "maxConnPerUser": 5,
       "maxConnPerHost": 20,
@@ -68,7 +68,7 @@
     }
   ],
   ["vhost", {
-      "applicationName": "localhost",
+      "vhostName": "localhost",
       "maxConnections": 50,
       "maxConnPerUser": 5,
       "maxConnPerHost": 20,

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/68e05589/tests/policy-1/policy-boardwalk.json
----------------------------------------------------------------------
diff --git a/tests/policy-1/policy-boardwalk.json b/tests/policy-1/policy-boardwalk.json
index d5c611a..e973e3f 100644
--- a/tests/policy-1/policy-boardwalk.json
+++ b/tests/policy-1/policy-boardwalk.json
@@ -21,7 +21,7 @@
     # The boardwalk policy ruleset
     ["vhost",
         {
-            "applicationName": "boardwalk",
+            "vhostName": "boardwalk",
             "maxConnections": 10,
             "maxConnPerUser": 2,
             "maxConnPerHost": 5,

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/68e05589/tests/policy-1/policy-safari.json
----------------------------------------------------------------------
diff --git a/tests/policy-1/policy-safari.json b/tests/policy-1/policy-safari.json
index be28e96..ac11ec6 100644
--- a/tests/policy-1/policy-safari.json
+++ b/tests/policy-1/policy-safari.json
@@ -20,7 +20,7 @@
     # The safari policy ruleset
     ["vhost",
         {
-            "applicationName": "safari",
+            "vhostName": "safari",
             "maxConnections": 10,
             "maxConnPerUser": 2,
             "maxConnPerHost": 5,

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/68e05589/tests/policy-2/test-router-with-policy.json.in
----------------------------------------------------------------------
diff --git a/tests/policy-2/test-router-with-policy.json.in b/tests/policy-2/test-router-with-policy.json.in
index a38608f..0679489 100644
--- a/tests/policy-2/test-router-with-policy.json.in
+++ b/tests/policy-2/test-router-with-policy.json.in
@@ -30,7 +30,7 @@
     }],
 # Some ruleset
     ["vhost", {
-      "applicationName": "photoserver",
+      "vhostName": "photoserver",
       "maxConnections": 50,
       "maxConnPerUser": 5,
       "maxConnPerHost": 20,
@@ -146,7 +146,7 @@
       }
   }],
   ["vhost", {
-      "applicationName": "",
+      "vhostName": "",
       "maxConnections": 50,
       "maxConnPerUser": 5,
       "maxConnPerHost": 20,
@@ -168,7 +168,7 @@
     }
   ],
   ["vhost", {
-      "applicationName": "0.0.0.0",
+      "vhostName": "0.0.0.0",
       "maxConnections": 50,
       "maxConnPerUser": 5,
       "maxConnPerHost": 20,
@@ -190,7 +190,7 @@
     }
   ],
   ["vhost", {
-      "applicationName": "localhost",
+      "vhostName": "localhost",
       "maxConnections": 50,
       "maxConnPerUser": 5,
       "maxConnPerHost": 20,

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/68e05589/tests/policy-3/test-sender-receiver-limits.json
----------------------------------------------------------------------
diff --git a/tests/policy-3/test-sender-receiver-limits.json b/tests/policy-3/test-sender-receiver-limits.json
index 7a30aaf..c122e42 100644
--- a/tests/policy-3/test-sender-receiver-limits.json
+++ b/tests/policy-3/test-sender-receiver-limits.json
@@ -2,7 +2,7 @@
 # Ruleset with differing number of senders and receivers
 # so tests can determine that correct limit is matched.
   ["vhost", {
-      "applicationName": "",
+      "vhostName": "",
       "maxConnections": 50,
       "maxConnPerUser": 2,
       "maxConnPerHost": 4,
@@ -24,7 +24,7 @@
     }
   ],
   ["vhost", {
-      "applicationName": "0.0.0.0",
+      "vhostName": "0.0.0.0",
       "maxConnections": 50,
       "maxConnPerUser": 2,
       "maxConnPerHost": 4,
@@ -46,7 +46,7 @@
     }
   ],
   ["vhost", {
-      "applicationName": "localhost",
+      "vhostName": "localhost",
       "maxConnections": 50,
       "maxConnPerUser": 2,
       "maxConnPerHost": 4,


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


[3/3] qpid-dispatch git commit: DISPATCH-311: change default connection count values from 0 to 65535. Stop treating 0 as magic 'connection counting disabled' value.

Posted by ch...@apache.org.
DISPATCH-311: change default connection count values from 0 to 65535.
Stop treating 0 as magic 'connection counting disabled' value.


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

Branch: refs/heads/crolke-DISPATCH-311
Commit: 9d82b839fc0deaeaa4dafad85f0ff590fde3dc91
Parents: 7f51d58
Author: Chuck Rolke <cr...@redhat.com>
Authored: Tue Jul 26 10:06:31 2016 -0400
Committer: Chuck Rolke <cr...@redhat.com>
Committed: Tue Jul 26 10:06:31 2016 -0400

----------------------------------------------------------------------
 python/qpid_dispatch/management/qdrouter.json   | 16 +++++-----
 .../policy/policy_local.py                      |  6 ++--
 .../policy/policy_util.py                       |  6 ++--
 src/policy.c                                    | 33 +++++++-------------
 4 files changed, 26 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/9d82b839/python/qpid_dispatch/management/qdrouter.json
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch/management/qdrouter.json b/python/qpid_dispatch/management/qdrouter.json
index 9c17241..a465550 100644
--- a/python/qpid_dispatch/management/qdrouter.json
+++ b/python/qpid_dispatch/management/qdrouter.json
@@ -1348,7 +1348,7 @@
             "attributes": {
                 "maxConnections": {
                     "type": "integer",
-                    "default": 0,
+                    "default": 65535,
                     "description": "Global maximum number of concurrent client connections allowed. This limit is always enforced even if no other policy settings have been defined.",
                     "required": false,
                     "create": true
@@ -1356,7 +1356,7 @@
                 "enableVhostPolicy": {
                     "type": "boolean",
                     "default": false,
-                    "description": "Enable vhost policy connection denial, and resource limit enforcement",
+                    "description": "Enable vhost policy user groups, connection denial, and resource limit enforcement",
                     "required": false,
                     "create": true
                 },
@@ -1392,22 +1392,22 @@
                 },
                 "maxConnections": {
                     "type": "integer",
-                    "default": 0,
-                    "description": "Maximum number of concurrent client connections allowed. Zero implies no limit.",
+                    "default": 65535,
+                    "description": "Maximum number of concurrent client connections allowed.",
                     "required": false,
                     "create": true
                 },
                 "maxConnectionsPerUser": {
                     "type": "integer",
-                    "default": 0,
-                    "description": "Maximum number of concurrent client connections allowed for any single user. Zero implies no limit.",
+                    "default": 65535,
+                    "description": "Maximum number of concurrent client connections allowed for any single user.",
                     "required": false,
                     "create": true
                 },
                 "maxConnectionsPerHost": {
                     "type": "integer",
-                    "default": 0,
-                    "description": "Maximum number of concurrent client connections allowed for any remote host. Zero implies no limit.",
+                    "default": 65535,
+                    "description": "Maximum number of concurrent client connections allowed for any remote host.",
                     "required": false,
                     "create": true
                 },

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/9d82b839/python/qpid_dispatch_internal/policy/policy_local.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/policy/policy_local.py b/python/qpid_dispatch_internal/policy/policy_local.py
index d9af6a1..9b34f0f 100644
--- a/python/qpid_dispatch_internal/policy/policy_local.py
+++ b/python/qpid_dispatch_internal/policy/policy_local.py
@@ -273,9 +273,9 @@ class PolicyCompiler(object):
         """
         cerror = []
         # rulesets may not come through standard config so make nice defaults
-        policy_out[PolicyKeys.KW_MAXCONN] = 0
-        policy_out[PolicyKeys.KW_MAXCONNPERHOST] = 0
-        policy_out[PolicyKeys.KW_MAXCONNPERUSER] = 0
+        policy_out[PolicyKeys.KW_MAXCONN] = 65535
+        policy_out[PolicyKeys.KW_MAXCONNPERHOST] = 65535
+        policy_out[PolicyKeys.KW_MAXCONNPERUSER] = 65535
         policy_out[PolicyKeys.KW_USER_GROUPS] = {}
         policy_out[PolicyKeys.KW_INGRESS_HOST_GROUPS] = {}
         policy_out[PolicyKeys.KW_INGRESS_POLICIES] = {}

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/9d82b839/python/qpid_dispatch_internal/policy/policy_util.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/policy/policy_util.py b/python/qpid_dispatch_internal/policy/policy_util.py
index 1cb09d3..bacd078 100644
--- a/python/qpid_dispatch_internal/policy/policy_util.py
+++ b/python/qpid_dispatch_internal/policy/policy_util.py
@@ -293,9 +293,9 @@ class PolicyAppConnectionMgr(object):
         if host in self.per_host_state:
             n_host = len(self.per_host_state[host])
 
-        allowbytotal = self.max_total == 0 or self.connections_active < self.max_total
-        allowbyuser  = self.max_per_user == 0 or n_user < self.max_per_user
-        allowbyhost  = self.max_per_host == 0 or n_host < self.max_per_host
+        allowbytotal = self.connections_active < self.max_total
+        allowbyuser  = n_user < self.max_per_user
+        allowbyhost  = n_host < self.max_per_host
 
         if allowbytotal and allowbyuser and allowbyhost:
             if not user in self.per_user_state:

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/9d82b839/src/policy.c
----------------------------------------------------------------------
diff --git a/src/policy.c b/src/policy.c
index aa67964..4786446 100644
--- a/src/policy.c
+++ b/src/policy.c
@@ -82,7 +82,7 @@ qd_policy_t *qd_policy(qd_dispatch_t *qd)
 
     policy->qd                   = qd;
     policy->log_source           = qd_log_source("POLICY");
-    policy->max_connection_limit = 0;
+    policy->max_connection_limit = 65535;
     policy->policyDir         = 0;
     policy->enableVhostPolicy    = false;
     policy->connections_processed= 0;
@@ -110,7 +110,7 @@ void qd_policy_free(qd_policy_t *policy)
 
 qd_error_t qd_entity_configure_policy(qd_policy_t *policy, qd_entity_t *entity)
 {
-    policy->max_connection_limit = qd_entity_opt_long(entity, "maxConnections", 0); CHECK();
+    policy->max_connection_limit = qd_entity_opt_long(entity, "maxConnections", 65535); CHECK();
     if (policy->max_connection_limit < 0)
         return qd_error(QD_ERROR_CONFIG, "maxConnections must be >= 0");
     policy->policyDir =
@@ -192,22 +192,15 @@ bool qd_policy_socket_accept(void *context, const char *hostname)
 {
     qd_policy_t *policy = (qd_policy_t *)context;
     bool result = true;
-
-    if (policy->max_connection_limit == 0) {
-        // Policy not in force; connection counted and allowed
+    if (n_connections < policy->max_connection_limit) {
+        // connection counted and allowed
         n_connections += 1;
+        qd_log(policy->log_source, QD_LOG_TRACE, "ALLOW Connection '%s' based on global connection count. N= %d", hostname, n_connections);
     } else {
-        // Policy in force
-        if (n_connections < policy->max_connection_limit) {
-            // connection counted and allowed
-            n_connections += 1;
-            qd_log(policy->log_source, QD_LOG_TRACE, "ALLOW Connection '%s' based on global connection count. N= %d", hostname, n_connections);
-        } else {
-            // connection denied
-            result = false;
-            n_denied += 1;
-            qd_log(policy->log_source, QD_LOG_INFO, "DENY Connection '%s' based on global connection count. N= %d", hostname, n_connections);
-        }
+        // connection denied
+        result = false;
+        n_denied += 1;
+        qd_log(policy->log_source, QD_LOG_INFO, "DENY Connection '%s' based on global connection count. N= %d", hostname, n_connections);
     }
     n_processed += 1;
     return result;
@@ -247,11 +240,9 @@ void qd_policy_socket_close(void *context, const qd_connection_t *conn)
         }
         qd_python_unlock(lock_state);
     }
-    if (policy->max_connection_limit > 0) {
-        const char *hostname = qdpn_connector_name(conn->pn_cxtr);
-        qd_log(policy->log_source, QD_LOG_DEBUG, "Connection '%s' closed with resources n_sessions=%d, n_senders=%d, n_receivers=%d. N= %d.",
-                hostname, conn->n_sessions, conn->n_senders, conn->n_receivers, n_connections);
-    }
+    const char *hostname = qdpn_connector_name(conn->pn_cxtr);
+    qd_log(policy->log_source, QD_LOG_DEBUG, "Connection '%s' closed with resources n_sessions=%d, n_senders=%d, n_receivers=%d. nConnections= %d.",
+            hostname, conn->n_sessions, conn->n_senders, conn->n_receivers, n_connections);
 }
 
 


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


[2/3] qpid-dispatch git commit: DISPATCH-311: rename maxConnPerXxx to maxConnectionsPerXxx

Posted by ch...@apache.org.
DISPATCH-311: rename maxConnPerXxx to maxConnectionsPerXxx


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

Branch: refs/heads/crolke-DISPATCH-311
Commit: 7f51d58943829e77a5176a18b42827a2e45ff19e
Parents: 68e0558
Author: Chuck Rolke <cr...@redhat.com>
Authored: Mon Jul 25 16:36:42 2016 -0400
Committer: Chuck Rolke <cr...@redhat.com>
Committed: Mon Jul 25 16:36:42 2016 -0400

----------------------------------------------------------------------
 python/qpid_dispatch/management/qdrouter.json       |  4 ++--
 .../qpid_dispatch_internal/policy/policy_local.py   |  6 +++---
 tests/policy-1/management-access.json               | 12 ++++++------
 tests/policy-1/policy-boardwalk.json                |  4 ++--
 tests/policy-1/policy-safari.json                   |  4 ++--
 tests/policy-2/test-router-with-policy.json.in      | 16 ++++++++--------
 tests/policy-3/test-sender-receiver-limits.json     | 12 ++++++------
 7 files changed, 29 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/7f51d589/python/qpid_dispatch/management/qdrouter.json
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch/management/qdrouter.json b/python/qpid_dispatch/management/qdrouter.json
index 31e7d92..9c17241 100644
--- a/python/qpid_dispatch/management/qdrouter.json
+++ b/python/qpid_dispatch/management/qdrouter.json
@@ -1397,14 +1397,14 @@
                     "required": false,
                     "create": true
                 },
-                "maxConnPerUser": {
+                "maxConnectionsPerUser": {
                     "type": "integer",
                     "default": 0,
                     "description": "Maximum number of concurrent client connections allowed for any single user. Zero implies no limit.",
                     "required": false,
                     "create": true
                 },
-                "maxConnPerHost": {
+                "maxConnectionsPerHost": {
                     "type": "integer",
                     "default": 0,
                     "description": "Maximum number of concurrent client connections allowed for any remote host. Zero implies no limit.",

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/7f51d589/python/qpid_dispatch_internal/policy/policy_local.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/policy/policy_local.py b/python/qpid_dispatch_internal/policy/policy_local.py
index 8705048..d9af6a1 100644
--- a/python/qpid_dispatch_internal/policy/policy_local.py
+++ b/python/qpid_dispatch_internal/policy/policy_local.py
@@ -42,8 +42,8 @@ class PolicyKeys(object):
 
     # Policy ruleset key words
     KW_MAXCONN                     = "maxConnections"
-    KW_MAXCONNPERHOST              = "maxConnPerHost"
-    KW_MAXCONNPERUSER              = "maxConnPerUser"
+    KW_MAXCONNPERHOST              = "maxConnectionsPerHost"
+    KW_MAXCONNPERUSER              = "maxConnectionsPerUser"
     KW_USER_GROUPS                 = "userGroups"
     KW_INGRESS_HOST_GROUPS         = "ingressHostGroups"
     KW_INGRESS_POLICIES            = "ingressPolicies"
@@ -729,7 +729,7 @@ class PolicyLocal(object):
         Test function to load a policy.
         @return:
         """
-        ruleset_str = '["policyAccessRuleset", {"vhostName": "photoserver","maxConnections": 50,"maxConnPerUser": 5,"maxConnPerHost": 20,"userGroups": {"anonymous":       "anonymous","users":           "u1, u2","paidsubscribers": "p1, p2","test":            "zeke, ynot","admin":           "alice, bob","superuser":       "ellen"},"ingressHostGroups": {"Ten18":     "10.18.0.0-10.18.255.255","EllensWS":  "72.135.2.9","TheLabs":   "10.48.0.0-10.48.255.255, 192.168.100.0-192.168.100.255","localhost": "127.0.0.1, ::1","TheWorld":  "*"},"ingressPolicies": {"anonymous":       "TheWorld","users":           "TheWorld","paidsubscribers": "TheWorld","test":            "TheLabs","admin":           "Ten18, TheLabs, localhost","superuser":       "EllensWS, localhost"},"connectionAllowDefault": true,'
+        ruleset_str = '["policyAccessRuleset", {"vhostName": "photoserver","maxConnections": 50,"maxConnectionsPerUser": 5,"maxConnectionsPerHost": 20,"userGroups": {"anonymous":       "anonymous","users":           "u1, u2","paidsubscribers": "p1, p2","test":            "zeke, ynot","admin":           "alice, bob","superuser":       "ellen"},"ingressHostGroups": {"Ten18":     "10.18.0.0-10.18.255.255","EllensWS":  "72.135.2.9","TheLabs":   "10.48.0.0-10.48.255.255, 192.168.100.0-192.168.100.255","localhost": "127.0.0.1, ::1","TheWorld":  "*"},"ingressPolicies": {"anonymous":       "TheWorld","users":           "TheWorld","paidsubscribers": "TheWorld","test":            "TheLabs","admin":           "Ten18, TheLabs, localhost","superuser":       "EllensWS, localhost"},"connectionAllowDefault": true,'
         ruleset_str += '"settings": {'
         ruleset_str += '"anonymous":      {"maxFrameSize": 111111,"maxMessageSize":   111111,"maxSessionWindow": 111111,"maxSessions":           1,"maxSenders":           11,"maxReceivers":         11,"allowDynamicSrc":      false,"allowAnonymousSender": false,"sources": "public",                           "targets": ""},'
         ruleset_str += '"users":          {"maxFrameSize": 222222,"maxMessageSize":   222222,"maxSessionWindow": 222222,"maxSessions":           2,"maxSenders":           22,"maxReceivers":         22,"allowDynamicSrc":      false,"allowAnonymousSender": false,"sources": "public, private",                  "targets": "public"},'

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/7f51d589/tests/policy-1/management-access.json
----------------------------------------------------------------------
diff --git a/tests/policy-1/management-access.json b/tests/policy-1/management-access.json
index b58f1cb..d2b8132 100644
--- a/tests/policy-1/management-access.json
+++ b/tests/policy-1/management-access.json
@@ -26,8 +26,8 @@
   ["vhost", {
       "vhostName": "",
       "maxConnections": 50,
-      "maxConnPerUser": 5,
-      "maxConnPerHost": 20,
+      "maxConnectionsPerUser": 5,
+      "maxConnectionsPerHost": 20,
       "connectionAllowDefault": true,
       "settings": {
         "default" : {
@@ -48,8 +48,8 @@
   ["vhost", {
       "vhostName": "0.0.0.0",
       "maxConnections": 50,
-      "maxConnPerUser": 5,
-      "maxConnPerHost": 20,
+      "maxConnectionsPerUser": 5,
+      "maxConnectionsPerHost": 20,
       "connectionAllowDefault": true,
       "settings": {
         "default" : {
@@ -70,8 +70,8 @@
   ["vhost", {
       "vhostName": "localhost",
       "maxConnections": 50,
-      "maxConnPerUser": 5,
-      "maxConnPerHost": 20,
+      "maxConnectionsPerUser": 5,
+      "maxConnectionsPerHost": 20,
       "connectionAllowDefault": true,
       "settings": {
         "default" : {

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/7f51d589/tests/policy-1/policy-boardwalk.json
----------------------------------------------------------------------
diff --git a/tests/policy-1/policy-boardwalk.json b/tests/policy-1/policy-boardwalk.json
index e973e3f..d2cf4da 100644
--- a/tests/policy-1/policy-boardwalk.json
+++ b/tests/policy-1/policy-boardwalk.json
@@ -23,8 +23,8 @@
         {
             "vhostName": "boardwalk",
             "maxConnections": 10,
-            "maxConnPerUser": 2,
-            "maxConnPerHost": 5,
+            "maxConnectionsPerUser": 2,
+            "maxConnectionsPerHost": 5,
             "userGroups": {
                 "anonymous": "anonymous",
                 "users": "u1 u2 u3",

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/7f51d589/tests/policy-1/policy-safari.json
----------------------------------------------------------------------
diff --git a/tests/policy-1/policy-safari.json b/tests/policy-1/policy-safari.json
index ac11ec6..5147335 100644
--- a/tests/policy-1/policy-safari.json
+++ b/tests/policy-1/policy-safari.json
@@ -22,8 +22,8 @@
         {
             "vhostName": "safari",
             "maxConnections": 10,
-            "maxConnPerUser": 2,
-            "maxConnPerHost": 5,
+            "maxConnectionsPerUser": 2,
+            "maxConnectionsPerHost": 5,
             "userGroups": {
                 "anonymous": "anonymous",
                 "clients": "moja mbili",

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/7f51d589/tests/policy-2/test-router-with-policy.json.in
----------------------------------------------------------------------
diff --git a/tests/policy-2/test-router-with-policy.json.in b/tests/policy-2/test-router-with-policy.json.in
index 0679489..197d604 100644
--- a/tests/policy-2/test-router-with-policy.json.in
+++ b/tests/policy-2/test-router-with-policy.json.in
@@ -32,8 +32,8 @@
     ["vhost", {
       "vhostName": "photoserver",
       "maxConnections": 50,
-      "maxConnPerUser": 5,
-      "maxConnPerHost": 20,
+      "maxConnectionsPerUser": 5,
+      "maxConnectionsPerHost": 20,
       "userGroups": {
         "anonymous":       "anonymous",
         "users":           "u1, u2",
@@ -148,8 +148,8 @@
   ["vhost", {
       "vhostName": "",
       "maxConnections": 50,
-      "maxConnPerUser": 5,
-      "maxConnPerHost": 20,
+      "maxConnectionsPerUser": 5,
+      "maxConnectionsPerHost": 20,
       "connectionAllowDefault": true,
       "settings": {
         "default" : {
@@ -170,8 +170,8 @@
   ["vhost", {
       "vhostName": "0.0.0.0",
       "maxConnections": 50,
-      "maxConnPerUser": 5,
-      "maxConnPerHost": 20,
+      "maxConnectionsPerUser": 5,
+      "maxConnectionsPerHost": 20,
       "connectionAllowDefault": true,
       "settings": {
         "default" : {
@@ -192,8 +192,8 @@
   ["vhost", {
       "vhostName": "localhost",
       "maxConnections": 50,
-      "maxConnPerUser": 5,
-      "maxConnPerHost": 20,
+      "maxConnectionsPerUser": 5,
+      "maxConnectionsPerHost": 20,
       "connectionAllowDefault": true,
       "settings": {
         "default" : {

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/7f51d589/tests/policy-3/test-sender-receiver-limits.json
----------------------------------------------------------------------
diff --git a/tests/policy-3/test-sender-receiver-limits.json b/tests/policy-3/test-sender-receiver-limits.json
index c122e42..3e6145d 100644
--- a/tests/policy-3/test-sender-receiver-limits.json
+++ b/tests/policy-3/test-sender-receiver-limits.json
@@ -4,8 +4,8 @@
   ["vhost", {
       "vhostName": "",
       "maxConnections": 50,
-      "maxConnPerUser": 2,
-      "maxConnPerHost": 4,
+      "maxConnectionsPerUser": 2,
+      "maxConnectionsPerHost": 4,
       "connectionAllowDefault": true,
       "settings": {
         "default" : {
@@ -26,8 +26,8 @@
   ["vhost", {
       "vhostName": "0.0.0.0",
       "maxConnections": 50,
-      "maxConnPerUser": 2,
-      "maxConnPerHost": 4,
+      "maxConnectionsPerUser": 2,
+      "maxConnectionsPerHost": 4,
       "connectionAllowDefault": true,
       "settings": {
         "default" : {
@@ -48,8 +48,8 @@
   ["vhost", {
       "vhostName": "localhost",
       "maxConnections": 50,
-      "maxConnPerUser": 2,
-      "maxConnPerHost": 4,
+      "maxConnectionsPerUser": 2,
+      "maxConnectionsPerHost": 4,
       "connectionAllowDefault": true,
       "settings": {
         "default" : {


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