daemon: moved FRR_STATE_DIR from constants.py to frr service files

This commit is contained in:
Blake Harnden 2020-06-22 21:36:39 -07:00
parent f39ab1dee6
commit 2145c07cb7
3 changed files with 5 additions and 5 deletions

View file

@ -1,7 +1,6 @@
import abc
from typing import Any, Dict, List
from core import constants
from core.config import Configuration
from core.configservice.base import ConfigService, ConfigServiceMode
from core.emane.nodes import EmaneNet
@ -10,6 +9,7 @@ from core.nodes.interface import CoreInterface
from core.nodes.network import WlanNode
GROUP: str = "FRR"
FRR_STATE_DIR: str = "/var/run/frr"
def has_mtu_mismatch(iface: CoreInterface) -> bool:
@ -110,7 +110,7 @@ class FRRZebra(ConfigService):
frr_conf=frr_conf,
frr_sbin_search=frr_sbin_search,
frr_bin_search=frr_bin_search,
frr_state_dir=constants.FRR_STATE_DIR,
frr_state_dir=FRR_STATE_DIR,
ifaces=ifaces,
want_ip4=want_ip4,
want_ip6=want_ip6,

View file

@ -4,7 +4,6 @@ COREDPY_VERSION = "@PACKAGE_VERSION@"
CORE_CONF_DIR = "@CORE_CONF_DIR@"
CORE_DATA_DIR = "@CORE_DATA_DIR@"
QUAGGA_STATE_DIR = "@CORE_STATE_DIR@/run/quagga"
FRR_STATE_DIR = "@CORE_STATE_DIR@/run/frr"
VNODED_BIN = which("vnoded", required=True)
VCMD_BIN = which("vcmd", required=True)

View file

@ -6,7 +6,6 @@ from typing import Optional, Tuple
import netaddr
from core import constants
from core.emane.nodes import EmaneNet
from core.nodes.base import CoreNode
from core.nodes.interface import CoreInterface
@ -14,6 +13,8 @@ from core.nodes.network import PtpNet, WlanNode
from core.nodes.physical import Rj45Node
from core.services.coreservices import CoreService
FRR_STATE_DIR: str = "/var/run/frr"
class FRRZebra(CoreService):
name: str = "FRRzebra"
@ -236,7 +237,7 @@ bootfrr
cls.configs[0],
frr_sbin_search,
frr_bin_search,
constants.FRR_STATE_DIR,
FRR_STATE_DIR,
)
for iface in node.get_ifaces():
cfg += f"ip link set dev {iface.name} down\n"