Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added UI option to set tag_ranges #168

Closed
wants to merge 18 commits into from
Closed

Added UI option to set tag_ranges #168

wants to merge 18 commits into from

Conversation

Alopalao
Copy link

@Alopalao Alopalao commented Oct 5, 2023

Closes #167
Based on branch epic/vlan_pool_request_get

Summary

Added available_tags and tag_ranges so those are sent to Interface details UI platform.

@Alopalao Alopalao requested a review from a team as a code owner October 5, 2023 22:55
Copy link
Member

@viniarck viniarck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's nice to have the new UI props. I've asked a change though. I'll also recommend that you stack your PR on top of existing ones once targeting them to minimize the diffs facilitating the review (although it's understandable that too many PRs to manage get difficult, so let's try to also merge the other ones as we've discused, thanks, Aldo).

@@ -17,7 +17,8 @@
<k-accordion-item title="Interfaces" v-if="this.interfaces">
<k-interface :interface_id="interface.id" :name="interface.name" :port_number="interface.port_number" :mac="interface.mac"
:speed="interface.speed" :key="interface.name" :enabled="interface.enabled" :metadata="interface.metadata"
:active="interface.active" :lldp="interface.lldp" :nni="interface.nni" :uni="interface.uni" :content_switch="content_switch" v-for="interface in this.interfaces">
:active="interface.active" :lldp="interface.lldp" :nni="interface.nni" :uni="interface.uni" :content_switch="content_switch"
:available_tags="interface.available_tags" :tag_ranges="interface.tag_ranges" v-for="interface in this.interfaces">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new k-interface available_tags and tag_ranges props look great. However, I'll recommend that you instead of setting interface.available_tags and interface.tag_ranges you fetch directly from GET /api/kytos/topology/v3/interfaces/tag_ranges?dpid=dpid, and then you add a support for filtering by dpid on your PR https://github.com/kytos-ng/topology/pull/166/files, and then when this switch_info.kytos component gets mounted you fetch it, we'll only have to pay one extra request, but then the positive side is that we do change the existing v3 and v3/interfaces response contents while still not adding too extra data on existing endpoints, so the interface.as_dict() change on PR kytos-ng/kytos#421 shouldn't be needed. Wdyt? Let me know if you see another approach other than also changing the response of the existing v3 endpoints. Thanks, @Alopalao.

Side note: At amLight, in prod, typically each switch will have 32 interfaces, and a dozen of switches, as EVCs start allocating and specially when UNI available_tags might get partitioned it might get a bit lengthy (I'm thinking of 100+ EVPLs for instance using non-contiguous values), so I'm a bit concerned to include tag_ranges and available_tags on interface.as_dict(), even though it's well intregrated and makes a lot of sense.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, it is a minor change. With that change this PR no longer needed though, so I am closing this.

@Alopalao Alopalao closed this Oct 6, 2023
@Alopalao Alopalao deleted the epic/vlan_pool_ui branch October 11, 2023 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add front end option to configure Interface.tag_ranges
2 participants