Fixes indentation style issues (#51637)

Fixes docstrings
This commit is contained in:
Wojciech Wypior 2019-02-02 01:49:33 +00:00 committed by Tim Rupp
parent fd2e0ddcac
commit 48704d45fd
10 changed files with 21 additions and 20 deletions

View file

@ -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]

View file

@ -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(

View file

@ -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):

View file

@ -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):

View file

@ -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

View file

@ -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):

View file

@ -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):

View file

@ -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):

View file

@ -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):

View file

@ -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'])