Skip to content

Commit

Permalink
Changed tag_type to integer type
Browse files Browse the repository at this point in the history
- Added Interface.range_difference()
- Deleted Interface.verify_first_last_tag()
- Changed from verify_first_last_tag to can_set_tag_ranges
- Changed Interface.set_tag_ranges to resize available_tags
- Changed remove_tag_ranges to resize available_tags
- Using bysect for find_index_add and find_index_remove
- Changed event kytos/core.link_available_tags to kytos/core.interface_tags
- Added KytosTagtypeNotSupported exception
- Updated changelog
  • Loading branch information
Alopalao committed Sep 5, 2023
1 parent 914c99a commit 33ac24f
Show file tree
Hide file tree
Showing 4 changed files with 178 additions and 164 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ All notable changes to the kytos project will be documented in this file.
UNRELEASED - Under development
******************************

Added
=====
- Added ``Interface.tag_ranges`` as ``dict[str, list[list[int]]]`` as replacement for ``vlan_pool`` settings.
- Added ``kytos/core.interface_tags`` event publication to notify any modification of ``Interface.tag_ranges`` or ``Interface.available_tags``.

Changed
=======
- Change format for ``Interface.available_tags`` to ``dict[str, list[list[int]]]``. Storing ``tag_types`` as keys and a list of ranges for ``available_tags`` as values.

Deprecated
==========
- Deleted ``vlan_pool`` in favor of ``Interface.tag_ranges``

[2023.1.0] - 2023-06-05
***********************

Expand Down
6 changes: 5 additions & 1 deletion kytos/core/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,18 @@ def __str__(self):
return msg


class KytosResizingAvailableTagError(Exception):
class KytosSetTagRangeError(Exception):
"""Exception raised when available_tag cannot be resized"""


class KytosLinkCreationError(Exception):
"""Exception thrown when the link has an empty endpoint."""


class KytosTagtypeNotSupported(Exception):
"""Exception thronw when a not supported tag type is not supported"""


# Exceptions related to NApps


Expand Down
Loading

0 comments on commit 33ac24f

Please sign in to comment.