Updated Branches:
  refs/heads/master 6aca7de29 -> db2ea0a16

CLOUDSTACK-5204: test_routers - fixed ssh issue


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/db2ea0a1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/db2ea0a1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/db2ea0a1

Branch: refs/heads/master
Commit: db2ea0a16a1eac0a76318250355f4575c0681a29
Parents: 6aca7de
Author: Ashutosh K <ashut...@clogeny.com>
Authored: Thu Nov 21 11:06:34 2013 +0530
Committer: Girish Shilamkar <gir...@clogeny.com>
Committed: Thu Nov 21 11:06:34 2013 +0530

----------------------------------------------------------------------
 test/integration/component/test_routers.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/db2ea0a1/test/integration/component/test_routers.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_routers.py 
b/test/integration/component/test_routers.py
index b41cc6f..5f1ebc6 100644
--- a/test/integration/component/test_routers.py
+++ b/test/integration/component/test_routers.py
@@ -70,7 +70,7 @@ class Services:
                         "natrule":
                                 {
                                     "privateport": 22,
-                                    "publicport": 222,
+                                    "publicport": 22,
                                     "protocol": "TCP"
                                 },
                          "lbrule":
@@ -79,7 +79,7 @@ class Services:
                                     "alg": "roundrobin",
                                     # Algorithm used for load balancing
                                     "privateport": 22,
-                                    "publicport": 2222,
+                                    "publicport": 22,
                                     "protocol": 'TCP',
                                 },
                          "fw_rule": {
@@ -700,7 +700,7 @@ class TestRouterStopCreatePF(cloudstackTestCase):
         # 4. listPublicIpAddresses account=user, domainid=1 - pick ipaddressid
         # 5. createPortForwardingRule (ipaddressid from step 5.)
         #    a. for port 22 (ssh) for user VM deployed in step 1.
-        #    b. public port 222 , private port 22
+        #    b. public port 22 , private port 22
         # 6. startRouter stopped for this account
         # 7. wait for listRouters to show router as Running
 
@@ -759,6 +759,7 @@ class TestRouterStopCreatePF(cloudstackTestCase):
                         True,
                         "Check for list public IPs response return valid data"
                         )
+
         public_ip = public_ips[0]
 
         # Open up firewall port for SSH
@@ -823,12 +824,11 @@ class TestRouterStopCreatePF(cloudstackTestCase):
 
             self.debug("SSH into VM with ID: %s" % nat_rule.ipaddress)
 
-            self.vm_1.ssh_port = nat_rule.publicport
-            self.vm_1.get_ssh_client(nat_rule.ipaddress)
+            self.vm_1.get_ssh_client(ipaddress=nat_rule.ipaddress, 
port=self.services["natrule"]["publicport"])
         except Exception as e:
             self.fail(
                       "SSH Access failed for %s: %s" % \
-                      (self.vm_1.ipaddress, e)
+                      (nat_rule.ipaddress, e)
                       )
         return
 
@@ -905,10 +905,10 @@ class TestRouterStopCreateLB(cloudstackTestCase):
         """
         # validate the following
         # 1. listLoadBalancerRules (publicipid=ipaddressid of source NAT)
-        # 2. rule should be for port 2222 as applied and
+        # 2. rule should be for port 22 as applied and
         #    should be in state=Active
         # 3. ssh access should be allowed to the userVMs over the source NAT IP
-        #    and port 2222
+        #    and port 22
 
         # Get router details associated for that account
         routers = list_routers(

Reply via email to