refactor result classes and code which stores/loads results from storage
diff --git a/wally/ssh_utils.py b/wally/ssh_utils.py
index e9e118d..ed857b6 100644
--- a/wally/ssh_utils.py
+++ b/wally/ssh_utils.py
@@ -1,12 +1,11 @@
import re
import getpass
import logging
-from typing import List, Dict, Any
+from typing import List, Dict
from . import utils
-from .common_types import IPAddr
-from .result_classes import IStorable
+from .common_types import ConnCreds
logger = logging.getLogger("wally")
@@ -47,35 +46,6 @@
uri_reg_exprs.append(templ.format(**re_dct))
-class ConnCreds(IStorable):
- def __init__(self, host: str, user: str, passwd: str = None, port: str = '22',
- key_file: str = None, key: bytes = None) -> None:
- self.user = user
- self.passwd = passwd
- self.addr = IPAddr(host, int(port))
- self.key_file = key_file
- self.key = key
-
- def __str__(self) -> str:
- return "{}@{}:{}".format(self.user, self.addr.host, self.addr.port)
-
- def __repr__(self) -> str:
- return str(self)
-
- def raw(self) -> Dict[str, Any]:
- return {
- 'user': self.user,
- 'host': self.addr.host,
- 'port': self.addr.port,
- 'passwd': self.passwd,
- 'key_file': self.key_file
- }
-
- @classmethod
- def fromraw(cls, data) -> 'ConnCreds':
- return cls(**data)
-
-
def parse_ssh_uri(uri: str) -> ConnCreds:
"""Parse ssh connection URL from one of following form
[ssh://]user:passwd@host[:port]