daemon: moved QUAGGA_STATE_DIR from constants.py to quagga service files

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

View file

@ -2,7 +2,6 @@ import abc
import logging
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
@ -11,6 +10,7 @@ from core.nodes.interface import CoreInterface
from core.nodes.network import WlanNode
GROUP: str = "Quagga"
QUAGGA_STATE_DIR: str = "/var/run/quagga"
def has_mtu_mismatch(iface: CoreInterface) -> bool:
@ -79,7 +79,7 @@ class Zebra(ConfigService):
quagga_sbin_search = self.node.session.options.get_config(
"quagga_sbin_search", default="/usr/local/sbin /usr/sbin /usr/lib/quagga"
).strip('"')
quagga_state_dir = constants.QUAGGA_STATE_DIR
quagga_state_dir = QUAGGA_STATE_DIR
quagga_conf = self.files[0]
services = []

View file

@ -3,7 +3,6 @@ from core.utils import which
COREDPY_VERSION = "@PACKAGE_VERSION@"
CORE_CONF_DIR = "@CORE_CONF_DIR@"
CORE_DATA_DIR = "@CORE_DATA_DIR@"
QUAGGA_STATE_DIR = "@CORE_STATE_DIR@/run/quagga"
VNODED_BIN = which("vnoded", required=True)
VCMD_BIN = which("vcmd", required=True)

View file

@ -5,7 +5,6 @@ from typing import Optional, Tuple
import netaddr
from core import constants
from core.emane.nodes import EmaneNet
from core.emulator.enumerations import LinkTypes
from core.nodes.base import CoreNode
@ -14,6 +13,8 @@ from core.nodes.network import PtpNet, WlanNode
from core.nodes.physical import Rj45Node
from core.services.coreservices import CoreService
QUAGGA_STATE_DIR: str = "/var/run/quagga"
class Zebra(CoreService):
name: str = "zebra"
@ -226,7 +227,7 @@ bootquagga
cls.configs[0],
quagga_sbin_search,
quagga_bin_search,
constants.QUAGGA_STATE_DIR,
QUAGGA_STATE_DIR,
)