daemon: finished class variable type hinting for core.nodes

This commit is contained in:
Blake Harnden 2020-06-10 08:52:51 -07:00
parent 452e0720f2
commit 6ee9590bdc
4 changed files with 15 additions and 15 deletions

View file

@ -2,7 +2,7 @@ import json
import logging
import os
from tempfile import NamedTemporaryFile
from typing import TYPE_CHECKING, Callable, Dict
from typing import TYPE_CHECKING, Callable, Dict, Optional
from core import utils
from core.emulator.distributed import DistributedServer
@ -17,10 +17,10 @@ if TYPE_CHECKING:
class DockerClient:
def __init__(self, name: str, image: str, run: Callable[..., str]) -> None:
self.name = name
self.image = image
self.run = run
self.pid = None
self.name: str = name
self.image: str = image
self.run: Callable[..., str] = run
self.pid: Optional[str] = None
def create_container(self) -> str:
self.run(
@ -95,7 +95,7 @@ class DockerNode(CoreNode):
"""
if image is None:
image = "ubuntu"
self.image = image
self.image: str = image
super().__init__(session, _id, name, nodedir, start, server)
def create_node_net_client(self, use_ovs: bool) -> LinuxNetClient: