mark license expired inventory update + tests

This commit is contained in:
Chris Meyers
2015-05-04 12:51:38 -04:00
parent cffb2f324f
commit f6541059a3
3 changed files with 27 additions and 3 deletions

View File

@@ -1224,7 +1224,7 @@ class InventoryUpdate(UnifiedJob, InventorySourceOptions):
update_fields = kwargs.get('update_fields', [])
if bool(('license' in self.result_stdout or 'licensed' in self.result_stdout) and
'exceeded' in self.result_stdout and not self.license_error) or \
bool('License has expired' in self.result_stdout or 'License count exceeded'):
bool(any(x in self.result_stdout for x in ('License has expired', 'License count exceeded'))):
self.license_error = True
if 'license_error' not in update_fields:
update_fields.append('license_error')