Overload equality operator in cleaning policy params' classes
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
This commit is contained in:
parent
2e801caf25
commit
b72cfff6a9
@ -147,6 +147,12 @@ class FlushParametersAlru:
|
||||
alru_params.wake_up_time = (1, 3600)
|
||||
return alru_params
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.activity_threshold == other.activity_threshold and \
|
||||
self.flush_max_buffers == other.flush_max_buffers and \
|
||||
self.staleness_time == other.staleness_time and \
|
||||
self.wake_up_time == other.wake_up_time
|
||||
|
||||
@staticmethod
|
||||
def default_alru_params():
|
||||
alru_params = FlushParametersAlru()
|
||||
@ -175,6 +181,10 @@ class FlushParametersAcp:
|
||||
acp_params.wake_up_time = (0, 10000)
|
||||
return acp_params
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.flush_max_buffers == other.flush_max_buffers and \
|
||||
self.wake_up_time == other.wake_up_time
|
||||
|
||||
@staticmethod
|
||||
def default_acp_params():
|
||||
acp_params = FlushParametersAcp()
|
||||
|
Loading…
Reference in New Issue
Block a user