diff options
author | maopengzhang <zhang.maopeng1@zte.com.cn> | 2019-05-28 16:45:53 +0800 |
---|---|---|
committer | maopengzhang <zhang.maopeng1@zte.com.cn> | 2019-05-28 16:45:53 +0800 |
commit | 06c84efce22b8b96b734648c0677573791090f3b (patch) | |
tree | b0bb99d5ac41ffc0f596729eff434121a108a62e | |
parent | 4e397c711886650791cbaf5e80fc2f3993b8bde7 (diff) |
remove paramiko and cryptography
Fro security reason, paramiko and cryptography should be removed
Change-Id: Ie464a2eeebbd12fbac97d75845c68adc7bbd64f9
Issue-ID: VFC-1400
Signed-off-by: maopengzhang <zhang.maopeng1@zte.com.cn>
-rw-r--r-- | genericparser/pub/utils/toscaparsers/basemodel.py | 24 | ||||
-rw-r--r-- | requirements.txt | 4 |
2 files changed, 14 insertions, 14 deletions
diff --git a/genericparser/pub/utils/toscaparsers/basemodel.py b/genericparser/pub/utils/toscaparsers/basemodel.py index 2b21456..0110df9 100644 --- a/genericparser/pub/utils/toscaparsers/basemodel.py +++ b/genericparser/pub/utils/toscaparsers/basemodel.py @@ -20,7 +20,7 @@ import re import shutil import urllib -import paramiko +# import paramiko from toscaparser.tosca_template import ToscaTemplate from toscaparser.properties import Property from toscaparser.functions import Function, Concat, GetInput, get_function, function_mappings @@ -167,17 +167,17 @@ class BaseInfoModel(object): self.ftp_get(userName, userPwd, hostIp, hostPort, remoteFileName, localFileName) return localFileName - def sftp_get(self, userName, userPwd, hostIp, hostPort, remoteFileName, localFileName): - # return - t = None - try: - t = paramiko.Transport(hostIp, int(hostPort)) - t.connect(username=userName, password=userPwd) - sftp = paramiko.SFTPClient.from_transport(t) - sftp.get(remoteFileName, localFileName) - finally: - if t is not None: - t.close() + # def sftp_get(self, userName, userPwd, hostIp, hostPort, remoteFileName, localFileName): + # # return + # t = None + # try: + # t = paramiko.Transport(hostIp, int(hostPort)) + # t.connect(username=userName, password=userPwd) + # sftp = paramiko.SFTPClient.from_transport(t) + # sftp.get(remoteFileName, localFileName) + # finally: + # if t is not None: + # t.close() def ftp_get(self, userName, userPwd, hostIp, hostPort, remoteFileName, localFileName): f = None diff --git a/requirements.txt b/requirements.txt index 3787297..1c96626 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,8 +21,8 @@ mock==2.0.0 unittest_xml_reporting==1.12.0 # for parser -cryptography==2.0.3 -paramiko==2.0.2 +# cryptography==2.0.3 +# paramiko==2.0.2 nfv-toscaparser==1.1.2.dev1 # for auto swagger |