removed rtype and param typing from doc strings to help avoid maintaining duplicate information provided by type hints
This commit is contained in:
parent
9d89877b20
commit
f4ddf310a8
32 changed files with 1091 additions and 1357 deletions
|
@ -88,15 +88,15 @@ class DockerNode(CoreNode):
|
|||
"""
|
||||
Create a DockerNode instance.
|
||||
|
||||
:param core.emulator.session.Session session: core session instance
|
||||
:param int _id: object id
|
||||
:param str name: object name
|
||||
:param str nodedir: node directory
|
||||
:param str bootsh: boot shell to use
|
||||
:param bool start: start flag
|
||||
:param core.emulator.distributed.DistributedServer server: remote server node
|
||||
:param session: core session instance
|
||||
:param _id: object id
|
||||
:param name: object name
|
||||
:param nodedir: node directory
|
||||
:param bootsh: boot shell to use
|
||||
:param start: start flag
|
||||
:param server: remote server node
|
||||
will run on, default is None for localhost
|
||||
:param str image: image to start container with
|
||||
:param image: image to start container with
|
||||
"""
|
||||
if image is None:
|
||||
image = "ubuntu"
|
||||
|
@ -108,7 +108,7 @@ class DockerNode(CoreNode):
|
|||
Create node network client for running network commands within the nodes
|
||||
container.
|
||||
|
||||
:param bool use_ovs: True for OVS bridges, False for Linux bridges
|
||||
:param use_ovs: True for OVS bridges, False for Linux bridges
|
||||
:return:node network client
|
||||
"""
|
||||
return get_net_client(use_ovs, self.nsenter_cmd)
|
||||
|
@ -118,8 +118,7 @@ class DockerNode(CoreNode):
|
|||
Check if the node is alive.
|
||||
|
||||
:return: True if node is alive, False otherwise
|
||||
:rtype: bool
|
||||
"""
|
||||
"""
|
||||
return self.client.is_alive()
|
||||
|
||||
def startup(self) -> None:
|
||||
|
@ -165,7 +164,7 @@ class DockerNode(CoreNode):
|
|||
"""
|
||||
Create a terminal command string.
|
||||
|
||||
:param str sh: shell to execute command in
|
||||
:param sh: shell to execute command in
|
||||
:return: str
|
||||
"""
|
||||
return f"docker exec -it {self.name} bash"
|
||||
|
@ -174,7 +173,7 @@ class DockerNode(CoreNode):
|
|||
"""
|
||||
Create a private directory.
|
||||
|
||||
:param str path: path to create
|
||||
:param path: path to create
|
||||
:return: nothing
|
||||
"""
|
||||
logging.debug("creating node dir: %s", path)
|
||||
|
@ -185,8 +184,8 @@ class DockerNode(CoreNode):
|
|||
"""
|
||||
Create and mount a directory.
|
||||
|
||||
:param str source: source directory to mount
|
||||
:param str target: target directory to create
|
||||
:param source: source directory to mount
|
||||
:param target: target directory to create
|
||||
:return: nothing
|
||||
:raises CoreCommandError: when a non-zero exit status occurs
|
||||
"""
|
||||
|
@ -197,9 +196,9 @@ class DockerNode(CoreNode):
|
|||
"""
|
||||
Create a node file with a given mode.
|
||||
|
||||
:param str filename: name of file to create
|
||||
:param filename: name of file to create
|
||||
:param contents: contents of file
|
||||
:param int mode: mode for file
|
||||
:param mode: mode for file
|
||||
:return: nothing
|
||||
"""
|
||||
logging.debug("nodefile filename(%s) mode(%s)", filename, mode)
|
||||
|
@ -226,9 +225,9 @@ class DockerNode(CoreNode):
|
|||
Copy a file to a node, following symlinks and preserving metadata.
|
||||
Change file mode if specified.
|
||||
|
||||
:param str filename: file name to copy file to
|
||||
:param str srcfilename: file to copy
|
||||
:param int mode: mode to copy to
|
||||
:param filename: file name to copy file to
|
||||
:param srcfilename: file to copy
|
||||
:param mode: mode to copy to
|
||||
:return: nothing
|
||||
"""
|
||||
logging.info(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue