From 09edc000082d8ec15709b3e26cdb4b9b774c8e85 Mon Sep 17 00:00:00 2001 From: Tim Rupp Date: Tue, 14 Feb 2017 00:42:07 -0800 Subject: [PATCH] Adds f5-sdk import check to all F5 modules (#21354) Including this check in module utils so that it can be done automatically in all F5 modules. This includes the ones that do not yet use the f5-sdk because those modules too will move to the SDK in the future --- lib/ansible/module_utils/f5.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/ansible/module_utils/f5.py b/lib/ansible/module_utils/f5.py index 549422fb3f..e2b79744a2 100644 --- a/lib/ansible/module_utils/f5.py +++ b/lib/ansible/module_utils/f5.py @@ -35,6 +35,16 @@ except ImportError: bigsuds_found = False +try: + from f5.bigip import ManagementRoot as BigIpMgmt + from f5.bigiq import ManagementRoot as BigIqMgmt + from f5.iworkflow import ManagementRoot as iWorkflowMgmt + from icontrol.session import iControlUnexpectedHTTPError + HAS_F5SDK = True +except ImportError: + HAS_F5SDK = False + + from ansible.module_utils.basic import env_fallback