Loading src/context/service/database/models/OpticalConfig/OpticalBandModel.py +12 −14 Original line number Diff line number Diff line Loading @@ -28,8 +28,6 @@ class OpticalBandModel(_Base): connection_uuid = Column(ForeignKey('connection.connection_uuid', ondelete='CASCADE'), nullable=False) channel_uuid = Column(ForeignKey('channel.channel_uuid', ondelete='CASCADE'), nullable=False) created_at = Column(DateTime, nullable=False) ob_channel = relationship('ChannelModel') # back_populates='connections' ob_connection = relationship('ConnectionModel') # lazy='joined', back_populates='connection' Loading src/opticalcontroller/OpticalController.py +0 −6 Original line number Diff line number Diff line Loading @@ -125,10 +125,7 @@ class DelFLightpath(Resource): ob_id = flow["parent_opt_band"] flow['is_active']=False if flow is not None: bidir = flow["bidir"] if bidir: match2 = flow["src"] == dst and flow["dst"] == src and flow["bitrate"] == bitrate if match1 or match2: Loading Loading @@ -187,10 +184,7 @@ class DelOpticalBand(Resource): ob_id=o_band_id if flow is not None: bidir = flow["bidir"] if bidir: match1 = flow["src"] == src and flow["dst"] == dst and flow["bitrate"] match2 = flow["src"] == dst and flow["dst"] == src and flow["bitrate"] Loading src/opticalcontroller/tools.py +0 −3 Original line number Diff line number Diff line Loading @@ -271,13 +271,10 @@ def handle_slot (slot_field, slot): def update_optical_band (optical_bands,optical_band_id,band,link): key_list = optical_bands[optical_band_id][band].keys() corrected_slots=optical_bands[optical_band_id][band] print(f"band {band}") print(f"corrected_slots_before {corrected_slots}") if (len(key_list) < 20): corrected_slots=correct_slot(optical_bands[optical_band_id][band]) fib={} print(f"corrected_slots_after {corrected_slots}") fib['c_slots']=link['optical_details']['c_slots'] fib['l_slots']=link['optical_details']['l_slots'] fib['s_slots']=link['optical_details']['s_slots'] Loading src/webui/service/optical_link/routes.py +0 −2 Original line number Diff line number Diff line Loading @@ -150,8 +150,6 @@ def get_optical_links (): sorted_dict = {key: v[key] for key in sorted_keys} link['optical_details'][k] = sorted_dict logging.info(f"reply {optical_links}") except Exception as e : logging.info(f"error {e}") finally: Loading Loading
src/context/service/database/models/OpticalConfig/OpticalBandModel.py +12 −14 Original line number Diff line number Diff line Loading @@ -28,8 +28,6 @@ class OpticalBandModel(_Base): connection_uuid = Column(ForeignKey('connection.connection_uuid', ondelete='CASCADE'), nullable=False) channel_uuid = Column(ForeignKey('channel.channel_uuid', ondelete='CASCADE'), nullable=False) created_at = Column(DateTime, nullable=False) ob_channel = relationship('ChannelModel') # back_populates='connections' ob_connection = relationship('ConnectionModel') # lazy='joined', back_populates='connection' Loading
src/opticalcontroller/OpticalController.py +0 −6 Original line number Diff line number Diff line Loading @@ -125,10 +125,7 @@ class DelFLightpath(Resource): ob_id = flow["parent_opt_band"] flow['is_active']=False if flow is not None: bidir = flow["bidir"] if bidir: match2 = flow["src"] == dst and flow["dst"] == src and flow["bitrate"] == bitrate if match1 or match2: Loading Loading @@ -187,10 +184,7 @@ class DelOpticalBand(Resource): ob_id=o_band_id if flow is not None: bidir = flow["bidir"] if bidir: match1 = flow["src"] == src and flow["dst"] == dst and flow["bitrate"] match2 = flow["src"] == dst and flow["dst"] == src and flow["bitrate"] Loading
src/opticalcontroller/tools.py +0 −3 Original line number Diff line number Diff line Loading @@ -271,13 +271,10 @@ def handle_slot (slot_field, slot): def update_optical_band (optical_bands,optical_band_id,band,link): key_list = optical_bands[optical_band_id][band].keys() corrected_slots=optical_bands[optical_band_id][band] print(f"band {band}") print(f"corrected_slots_before {corrected_slots}") if (len(key_list) < 20): corrected_slots=correct_slot(optical_bands[optical_band_id][band]) fib={} print(f"corrected_slots_after {corrected_slots}") fib['c_slots']=link['optical_details']['c_slots'] fib['l_slots']=link['optical_details']['l_slots'] fib['s_slots']=link['optical_details']['s_slots'] Loading
src/webui/service/optical_link/routes.py +0 −2 Original line number Diff line number Diff line Loading @@ -150,8 +150,6 @@ def get_optical_links (): sorted_dict = {key: v[key] for key in sorted_keys} link['optical_details'][k] = sorted_dict logging.info(f"reply {optical_links}") except Exception as e : logging.info(f"error {e}") finally: Loading