mirror of https://github.com/EdgeVPNio/evio.git
Tidy up code
parent
c1b931e854
commit
71695a0f10
|
|
@ -455,12 +455,6 @@ class Broker:
|
|||
if sub is not None:
|
||||
sub.remove_subscriber(sink)
|
||||
|
||||
# def inject_fault(self, module_name):
|
||||
# if "InjectFaults" not in self._config["Broker"]:
|
||||
# return
|
||||
# if module_name in self._config["Broker"]["InjectFaults"]:
|
||||
# inject_fault(frequency=self._config["Broker"]["InjectFaults"][module_name])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
cf = Broker()
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ class ControllerModule:
|
|||
def __init__(self, nexus: Nexus, ctrl_config: dict):
|
||||
self._nexus = nexus
|
||||
self._ctrl_config = ctrl_config
|
||||
# self._module_name = self.__class__.__module__
|
||||
self._state_digest = None
|
||||
self.logger = logging.getLogger("Evio." + self.__class__.__name__)
|
||||
|
||||
|
|
@ -73,11 +72,6 @@ class ControllerModule:
|
|||
def config(self) -> dict:
|
||||
return self._ctrl_config
|
||||
|
||||
# @property
|
||||
# def module_name(self):
|
||||
# return full path name
|
||||
# return self.__class__.__module__
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self.__class__.__name__
|
||||
|
|
@ -108,18 +102,6 @@ class ControllerModule:
|
|||
parent_cbt.set_response(cbt_data, cbt_status)
|
||||
self.complete_cbt(parent_cbt)
|
||||
|
||||
# def log(self, level, fmt, *args):
|
||||
# if level == "LOG_DEBUG":
|
||||
# self.logger.debug(fmt, *args)
|
||||
# elif level == "LOG_INFO":
|
||||
# self.logger.info(fmt, *args)
|
||||
# elif level == "LOG_WARNING":
|
||||
# self.logger.warning(fmt, *args)
|
||||
# elif level == "LOG_ERROR":
|
||||
# self.logger.error(fmt, *args)
|
||||
# else:
|
||||
# self.logger.debug(fmt, *args)
|
||||
|
||||
def trace_state(self):
|
||||
if self.config.get("StateTracingEnabled", False):
|
||||
state = str(self)
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@
|
|||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
EVIO_VER_MJR = 23
|
||||
EVIO_VER_MNR = 1
|
||||
EVIO_VER_MJR = 0
|
||||
EVIO_VER_MNR = 0
|
||||
EVIO_VER_REV = 0
|
||||
EVIO_VER_BLD = 638
|
||||
EVIO_VER_CTL = 6
|
||||
EVIO_VER_BLD = 0
|
||||
EVIO_VER_CTL = 0
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@ import time
|
|||
from abc import ABCMeta, abstractmethod
|
||||
from collections.abc import MutableMapping
|
||||
from distutils import spawn
|
||||
|
||||
# from subprocess import CompletedProcess
|
||||
from typing import Any, Literal, Union
|
||||
|
||||
import broker
|
||||
|
|
|
|||
|
|
@ -274,12 +274,6 @@ class ConnEdgeAdjacenctList(MutableMapping):
|
|||
else:
|
||||
raise RuntimeWarning("EdgeType threshold not implemented")
|
||||
|
||||
# def is_all_successors_connected(self):
|
||||
# matches = self.select_edges(
|
||||
# edge_type=EDGE_TYPE_OUT.Successor, edge_state=EDGE_STATES.Connected
|
||||
# )
|
||||
# return len(matches) >= self.min_successors
|
||||
|
||||
def add_conn_edge(self, peer_id: str, ce: ConnectionEdge):
|
||||
self.remove_conn_edge(peer_id)
|
||||
self._conn_edges[peer_id] = ce
|
||||
|
|
|
|||
Loading…
Reference in New Issue