浏览代码

Rename _ns -> node_selector

There doesn't seem to be a good reason for the underscore prefix.
Rodolfo Carvalho 8 年之前
父节点
当前提交
e8c7a48c44
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 3 3
      roles/lib_openshift/library/oc_project.py
  2. 3 3
      roles/lib_openshift/src/class/oc_project.py

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

@@ -1547,9 +1547,9 @@ class OCProject(OpenShiftCLI):
     def run_ansible(params, check_mode):
         '''run the idempotent ansible code'''
 
-        _ns = None
+        node_selector = None
         if params['node_selector'] is not None:
-            _ns = ','.join(params['node_selector'])
+            node_selector = ','.join(params['node_selector'])
 
         pconfig = ProjectConfig(
             params['name'],
@@ -1560,7 +1560,7 @@ class OCProject(OpenShiftCLI):
                 'admin_role': {'value': params['admin_role'], 'include': True},
                 'description': {'value': params['description'], 'include': True},
                 'display_name': {'value': params['display_name'], 'include': True},
-                'node_selector': {'value': _ns, 'include': True},
+                'node_selector': {'value': node_selector, 'include': True},
             },
         )
 

+ 3 - 3
roles/lib_openshift/src/class/oc_project.py

@@ -97,9 +97,9 @@ class OCProject(OpenShiftCLI):
     def run_ansible(params, check_mode):
         '''run the idempotent ansible code'''
 
-        _ns = None
+        node_selector = None
         if params['node_selector'] is not None:
-            _ns = ','.join(params['node_selector'])
+            node_selector = ','.join(params['node_selector'])
 
         pconfig = ProjectConfig(
             params['name'],
@@ -110,7 +110,7 @@ class OCProject(OpenShiftCLI):
                 'admin_role': {'value': params['admin_role'], 'include': True},
                 'description': {'value': params['description'], 'include': True},
                 'display_name': {'value': params['display_name'], 'include': True},
-                'node_selector': {'value': _ns, 'include': True},
+                'node_selector': {'value': node_selector, 'include': True},
             },
         )