cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject git commit: updated refs/heads/4.2 to 6ec4e57
Date Tue, 30 Jul 2013 14:42:12 GMT
Updated Branches:
  refs/heads/4.2 8392a6eec -> 6ec4e5722


CLOUDSTACK-3168: Fix test_reboot_router.py to ssh using public IP

test_reboot_router.py was trying to ssh to vm using private IP
and hence it failed with error "No route to host."
Fixed the testcase to ssh using public IP.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit 003721a085210afe167fbc734abe4cc8e2d3d23f)


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

Branch: refs/heads/4.2
Commit: 6ec4e5722807b0cdf75104ed61889f1e56efae02
Parents: 8392a6e
Author: Gaurav Aradhye <gaurav.aradhye@clogeny.com>
Authored: Mon Jul 29 20:19:54 2013 -0400
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Tue Jul 30 20:10:12 2013 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_network.py | 47 +++++++++++++++--------------
 1 file changed, 25 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6ec4e572/test/integration/smoke/test_network.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py
index dad5630..77cb2ea 100644
--- a/test/integration/smoke/test_network.py
+++ b/test/integration/smoke/test_network.py
@@ -635,21 +635,21 @@ class TestRebootRouter(cloudstackTestCase):
             raise Exception("Warning: Exception during fetching source NAT: %s" % e)
 
         self.public_ip = PublicIPAddress.create(
-                                           self.apiclient,
-                                           self.vm_1.account,
-                                           self.vm_1.zoneid,
-                                           self.vm_1.domainid,
-                                           self.services["server"]
-                                           )
-        # Open up firewall port for SSH        
+                                            self.apiclient,
+                                            self.vm_1.account,
+                                            self.vm_1.zoneid,
+                                            self.vm_1.domainid,
+                                            self.services["server"]
+                                            )
+        #Open up firewall port for SSH
         fw_rule = FireWallRule.create(
-                            self.apiclient,
-                            ipaddressid=self.public_ip.ipaddress.id,
-                            protocol=self.services["lbrule"]["protocol"],
-                            cidrlist=['0.0.0.0/0'],
-                            startport=self.services["lbrule"]["publicport"],
-                            endport=self.services["lbrule"]["publicport"]
-                            )
+                             self.apiclient,
+                             ipaddressid=self.public_ip.ipaddress.id,
+                             protocol=self.services["lbrule"]["protocol"],
+                             cidrlist=['0.0.0.0/0'],
+                             startport=self.services["lbrule"]["publicport"],
+                             endport=self.services["lbrule"]["publicport"]
+                             )
 
         lb_rule = LoadBalancerRule.create(
                                             self.apiclient,
@@ -659,16 +659,16 @@ class TestRebootRouter(cloudstackTestCase):
                                         )
         lb_rule.assign(self.apiclient, [self.vm_1])
         self.nat_rule = NATRule.create(
-                                    self.apiclient,
-                                    self.vm_1,
-                                    self.services["natrule"],
-                                    ipaddressid=self.public_ip.ipaddress.id
-                                    )
+                                     self.apiclient,
+                                     self.vm_1,
+                                     self.services["natrule"],
+                                     ipaddressid=self.public_ip.ipaddress.id
+                                     )
         self.cleanup = [
                         self.vm_1,
                         lb_rule,
-                        self.service_offering,
                         self.nat_rule,
+                        self.service_offering,
                         self.account,
                         ]
         return
@@ -683,6 +683,9 @@ class TestRebootRouter(cloudstackTestCase):
         #   still works through the sourceNAT Ip
 
         #Retrieve router for the user account
+
+        self.debug("Public IP: %s" % self.vm_1.ssh_ip)
+        self.debug("Public IP: %s" % self.public_ip.ipaddress.ipaddress)
         routers = list_routers(
                                 self.apiclient,
                                 account=self.account.name,
@@ -732,7 +735,7 @@ class TestRebootRouter(cloudstackTestCase):
             self.debug("SSH into VM (ID : %s ) after reboot" % self.vm_1.id)
 
             remoteSSHClient(
-                                    self.nat_rule.ipaddress,
+                                    self.public_ip.ipaddress.ipaddress,
                                     self.services["natrule"]["publicport"],
                                     self.vm_1.username,
                                     self.vm_1.password
@@ -740,7 +743,7 @@ class TestRebootRouter(cloudstackTestCase):
         except Exception as e:
             self.fail(
                       "SSH Access failed for %s: %s" % \
-                      (self.vm_1.ipaddress, e))
+                      (self.public_ip.ipaddress.ipaddress, e))
         return
 
     def tearDown(self):


Mime
View raw message