Closed viniarck closed 2 months ago
custom_topos/ring_int.py
:"""Custom topology example
Two directly connected switches plus a host for each switch:
host --- switch --- switch --- host
Adding the 'topos' dict with a key/value pair to generate our newly defined
topology enables one to pass in '--topo=mytopo' from the command line.
"""
from mininet.topo import Topo
class MyTopo(Topo):
"Simple topology example."
def build(self):
"Create custom topo."
# Add hosts and switches
h11 = self.addHost("h11")
h12 = self.addHost("h12")
h2 = self.addHost("h2")
h3 = self.addHost("h3")
s1 = self.addSwitch("s1")
s2 = self.addSwitch("s2")
s3 = self.addSwitch("s3")
self.addLink(s1, h11)
self.addLink(s1, h12)
self.addLink(s2, h2)
self.addLink(s3, h3)
self.addLink(s1, s2)
self.addLink(s2, s3)
self.addLink(s1, s3)
self.addLink(s1, s1, port1=5, port2=6)
self.addLink(s1, s1, port1=7, port2=8)
self.addLink(s3, s3, port1=5, port2=6)
topos = {"mytopo": (lambda: MyTopo())}
mn --controller=remote,ip=127.0.0.1,port=6653 --switch=ovsk,protocols=OpenFlow13 --custom custom_topos/ring_int.py --topo mytopo
Add an early return
on this line of code https://github.com/kytos-ng/telemetry_int/blob/master/managers/int.py#L637, you'll need to it just so flows with INT actions aren't sent on wire, which in turn will let you use this NApp without sending the flows just so it compatiable with minenet for you to play with the API and set the metadata, since this NApp is for NoviFlow hardware switches then you need to do it:
diff --git a/managers/int.py b/managers/int.py
index 4b5eec1..b0f1c48 100644
--- a/managers/int.py
+++ b/managers/int.py
@@ -634,6 +634,7 @@ class INTManager:
The flows will be batched per dpid based on settings.BATCH_SIZE and will wait
for settings.BATCH_INTERVAL per batch iteration.
"""
+ return
switch_flows = defaultdict(list)
for flows in stored_flows.values():
Start kytosd
Set the following metadata:
echo '{"proxy_port": 5}' | http http://127.0.0.1:8181/api/kytos/topology/v3/interfaces/00:00:00:00:00:00:00:01:01/metadata
echo '{"proxy_port": 7}' | http http://127.0.0.1:8181/api/kytos/topology/v3/interfaces/00:00:00:00:00:00:00:01:02/metadata
echo '{"proxy_port": 5}' | http http://127.0.0.1:8181/api/kytos/topology/v3/interfaces/00:00:00:00:00:00:00:03:01/metadata
curl -H 'Content-type: application/json' -X POST http://127.0.0.1:8181/api/kytos/mef_eline/v2/evc/ -d '{"name": "inter_evpl_2222", "dynamic_backup_path": true, "uni_a": {"interface_id": "00:00:00:00:00:00:00:01:1", "tag": {"tag_type": "vlan", "value": 2222}}, "uni_z": { "interface_id": "00:00:00:00:00:00:00:03:1", "tag": {"tag_type": "vlan", "value": 2222}}}'
❯ curl -H 'Content-type: application/json' -X POST http://127.0.0.1:8181/api/kytos/telemetry_int/v1/evc/enable -d '{"evc_ids": []}'
["db43d585b64242"]
@HeriLFIU will work on this one
This is the
k-info-panel
mentioned on https://github.com/kytos-ng/telemetry_int/issues/92.This
k-info-panel
should list in a table all installed EVCs but it'll only display summarized data of the EVCs, so, it'll display EVC name plus certaintelemetry_int
metadata, and when the metadata isn't there then it means that INT isn't enabled.The k-table should have columns for displaying these fields
evc.id
,evc.name
,evc.active
,evc.metadata.telemetry.enabled
,evc.metadata.telemetry.status
,evc.metadata.telemetry.status_reason
,evc.metadata.telemetry.status_updated_at
. Here is one example of how the shape of the data looks like,status_reason
is a list of str and when displaying it it should be joined as a string with,
:status
"UP" or "DOWN", andenabled
true or false. In addition, it'd be great to also have a dynamic filter for the evc.id and evc.nameevc.metadata
doesn't havetelemetry
key, that means that there's no INT at all, so it should display as empty when it doesn't exist.evc.metadata.telemetry.enabled
is a boolean, true means enabled whereas false means it's been disabled.evc.metadata.status
can be "UP" or "DOWN", so it'd be cool to have UP colored the background in green and DOWN in red.Once the EVCs are listed, the following actions enable/disable/redeploy should be supported in bulk (meaning that you can select one or more EVCs for a given action to be performed,
telemetry_int
API support passing a list of EVC ids for these actions):POST v1/evc/enable
https://github.com/kytos-ng/telemetry_int/blob/master/openapi.yml#L20POST v1/evc/disable
https://github.com/kytos-ng/telemetry_int/blob/master/openapi.yml#L67POST v1/evc/redeploy
https://github.com/kytos-ng/telemetry_int/blob/master/openapi.yml#L114Notice that both enable and disable also accept a
force: bool
flag which should also be set or not. The API explains what it's useful for, but essentially it's to force certain validation criteria to be bypassed when it can be safe and intentional to do so.