You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/07/30 16:42:36 UTC
git commit: updated refs/heads/master to 906ea82
Updated Branches:
refs/heads/master 6cbcd9777 -> 906ea8257
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 <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/906ea825
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/906ea825
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/906ea825
Branch: refs/heads/master
Commit: 906ea82572ad51b093b06369e9d6e3eabf777492
Parents: 6cbcd97
Author: Gaurav Aradhye <ga...@clogeny.com>
Authored: Mon Jul 29 20:19:54 2013 -0400
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Tue Jul 30 20:12:23 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/906ea825/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):