Skip to content
Snippets Groups Projects
Commit 6cdf1686 authored by Aleš Mrázek's avatar Aleš Mrázek
Browse files

datamodel: types: IPNetwork: __eq__ added

parent dfa29bfe
Branches
Tags
1 merge request!1540manager: policy-loader: new process for loading policy rules separately
......@@ -454,6 +454,9 @@ class IPNetwork(BaseValueType):
def __repr__(self) -> str:
return f'{type(self).__name__}("{self._value}")'
def __eq__(self, o: object) -> bool:
return isinstance(o, IPNetwork) and o._value == self._value
def to_std(self) -> Union[ipaddress.IPv4Network, ipaddress.IPv6Network]:
return self._value
......
......@@ -125,6 +125,7 @@ class KresManager: # pylint: disable=too-many-instance-attributes
config.webmgmt,
config.options,
config.network,
config.forward,
config.cache,
config.dnssec,
config.dns64,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment