From 63e4a57fed0b23d09aaaa4fe0f269ba12f63d46f Mon Sep 17 00:00:00 2001 From: Samuel Carpentier Date: Wed, 23 Jan 2019 22:13:47 -0500 Subject: [PATCH 1/2] Rename 'target' to 'targets' in notification template API doc --- docs/source/api_ref/resources/notification_template.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/api_ref/resources/notification_template.rst b/docs/source/api_ref/resources/notification_template.rst index e4738d2d..c4a7c9d7 100644 --- a/docs/source/api_ref/resources/notification_template.rst +++ b/docs/source/api_ref/resources/notification_template.rst @@ -77,7 +77,7 @@ Fields Table +---------------------------+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+----------+-------+-----------+---------+ |nickname |String |[irc]The irc nick. |False |False |True |False | +---------------------------+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+----------+-------+-----------+---------+ -|target |String |[irc]The distination channels or users. |False |False |True |False | +|targets |String |[irc]The distination channels or users. |False |False |True |False | +---------------------------+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+----------+-------+-----------+---------+ .. From 4d29a597616c893f25eed731f097bc367f18bac7 Mon Sep 17 00:00:00 2001 From: Samuel Carpentier Date: Thu, 24 Jan 2019 08:08:49 -0500 Subject: [PATCH 2/2] Rename 'target' to 'targets' in notification_template resource --- tower_cli/resources/notification_template.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tower_cli/resources/notification_template.py b/tower_cli/resources/notification_template.py index 63ed5f1e..87af2d0c 100644 --- a/tower_cli/resources/notification_template.py +++ b/tower_cli/resources/notification_template.py @@ -146,9 +146,9 @@ class Resource(models.Resource): help_text='[{0}]Server address.'.format('irc')) nickname = models.Field(required=False, display=False, help_text='[{0}]The irc nick.'.format('irc')) - target = models.Field(required=False, display=False, - help_text='[{0}]The distination channels or users.' - .format('irc')) + targets = models.Field(required=False, display=False, + help_text='[{0}]The distination channels or users.' + .format('irc')) def _separate(self, kwargs): """Remove None-valued and configuration-related keyworded arguments @@ -188,7 +188,7 @@ def _configuration(self, kwargs, config_item): nc[field] = config_item[field] else: kwargs['notification_configuration'] = \ - config_item['notification_configuration'] + config_item['notification_configuration'] @resources.command @click.option('--job-template', type=types.Related('job_template'),