summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaopengzhang <zhang.maopeng1@zte.com.cn>2019-05-28 16:25:43 +0800
committermaopengzhang <zhang.maopeng1@zte.com.cn>2019-05-28 16:25:43 +0800
commit67588c621c0e41c4ebc24517e2764904b80d4194 (patch)
treee81f83de00b3f3c55db463ba5742b216e7e7caaa
parentdb4c5e3f42eaf6d8d8554a0dc54f09d965d6145f (diff)
remove paramiko and cryptography
Fro security reason, paramiko and cryptography should be removed Change-Id: I3f5351649109292b27640f3e1eb432d1ba4d10be Issue-ID: VFC-1400 Signed-off-by: maopengzhang <zhang.maopeng1@zte.com.cn>
-rw-r--r--catalog/pub/utils/toscaparser/basemodel.py24
-rw-r--r--requirements.txt4
2 files changed, 14 insertions, 14 deletions
diff --git a/catalog/pub/utils/toscaparser/basemodel.py b/catalog/pub/utils/toscaparser/basemodel.py
index d92a4560..1d8b261d 100644
--- a/catalog/pub/utils/toscaparser/basemodel.py
+++ b/catalog/pub/utils/toscaparser/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 37872979..1c966267 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