From 1bc75374dc9da19106c0b8aa33a9683dd4b51a50 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 2 Nov 2015 12:02:26 -0800 Subject: [PATCH] Add imports for stdlib modules that are used. This is cleanup that will aid us when we get ziploader implemented for 2.1 --- lib/ansible/module_utils/a10.py | 4 ++++ lib/ansible/module_utils/cloudstack.py | 1 + lib/ansible/module_utils/facts.py | 2 ++ lib/ansible/module_utils/gce.py | 1 + lib/ansible/module_utils/known_hosts.py | 1 + lib/ansible/module_utils/rax.py | 1 + lib/ansible/module_utils/service.py | 1 + lib/ansible/module_utils/vca.py | 1 + 8 files changed, 12 insertions(+) diff --git a/lib/ansible/module_utils/a10.py b/lib/ansible/module_utils/a10.py index cfc217ee616..92a9a69c69d 100644 --- a/lib/ansible/module_utils/a10.py +++ b/lib/ansible/module_utils/a10.py @@ -26,6 +26,10 @@ # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +import json +# Note: modules using this must have from ansible.module_utils.urls import * +# before this is imported + AXAPI_PORT_PROTOCOLS = { 'tcp': 2, 'udp': 3, diff --git a/lib/ansible/module_utils/cloudstack.py b/lib/ansible/module_utils/cloudstack.py index ae76c4e870a..e5eb73e9bdc 100644 --- a/lib/ansible/module_utils/cloudstack.py +++ b/lib/ansible/module_utils/cloudstack.py @@ -27,6 +27,7 @@ # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +import time try: from cs import CloudStack, CloudStackException, read_config diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index 70d29529147..334e49fa38b 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -18,7 +18,9 @@ import os import sys import stat +import time import array +import shlex import errno import fcntl import fnmatch diff --git a/lib/ansible/module_utils/gce.py b/lib/ansible/module_utils/gce.py index d3ed90c68b2..dc3a32700c7 100644 --- a/lib/ansible/module_utils/gce.py +++ b/lib/ansible/module_utils/gce.py @@ -27,6 +27,7 @@ # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +import os import pprint from libcloud.compute.providers import get_driver diff --git a/lib/ansible/module_utils/known_hosts.py b/lib/ansible/module_utils/known_hosts.py index 900b9fe80aa..58dab109b5a 100644 --- a/lib/ansible/module_utils/known_hosts.py +++ b/lib/ansible/module_utils/known_hosts.py @@ -26,6 +26,7 @@ # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +import os import hmac import urlparse diff --git a/lib/ansible/module_utils/rax.py b/lib/ansible/module_utils/rax.py index 73b48cc780d..a6ee7248ec4 100644 --- a/lib/ansible/module_utils/rax.py +++ b/lib/ansible/module_utils/rax.py @@ -28,6 +28,7 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. +import re from uuid import UUID diff --git a/lib/ansible/module_utils/service.py b/lib/ansible/module_utils/service.py index 420e662c6c6..b63207538ce 100644 --- a/lib/ansible/module_utils/service.py +++ b/lib/ansible/module_utils/service.py @@ -32,6 +32,7 @@ import os import tempfile import shlex import select +import subprocess import json # The distutils module is not shipped with SUNWPython on Solaris. diff --git a/lib/ansible/module_utils/vca.py b/lib/ansible/module_utils/vca.py index fbaf3304172..56341ec5559 100644 --- a/lib/ansible/module_utils/vca.py +++ b/lib/ansible/module_utils/vca.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +import os try: from pyvcloud.vcloudair import VCA HAS_PYVCLOUD = True