File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ def inspect_yaml(path):
2222 except (yaml .scanner .ScannerError , yaml .parser .ParserError ):
2323 result [path ].append ("Failed to parse YAML content" )
2424 return result
25+ result [path ].extend (OCP .operator_success (obj ))
2526 pods = list ()
2627 if obj ['kind' ].lower () == 'pod' :
2728 pods .append (obj )
@@ -33,6 +34,20 @@ def inspect_yaml(path):
3334 result [path ].extend (map (OCP .pod_ready , pods ))
3435 return result
3536
37+ @staticmethod
38+ def operator_success (obj ):
39+ result = list ()
40+ if obj ['kind' ] != 'ClusterServiceVersion' :
41+ return result
42+ status = obj ['status' ]
43+ if status ['phase' ].lower () == 'succeeded' :
44+ return result
45+ result .append (
46+ f"Operator phase is '{ status ['phase' ]} ', "
47+ "not 'Succeeded' as expected"
48+ )
49+ return result
50+
3651 @staticmethod
3752 def pod_ready (obj ):
3853 result = list ()
You can’t perform that action at this time.
0 commit comments