Browse Source

Allow oc_ modules to pass unicode results

Russell Teague 8 years ago
parent
commit
339904aeec

+ 1 - 1
roles/lib_openshift/library/oc_adm_ca_server_cert.py

@@ -1080,7 +1080,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_adm_manage_node.py

@@ -1066,7 +1066,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_adm_policy_group.py

@@ -1052,7 +1052,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_adm_policy_user.py

@@ -1052,7 +1052,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_adm_registry.py

@@ -1170,7 +1170,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_adm_router.py

@@ -1195,7 +1195,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_clusterrole.py

@@ -1044,7 +1044,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_configmap.py

@@ -1050,7 +1050,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_edit.py

@@ -1094,7 +1094,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_env.py

@@ -1061,7 +1061,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_group.py

@@ -1034,7 +1034,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_image.py

@@ -1053,7 +1053,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_label.py

@@ -1070,7 +1070,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_obj.py

@@ -1073,7 +1073,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_objectvalidator.py

@@ -1005,7 +1005,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_process.py

@@ -1062,7 +1062,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_project.py

@@ -1059,7 +1059,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_pvc.py

@@ -1054,7 +1054,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_route.py

@@ -1104,7 +1104,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_scale.py

@@ -1048,7 +1048,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_secret.py

@@ -1094,7 +1094,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_service.py

@@ -1100,7 +1100,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_serviceaccount.py

@@ -1046,7 +1046,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_serviceaccount_secret.py

@@ -1046,7 +1046,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_user.py

@@ -1106,7 +1106,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_version.py

@@ -1018,7 +1018,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/library/oc_volume.py

@@ -1083,7 +1083,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):

+ 1 - 1
roles/lib_openshift/src/lib/base.py

@@ -256,7 +256,7 @@ class OpenShiftCLI(object):
 
 
         stdout, stderr = proc.communicate(input_data)
         stdout, stderr = proc.communicate(input_data)
 
 
-        return proc.returncode, stdout.decode(), stderr.decode()
+        return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
 
 
     # pylint: disable=too-many-arguments,too-many-branches
     # pylint: disable=too-many-arguments,too-many-branches
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):
     def openshift_cmd(self, cmd, oadm=False, output=False, output_type='json', input_data=None):