Project

General

Profile

Bug #36701

calling Device.is_valid repeatedly duplicates entries in Device._rejected_reasons

Added by Jan Fajerski over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

Device.is_valid only ever adds to _rejected_reason. Two fixes are possible:

- is_valid resets _rejected_reasons on every call
- Don't expose is_valid with the @property decorator. Instead expose the is_valid as a true property and set it on object creation once.

I'd prefer option 2 since we don't expect that property to change once a Device instance is created.

I have the fix ready, unless option 1 is preferable...

Also available in: Atom PDF