Browse Source

Generic message directing people to contact support

Scott Dodson 8 years ago
parent
commit
049af8749a

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

@@ -1380,7 +1380,16 @@ class OCObjectValidator(OpenShiftCLI):
                 all_invalid[invalid_msg] = invalid
 
         if failed:
-            return {'failed': True, 'msg': 'All objects are not valid.', 'state': 'list', 'results': all_invalid}
+            return {
+                'failed': True,
+                'msg': (
+                    "All objects are not valid.  If you are a supported customer please contact "
+                    "Red Hat Support providing the complete output above. If you are not a customer "
+                    "please contact users@lists.openshift.redhat.com for assistance."
+                    ),
+                'state': 'list',
+                'results': all_invalid
+                }
 
         return {'msg': 'All objects are valid.'}
 

+ 10 - 1
roles/lib_openshift/src/class/oc_objectvalidator.py

@@ -72,6 +72,15 @@ class OCObjectValidator(OpenShiftCLI):
                 all_invalid[invalid_msg] = invalid
 
         if failed:
-            return {'failed': True, 'msg': 'All objects are not valid.', 'state': 'list', 'results': all_invalid}
+            return {
+                'failed': True,
+                'msg': (
+                    "All objects are not valid.  If you are a supported customer please contact "
+                    "Red Hat Support providing the complete output above. If you are not a customer "
+                    "please contact users@lists.openshift.redhat.com for assistance."
+                    ),
+                'state': 'list',
+                'results': all_invalid
+                }
 
         return {'msg': 'All objects are valid.'}

+ 1 - 1
roles/lib_openshift/src/test/unit/test_oc_objectvalidator.py

@@ -891,7 +891,7 @@ class OCObjectValidatorTest(unittest.TestCase):
 
         # Assert
         self.assertTrue(results['failed'])
-        self.assertEqual(results['msg'], 'All objects are not valid.')
+        self.assertIn('All objects are not valid.', results['msg'])
         self.assertEqual(results['state'], 'list')
         self.assertEqual(results['results'], invalid_results)