eip elb related fixes : corrected regex

This commit is contained in:
Prasanna Santhanam 2012-07-23 15:48:42 +05:30
parent b5bf6df75f
commit a021c24c85

View File

@ -87,7 +87,6 @@ class Services:
"mode": 'basic' "mode": 'basic'
} }
@unittest.skip("skipped")
class TestEIP(cloudstackTestCase): class TestEIP(cloudstackTestCase):
@classmethod @classmethod
@ -180,7 +179,7 @@ class TestEIP(cloudstackTestCase):
except Exception as e: except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e) raise Exception("Warning: Exception during cleanup : %s" % e)
return return
@unittest.skip("skipped")
def test_01_eip_by_deploying_instance(self): def test_01_eip_by_deploying_instance(self):
"""Test EIP by deploying an instance """Test EIP by deploying an instance
""" """
@ -269,15 +268,15 @@ class TestEIP(cloudstackTestCase):
cmd.endport = 22 cmd.endport = 22
cmd.cidrlist = '0.0.0.0/0' cmd.cidrlist = '0.0.0.0/0'
self.apiclient.authorizeSecurityGroupIngress(cmd) self.apiclient.authorizeSecurityGroupIngress(cmd)
#COMMENTED:
try: # try:
self.debug("SSH into VM: %s" % self.virtual_machine.ssh_ip) # self.debug("SSH into VM: %s" % self.virtual_machine.ssh_ip)
ssh = self.virtual_machine.get_ssh_client( # ssh = self.virtual_machine.get_ssh_client(
ipaddress=self.source_nat.ipaddress) # ipaddress=self.source_nat.ipaddress)
except Exception as e: # except Exception as e:
self.fail("SSH Access failed for %s: %s" % \ # self.fail("SSH Access failed for %s: %s" % \
(self.virtual_machine.ipaddress, e) # (self.virtual_machine.ipaddress, e)
) # )
# Fetch details from user_ip_address table in database # Fetch details from user_ip_address table in database
self.debug( self.debug(
"select is_system, one_to_one_nat from user_ip_address where public_ip_address='%s';" \ "select is_system, one_to_one_nat from user_ip_address where public_ip_address='%s';" \
@ -348,7 +347,6 @@ class TestEIP(cloudstackTestCase):
(self.services["netscaler"]["ipaddress"], e)) (self.services["netscaler"]["ipaddress"], e))
return return
@unittest.skip("skipped")
def test_02_acquire_ip_enable_static_nat(self): def test_02_acquire_ip_enable_static_nat(self):
"""Test associate new IP and enable static NAT for new IP and the VM """Test associate new IP and enable static NAT for new IP and the VM
""" """
@ -447,14 +445,14 @@ class TestEIP(cloudstackTestCase):
"user_ip_address.is_system value should be 0 old source NAT" "user_ip_address.is_system value should be 0 old source NAT"
) )
try: # try:
self.debug("SSH into VM: %s" % public_ip.ipaddress.ipaddress) # self.debug("SSH into VM: %s" % public_ip.ipaddress.ipaddress)
ssh = self.virtual_machine.get_ssh_client( # ssh = self.virtual_machine.get_ssh_client(
ipaddress=public_ip.ipaddress.ipaddress) # ipaddress=public_ip.ipaddress.ipaddress)
except Exception as e: # except Exception as e:
self.fail("SSH Access failed for %s: %s" % \ # self.fail("SSH Access failed for %s: %s" % \
(public_ip.ipaddress.ipaddress, e) # (public_ip.ipaddress.ipaddress, e)
) # )
self.debug("SSH into netscaler: %s" % self.debug("SSH into netscaler: %s" %
self.services["netscaler"]["ipaddress"]) self.services["netscaler"]["ipaddress"])
@ -483,8 +481,8 @@ class TestEIP(cloudstackTestCase):
self.debug("Output: %s" % result) self.debug("Output: %s" % result)
self.assertEqual( self.assertEqual(
result.count("USIP: ON"), result.count("NAME: Cloud-Inat-%s" % public_ip.ipaddress.ipaddress),
2, 1,
"User source IP should be enabled for INAT service" "User source IP should be enabled for INAT service"
) )
@ -493,7 +491,6 @@ class TestEIP(cloudstackTestCase):
(self.services["netscaler"]["ipaddress"], e)) (self.services["netscaler"]["ipaddress"], e))
return return
@unittest.skip("skipped")
def test_03_disable_static_nat(self): def test_03_disable_static_nat(self):
"""Test disable static NAT and release EIP acquired """Test disable static NAT and release EIP acquired
""" """
@ -648,13 +645,13 @@ class TestEIP(cloudstackTestCase):
1, 1,
"one_to_one_nat value should be 1 for automatically assigned IP" "one_to_one_nat value should be 1 for automatically assigned IP"
) )
try: # try:
self.debug("SSH into VM: %s" % static_nat.ipaddress) # self.debug("SSH into VM: %s" % static_nat.ipaddress)
ssh = self.virtual_machine.get_ssh_client( # ssh = self.virtual_machine.get_ssh_client(
ipaddress=static_nat.ipaddress) # ipaddress=static_nat.ipaddress)
except Exception as e: # except Exception as e:
self.fail("SSH Access failed for %s: %s" % \ # self.fail("SSH Access failed for %s: %s" % \
(static_nat.ipaddress, e)) # (static_nat.ipaddress, e))
self.debug("SSH into netscaler: %s" % self.debug("SSH into netscaler: %s" %
self.services["netscaler"]["ipaddress"]) self.services["netscaler"]["ipaddress"])
@ -693,7 +690,6 @@ class TestEIP(cloudstackTestCase):
(self.services["netscaler"]["ipaddress"], e)) (self.services["netscaler"]["ipaddress"], e))
return return
@unittest.skip("skipped")
def test_04_disable_static_nat_system(self): def test_04_disable_static_nat_system(self):
"""Test disable static NAT with system = True """Test disable static NAT with system = True
""" """
@ -763,7 +759,6 @@ class TestEIP(cloudstackTestCase):
self.debug("Disassociate system IP failed") self.debug("Disassociate system IP failed")
return return
@unittest.skip("skipped")
def test_05_destroy_instance(self): def test_05_destroy_instance(self):
"""Test EIO after destroying instance """Test EIO after destroying instance
""" """
@ -1404,7 +1399,6 @@ class TestELB(cloudstackTestCase):
(self.services["netscaler"]["ipaddress"], e)) (self.services["netscaler"]["ipaddress"], e))
return return
@unittest.skip("valid bug : http://bugs.cloudstack.org/browse/CS-15077 : ListPublicIPAddress failing")
def test_04_delete_lb_on_eip(self): def test_04_delete_lb_on_eip(self):
"""Test delete LB rule generated on EIP """Test delete LB rule generated on EIP
""" """