daemon: added further python docs to docker.py
This commit is contained in:
parent
f40de9f838
commit
9fa3e77d12
1 changed files with 12 additions and 2 deletions
|
@ -37,10 +37,15 @@ class DockerOptions(CoreNodeOptions):
|
||||||
@dataclass
|
@dataclass
|
||||||
class DockerVolume:
|
class DockerVolume:
|
||||||
src: str
|
src: str
|
||||||
|
"""volume mount name"""
|
||||||
dst: str
|
dst: str
|
||||||
|
"""volume mount destination directory"""
|
||||||
unique: bool = True
|
unique: bool = True
|
||||||
|
"""True to create a node unique prefixed name for this volume"""
|
||||||
delete: bool = True
|
delete: bool = True
|
||||||
|
"""True to delete the volume during shutdown"""
|
||||||
path: str = None
|
path: str = None
|
||||||
|
"""path to the volume on the host"""
|
||||||
|
|
||||||
|
|
||||||
class DockerNode(CoreNode):
|
class DockerNode(CoreNode):
|
||||||
|
@ -60,8 +65,8 @@ class DockerNode(CoreNode):
|
||||||
Create a DockerNode instance.
|
Create a DockerNode instance.
|
||||||
|
|
||||||
:param session: core session instance
|
:param session: core session instance
|
||||||
:param _id: object id
|
:param _id: node id
|
||||||
:param name: object name
|
:param name: node name
|
||||||
:param server: remote server node
|
:param server: remote server node
|
||||||
will run on, default is None for localhost
|
will run on, default is None for localhost
|
||||||
:param options: options for creating node
|
:param options: options for creating node
|
||||||
|
@ -77,6 +82,11 @@ class DockerNode(CoreNode):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create_options(cls) -> DockerOptions:
|
def create_options(cls) -> DockerOptions:
|
||||||
|
"""
|
||||||
|
Return default creation options, which can be used during node creation.
|
||||||
|
|
||||||
|
:return: docker options
|
||||||
|
"""
|
||||||
return DockerOptions()
|
return DockerOptions()
|
||||||
|
|
||||||
def _create_cmd(self, args: str, shell: bool = False) -> str:
|
def _create_cmd(self, args: str, shell: bool = False) -> str:
|
||||||
|
|
Loading…
Reference in a new issue