Commit 3e60e486 authored by Mohammad Ismaeel's avatar Mohammad Ismaeel
Browse files

Merge branch 'cnit_related_activity' of...

Merge branch 'cnit_related_activity' of https://labs.etsi.org/rep/tfs/controller into cnit_related_activity
parents 18f7cc97 d4b7c8d7
Loading
Loading
Loading
Loading

bands.json

0 → 100644
+1 −0
Original line number Diff line number Diff line
{"1": {"optical_band_id": 1, "bidir": 0, "src": "R1", "dst": "R2", "flows": {"R1": {"f": {"in": "0", "out": "port-1-out"}, "b": {}}, "R2": {"f": {"in": "port-1-in", "out": "0"}, "b": {}}}, "band_type": "c_slots", "fiber_forward": {}, "fiber_backward": {}, "op-mode": 0, "n_slots": 16, "links": ["R1-R2"], "path": ["R1", "R2"], "band": 200000, "freq": 192106250, "is_active": false, "src_port": "port-1-out", "dst_port": "port-1-in", "rev_dst_port": "port-1-in", "rev_src_port": "port-1-out", "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1}, "served_lightpaths": []}, "2": {"optical_band_id": 2, "bidir": 0, "src": "R1", "dst": "R2", "flows": {"R1": {"f": {"in": "0", "out": "port-1-out"}, "b": {}}, "R2": {"f": {"in": "port-1-in", "out": "0"}, "b": {}}}, "band_type": "c_slots", "fiber_forward": {}, "fiber_backward": {}, "op-mode": 0, "n_slots": 16, "links": ["R1-R2"], "path": ["R1", "R2"], "band": 200000, "freq": 192106250, "is_active": true, "src_port": "port-1-out", "dst_port": "port-1-in", "rev_dst_port": "port-1-in", "rev_src_port": "port-1-out", "c_slots": {"1": 0, "2": 0, "3": 0, "4": 0, "5": 0, "6": 0, "7": 0, "8": 0, "9": 0, "10": 0, "11": 0, "12": 0, "13": 0, "14": 0, "15": 0, "16": 0}, "served_lightpaths": [2, 3]}}

dev.logs

0 → 100644
+557 −0

File added.

Preview size limit exceeded, changes collapsed.

links.json

0 → 100644
+1 −0

File added.

Preview size limit exceeded, changes collapsed.

+9 −0
Original line number Diff line number Diff line
@@ -328,6 +328,8 @@ class RSA():
        path = flow["path"]
        links = flow["links"]
        bidir = flow["bidir"]
        flow_id = flow["flow_id"]

       
        for l in links:
            if debug:
@@ -360,6 +362,10 @@ class RSA():
                print("restoring OB")
            print(f"invoking restore_optical_band o_b_id: {o_b_id} , slots {slots} , band {band} ")    
            self.restore_optical_band(o_b_id, slots, band)
            if flow_id in self.optical_bands[o_b_id]["served_lightpaths"]:
                if flow_id in self.optical_bands[o_b_id]["served_lightpaths"]:
                    self.optical_bands[o_b_id]["served_lightpaths"].remove(flow_id)

            #self.restore_optical_band_2(o_b_id, slots, band,links)
        if bidir:
            for l in links:
@@ -398,6 +404,9 @@ class RSA():
    def del_band(self, flow, o_b_id = None):
        
        print(f"delete band {flow} ")
        
        if len(self.optical_bands[o_b_id]["served_lightpaths"])>0:
            return False
        flows = flow["flows"]
        band = None
        #slots = flow["slots"]