From 2ef4a34eee091449d2a22312e3e15171f8c6d54c Mon Sep 17 00:00:00 2001 From: Tim Rupp Date: Mon, 29 Aug 2016 09:29:47 -0700 Subject: [PATCH] Fixes documentation bugs in bigip_irule (#2797) The return docs were incorrect for this module. This patch fixes them and adds some additional return values --- network/f5/bigip_irule.py | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/network/f5/bigip_irule.py b/network/f5/bigip_irule.py index b1ec9acef2a..5e99ec34faa 100644 --- a/network/f5/bigip_irule.py +++ b/network/f5/bigip_irule.py @@ -94,11 +94,31 @@ EXAMPLES = ''' ''' RETURN = ''' -full_name: - description: Full name of the user +module: + description: The module that the iRule was added to returned: changed and success type: string - sample: "John Doe" + sample: "gtm" +src: + description: The filename that included the iRule source + returned: changed and success, when provided + type: string + sample: "/opt/src/irules/example1.tcl" +name: + description: The name of the iRule that was managed + returned: changed and success + type: string + sample: "my-irule" +content: + description: The content of the iRule that was managed + returned: changed and success + type: string + sample: "when LB_FAILED { set wipHost [LB::server addr] }" +partition: + description: The partition in which the iRule was managed + returned: changed and success + type: string + sample: "Common" ''' try: @@ -255,9 +275,14 @@ class BigIpiRule(object): changed = True params['name'] = name params['partition'] = partition + self.cparams = camel_dict_to_snake_dict(params) + if 'api_anonymous' in self.cparams: + self.cparams['content'] = self.cparams.pop('api_anonymous') + if self.params['src']: + self.cparams['src'] = self.params['src'] + if check_mode: return changed - self.cparams = camel_dict_to_snake_dict(params) else: return changed @@ -297,6 +322,11 @@ class BigIpiRule(object): params['partition'] = partition self.cparams = camel_dict_to_snake_dict(params) + if 'api_anonymous' in self.cparams: + self.cparams['content'] = self.cparams.pop('api_anonymous') + if self.params['src']: + self.cparams['src'] = self.params['src'] + if check_mode: return True