From 0bd34cb0b4cace6c7023f39bdf0838285866d987 Mon Sep 17 00:00:00 2001 From: ossanna16 Date: Tue, 10 Mar 2015 20:27:12 +0000 Subject: [PATCH] This change adds missing help strings for claims This change adds missing help strings for some of the configurations available, including default_message_ttl, default_claim_ttl, default_claim_grace, max_queues_per_page, max_messages_per_page, max_queue_metadata, max_messages_post_size, max_message_ttl, max_claim_ttl and max_claim_grace Closes-Bug: #1429401 Change-Id: Ic0440ad560effde6545828e5de3f4b8f59f756c9 --- zaqar/transport/base.py | 9 ++++++--- zaqar/transport/validation.py | 25 ++++++++++++++++++------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/zaqar/transport/base.py b/zaqar/transport/base.py index d171c1186..a3ac3999b 100644 --- a/zaqar/transport/base.py +++ b/zaqar/transport/base.py @@ -28,9 +28,12 @@ _GENERAL_TRANSPORT_OPTIONS = ( ) _RESOURCE_DEFAULTS = ( - cfg.IntOpt('default_message_ttl', default=3600), - cfg.IntOpt('default_claim_ttl', default=300), - cfg.IntOpt('default_claim_grace', default=60), + cfg.IntOpt('default_message_ttl', default=3600, + help=('Defines how long a message will be accessible.')), + cfg.IntOpt('default_claim_ttl', default=300, + help=('Defines how long a message will be in claimed state.')), + cfg.IntOpt('default_claim_grace', default=60, + help=('Defines the message grace period in seconds.')) ) _TRANSPORT_GROUP = 'transport' diff --git a/zaqar/transport/validation.py b/zaqar/transport/validation.py index 585ed9ae2..5d1455626 100644 --- a/zaqar/transport/validation.py +++ b/zaqar/transport/validation.py @@ -26,10 +26,13 @@ MIN_CLAIM_GRACE = 60 _TRANSPORT_LIMITS_OPTIONS = ( cfg.IntOpt('max_queues_per_page', default=20, deprecated_name='queue_paging_uplimit', - deprecated_group='limits:transport'), + deprecated_group='limits:transport', + help='Defines the maximum number of queues per page.'), + cfg.IntOpt('max_messages_per_page', default=20, deprecated_name='message_paging_uplimit', - deprecated_group='limits:transport'), + deprecated_group='limits:transport', + help='Defines the maximum number of messages per page.'), cfg.IntOpt('max_messages_per_claim_or_pop', default=20, deprecated_name='max_messages_per_claim', @@ -38,21 +41,29 @@ _TRANSPORT_LIMITS_OPTIONS = ( cfg.IntOpt('max_queue_metadata', default=64 * 1024, deprecated_name='metadata_size_uplimit', - deprecated_group='limits:transport'), + deprecated_group='limits:transport', + help='Defines the maximum amount of metadata in a queue.'), + cfg.IntOpt('max_messages_post_size', default=256 * 1024, deprecated_name='message_size_uplimit', deprecated_group='limits:transport', - deprecated_opts=[cfg.DeprecatedOpt('max_message_size')]), + deprecated_opts=[cfg.DeprecatedOpt('max_message_size')], + help='Defines the maximum size of message posts.'), cfg.IntOpt('max_message_ttl', default=1209600, deprecated_name='message_ttl_max', - deprecated_group='limits:transport'), + deprecated_group='limits:transport', + help='Maximum amount of time a message will be available.'), + cfg.IntOpt('max_claim_ttl', default=43200, deprecated_name='claim_ttl_max', - deprecated_group='limits:transport'), + deprecated_group='limits:transport', + help='Maximum length of a message in claimed state.'), + cfg.IntOpt('max_claim_grace', default=43200, deprecated_name='claim_grace_max', - deprecated_group='limits:transport'), + deprecated_group='limits:transport', + help='Defines the maximum message grace period in seconds.'), ) _TRANSPORT_LIMITS_GROUP = 'transport'