Skip to content
Snippets Groups Projects
Commit 0c8a227d authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

changed gorm to ip adress

parent f115a6a7
No related branches found
No related tags found
1 merge request!22Ssh client with gateway and interactive auth2
...@@ -5,9 +5,12 @@ Created on 23. dec. 2016 ...@@ -5,9 +5,12 @@ Created on 23. dec. 2016
''' '''
import unittest import unittest
from wetb.utils.cluster_tools.ssh_client import SSHClient from wetb.utils.cluster_tools.ssh_client import SSHClient
import sys
import os import os
try: try:
import sys
import wetb
sys.path.append(os.path.dirname(wetb.__file__) + "/../../x")
import x import x
except: except:
x=None x=None
...@@ -15,12 +18,6 @@ except: ...@@ -15,12 +18,6 @@ except:
import io import io
from wetb.utils.timing import print_time from wetb.utils.timing import print_time
import shutil import shutil
import paramiko
from paramiko.message import Message
from paramiko.common import cMSG_SERVICE_REQUEST
import getpass
import logging
import getpass import getpass
class sshrisoe_interactive_auth_handler(object): class sshrisoe_interactive_auth_handler(object):
...@@ -132,7 +129,7 @@ class TestSSHClient(unittest.TestCase): ...@@ -132,7 +129,7 @@ class TestSSHClient(unittest.TestCase):
if x: if x:
gateway = SSHClient('ssh.risoe.dk', 'mmpe', interactive_auth_handler = sshrisoe_interactive_auth_handler(x.mmpe)) gateway = SSHClient('ssh.risoe.dk', 'mmpe', interactive_auth_handler = sshrisoe_interactive_auth_handler(x.mmpe))
ssh = SSHClient('gorm.risoe.dk', 'mmpe', x.mmpe, gateway = gateway) ssh = SSHClient('10.40.23.49', 'mmpe', x.mmpe, gateway = gateway)
_,out,_ = ssh.execute("hostname") _,out,_ = ssh.execute("hostname")
self.assertEqual(out.strip(), "g-000.risoe.dk") self.assertEqual(out.strip(), "g-000.risoe.dk")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment