updated missed commands to be string based
This commit is contained in:
parent
5b3308a231
commit
2bfd050880
5 changed files with 15 additions and 12 deletions
|
@ -974,9 +974,10 @@ class EmaneManager(ModelManager):
|
|||
|
||||
def emanerunning(self, node):
|
||||
"""
|
||||
Return True if an EMANE process associated with the given node is running, False otherwise.
|
||||
Return True if an EMANE process associated with the given node is running,
|
||||
False otherwise.
|
||||
"""
|
||||
args = ["pkill", "-0", "-x", "emane"]
|
||||
args = "pkill -0 -x emane"
|
||||
try:
|
||||
node.node_net_cmd(args)
|
||||
result = True
|
||||
|
|
|
@ -2025,7 +2025,8 @@ class Session(object):
|
|||
data,
|
||||
)
|
||||
|
||||
# TODO: if data is None, this blows up, but this ties into how event functions are ran, need to clean that up
|
||||
# TODO: if data is None, this blows up, but this ties into how event functions
|
||||
# are ran, need to clean that up
|
||||
def run_event(self, node_id=None, name=None, data=None):
|
||||
"""
|
||||
Run a scheduled event, executing commands in the data string.
|
||||
|
|
|
@ -6,7 +6,8 @@ import logging
|
|||
import os
|
||||
import threading
|
||||
|
||||
from core import constants, utils
|
||||
from core import utils
|
||||
from core.constants import MOUNT_BIN, UMOUNT_BIN
|
||||
from core.emulator.enumerations import NodeTypes
|
||||
from core.errors import CoreCommandError
|
||||
from core.nodes.base import CoreNodeBase
|
||||
|
@ -190,13 +191,13 @@ class PhysicalNode(CoreNodeBase):
|
|||
source = os.path.abspath(source)
|
||||
logging.info("mounting %s at %s", source, target)
|
||||
os.makedirs(target)
|
||||
self.net_cmd([constants.MOUNT_BIN, "--bind", source, target], cwd=self.nodedir)
|
||||
self.net_cmd("%s --bind %s %s" % (MOUNT_BIN, source, target), cwd=self.nodedir)
|
||||
self._mounts.append((source, target))
|
||||
|
||||
def umount(self, target):
|
||||
logging.info("unmounting '%s'" % target)
|
||||
try:
|
||||
self.net_cmd([constants.UMOUNT_BIN, "-l", target], cwd=self.nodedir)
|
||||
self.net_cmd("%s -l %s" % (UMOUNT_BIN, target), cwd=self.nodedir)
|
||||
except CoreCommandError:
|
||||
logging.exception("unmounting failed for %s", target)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue