Переглянути джерело

Returning actual results of yedit query. Empty list was returning empty dict.

Kenny Woodson 7 роки тому
батько
коміт
7a59228342
31 змінених файлів з 31 додано та 31 видалено
  1. 1 1
      roles/lib_openshift/library/oc_adm_ca_server_cert.py
  2. 1 1
      roles/lib_openshift/library/oc_adm_csr.py
  3. 1 1
      roles/lib_openshift/library/oc_adm_manage_node.py
  4. 1 1
      roles/lib_openshift/library/oc_adm_policy_group.py
  5. 1 1
      roles/lib_openshift/library/oc_adm_policy_user.py
  6. 1 1
      roles/lib_openshift/library/oc_adm_registry.py
  7. 1 1
      roles/lib_openshift/library/oc_adm_router.py
  8. 1 1
      roles/lib_openshift/library/oc_clusterrole.py
  9. 1 1
      roles/lib_openshift/library/oc_configmap.py
  10. 1 1
      roles/lib_openshift/library/oc_edit.py
  11. 1 1
      roles/lib_openshift/library/oc_env.py
  12. 1 1
      roles/lib_openshift/library/oc_group.py
  13. 1 1
      roles/lib_openshift/library/oc_image.py
  14. 1 1
      roles/lib_openshift/library/oc_label.py
  15. 1 1
      roles/lib_openshift/library/oc_obj.py
  16. 1 1
      roles/lib_openshift/library/oc_objectvalidator.py
  17. 1 1
      roles/lib_openshift/library/oc_process.py
  18. 1 1
      roles/lib_openshift/library/oc_project.py
  19. 1 1
      roles/lib_openshift/library/oc_pvc.py
  20. 1 1
      roles/lib_openshift/library/oc_route.py
  21. 1 1
      roles/lib_openshift/library/oc_scale.py
  22. 1 1
      roles/lib_openshift/library/oc_secret.py
  23. 1 1
      roles/lib_openshift/library/oc_service.py
  24. 1 1
      roles/lib_openshift/library/oc_serviceaccount.py
  25. 1 1
      roles/lib_openshift/library/oc_serviceaccount_secret.py
  26. 1 1
      roles/lib_openshift/library/oc_storageclass.py
  27. 1 1
      roles/lib_openshift/library/oc_user.py
  28. 1 1
      roles/lib_openshift/library/oc_version.py
  29. 1 1
      roles/lib_openshift/library/oc_volume.py
  30. 1 1
      roles/lib_utils/library/yedit.py
  31. 1 1
      roles/lib_utils/src/class/yedit.py

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

@@ -745,7 +745,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -723,7 +723,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -731,7 +731,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -717,7 +717,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -717,7 +717,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -835,7 +835,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -860,7 +860,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -709,7 +709,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -715,7 +715,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -759,7 +759,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -726,7 +726,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -699,7 +699,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -718,7 +718,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -735,7 +735,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -738,7 +738,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -670,7 +670,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -727,7 +727,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -724,7 +724,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -731,7 +731,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -769,7 +769,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -713,7 +713,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -765,7 +765,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -772,7 +772,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -711,7 +711,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -711,7 +711,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -729,7 +729,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -771,7 +771,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -683,7 +683,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

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

@@ -760,7 +760,7 @@ class Yedit(object):  # pragma: no cover
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

+ 1 - 1
roles/lib_utils/library/yedit.py

@@ -793,7 +793,7 @@ class Yedit(object):
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}
 

+ 1 - 1
roles/lib_utils/src/class/yedit.py

@@ -590,7 +590,7 @@ class Yedit(object):
                 yamlfile.yaml_dict = content
 
             if params['key']:
-                rval = yamlfile.get(params['key']) or {}
+                rval = yamlfile.get(params['key'])
 
             return {'changed': False, 'result': rval, 'state': state}