From 5fabd910189a125df2943ef8092ff492f90617a1 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Wed, 22 Feb 2017 12:53:21 -0500 Subject: Moving import to local class. --- roles/lib_openshift/library/oadm_manage_node.py | 2 -- roles/lib_openshift/library/oc_adm_ca_server_cert.py | 3 +-- roles/lib_openshift/library/oc_edit.py | 2 -- roles/lib_openshift/library/oc_env.py | 2 -- roles/lib_openshift/library/oc_label.py | 2 -- roles/lib_openshift/library/oc_obj.py | 2 -- roles/lib_openshift/library/oc_process.py | 2 -- roles/lib_openshift/library/oc_route.py | 2 -- roles/lib_openshift/library/oc_scale.py | 2 -- roles/lib_openshift/library/oc_secret.py | 2 -- roles/lib_openshift/library/oc_service.py | 2 -- roles/lib_openshift/library/oc_serviceaccount.py | 2 -- roles/lib_openshift/library/oc_serviceaccount_secret.py | 2 -- roles/lib_openshift/library/oc_version.py | 2 -- roles/lib_openshift/src/class/oc_adm_ca_server_cert.py | 1 + roles/lib_openshift/src/lib/import.py | 2 -- 16 files changed, 2 insertions(+), 30 deletions(-) (limited to 'roles/lib_openshift') diff --git a/roles/lib_openshift/library/oadm_manage_node.py b/roles/lib_openshift/library/oadm_manage_node.py index d0bf553ae..0ac233c72 100644 --- a/roles/lib_openshift/library/oadm_manage_node.py +++ b/roles/lib_openshift/library/oadm_manage_node.py @@ -34,8 +34,6 @@ from __future__ import print_function import atexit import copy -# pylint: disable=unused-import -import time import json import os import re diff --git a/roles/lib_openshift/library/oc_adm_ca_server_cert.py b/roles/lib_openshift/library/oc_adm_ca_server_cert.py index ffb649eb7..2b6ee53aa 100644 --- a/roles/lib_openshift/library/oc_adm_ca_server_cert.py +++ b/roles/lib_openshift/library/oc_adm_ca_server_cert.py @@ -34,8 +34,6 @@ from __future__ import print_function import atexit import copy -# pylint: disable=unused-import -import time import json import os import re @@ -1357,6 +1355,7 @@ class CAServerCert(OpenShiftCLI): # Added this here as a safegaurd for stomping on the # cert and key files if they exist if self.config.config_options['backup']['value']: + import time ext = time.strftime("%Y-%m-%d@%H:%M:%S", time.localtime(time.time())) date_str = "%s_" + "%s" % ext diff --git a/roles/lib_openshift/library/oc_edit.py b/roles/lib_openshift/library/oc_edit.py index 2ead608ac..1b1faf496 100644 --- a/roles/lib_openshift/library/oc_edit.py +++ b/roles/lib_openshift/library/oc_edit.py @@ -34,8 +34,6 @@ from __future__ import print_function import atexit import copy -# pylint: disable=unused-import -import time import json import os import re diff --git a/roles/lib_openshift/library/oc_env.py b/roles/lib_openshift/library/oc_env.py index 49a03b0a7..7c2ccb98f 100644 --- a/roles/lib_openshift/library/oc_env.py +++ b/roles/lib_openshift/library/oc_env.py @@ -34,8 +34,6 @@ from __future__ import print_function import atexit import copy -# pylint: disable=unused-import -import time import json import os import re diff --git a/roles/lib_openshift/library/oc_label.py b/roles/lib_openshift/library/oc_label.py index 4bb67b2b5..0db8585a4 100644 --- a/roles/lib_openshift/library/oc_label.py +++ b/roles/lib_openshift/library/oc_label.py @@ -34,8 +34,6 @@ from __future__ import print_function import atexit import copy -# pylint: disable=unused-import -import time import json import os import re diff --git a/roles/lib_openshift/library/oc_obj.py b/roles/lib_openshift/library/oc_obj.py index a9bec980c..6d0b391b9 100644 --- a/roles/lib_openshift/library/oc_obj.py +++ b/roles/lib_openshift/library/oc_obj.py @@ -34,8 +34,6 @@ from __future__ import print_function import atexit import copy -# pylint: disable=unused-import -import time import json import os import re diff --git a/roles/lib_openshift/library/oc_process.py b/roles/lib_openshift/library/oc_process.py index 2565bd895..a1ee79f6e 100644 --- a/roles/lib_openshift/library/oc_process.py +++ b/roles/lib_openshift/library/oc_process.py @@ -34,8 +34,6 @@ from __future__ import print_function import atexit import copy -# pylint: disable=unused-import -import time import json import os import re diff --git a/roles/lib_openshift/library/oc_route.py b/roles/lib_openshift/library/oc_route.py index b1f97505e..4b5c4460c 100644 --- a/roles/lib_openshift/library/oc_route.py +++ b/roles/lib_openshift/library/oc_route.py @@ -34,8 +34,6 @@ from __future__ import print_function import atexit import copy -# pylint: disable=unused-import -import time import json import os import re diff --git a/roles/lib_openshift/library/oc_scale.py b/roles/lib_openshift/library/oc_scale.py index babf489ad..a37b2aba0 100644 --- a/roles/lib_openshift/library/oc_scale.py +++ b/roles/lib_openshift/library/oc_scale.py @@ -34,8 +34,6 @@ from __future__ import print_function import atexit import copy -# pylint: disable=unused-import -import time import json import os import re diff --git a/roles/lib_openshift/library/oc_secret.py b/roles/lib_openshift/library/oc_secret.py index 020d1a89f..c423e9442 100644 --- a/roles/lib_openshift/library/oc_secret.py +++ b/roles/lib_openshift/library/oc_secret.py @@ -34,8 +34,6 @@ from __future__ import print_function import atexit import copy -# pylint: disable=unused-import -import time import json import os import re diff --git a/roles/lib_openshift/library/oc_service.py b/roles/lib_openshift/library/oc_service.py index 99829a5e2..319ec4bd7 100644 --- a/roles/lib_openshift/library/oc_service.py +++ b/roles/lib_openshift/library/oc_service.py @@ -34,8 +34,6 @@ from __future__ import print_function import atexit import copy -# pylint: disable=unused-import -import time import json import os import re diff --git a/roles/lib_openshift/library/oc_serviceaccount.py b/roles/lib_openshift/library/oc_serviceaccount.py index ec2c24983..0d1705414 100644 --- a/roles/lib_openshift/library/oc_serviceaccount.py +++ b/roles/lib_openshift/library/oc_serviceaccount.py @@ -34,8 +34,6 @@ from __future__ import print_function import atexit import copy -# pylint: disable=unused-import -import time import json import os import re diff --git a/roles/lib_openshift/library/oc_serviceaccount_secret.py b/roles/lib_openshift/library/oc_serviceaccount_secret.py index 1c7855f37..5f07528a0 100644 --- a/roles/lib_openshift/library/oc_serviceaccount_secret.py +++ b/roles/lib_openshift/library/oc_serviceaccount_secret.py @@ -34,8 +34,6 @@ from __future__ import print_function import atexit import copy -# pylint: disable=unused-import -import time import json import os import re diff --git a/roles/lib_openshift/library/oc_version.py b/roles/lib_openshift/library/oc_version.py index 8916dc0e0..9b660e1d3 100644 --- a/roles/lib_openshift/library/oc_version.py +++ b/roles/lib_openshift/library/oc_version.py @@ -34,8 +34,6 @@ from __future__ import print_function import atexit import copy -# pylint: disable=unused-import -import time import json import os import re diff --git a/roles/lib_openshift/src/class/oc_adm_ca_server_cert.py b/roles/lib_openshift/src/class/oc_adm_ca_server_cert.py index c0e7f292a..6ed1f2f35 100644 --- a/roles/lib_openshift/src/class/oc_adm_ca_server_cert.py +++ b/roles/lib_openshift/src/class/oc_adm_ca_server_cert.py @@ -37,6 +37,7 @@ class CAServerCert(OpenShiftCLI): # Added this here as a safegaurd for stomping on the # cert and key files if they exist if self.config.config_options['backup']['value']: + import time ext = time.strftime("%Y-%m-%d@%H:%M:%S", time.localtime(time.time())) date_str = "%s_" + "%s" % ext diff --git a/roles/lib_openshift/src/lib/import.py b/roles/lib_openshift/src/lib/import.py index 9a1fc6ef7..a79297898 100644 --- a/roles/lib_openshift/src/lib/import.py +++ b/roles/lib_openshift/src/lib/import.py @@ -8,8 +8,6 @@ from __future__ import print_function import atexit import copy -# pylint: disable=unused-import -import time import json import os import re -- cgit v1.2.3