daemon: removed missing params from python docs, updated node ValueErrors to CoreErrors
This commit is contained in:
parent
ecc3eb1c89
commit
e46a072f74
2 changed files with 3 additions and 7 deletions
|
@ -9,7 +9,7 @@ from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Tuple
|
|||
from core import utils
|
||||
from core.emulator.data import LinkOptions
|
||||
from core.emulator.enumerations import TransportType
|
||||
from core.errors import CoreCommandError
|
||||
from core.errors import CoreCommandError, CoreError
|
||||
from core.nodes.netclient import LinuxNetClient, get_net_client
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
@ -544,7 +544,7 @@ class GreTap(CoreInterface):
|
|||
if not start:
|
||||
return
|
||||
if remoteip is None:
|
||||
raise ValueError("missing remote IP required for GRE TAP device")
|
||||
raise CoreError("missing remote IP required for GRE TAP device")
|
||||
self.net_client.create_gretap(self.localname, remoteip, localip, ttl, key)
|
||||
self.net_client.device_up(self.localname)
|
||||
self.up = True
|
||||
|
|
|
@ -618,7 +618,6 @@ class GreTapBridge(CoreNetwork):
|
|||
:param localip: local address
|
||||
:param ttl: ttl value
|
||||
:param key: gre tap key
|
||||
:param start: start flag
|
||||
:param server: remote server node
|
||||
will run on, default is None for localhost
|
||||
"""
|
||||
|
@ -857,9 +856,7 @@ class PtpNet(CoreNetwork):
|
|||
:return: nothing
|
||||
"""
|
||||
if len(self.ifaces) >= 2:
|
||||
raise ValueError(
|
||||
"Point-to-point links support at most 2 network interfaces"
|
||||
)
|
||||
raise CoreError("ptp links support at most 2 network interfaces")
|
||||
super().attach(iface)
|
||||
|
||||
def all_link_data(self, flags: MessageFlags = MessageFlags.NONE) -> List[LinkData]:
|
||||
|
@ -992,7 +989,6 @@ class WlanNode(CoreNetwork):
|
|||
:param session: core session instance
|
||||
:param _id: node id
|
||||
:param name: node name
|
||||
:param start: start flag
|
||||
:param server: remote server node
|
||||
will run on, default is None for localhost
|
||||
:param policy: wlan policy
|
||||
|
|
Loading…
Reference in a new issue