diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b9da1f80..9bb84a07 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,13 @@ All notable changes to the kytos project will be documented in this file. UNRELEASED - Under development ****************************** +[2023.2.1] - 2024-11-01 +*********************** + +Fixed +===== +- Order in ``interface.special_available_tags`` and ``interface.special_tags`` does not matter anymore when looking for used special tag. + [2023.2.0] - 2024-02-16 *********************** diff --git a/docs/conf.py b/docs/conf.py index f924e90b..b15fd5c9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -64,10 +64,10 @@ # built documents. # # The short X.Y version. -version = u'2023.2.0' +version = u'2023.2.1' show_version = False # The full version, including alpha/beta/rc tags. -release = u'2023.2.0' +release = u'2023.2.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/kytos/core/interface.py b/kytos/core/interface.py index 19cb248f..b7524acc 100644 --- a/kytos/core/interface.py +++ b/kytos/core/interface.py @@ -246,8 +246,12 @@ def all_tags_available(self) -> bool: """Return True if all tags are avaiable (no tags used), False otherwise""" with self._tag_lock: - return (self.available_tags == self.tag_ranges and - self.special_available_tags == self.special_tags) + if self.available_tags != self.tag_ranges: + return False + for field, ranges in self.special_available_tags.items(): + if set(ranges) != set(self.special_tags[field]): + return False + return True def set_tag_ranges(self, tag_ranges: list[list[int]], tag_type: str): """Set new restriction, tag_ranges.""" diff --git a/kytos/core/metadata.py b/kytos/core/metadata.py index 546b83c1..0dffc09c 100644 --- a/kytos/core/metadata.py +++ b/kytos/core/metadata.py @@ -2,7 +2,7 @@ The present metadata is intended to be used mainly on the setup. """ -__version__ = '2023.2.0' +__version__ = '2023.2.1' __author__ = 'Kytos Team' __author_email__ = 'devel@lists.kytos.io' __license__ = 'MIT' diff --git a/tests/unit/test_core/test_interface.py b/tests/unit/test_core/test_interface.py index 83884d04..ec650ca8 100644 --- a/tests/unit/test_core/test_interface.py +++ b/tests/unit/test_core/test_interface.py @@ -533,6 +533,10 @@ def test_all_tags_available(self) -> None: self.iface.special_available_tags = {"vlan": ["any"]} assert self.iface.all_tags_available() + self.iface.special_available_tags = {"vlan": ["untagged", "any"]} + self.iface.special_tags = {"vlan": ["any", "untagged"]} + assert self.iface.all_tags_available() + class TestUNI(): """UNI tests."""