This is for creating a k-toolbar component allowing operators to perform sdntrace (which are run in the data plane). This UI is somewhat similar to https://github.com/kytos-ng/sdntrace_cp/issues/66, except how the data is displayed is asynchronous.
We need a new k-tool-bar with inputs to send a request to PUT /api/amlight/sdntrace/trace
The following components are recommended:
k-input and k-input-auto to insert the mandatory dpid with autocompletion (any of the switches that are available in the topology). For each dpid, if metadata.node_name is defined, then it should display metadata.node_name, otherwise just the dpid value.
k-input and k-input-auto to insert the mandatory in_port with autocompletion (any of the interfaces of the dpid that will be selected first). For each port value, if metadata.port_name is defined, then it should display metadata.port_name, otherwise just the port value.
If you need a reference how to implement k-input with autocompletion and also displaying the specific metadata when applicable check out these components on pathfinder:
k-accordion to group optional items such as eth, and then k-input to add dl_vlan, dl_type, dl_src, and dl_dst.
In the future, ip, ipv6, tcp and udp will be supported when the backends fully supports it.
k-button to submit the request. When the request is sent, the trace_id of the response should be stored to subsequently load a new k-info-panel that will be built on https://github.com/kytos-ng/sdntrace/issues/59, this component will make a request to GET /api/amlight/sdntrace/trace/<trace_id> with the given trace id and show the result. Since the result is asynchronous, then there must be a button that allows the user to refresh it (for more information check out the linked issue)
k-button to clear the component input values. It's not always desirable to automatically clear the inputs once the request is submitted since users might want to reuse or just change again one value and submit another request shortly after.
Scenarios
For local tests, you'll probably want to use a topology such as linear,3 and with mef_eline and create an EVC, just so you have at least one expected completing trace result (since sdntrace would be tracing the current path of this EVC).
This is for creating a
k-toolbar
component allowing operators to perform sdntrace (which are run in the data plane). This UI is somewhat similar to https://github.com/kytos-ng/sdntrace_cp/issues/66, except how the data is displayed is asynchronous.The result is supposed to be shown on a new
k-info-panel
that will be implemented on https://github.com/amlight/sdntrace/issues/7We need a new
k-tool-bar
with inputs to send a request toPUT /api/amlight/sdntrace/trace
The following components are recommended:
k-input
andk-input-auto
to insert the mandatorydpid
with autocompletion (any of the switches that are available in the topology). For each dpid, ifmetadata.node_name
is defined, then it should displaymetadata.node_name
, otherwise just thedpid
value.k-input
andk-input-auto
to insert the mandatoryin_port
with autocompletion (any of the interfaces of thedpid
that will be selected first). For each port value, ifmetadata.port_name
is defined, then it should displaymetadata.port_name
, otherwise just theport
value.If you need a reference how to implement
k-input
with autocompletion and also displaying the specific metadata when applicable check out these components on pathfinder:https://github.com/kytos-ng/pathfinder/blob/master/ui/k-toolbar/main.kytos#L7-L15
https://github.com/kytos-ng/pathfinder/blob/master/ui/k-info-panel/best_path.kytos#L30
k-accordion
to group optional items such aseth
, and thenk-input
to adddl_vlan
,dl_type
,dl_src
, anddl_dst
.In the future,
ip
,ipv6
,tcp
andudp
will be supported when the backends fully supports it.k-button
to submit the request. When the request is sent, thetrace_id
of the response should be stored to subsequently load a newk-info-panel
that will be built on https://github.com/kytos-ng/sdntrace/issues/59, this component will make a request toGET /api/amlight/sdntrace/trace/<trace_id>
with the given trace id and show the result. Since the result is asynchronous, then there must be a button that allows the user to refresh it (for more information check out the linked issue)k-button
to clear the component input values. It's not always desirable to automatically clear the inputs once the request is submitted since users might want to reuse or just change again one value and submit another request shortly after.Scenarios
For local tests, you'll probably want to use a topology such as
linear,3
and withmef_eline
and create an EVC, just so you have at least one expected completing trace result (sincesdntrace
would be tracing the current path of this EVC).linear,3
:curl
GET /api/amlight/sdntrace/trace/<trace_id>
(notice that this request will be implemented in another component)