cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tall...@apache.org
Subject [59/60] [abbrv] Merge branch 'master' into marvin
Date Tue, 08 Apr 2014 12:26:14 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_accounts.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_affinity_groups.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_allocation_states.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_base_image_updation.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_blocker_bugs.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_cpu_domain_limits.py
----------------------------------------------------------------------
diff --cc test/integration/component/test_cpu_domain_limits.py
index 7421559,c0bd9e7..6cca7c8
--- a/test/integration/component/test_cpu_domain_limits.py
+++ b/test/integration/component/test_cpu_domain_limits.py
@@@ -27,13 -27,14 +27,14 @@@ from marvin.lib.base import 
                                          Resources,
                                          Domain
                                          )
 -from marvin.integration.lib.common import (get_domain,
 +from marvin.lib.common import (get_domain,
                                          get_zone,
                                          get_template,
-                                         find_suitable_host,
+                                         findSuitableHostForMigration,
                                          get_resource_type
                                          )
 -from marvin.integration.lib.utils import cleanup_resources
 +from marvin.lib.utils import cleanup_resources
+ from marvin.codes import ERROR_NO_HOST_FOR_MIGRATION
  
  class Services:
      """Test resource limit services

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_cpu_limits.py
----------------------------------------------------------------------
diff --cc test/integration/component/test_cpu_limits.py
index 12b0790,9868bf2..2cf92f8
--- a/test/integration/component/test_cpu_limits.py
+++ b/test/integration/component/test_cpu_limits.py
@@@ -27,13 -27,14 +27,14 @@@ from marvin.lib.base import 
                                          Domain,
                                          Resources
                                          )
 -from marvin.integration.lib.common import (get_domain,
 +from marvin.lib.common import (get_domain,
                                          get_zone,
                                          get_template,
-                                         find_suitable_host,
+                                         findSuitableHostForMigration,
                                          get_resource_type
                                          )
 -from marvin.integration.lib.utils import cleanup_resources
 +from marvin.lib.utils import cleanup_resources
+ from marvin.codes import ERROR_NO_HOST_FOR_MIGRATION
  
  
  class Services:

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_cpu_max_limits.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_cpu_project_limits.py
----------------------------------------------------------------------
diff --cc test/integration/component/test_cpu_project_limits.py
index f038fb4,8a355cf..b33b9f1
--- a/test/integration/component/test_cpu_project_limits.py
+++ b/test/integration/component/test_cpu_project_limits.py
@@@ -27,13 -27,14 +27,14 @@@ from marvin.lib.base import 
                                          Domain,
                                          Project
                                          )
 -from marvin.integration.lib.common import (get_domain,
 +from marvin.lib.common import (get_domain,
                                          get_zone,
                                          get_template,
-                                         find_suitable_host,
+                                         findSuitableHostForMigration,
                                          get_resource_type
                                          )
 -from marvin.integration.lib.utils import cleanup_resources
 +from marvin.lib.utils import cleanup_resources
+ from marvin.codes import ERROR_NO_HOST_FOR_MIGRATION
  
  class Services:
      """Test resource limit services

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_custom_hostname.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_deploy_vm_userdata_reg.py
----------------------------------------------------------------------
diff --cc test/integration/component/test_deploy_vm_userdata_reg.py
index 0fd7a06,912c917..1c9f35c
--- a/test/integration/component/test_deploy_vm_userdata_reg.py
+++ b/test/integration/component/test_deploy_vm_userdata_reg.py
@@@ -100,12 -99,8 +100,12 @@@ class TestDeployVmWithUserData(cloudsta
          cls.user_data_2kl = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(1900))
  
  
 +    def setUp(self):
 +        self.apiClient = self.testClient.getApiClient()
 +        self.hypervisor = self.testClient.getHypervisorInfo()
 +
  
-     @attr(tags=["simulator", "devcloud", "basic", "advanced"])
+     @attr(tags=["simulator", "devcloud", "basic", "advanced", "provisioning"])
      def test_deployvm_userdata_post(self):
          """Test userdata as POST, size > 2k
          """

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_egress_fw_rules.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_explicit_dedication.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_haproxy.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_implicit_planner.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_ip_reservation.py
----------------------------------------------------------------------
diff --cc test/integration/component/test_ip_reservation.py
index 79ca409,46b4edb..58f9321
mode 100755,100644..100644
--- a/test/integration/component/test_ip_reservation.py
+++ b/test/integration/component/test_ip_reservation.py
@@@ -15,109 -15,99 +15,80 @@@
  # specific language governing permissions and limitations
  # under the License.
  """ Tests for IP reservation feature
+ 
+     Test Plan: https://cwiki.apache.org/confluence/display/CLOUDSTACK/IP+Range+Reservation+within+a+Network+Test+Cases
+ 
+     Issue Link: https://issues.apache.org/jira/browse/CLOUDSTACK-2266
+ 
+     Feature Specifications: https://cwiki.apache.org/confluence/display/CLOUDSTACK/FS+-+IP+Range+Reservation+within+a+Network
  """
- import marvin
- from marvin.cloudstackTestCase import *
- from marvin.cloudstackAPI import *
+ from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+ from marvin.integration.lib.utils import (cleanup_resources,
+                                           validateList,
 -                                          verifyRouterState)
 -from marvin.integration.lib.base import (Network,
 -                                         Account,
 -                                         ServiceOffering,
 -                                         VirtualMachine,
 -                                         Router,
 -                                         NetworkOffering,
 -                                         VpcOffering,
 -                                         VPC)
 -from marvin.integration.lib.common import (get_domain,
 -                                            get_zone,
 -                                            get_template,
 -                                            createEnabledNetworkOffering,
 -                                            get_free_vlan,
 -                                            wait_for_cleanup,
 -                                            createNetworkRulesForVM)
 -from marvin.codes import (PASS,
 -                          NAT_RULE,
 -                          STATIC_NAT_RULE,
 -                          FAIL,
 -                          UNKNOWN,
 -                          FAULT,
 -                          MASTER)
 +from marvin.cloudstackException import CloudstackAPIException
 +from marvin.lib.utils import *
 +from marvin.lib.base import *
 +from marvin.lib.common import *
  import netaddr
  
+ import random
  from nose.plugins.attrib import attr
+ from ddt import ddt, data
  
- class Services(object):
-     """Test IP Reservation
-     """
-     def __init__(self):
-         self.services = {
-                         "account": {
-                                     "email": "test@test.com",
-                                     "firstname": "Test",
-                                     "lastname": "User",
-                                     "username": "test",
-                                     # Random characters are appended for unique
-                                     # username
-                                     "password": "password",
-                         },
-                         "service_offering": {
-                                     "name": "Tiny Instance ",
-                                     "displaytext": "Tiny Instance",
-                                     "cpunumber": 1,
-                                     "cpuspeed": 200,  # in MHz
-                                     "memory": 256,  # In MBs
-                         },
-                         "isolated_network_offering": {
-                                     "name": 'Network offering for Isolated Network',
-                                     "displaytext": 'Network offering-DA services',
-                                     "guestiptype": 'Isolated',
-                                     "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat',
-                                     "traffictype": 'GUEST',
-                                     "availability": 'Optional',
-                                     "serviceProviderList": {
-                                             "Dhcp": 'VirtualRouter',
-                                             "Dns": 'VirtualRouter',
-                                             "SourceNat": 'VirtualRouter',
-                                             "PortForwarding": 'VirtualRouter',
-                                             "Vpn": 'VirtualRouter',
-                                             "Firewall": 'VirtualRouter',
-                                             "Lb": 'VirtualRouter',
-                                             "UserData": 'VirtualRouter',
-                                             "StaticNat": 'VirtualRouter',
-                                         },
-                          },
-                          "isolated_persistent_network_offering": {
-                                     "name": 'Network offering for Isolated Network',
-                                     "displaytext": 'Network offering-DA services',
-                                     "guestiptype": 'Isolated',
-                                     "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat',
-                                     "traffictype": 'GUEST',
-                                     "availability": 'Optional',
-                                     "ispersistent": 'True',
-                                     "serviceProviderList": {
-                                             "Dhcp": 'VirtualRouter',
-                                             "Dns": 'VirtualRouter',
-                                             "SourceNat": 'VirtualRouter',
-                                             "PortForwarding": 'VirtualRouter',
-                                             "Vpn": 'VirtualRouter',
-                                             "Firewall": 'VirtualRouter',
-                                             "Lb": 'VirtualRouter',
-                                             "UserData": 'VirtualRouter',
-                                             "StaticNat": 'VirtualRouter',
-                                         },
-                          },
-                          "isolated_network": {
-                                   "name": "Isolated Network",
-                                   "displaytext": "Isolated Network",
-                                   "netmask": "255.255.255.0",
-                                   "gateway": "10.1.1.1"
-                          },
-                          # update CIDR according to netmask and gateway in isolated_network
-                          "isolated_network_cidr": "10.1.1.0/24",
-                          "virtual_machine": {
-                                     "displayname": "Test VM",
-                                 },
-                          "ostype": 'CentOS 5.3 (64-bit)',
-                          # Cent OS 5.3 (64 bit)
-                          "sleep": 90,
-                          "timeout": 10,
-                          "mode": 'advanced'
-                     }
+ def createIsolatedNetwork(self, network_offering_id, gateway=None):
+     """Create isolated network with given network offering and gateway if provided
+     and return"""
+     try:
+         isolated_network = Network.create(self.apiclient, self.testData["isolated_network"],
+                          networkofferingid=network_offering_id,accountid=self.account.name,
+                          domainid=self.domain.id,zoneid=self.zone.id,
+                          gateway=gateway, netmask='255.255.255.0' if gateway else None)
+     except Exception as e:
+         return [FAIL, e]
+     return [PASS, isolated_network]
+ 
+ def matchNetworkGuestVmCIDR(self, networkid, guestvmcidr):
+     """List networks with given network id and check if the guestvmcidr matches
+     with the given cidr"""
+ 
+     networks = Network.list(self.apiclient, id=networkid, listall=True)
+     self.assertEqual(validateList(networks)[0], PASS, "network list validation failed")
+     self.assertEqual(str(networks[0].cidr), guestvmcidr, "guestvmcidr of network %s \
+                 does not match with the given value %s" % (networks[0].cidr, guestvmcidr))
  
+     return
  
+ def createVirtualMachine(self, network_id=None, ip_address=None):
+     """Create and return virtual machine within network and ipaddress"""
+     virtual_machine = VirtualMachine.create(self.apiclient,
+                                             self.testData["virtual_machine"],
+                                             networkids=network_id,
+                                             serviceofferingid=self.service_offering.id,
+                                             accountid=self.account.name,
+                                             domainid=self.domain.id,
+                                             ipaddress=ip_address)
+     return virtual_machine
+ 
+ def CreateEnabledNetworkOffering(apiclient, networkServices):
+     """Create network offering of given test data and enable it"""
+ 
+     result = createEnabledNetworkOffering(apiclient, networkServices)
+     assert result[0] == PASS, "Network offering creation/enabling failed due to %s" % result[2]
+     return result[1]
+ 
+ @ddt
  class TestIpReservation(cloudstackTestCase):
      """Test IP Range Reservation with a Network
      """
      @classmethod
      def setUpClass(cls):
-         cls.testClient = super(TestIpReservation, cls).getClsTestClient()
-         cls.api_client = cls.testClient.getApiClient()
- 
-         cls.services = Services().services
+         cloudstackTestClient = super(TestIpReservation, cls).getClsTestClient()
+         cls.api_client = cloudstackTestClient.getApiClient()
+         # Fill test data from the external config file
+         cls.testData = cloudstackTestClient.getConfigParser().parsedDict
          # Get Zone, Domain and templates
 -        cls.domain = get_domain(cls.api_client, cls.testData)
 -        cls.zone = get_zone(cls.api_client, cls.testData)
 +        cls.domain = get_domain(cls.api_client)
 +        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
          cls.template = get_template(
                              cls.api_client,
                              cls.zone.id,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_ldap.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_memory_limits.py
----------------------------------------------------------------------
diff --cc test/integration/component/test_memory_limits.py
index 0e00df4,020f89b..5dd3ba0
--- a/test/integration/component/test_memory_limits.py
+++ b/test/integration/component/test_memory_limits.py
@@@ -30,10 -30,11 +30,11 @@@ from marvin.lib.common import (get_doma
                                          get_zone,
                                          get_template,
                                          wait_for_cleanup,
-                                         find_suitable_host,
+                                         findSuitableHostForMigration,
                                          get_resource_type
                                          )
 -from marvin.integration.lib.utils import cleanup_resources
 +from marvin.lib.utils import cleanup_resources
+ from marvin.codes import ERROR_NO_HOST_FOR_MIGRATION
  
  class Services:
      """Test memory resource limit services

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_mm_domain_limits.py
----------------------------------------------------------------------
diff --cc test/integration/component/test_mm_domain_limits.py
index ed21942,0a8e98b..bc8c9ea
--- a/test/integration/component/test_mm_domain_limits.py
+++ b/test/integration/component/test_mm_domain_limits.py
@@@ -34,7 -34,8 +34,8 @@@ from marvin.lib.common import (get_doma
                                          get_resource_type,
                                          update_resource_count
                                          )
 -from marvin.integration.lib.utils import cleanup_resources
 +from marvin.lib.utils import cleanup_resources
+ from marvin.codes import ERROR_NO_HOST_FOR_MIGRATION
  
  class Services:
      """Test memory resource limit services

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_mm_max_limits.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_mm_project_limits.py
----------------------------------------------------------------------
diff --cc test/integration/component/test_mm_project_limits.py
index 1228a11,00c0ab4..593b2b6
--- a/test/integration/component/test_mm_project_limits.py
+++ b/test/integration/component/test_mm_project_limits.py
@@@ -30,10 -30,11 +30,11 @@@ from marvin.lib.common import (get_doma
                                          get_zone,
                                          get_template,
  					                    wait_for_cleanup,
-                                         find_suitable_host,
+                                         findSuitableHostForMigration,
                                          get_resource_type
                                          )
 -from marvin.integration.lib.utils import cleanup_resources
 +from marvin.lib.utils import cleanup_resources
+ from marvin.codes import ERROR_NO_HOST_FOR_MIGRATION
  
  class Services:
      """Test memory resource limit services

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_netscaler_configs.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_netscaler_nw_off.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_network_offering.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_persistent_networks.py
----------------------------------------------------------------------
diff --cc test/integration/component/test_persistent_networks.py
index 352d846,1eefad8..f08145a
--- a/test/integration/component/test_persistent_networks.py
+++ b/test/integration/component/test_persistent_networks.py
@@@ -15,127 -15,63 +15,34 @@@
  # specific language governing permissions and limitations
  # under the License.
  """ Tests for Persistent Networks without running VMs feature
- """
- import marvin
- from marvin.cloudstackTestCase import *
- from marvin.cloudstackAPI import *
 -
 -    Test Plan: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Persistent+Networks+without+a+running+VM
 -
 -    Issue Link: https://issues.apache.org/jira/browse/CLOUDSTACK-2232
 -
 -    Feature Specifications: https://cwiki.apache.org/confluence/display/CLOUDSTACK/FS+-+Persistent+Networks
 -"""
 -from marvin.cloudstackTestCase import cloudstackTestCase, unittest
 -from marvin.integration.lib.utils import (cleanup_resources,
 -                                          validateList,
 -                                          get_hypervisor_type)
 -from marvin.integration.lib.base import (Account,
 -                                         ServiceOffering,
 -                                         NetworkOffering,
 -                                         Network,
 -                                         VirtualMachine,
 -                                         PublicIPAddress,
 -                                         FireWallRule,
 -                                         Router,
 -                                         Host,
 -                                         NATRule,
 -                                         Project,
 -                                         LoadBalancerRule,
 -                                         VpcOffering,
 -                                         VPC,
 -                                         Domain,
 -                                         StaticNATRule,
 -                                         NetworkACL)
 -from marvin.integration.lib.common import (get_domain,
 -                                           get_zone,
 -                                           get_template,
 -                                           wait_for_cleanup,
 -                                           add_netscaler,
 -                                           verifyNetworkState)
 -
 +from marvin.cloudstackException import CloudstackAPIException
 +from marvin.lib.utils import *
 +from marvin.lib.base import *
 +from marvin.lib.common import *
 +import netaddr
- 
  from nose.plugins.attrib import attr
 +
- class Services(object):
-     """Test Persistent Networks without running VMs
-     """
-     def __init__(self):
-         self.services = {
-                         "account": {
-                                     "email": "test@test.com",
-                                     "firstname": "Test",
-                                     "lastname": "User",
-                                     "username": "test",
-                                     # Random characters are appended for unique
-                                     # username
-                                     "password": "password",
-                         },
-                         "service_offering": {
-                                     "name": "Tiny Instance ",
-                                     "displaytext": "Tiny Instance",
-                                     "cpunumber": 1,
-                                     "cpuspeed": 200,  # in MHz
-                                     "memory": 256,  # In MBs
-                         },
-                          "shared_persistent_network_offering": {
-                                     "name": 'Network offering for Shared Persistent Network',
-                                     "displaytext": 'Network offering-DA services',
-                                     "guestiptype": 'Shared',
-                                     "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat',
-                                     "traffictype": 'GUEST',
-                                     "availability": 'Optional',
-                                     "ispersistent": 'True',
-                                     "serviceProviderList": {
-                                             "Dhcp": 'VirtualRouter',
-                                             "Dns": 'VirtualRouter',
-                                             "SourceNat": 'VirtualRouter',
-                                             "PortForwarding": 'VirtualRouter',
-                                             "Vpn": 'VirtualRouter',
-                                             "Firewall": 'VirtualRouter',
-                                             "Lb": 'VirtualRouter',
-                                             "UserData": 'VirtualRouter',
-                                             "StaticNat": 'VirtualRouter',
-                                         },
-                          },
-                         "isolated_persistent_network_offering": {
-                                     "name": 'Network offering for Isolated Persistent Network',
-                                     "displaytext": 'Network offering-DA services',
-                                     "guestiptype": 'Isolated',
-                                     "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat',
-                                     "traffictype": 'GUEST',
-                                     "availability": 'Optional',
-                                     "ispersistent": 'True',
-                                     "serviceProviderList": {
-                                             "Dhcp": 'VirtualRouter',
-                                             "Dns": 'VirtualRouter',
-                                             "SourceNat": 'VirtualRouter',
-                                             "PortForwarding": 'VirtualRouter',
-                                             "Vpn": 'VirtualRouter',
-                                             "Firewall": 'VirtualRouter',
-                                             "Lb": 'VirtualRouter',
-                                             "UserData": 'VirtualRouter',
-                                             "StaticNat": 'VirtualRouter',
-                                         },
-                          },
-                          "isolated_network_offering": {
-                                     "name": 'Network offering for Isolated Persistent Network',
-                                     "displaytext": 'Network offering-DA services',
-                                     "guestiptype": 'Isolated',
-                                     "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat',
-                                     "traffictype": 'GUEST',
-                                     "availability": 'Optional',
-                                     "serviceProviderList": {
-                                             "Dhcp": 'VirtualRouter',
-                                             "Dns": 'VirtualRouter',
-                                             "SourceNat": 'VirtualRouter',
-                                             "PortForwarding": 'VirtualRouter',
-                                             "Vpn": 'VirtualRouter',
-                                             "Firewall": 'VirtualRouter',
-                                             "Lb": 'VirtualRouter',
-                                             "UserData": 'VirtualRouter',
-                                             "StaticNat": 'VirtualRouter',
-                                         },
-                          },
-                          "isolated_network": {
-                                   "name": "Isolated Network",
-                                   "displaytext": "Isolated Network",
-                          },
-                          "virtual_machine": {
-                                     "displayname": "Test VM",
-                                 },
-                          "ostype": 'CentOS 5.3 (64-bit)',
-                          # Cent OS 5.3 (64 bit)
-                          "sleep": 90,
-                          "timeout": 10,
-                          "mode": 'advanced'
-                     }
- 
- 
+ from marvin.codes import PASS, FAIL
+ from marvin.sshClient import SshClient
+ from ddt import ddt, data
+ import time
  
+ @ddt
  class TestPersistentNetworks(cloudstackTestCase):
      """Test Persistent Networks without running VMs
      """
  
      @classmethod
      def setUpClass(cls):
 -        cloudstackTestClient = super(TestPersistentNetworks,cls).getClsTestClient()
 -        cls.api_client = cloudstackTestClient.getApiClient()
 +        cls.testClient = super(TestPersistentNetworks, cls).getClsTestClient()
 +        cls.api_client = cls.testClient.getApiClient()
  
-         cls.services = Services().services
+         # Fill services from the external config file
+         cls.services = cloudstackTestClient.getConfigParser().parsedDict
+ 
          # Get Zone, Domain and templates
 -        cls.domain = get_domain(cls.api_client, cls.services)
 -        cls.zone = get_zone(cls.api_client, cls.services)
 +        cls.domain = get_domain(cls.api_client)
 +        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
          cls.template = get_template(
                              cls.api_client,
                              cls.zone.id,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_portable_ip.py
----------------------------------------------------------------------
diff --cc test/integration/component/test_portable_ip.py
index c67b7cc,e8bf4f5..4444d43
--- a/test/integration/component/test_portable_ip.py
+++ b/test/integration/component/test_portable_ip.py
@@@ -15,14 -15,31 +15,18 @@@
  # specific language governing permissions and limitations
  # under the License.
  """ Tests for Portable public IP Ranges feature
+ 
+     Test Plan: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Portable+IP+Test+Execution
+ 
+     Feature Specifications: https://cwiki.apache.org/confluence/display/CLOUDSTACK/portable+public+IP
  """
- from marvin.cloudstackTestCase import *
- from marvin.cloudstackAPI import *
+ from marvin.cloudstackTestCase import cloudstackTestCase
+ from marvin.integration.lib.utils import cleanup_resources
 -from marvin.integration.lib.base import (Account,
 -                                         NetworkOffering,
 -                                         ServiceOffering,
 -                                         Network,
 -                                         VirtualMachine,
 -                                         PublicIPAddress,
 -                                         FireWallRule,
 -                                         NATRule,
 -                                         PortablePublicIpRange,
 -                                         StaticNATRule)
 -from marvin.integration.lib.common import (get_zone,
 -                                           get_pod,
 -                                           get_domain,
 -                                           get_region,
 -                                           get_template,
 -                                           get_portable_ip_range_services,
 -                                           is_public_ip_in_correct_state)
 -from netaddr import IPAddress
 +from marvin.cloudstackException import CloudstackAPIException
 +from marvin.lib.utils import *
 +from marvin.lib.base import *
 +from marvin.lib.common import *
 +from netaddr import *
  from marvin.sshClient import SshClient
  
  from nose.plugins.attrib import attr

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_project_configs.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_project_limits.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_project_resources.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_project_usage.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_projects.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_recurring_snapshots.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_redundant_router_cleanups.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_redundant_router_services.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_redundant_router_upgrades.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_regions.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_regions_accounts.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_resource_limits.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_routers.py
----------------------------------------------------------------------
diff --cc test/integration/component/test_routers.py
index f1dbc85,29e2e9f..1f9f118
--- a/test/integration/component/test_routers.py
+++ b/test/integration/component/test_routers.py
@@@ -1284,9 -1264,20 +1273,20 @@@ class TestRouterStopCreateFW(cloudstack
                                 self.apiclient.connection.passwd,
                                 router.linklocalip,
                                 'iptables -t nat -L',
 -                                hypervisor=self.apiclient.hypervisor
 +                                hypervisor=self.hypervisor
                                 )
          else:
+             hosts = list_hosts(
+                         self.apiclient,
+                         id=router.hostid,
+                         )
+             self.assertEqual(
+                         isinstance(hosts, list),
+                         True,
+                         "Check for list hosts response return valid data"
+                         )
+             host = hosts[0]
+             host.user, host.passwd = get_host_credentials(self.config, host.ipaddress)
              try:
                  result = get_process_status(
                      host.ipaddress,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_shared_networks.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_snapshot_gc.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_snapshot_limits.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_snapshots.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_snapshots_improvement.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_stopped_vm.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_storage_motion.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_tags.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_templates.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_update_vm.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_usage.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_vmware_drs.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_volumes.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_vpc.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_vpc_network.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_vpc_network_lbrules.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_vpc_network_pfrules.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_vpc_network_staticnatrule.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_vpc_offerings.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_vpc_routers.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_vpc_vm_life_cycle.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_vpc_vms_deployment.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/component/test_vpn_users.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_affinity_groups.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_deploy_vm.py
----------------------------------------------------------------------
diff --cc test/integration/smoke/test_deploy_vm.py
index de04dfa,9f3633c..5ffdfc9
--- a/test/integration/smoke/test_deploy_vm.py
+++ b/test/integration/smoke/test_deploy_vm.py
@@@ -34,6 -33,43 +34,11 @@@ from marvin.lib.common import get_zone
  
  from nose.plugins.attrib import attr
  
 -class TestData(object):
 -    """Test data object that is required to create resources
 -    """
 -    def __init__(self):
 -        self.testdata = {
 -            #data to create an account
 -            "account": {
 -                "email": "test@test.com",
 -                "firstname": "Test",
 -                "lastname": "User",
 -                "username": "test",
 -                "password": "password",
 -            },
 -            #data reqd for virtual machine creation
 -            "virtual_machine" : {
 -                "name" : "testvm",
 -                "displayname" : "Test VM",
 -            },
+             #data reqd for virtual machine creation
+             "virtual_machine2" : {
+                 "name" : "testvm2",
+                 "displayname" : "Test VM2",
+             },
 -            #small service offering
 -            "service_offering": {
 -                "small": {
 -                    "name": "Small Instance",
 -                    "displaytext": "Small Instance",
 -                    "cpunumber": 1,
 -                    "cpuspeed": 100,
 -                    "memory": 256,
 -                },
 -            },
 -            "ostype": 'CentOS 5.3 (64-bit)',
 -        }
 -
 -
  class TestDeployVM(cloudstackTestCase):
      """Test deploy a VM into a user account
      """

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_deploy_vm_with_userdata.py
----------------------------------------------------------------------
diff --cc test/integration/smoke/test_deploy_vm_with_userdata.py
index aec6334,b8be83a..7616b82
--- a/test/integration/smoke/test_deploy_vm_with_userdata.py
+++ b/test/integration/smoke/test_deploy_vm_with_userdata.py
@@@ -67,10 -92,7 +67,10 @@@ class TestDeployVmWithUserData(cloudsta
          user_data = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(2500))
          cls.services["virtual_machine"]["userdata"] = user_data
  
 -    @attr(tags=["simulator", "devcloud", "basic", "advanced", "provisioning"])
 +    def setup(self):
-         self.hypervisor = self.testClient.getHypervisorInfo()
++            self.hypervisor = self.testClient.getHypervisorInfo()
 +
-     @attr(tags=["simulator", "devcloud", "basic", "advanced", "post"])
++    @attr(tags=["simulator", "devcloud", "basic", "advanced", "post", "provisioning"])
      def test_deployvm_userdata_post(self):
          """Test userdata as POST, size > 2k
          """

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_disk_offerings.py
----------------------------------------------------------------------
diff --cc test/integration/smoke/test_disk_offerings.py
index 8b4d6c4,4c8a34c..d6ef8b8
--- a/test/integration/smoke/test_disk_offerings.py
+++ b/test/integration/smoke/test_disk_offerings.py
@@@ -52,10 -65,10 +52,10 @@@ class TestCreateDiskOffering(cloudstack
          # Validate the following:
          # 1. createDiskOfferings should return valid info for new offering
          # 2. The Cloud Database contains the valid information
- 
+         """
          disk_offering = DiskOffering.create(
                                          self.apiclient,
 -                                        self.services["off"]
 +                                        self.services["disk_offering"]
                                          )
          self.cleanup.append(disk_offering)
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_global_settings.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_guest_vlan_range.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_hosts.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_internal_lb.py
----------------------------------------------------------------------
diff --cc test/integration/smoke/test_internal_lb.py
index 20deef0,875df04..d6f3477
--- a/test/integration/smoke/test_internal_lb.py
+++ b/test/integration/smoke/test_internal_lb.py
@@@ -56,13 -103,13 +56,13 @@@ class TestInternalLb(cloudstackTestCase
                            cls.account.id))
          cls.cleanup = [cls.account]
  
-     @attr(tags=["smoke", "advanced"])
+     @attr(tags=["smoke", "advanced", "provisioning"])
      def test_internallb(self):
          """Test create, delete, assign, remove of internal loadbalancer
-         """
- 
-         #1) Create and enable network offering with Internal Lb vm service
++        """   
+            #1) Create and enable network offering with Internal Lb vm service
 -        """
 +        self.networkOffering = NetworkOffering.create(self.apiclient, self.services["network_offering_internal_lb"], conservemode=False)
+         #TODO: SIMENH:modify this test to verify lb rules by sending request from another tier
 -        self.networkOffering = NetworkOffering.create(self.apiclient, self.services["network_offering"], conservemode=False)
          self.networkOffering.update(self.apiclient, state="Enabled")
  
          #2) Create VPC and network in it

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_iso.py
----------------------------------------------------------------------
diff --cc test/integration/smoke/test_iso.py
index 37990b7,5312d71..408c164
--- a/test/integration/smoke/test_iso.py
+++ b/test/integration/smoke/test_iso.py
@@@ -31,10 -31,62 +31,11 @@@ import tim
  
  _multiprocess_shared_ = True
  
 -class Services:
 -    """Test ISO Services
 -    """
 -
 -    def __init__(self):
 -        self.services = {
 -            "account": {
 -                        "email": "test@test.com",
 -                        "firstname": "Test",
 -                        "lastname": "User",
 -                        "username": "test",
 -                        # Random characters are appended in create account to 
 -                        # ensure unique username generated each time
 -                        "password": "password",
 -                },
 -            "iso_1":
 -                    {
 -                        "displaytext": "Test ISO 1",
 -                        "name": "ISO 1",
 -                        "url": "http://people.apache.org/~tsp/dummy.iso",
 -                        # Source URL where ISO is located
 -                        "isextractable": True,
 -                        "isfeatured": True,
 -                        "ispublic": True,
 -                        "ostype": "CentOS 5.3 (64-bit)",
 -                    },
 -            "iso_2":
 -                    {
 -                        "displaytext": "Test ISO 2",
 -                        "name": "ISO 2",
 -                        "url": "http://people.apache.org/~tsp/dummy.iso",
 -                        # Source URL where ISO is located
 -                        "isextractable": True,
 -                        "isfeatured": True,
 -                        "ispublic": True,
 -                        "ostype": "CentOS 5.3 (64-bit)",
 -                        "mode": 'HTTP_DOWNLOAD',
 -                        # Used in Extract template, value must be HTTP_DOWNLOAD
 -                    },
 -            "isfeatured": True,
 -            "ispublic": True,
 -            "isextractable": True,
 -            "bootable": True, # For edit template
 -            "passwordenabled": True,
 -            "sleep": 60,
 -            "timeout": 10,
 -            "ostype": "CentOS 5.3 (64-bit)",
 -            # CentOS 5.3 (64 bit)
 -        }
 -
 -
  class TestCreateIso(cloudstackTestCase):
- 
+ #TODO: SIMENH: check the existence of registered of ISO in secondary deploy a VM with registered ISO. can be added \
+ # as another test
      def setUp(self):
 -        self.services = Services().services
 +        self.services = self.testClient.getParsedTestDataConfig()
          self.apiclient = self.testClient.getApiClient()
          self.dbclient = self.testClient.getDbConnection()
          # Get Zone, Domain and templates

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_loadbalance.py
----------------------------------------------------------------------
diff --cc test/integration/smoke/test_loadbalance.py
index cf87fcc,46eb7d4..daa5fee
--- a/test/integration/smoke/test_loadbalance.py
+++ b/test/integration/smoke/test_loadbalance.py
@@@ -140,10 -208,10 +140,10 @@@ class TestLoadBalance(cloudstackTestCas
          except Exception as e:
              self.fail("%s: SSH failed for VM with IP Address: %s" %
                                      (e, ip_addr))
 -        time.sleep(self.services["lb_switch_wait"])
 +        time.sleep(10)
          return
  
-     @attr(tags = ["advanced", "advancedns", "smoke"])
+     @attr(tags = ["advanced", "advancedns", "smoke", "provisioning"])
      def test_01_create_lb_rule_src_nat(self):
          """Test to create Load balancing rule with source NAT"""
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_multipleips_per_nic.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_network.py
----------------------------------------------------------------------
diff --cc test/integration/smoke/test_network.py
index b5bdb44,2cdcfa2..a9e0c25
--- a/test/integration/smoke/test_network.py
+++ b/test/integration/smoke/test_network.py
@@@ -160,18 -231,13 +160,18 @@@ class TestPublicIP(cloudstackTestCase)
                                                id=ip_address.ipaddress.id
                                                )
          self.assertEqual(
 -                    list_pub_ip_addr_resp,
 -                    None,
 -                    "Check if disassociated IP Address is no longer available"
 -                    )
 +                            isinstance(list_pub_ip_addr_resp, list),
 +                            True,
 +                            "Check list response returns a valid list"
 +                        )
 +        self.assertEqual(
 +                            len(list_pub_ip_addr_resp),
 +                            0,
 +                            "Check if the list public ip api response is not zero"
 +                            )
          return
  
-     @attr(tags = ["advanced", "advancedns", "smoke"])
+     @attr(tags = ["advanced", "advancedns", "smoke", "selfservice"])
      def test_public_ip_user_account(self):
          """Test for Associate/Disassociate public IP address for user account"""
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_network_acl.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_nic.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_non_contigiousvlan.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_portable_publicip.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_primary_storage.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_privategw_acl.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_public_ip_range.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_pvlan.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_regions.py
----------------------------------------------------------------------
diff --cc test/integration/smoke/test_regions.py
index 5a3b212,71900b4..389f878
--- a/test/integration/smoke/test_regions.py
+++ b/test/integration/smoke/test_regions.py
@@@ -28,14 -39,12 +28,14 @@@ class TestRegions(cloudstackTestCase)
  
      @classmethod
      def setUpClass(cls):
 -        cls.api_client = super(TestRegions, cls).getClsTestClient().getApiClient()
 -        cls.services = Services().services
 -        cls.domain = get_domain(cls.api_client, cls.services)
 +        testClient = super(TestRegions, cls).getClsTestClient()
 +        cls.apiclient = testClient.getApiClient()
 +        cls.services = testClient.getParsedTestDataConfig()
 +
 +        cls.domain = get_domain(cls.apiclient)
          cls.cleanup = []
  
-     @attr(tags=["simulator", "basic", "advanced"])
+     @attr(tags=["simulator", "basic", "advanced", "selfservice"])
      def test_createRegion(self):
          """ Test for create region
          """

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_reset_vm_on_reboot.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_resource_detail.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_routers.py
----------------------------------------------------------------------
diff --cc test/integration/smoke/test_routers.py
index c7fc1c1,2bd1d5e..2aa83c3
--- a/test/integration/smoke/test_routers.py
+++ b/test/integration/smoke/test_routers.py
@@@ -95,10 -128,9 +95,10 @@@ class TestRouterServices(cloudstackTest
  
      def setUp(self):
          self.apiclient = self.testClient.getApiClient()
 +        self.hypervisor = self.testClient.getHypervisorInfo()
          return
  
-     @attr(tags = ["advanced", "basic", "sg", "smoke"])
+     @attr(tags = ["advanced", "basic", "sg", "smoke", "provisioning"])
      def test_01_router_internal_basic(self):
          """Test router internal basic zone
          """

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_scale_vm.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_secondary_storage.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_service_offerings.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_snapshots.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_ssvm.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_templates.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_vm_life_cycle.py
----------------------------------------------------------------------
diff --cc test/integration/smoke/test_vm_life_cycle.py
index 18e4bb6,7d47f70..f114ec9
--- a/test/integration/smoke/test_vm_life_cycle.py
+++ b/test/integration/smoke/test_vm_life_cycle.py
@@@ -17,19 -17,130 +17,18 @@@
  """ BVT tests for Virtual Machine Life Cycle
  """
  #Import Local Modules
- import marvin
+ from marvin.cloudstackTestCase import cloudstackTestCase
 -from marvin.cloudstackAPI import (detachIso,
 -                                  attachIso,
 -                                  recoverVirtualMachine,
 -                                  destroyVirtualMachine)
 -from marvin.integration.lib.utils import (cleanup_resources,
 -                                           validateList,
 -                                           get_hypervisor_type)
 -from marvin.integration.lib.base import (Account,
 -                                         ServiceOffering,
 -                                         VirtualMachine,
 -                                         Iso,
 -                                         Host)
 -from marvin.integration.lib.common import (get_domain,
 -                                           get_zone,
 -                                           get_template,
 -                                           list_virtual_machines,
 -                                           list_configurations,
 -                                           list_routers,
 -                                           list_isos)
 -from marvin.codes import PASS
 +from marvin.codes import FAILED
 +from marvin.cloudstackTestCase import *
 +from marvin.cloudstackAPI import *
 +from marvin.lib.utils import *
 +from marvin.lib.base import *
 +from marvin.lib.common import *
  from nose.plugins.attrib import attr
  #Import System modules
  import time
  
  _multiprocess_shared_ = True
- 
 -class Services:
 -    """Test VM Life Cycle Services
 -    """
 -
 -    def __init__(self):
 -        self.services = {
 -                "disk_offering":{
 -                    "displaytext": "Small",
 -                    "name": "Small",
 -                    "disksize": 1
 -                },
 -                "account": {
 -                    "email": "test@test.com",
 -                    "firstname": "Test",
 -                    "lastname": "User",
 -                    "username": "test",
 -                    # Random characters are appended in create account to
 -                    # ensure unique username generated each time
 -                    "password": "password",
 -                },
 -                "small":
 -                # Create a small virtual machine instance with disk offering
 -                {
 -                    "displayname": "testserver",
 -                    "username": "root", # VM creds for SSH
 -                    "password": "password",
 -                    "ssh_port": 22,
 -                    "hypervisor": 'XenServer',
 -                    "privateport": 22,
 -                    "publicport": 22,
 -                    "protocol": 'TCP',
 -                },
 -                "medium":   # Create a medium virtual machine instance
 -                {
 -                    "displayname": "testserver",
 -                    "username": "root",
 -                    "password": "password",
 -                    "ssh_port": 22,
 -                    "hypervisor": 'XenServer',
 -                    "privateport": 22,
 -                    "publicport": 22,
 -                    "protocol": 'TCP',
 -                },
 -                "service_offerings":
 -                {
 -                 "tiny":
 -                   {
 -                        "name": "Tiny Instance",
 -                        "displaytext": "Tiny Instance",
 -                        "cpunumber": 1,
 -                        "cpuspeed": 100, # in MHz
 -                        "memory": 128, # In MBs
 -                    },
 -                 "small":
 -                    {
 -                     # Small service offering ID to for change VM
 -                     # service offering from medium to small
 -                        "name": "Small Instance",
 -                        "displaytext": "Small Instance",
 -                        "cpunumber": 1,
 -                        "cpuspeed": 100,
 -                        "memory": 256,
 -                    },
 -                "medium":
 -                    {
 -                    # Medium service offering ID to for
 -                    # change VM service offering from small to medium
 -                        "name": "Medium Instance",
 -                        "displaytext": "Medium Instance",
 -                        "cpunumber": 1,
 -                        "cpuspeed": 100,
 -                        "memory": 256,
 -                    }
 -                },
 -                "iso":  # ISO settings for Attach/Detach ISO tests
 -                {
 -                    "displaytext": "Test ISO",
 -                    "name": "testISO",
 -                    "url": "http://people.apache.org/~tsp/dummy.iso",
 -                     # Source URL where ISO is located
 -                    "ostype": 'CentOS 5.3 (64-bit)',
 -                    "mode": 'HTTP_DOWNLOAD', # Downloading existing ISO
 -                },
 -                "template": {
 -                    "displaytext": "Cent OS Template",
 -                    "name": "Cent OS Template",
 -                    "passwordenabled": True,
 -                },
 -            "diskdevice": ['/dev/vdc',  '/dev/vdb', '/dev/hdb', '/dev/hdc', '/dev/xvdd', '/dev/cdrom', '/dev/sr0', '/dev/cdrom1' ],
 -            # Disk device where ISO is attached to instance
 -            "mount_dir": "/mnt/tmp",
 -            "sleep": 60,
 -            "timeout": 10,
 -            #Migrate VM to hostid
 -            "ostype": 'CentOS 5.3 (64-bit)',
 -            # CentOS 5.3 (64-bit)
 -        }
 -
  class TestDeployVM(cloudstackTestCase):
  
      @classmethod

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_vm_snapshots.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_volumes.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/test/integration/smoke/test_vpc_vpn.py
----------------------------------------------------------------------
diff --cc test/integration/smoke/test_vpc_vpn.py
index 87a8cef,0e94e25..03826e9
--- a/test/integration/smoke/test_vpc_vpn.py
+++ b/test/integration/smoke/test_vpc_vpn.py
@@@ -47,12 -123,9 +47,12 @@@ class TestVpcRemoteAccessVpn(cloudstack
              cls.zone.id,
              cls.services["ostype"]
          )
 +        if cls.template == FAILED:
 +            assert False, "get_template() failed to return template with description %s" % cls.services["ostype"]
 +
          cls.cleanup = [cls.account]
  
-     @attr(tags=["advanced"])
+     @attr(tags=["advanced", "selfservice"])
      def test_vpc_remote_access_vpn(self):
          """Test VPN in VPC"""
  
@@@ -154,12 -225,9 +154,12 @@@ class TestVpcSite2SiteVpn(cloudstackTes
              cls.zone.id,
              cls.services["ostype"]
          )
 +        if cls.template == FAILED:
 +            assert False, "get_template() failed to return template with description %s" % cls.services["ostype"]
 +
          cls.cleanup = [cls.account]
  
-     @attr(tags=["advanced"])
+     @attr(tags=["advanced", "selfservice"])
      def test_vpc_site2site_vpn(self):
          """Test VPN in VPC"""
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/tools/marvin/marvin/codes.py
----------------------------------------------------------------------
diff --cc tools/marvin/marvin/codes.py
index 2f606dc,92d6cf9..4096a44
--- a/tools/marvin/marvin/codes.py
+++ b/tools/marvin/marvin/codes.py
@@@ -47,18 -47,13 +47,28 @@@ YES = "yes
  FAILED = "FAILED"
  UNKNOWN_ERROR = "Unknown Error"
  EXCEPTION = "EXCEPTION"
 +INVALID_RESPONSE = "Invalid Response"
 +'''
 +Async Job Related Codes
 +'''
 +JOB_INPROGRESS = 0
 +JOB_SUCCEEDED = 1
 +JOB_FAILED = 2
 +JOB_CANCELLED = 3
 +'''
 +User Related Codes
 +'''
+ BASIC_ZONE = "basic"
+ ISOLATED_NETWORK = "ISOLATED"
+ SHARED_NETWORK = "SHARED"
+ VPC_NETWORK = "VPC"
+ ERROR_NO_HOST_FOR_MIGRATION = "Could not find suitable host for migration, please ensure setup has required no. of hosts"
+ NAT_RULE = "nat rule"
+ STATIC_NAT_RULE = "static nat rule"
+ UNKNOWN = "UNKNOWN"
+ FAULT = "FAULT"
+ MASTER = "MASTER"
 +ADMIN = 1
 +DOMAIN_ADMIN = 2
 +USER = 0
 +XEN_SERVER = "XenServer"

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e223d67/tools/marvin/marvin/config/config.cfg
----------------------------------------------------------------------


Mime
View raw message