diff options
author | Wojciech Wypior <w.wypior@f5.com> | 2019-02-02 01:49:33 +0000 |
---|---|---|
committer | Tim Rupp <caphrim007@gmail.com> | 2019-02-01 17:49:33 -0800 |
commit | 48704d45fd68811a2c4b1ae6062133bfecba4775 (patch) | |
tree | 7b39138016e9271b797be049afab9d07e1b5ed85 | |
parent | fd2e0ddcac4f987aed4c74908e2b555803b7c7a7 (diff) | |
download | ansible-48704d45fd68811a2c4b1ae6062133bfecba4775.tar.gz |
Fixes indentation style issues (#51637)
Fixes docstrings
10 files changed, 21 insertions, 20 deletions
diff --git a/lib/ansible/modules/network/f5/bigip_asm_policy_import.py b/lib/ansible/modules/network/f5/bigip_asm_policy_import.py index 06f4e5e0cf..4322137a80 100644 --- a/lib/ansible/modules/network/f5/bigip_asm_policy_import.py +++ b/lib/ansible/modules/network/f5/bigip_asm_policy_import.py @@ -35,15 +35,16 @@ options: versions of BIG-IP. The opposite, however, is true; you can import older into newer. - The file format can be binary of XML. + type: path force: description: - When set to C(yes) any existing policy with the same name will be overwritten by the new import. - - Works in both inline and file imports, if policy does not exist this setting is ignored. + - Works for both inline and file imports, if the policy does not exist this setting is ignored. default: no type: bool partition: description: - - Device partition to manage resources on. + - Device partition to create policy on. default: Common extends_documentation_fragment: f5 author: @@ -84,8 +85,8 @@ EXAMPLES = r''' ''' RETURN = r''' -file: - description: Local path to ASM policy file. +source: + description: Local path to an ASM policy file. returned: changed type: str sample: /root/some_policy.xml @@ -365,10 +366,10 @@ class ModuleManager(object): if response['status'] == 'FAILURE': raise F5ModuleError( - 'Failed to export ASM policy.' + 'Failed to import ASM policy.' ) if response['status'] == 'COMPLETED': - return True + return True def import_file_to_device(self): name = os.path.split(self.want.source)[1] diff --git a/lib/ansible/modules/network/f5/bigip_asm_policy_signature_set.py b/lib/ansible/modules/network/f5/bigip_asm_policy_signature_set.py index 001d270331..00e0e225fa 100644 --- a/lib/ansible/modules/network/f5/bigip_asm_policy_signature_set.py +++ b/lib/ansible/modules/network/f5/bigip_asm_policy_signature_set.py @@ -351,7 +351,7 @@ class ModuleParameters(Parameters): return self._values['name'] if self._signature_set_exists_on_device(self._values['name']): - return self._values['name'] + return self._values['name'] raise F5ModuleError( "The specified signature {0} set does not exist.".format( diff --git a/lib/ansible/modules/network/f5/bigip_device_dns.py b/lib/ansible/modules/network/f5/bigip_device_dns.py index eb2adb1ef8..0de472c122 100644 --- a/lib/ansible/modules/network/f5/bigip_device_dns.py +++ b/lib/ansible/modules/network/f5/bigip_device_dns.py @@ -283,7 +283,7 @@ class Difference(object): if self.have.name_servers is None: return self.want.name_servers if set(self.want.name_servers) != set(self.have.name_servers): - return self.want.name_servers + return self.want.name_servers @property def search(self): @@ -305,7 +305,7 @@ class Difference(object): if self.have.search is None: return self.want.search if set(self.want.search) != set(self.have.search): - return self.want.search + return self.want.search class ModuleManager(object): diff --git a/lib/ansible/modules/network/f5/bigip_device_sshd.py b/lib/ansible/modules/network/f5/bigip_device_sshd.py index 9c2c2b2dd4..b3f4a49e83 100644 --- a/lib/ansible/modules/network/f5/bigip_device_sshd.py +++ b/lib/ansible/modules/network/f5/bigip_device_sshd.py @@ -282,7 +282,7 @@ class Difference(object): if self.have.allow is None: return self.want.allow if set(self.want.allow) != set(self.have.allow): - return self.want.allow + return self.want.allow class ModuleManager(object): diff --git a/lib/ansible/modules/network/f5/bigip_iapp_template.py b/lib/ansible/modules/network/f5/bigip_iapp_template.py index fe58b304fa..5a24914821 100644 --- a/lib/ansible/modules/network/f5/bigip_iapp_template.py +++ b/lib/ansible/modules/network/f5/bigip_iapp_template.py @@ -151,8 +151,8 @@ class Parameters(AnsibleF5Parameters): if self._values['name']: return self._values['name'] if self._values['content']: - name = self._get_template_name() - return name + name = self._get_template_name() + return name return None @property diff --git a/lib/ansible/modules/network/f5/bigip_profile_client_ssl.py b/lib/ansible/modules/network/f5/bigip_profile_client_ssl.py index 7025db3fb5..e9bc3f5318 100644 --- a/lib/ansible/modules/network/f5/bigip_profile_client_ssl.py +++ b/lib/ansible/modules/network/f5/bigip_profile_client_ssl.py @@ -710,7 +710,7 @@ class Difference(object): if self.have.options is None: return self.want.options if set(self.want.options) != set(self.have.options): - return self.want.options + return self.want.options @property def sni_require(self): diff --git a/lib/ansible/modules/network/f5/bigip_profile_http.py b/lib/ansible/modules/network/f5/bigip_profile_http.py index 212e7ffac6..ff496f916d 100644 --- a/lib/ansible/modules/network/f5/bigip_profile_http.py +++ b/lib/ansible/modules/network/f5/bigip_profile_http.py @@ -359,7 +359,7 @@ class ModuleParameters(Parameters): @property def proxy_type(self): if self._values['proxy_type'] is None: - return None + return None if self._values['proxy_type'] == 'explicit': if self.dns_resolver is None or self.dns_resolver == '': raise F5ModuleError( @@ -626,7 +626,7 @@ class Difference(object): else: return self.want.encrypt_cookies if set(self.want.encrypt_cookies) != set(self.have.encrypt_cookies): - return self.want.encrypt_cookies + return self.want.encrypt_cookies @property def encrypt_cookie_secret(self): diff --git a/lib/ansible/modules/network/f5/bigip_ssl_certificate.py b/lib/ansible/modules/network/f5/bigip_ssl_certificate.py index f8fde60318..3d850bfc37 100644 --- a/lib/ansible/modules/network/f5/bigip_ssl_certificate.py +++ b/lib/ansible/modules/network/f5/bigip_ssl_certificate.py @@ -296,7 +296,7 @@ class Difference(object): if self.content: return self.want.source_path if self.want.source_path != self.have.source_path: - return self.want.source_path + return self.want.source_path @property def content(self): diff --git a/lib/ansible/modules/network/f5/bigip_ssl_key.py b/lib/ansible/modules/network/f5/bigip_ssl_key.py index add7cbc81a..296ed772b3 100644 --- a/lib/ansible/modules/network/f5/bigip_ssl_key.py +++ b/lib/ansible/modules/network/f5/bigip_ssl_key.py @@ -267,7 +267,7 @@ class Difference(object): if self.key_checksum: return self.want.key_source_path if self.want.key_source_path != self.have.key_source_path: - return self.want.key_source_path + return self.want.key_source_path class ModuleManager(object): diff --git a/lib/ansible/modules/network/f5/bigip_vcmp_guest.py b/lib/ansible/modules/network/f5/bigip_vcmp_guest.py index b337a06515..0506e12449 100644 --- a/lib/ansible/modules/network/f5/bigip_vcmp_guest.py +++ b/lib/ansible/modules/network/f5/bigip_vcmp_guest.py @@ -710,7 +710,7 @@ class ModuleManager(object): def virtual_disk_exists(self): response = self.get_virtual_disk_on_device() if response: - return True + return True return False def remove_virtual_disk_from_device(self): @@ -743,7 +743,7 @@ class ModuleManager(object): try: response = resp.json() except ValueError as ex: - raise F5ModuleError(str(ex)) + raise F5ModuleError(str(ex)) if resp.status == 404 or 'code' in response and response['code'] == 404: return True @@ -767,7 +767,7 @@ class ModuleManager(object): try: response = resp.json() except ValueError: - return False + return False if 'code' in response and response['code'] == 400: if 'message' in response: raise F5ModuleError(response['message']) |