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