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/24 14:35:18 UTC

[1/2] git commit: updated refs/heads/master to 64c120c

Updated Branches:
  refs/heads/master d1c882289 -> 64c120c0d


Fixing minor typos

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/64c120c0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/64c120c0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/64c120c0

Branch: refs/heads/master
Commit: 64c120c0dbe25ab8541bfcab4916043a679eb76c
Parents: 368f32f
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Wed Jul 24 18:04:11 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Wed Jul 24 18:04:29 2013 +0530

----------------------------------------------------------------------
 test/integration/component/test_shared_networks.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/64c120c0/test/integration/component/test_shared_networks.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_shared_networks.py b/test/integration/component/test_shared_networks.py
index cfe97a4..237e0bf 100644
--- a/test/integration/component/test_shared_networks.py
+++ b/test/integration/component/test_shared_networks.py
@@ -1308,10 +1308,10 @@ class TestSharedNetworks(cloudstackTestCase):
         self.assertEqual(
             list_network_offerings_response[0].state,
             "Disabled",
-            "The network offering created should be bydefault disabled."
+            "The network offering created should be by default disabled."
             )
         
-        self.debug("Network Offering created: %s" % self.shared_network_offering.id)
+        self.debug("Shared Network Offering created: %s" % self.shared_network_offering.id)
         
         #Update network offering state from disabled to enabled.
         network_offering_update_response = NetworkOffering.update(


[2/2] git commit: updated refs/heads/master to 64c120c

Posted by ts...@apache.org.
CLOUDSTACK-3698: Ensure VM is accessible before stopping VR

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/368f32fa
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/368f32fa
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/368f32fa

Branch: refs/heads/master
Commit: 368f32fa2510cf07492eceab277c9913f8032ae4
Parents: d1c8822
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Wed Jul 24 18:03:27 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Wed Jul 24 18:04:29 2013 +0530

----------------------------------------------------------------------
 .../component/test_vpc_network_pfrules.py       | 28 +++++++++++---------
 1 file changed, 15 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/368f32fa/test/integration/component/test_vpc_network_pfrules.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_network_pfrules.py b/test/integration/component/test_vpc_network_pfrules.py
index d9a045c..1e1b5cc 100644
--- a/test/integration/component/test_vpc_network_pfrules.py
+++ b/test/integration/component/test_vpc_network_pfrules.py
@@ -171,7 +171,6 @@ class Services:
                 "protocol": 'TCP',
             },
             "ostype": 'CentOS 5.3 (64-bit)',
-            "sleep": 60,
             "timeout": 10,
         }
 
@@ -212,8 +211,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
             #Cleanup resources used
             cleanup_resources(cls.api_client, cls._cleanup)
         except Exception as e:
-            print("Warning: Exception during cleanup : %s" % e)
-            #raise Exception("Warning: Exception during cleanup : %s" % e)
+            raise Exception("Warning: Exception during cleanup : %s" % e)
         return
 
 
@@ -225,14 +223,13 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
                                                 admin=True,
                                                 domainid=self.domain.id
                                                 )
-        self._cleanup = [self.account]
+        self.cleanup = [self.account]
         self.debug("Creating a VPC offering..")
         self.vpc_off = VpcOffering.create(
                                                 self.apiclient,
                                                 self.services["vpc_offering"]
                                                 )
 
-        self._cleanup.append(self.vpc_off)
         self.debug("Enabling the VPC offering created")
         self.vpc_off.update(self.apiclient, state='Enabled')
 
@@ -251,10 +248,9 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
     def tearDown(self):
         try:
             #Clean up, terminate the created network offerings
-            cleanup_resources(self.apiclient, self._cleanup)
+            cleanup_resources(self.apiclient, self.cleanup)
         except Exception as e:
             self.debug("Warning: Exception during cleanup : %s" % e)
-            #raise Exception("Warning: Exception during cleanup : %s" % e)
         return
 
     def get_vpcrouter(self):
@@ -364,7 +360,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
                                                     public_ip.ipaddress.ipaddress, e))
 
     def create_natrule(self, vm, public_ip, network, services=None):
-        self.debug("Creatinng NAT rule in network for vm with public IP")
+        self.debug("Creating NAT rule in network for vm with public IP")
         if not services:
             services = self.services["natrule"]
         nat_rule = NATRule.create(self.apiclient,
@@ -391,7 +387,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
                                         accountid=self.account.name,
                                         zoneid=self.zone.id,
                                         domainid=self.account.domainid,
-                                        networkid=None, #network.id,
+                                        networkid=network.id,
                                         vpcid=self.vpc.id
                                         )
         self.debug("Associated %s with network %s" % (public_ip.ipaddress.ipaddress,
@@ -449,8 +445,8 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
                                                 )
                 self.debug("Created network with ID: %s" % obj_network.id)
                 return obj_network
-        except:
-                self.fail('Unable to create a Network with offering=%s' % net_offerring)
+        except Exception, e:
+                self.fail('Unable to create a Network with offering=%s because of %s ' % (net_offerring, e))
 
     def deployvm_in_network(self, network, host_id=None):
         try:
@@ -522,11 +518,17 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
         network_1 = self.create_network(self.services["network_offering"])
         vm_1 = self.deployvm_in_network(network_1)
         public_ip_1 = self.acquire_publicip(network_1)
+        #ensure vm is accessible over public ip
+        nat_rule = self.create_natrule(vm_1, public_ip_1, network_1)
+        self.check_ssh_into_vm(vm_1, public_ip_1, testnegative=False)
+        #remove the nat rule
+        nat_rule.delete(self.apiclient)
+
         router = self.stop_vpcrouter()
-        self.create_natrule( vm_1, public_ip_1, network_1)
+        #recreate nat rule
+        self.create_natrule(vm_1, public_ip_1, network_1)
         self.start_vpcrouter(router)
         self.check_ssh_into_vm(vm_1, public_ip_1, testnegative=False)
-
         return
 
     @attr(tags=["advanced", "intervlan"])