Jelajahi Sumber

Pleasing the linting bot.

Kenny Woodson 8 tahun lalu
induk
melakukan
ffac7eac61

+ 2 - 0
roles/lib_openshift/library/oc_env.py

@@ -1603,6 +1603,7 @@ spec:
 
 # -*- -*- -*- Begin included fragment: class/oc_env.py -*- -*- -*-
 
+
 # pylint: disable=too-many-instance-attributes
 class OCEnv(OpenShiftCLI):
     ''' Class to wrap the oc command line tools '''
@@ -1676,6 +1677,7 @@ class OCEnv(OpenShiftCLI):
 
         return self._replace_content(self.kind, self.name, self.resource.yaml_dict)
 
+    # pylint: disable=too-many-return-statements
     @staticmethod
     def run_ansible(params, check_mode):
         '''run the idempotent ansible code'''

+ 1 - 0
roles/lib_openshift/src/ansible/oc_env.py

@@ -1,4 +1,5 @@
 # pylint: skip-file
+# flake8: noqa
 
 def main():
     '''

+ 3 - 0
roles/lib_openshift/src/class/oc_env.py

@@ -1,4 +1,6 @@
 # pylint: skip-file
+# flake8: noqa
+
 
 # pylint: disable=too-many-instance-attributes
 class OCEnv(OpenShiftCLI):
@@ -73,6 +75,7 @@ class OCEnv(OpenShiftCLI):
 
         return self._replace_content(self.kind, self.name, self.resource.yaml_dict)
 
+    # pylint: disable=too-many-return-statements
     @staticmethod
     def run_ansible(params, check_mode):
         '''run the idempotent ansible code'''

+ 1 - 1
roles/lib_openshift/src/test/integration/oc_env.yml

@@ -6,7 +6,7 @@
   user: root
   vars:
     my_env_var:
-      SOMEKEY : SOMEVALUE
+      SOMEKEY: SOMEVALUE
 
     check_env_var:
       name: DEFAULT_CERTIFICATE_DIR

+ 0 - 65
roles/lib_openshift/src/test/unit/oc_env.py

@@ -343,71 +343,6 @@ class OCEnvTest(unittest.TestCase):
             'env_vars': {'SOMEKEY': 'SOMEVALUE'},
         }
 
-        dc_results_after = '''{
-            "apiVersion": "v1",
-            "kind": "DeploymentConfig",
-            "metadata": {
-                "creationTimestamp": "2017-02-02T15:58:49Z",
-                "generation": 8,
-                "labels": {
-                    "router": "router"
-                },
-                "name": "router",
-                "namespace": "default",
-                "resourceVersion": "513678"
-            },
-            "spec": {
-                "replicas": 2,
-                "selector": {
-                    "router": "router"
-                },
-                "template": {
-                    "metadata": {
-                        "creationTimestamp": null,
-                        "labels": {
-                            "router": "router"
-                        }
-                    },
-                    "spec": {
-                        "containers": [
-                            {
-                                "env": [
-                                    {
-                                        "name": "DEFAULT_CERTIFICATE_DIR",
-                                        "value": "/etc/pki/tls/private"
-                                    },
-                                    {
-                                        "name": "DEFAULT_CERTIFICATE_PATH",
-                                        "value": "/etc/pki/tls/private/tls.crt"
-                                    },
-                                    {
-                                        "name": "ROUTER_EXTERNAL_HOST_HOSTNAME"
-                                    },
-                                    {
-                                        "name": "ROUTER_EXTERNAL_HOST_HTTPS_VSERVER"
-                                    },
-                                    {
-                                        "name": "ROUTER_EXTERNAL_HOST_HTTP_VSERVER"
-                                    },
-                                    {
-                                        "name": "ROUTER_EXTERNAL_HOST_INSECURE",
-                                        "value": "false"
-                                    }
-                                ],
-                                "name": "router"
-                            }
-                        ]
-                    }
-                },
-                "test": false,
-                "triggers": [
-                    {
-                        "type": "ConfigChange"
-                    }
-                ]
-            }
-        }'''
-
         dc_results_before = '''{
             "apiVersion": "v1",
             "kind": "DeploymentConfig",