diff --git a/src/middlewared/middlewared/plugins/ups.py b/src/middlewared/middlewared/plugins/ups.py index 1743babeea98c..b168cdb34b463 100644 --- a/src/middlewared/middlewared/plugins/ups.py +++ b/src/middlewared/middlewared/plugins/ups.py @@ -17,6 +17,7 @@ RE_TEST_IN_PROGRESS = re.compile(r'ups.test.result:\s*TestInProgress') RE_UPS_STATUS = re.compile(r'ups.status: (.*)') UPS_POWERDOWN_FLAG_FILE = '/etc/killpower' +NUT_DUMMY_UPS = 'dummy-ups' class UPSModel(sa.Model): @@ -168,7 +169,7 @@ async def validate_data(self, data, schema): driver = data.get('driver') if driver: - if driver not in (await self.middleware.call('ups.driver_choices')).keys(): + if driver not in (await self.middleware.call('ups.driver_choices')).keys() and driver != NUT_DUMMY_UPS: verrors.add( f'{schema}.driver', 'Driver selected does not match local machine\'s driver list'