Skip to content

Commit fbe5293

Browse files
Ashutosh KGirish Shilamkar
authored andcommitted
CLOUDSTACK-5204: test_routers - fixed ssh issue
1 parent 631743b commit fbe5293

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎test/integration/component/test_routers.py‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def __init__(self):
7070
"natrule":
7171
{
7272
"privateport": 22,
73-
"publicport": 222,
73+
"publicport": 22,
7474
"protocol": "TCP"
7575
},
7676
"lbrule":
@@ -79,7 +79,7 @@ def __init__(self):
7979
"alg": "roundrobin",
8080
# Algorithm used for load balancing
8181
"privateport": 22,
82-
"publicport": 2222,
82+
"publicport": 22,
8383
"protocol": 'TCP',
8484
},
8585
"fw_rule": {
@@ -700,7 +700,7 @@ def test_01_RouterStopCreatePF(self):
700700
# 4. listPublicIpAddresses account=user, domainid=1 - pick ipaddressid
701701
# 5. createPortForwardingRule (ipaddressid from step 5.)
702702
# a. for port 22 (ssh) for user VM deployed in step 1.
703-
# b. public port 222 , private port 22
703+
# b. public port 22 , private port 22
704704
# 6. startRouter stopped for this account
705705
# 7. wait for listRouters to show router as Running
706706

@@ -759,6 +759,7 @@ def test_01_RouterStopCreatePF(self):
759759
True,
760760
"Check for list public IPs response return valid data"
761761
)
762+
762763
public_ip = public_ips[0]
763764

764765
# Open up firewall port for SSH
@@ -823,12 +824,11 @@ def test_01_RouterStopCreatePF(self):
823824

824825
self.debug("SSH into VM with ID: %s" % nat_rule.ipaddress)
825826

826-
self.vm_1.ssh_port = nat_rule.publicport
827-
self.vm_1.get_ssh_client(nat_rule.ipaddress)
827+
self.vm_1.get_ssh_client(ipaddress=nat_rule.ipaddress, port=self.services["natrule"]["publicport"])
828828
except Exception as e:
829829
self.fail(
830830
"SSH Access failed for %s: %s" % \
831-
(self.vm_1.ipaddress, e)
831+
(nat_rule.ipaddress, e)
832832
)
833833
return
834834

@@ -905,10 +905,10 @@ def test_01_RouterStopCreateLB(self):
905905
"""
906906
# validate the following
907907
# 1. listLoadBalancerRules (publicipid=ipaddressid of source NAT)
908-
# 2. rule should be for port 2222 as applied and
908+
# 2. rule should be for port 22 as applied and
909909
# should be in state=Active
910910
# 3. ssh access should be allowed to the userVMs over the source NAT IP
911-
# and port 2222
911+
# and port 22
912912

913913
# Get router details associated for that account
914914
routers = list_routers(

0 commit comments

Comments
 (0)