cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tall...@apache.org
Subject git commit: updated refs/heads/master to ef9e2a9
Date Thu, 24 Apr 2014 09:37:40 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master d1658c428 -> ef9e2a936


Fixed issues in CLOUDSTACK-6489

Fixed issues for CLOUDSTACK-6489
Along with fixed few indent issues.

Signed-off-by: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>


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

Branch: refs/heads/master
Commit: ef9e2a9367d4990631209322cdc9516fa8c91c28
Parents: d1658c4
Author: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
Authored: Thu Apr 24 20:16:35 2014 +0530
Committer: SrikanteswaraRao Talluri <talluri@apache.org>
Committed: Thu Apr 24 15:02:49 2014 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_deploy_vm.py      |  4 --
 test/integration/smoke/test_disk_offerings.py | 12 ------
 test/integration/smoke/test_volumes.py        |  6 ---
 tools/marvin/marvin/config/test_data.py       | 24 ++++++++++++
 tools/marvin/marvin/marvinInit.py             |  7 +++-
 tools/marvin/marvin/marvinLog.py              | 12 ++++--
 tools/marvin/marvin/marvinPlugin.py           | 43 ++++++++++++++--------
 7 files changed, 66 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ef9e2a93/test/integration/smoke/test_deploy_vm.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_deploy_vm.py b/test/integration/smoke/test_deploy_vm.py
index 6a8d8e2..5cc00d0 100644
--- a/test/integration/smoke/test_deploy_vm.py
+++ b/test/integration/smoke/test_deploy_vm.py
@@ -34,10 +34,6 @@ from marvin.lib.common import get_zone, get_domain, get_template
 
 from nose.plugins.attrib import attr
 
-            "virtual_machine3" : {
-                "name" : "testvm3",
-                "displayname" : "Test VM3",
-            },
 class TestDeployVM(cloudstackTestCase):
     """Test deploy a VM into a user account
     """

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ef9e2a93/test/integration/smoke/test_disk_offerings.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_disk_offerings.py b/test/integration/smoke/test_disk_offerings.py
index 42c950b..780c154 100644
--- a/test/integration/smoke/test_disk_offerings.py
+++ b/test/integration/smoke/test_disk_offerings.py
@@ -27,18 +27,6 @@ from nose.plugins.attrib import attr
 
 _multiprocess_shared_ = True
 
-                         "sparse": {
-                                        "name": "Sparse Type Disk offering",
-                                        "displaytext": "Sparse Type Disk offering",
-                                        "disksize": 1,   # in GB
-                                        "provisioningtype" : "sparse"
-                                },
-                                 "fat": {
-                                        "name": "Fat Type Disk offering",
-                                        "displaytext": "Fat Type Disk offering",
-                                        "disksize": 1,   # in GB
-                                        "provisioningtype" : "fat"
-                                }
 class TestCreateDiskOffering(cloudstackTestCase):
 
     def setUp(self):

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ef9e2a93/test/integration/smoke/test_volumes.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_volumes.py b/test/integration/smoke/test_volumes.py
index 127a721..ecce6e3 100644
--- a/test/integration/smoke/test_volumes.py
+++ b/test/integration/smoke/test_volumes.py
@@ -35,12 +35,6 @@ import tempfile
 
 _multiprocess_shared_ = True
 
-                        "sparse_disk_offering": {
-                                    "displaytext": "Sparse",
-                                    "name": "Sparse",
-                                    "provisioningtype": "sparse",
-                                    "disksize": 1
-                        },
 class TestCreateVolume(cloudstackTestCase):
 
     @classmethod

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ef9e2a93/tools/marvin/marvin/config/test_data.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/config/test_data.py b/tools/marvin/marvin/config/test_data.py
index 711227c..eb5ce26 100644
--- a/tools/marvin/marvin/config/test_data.py
+++ b/tools/marvin/marvin/config/test_data.py
@@ -205,6 +205,10 @@ test_data = {
         "name": "testvm2",
         "displayname": "Test VM2",
     },
+    "virtual_machine3": {
+        "name": "testvm3",
+        "displayname": "Test VM3",
+    },
     "server_without_disk": {
         "displayname": "Test VM-No Disk",
         "username": "root",
@@ -586,5 +590,25 @@ test_data = {
         "startip": "10.223.252.196",
         "endip": "10.223.252.197",
         "vlan": "1001"
+    },
+    "sparse": {
+        "name": "Sparse Type Disk offering",
+        "displaytext":
+        "Sparse Type Disk offering",
+        "disksize": 1,   # in GB
+        "provisioningtype": "sparse"
+    },
+    "fat": {
+        "name": "Fat Type Disk offering",
+        "displaytext":
+        "Fat Type Disk offering",
+        "disksize": 1,   # in GB
+        "provisioningtype": "fat"
+    },
+    "sparse_disk_offering": {
+        "displaytext": "Sparse",
+        "name": "Sparse",
+        "provisioningtype": "sparse",
+        "disksize": 1
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ef9e2a93/tools/marvin/marvin/marvinInit.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/marvinInit.py b/tools/marvin/marvin/marvinInit.py
index ba7c4de..c35fec6 100644
--- a/tools/marvin/marvin/marvinInit.py
+++ b/tools/marvin/marvin/marvinInit.py
@@ -43,7 +43,8 @@ class MarvinInit:
                  deploy_dc_flag=None,
                  test_mod_name="deploydc",
                  zone=None,
-                 hypervisor_type=None):
+                 hypervisor_type=None,
+                 user_logfolder_path=None):
         self.__configFile = config_file
         self.__deployFlag = deploy_dc_flag
         self.__logFolderPath = None
@@ -55,6 +56,7 @@ class MarvinInit:
         self.__zoneForTests = zone
         self.__parsedConfig = None
         self.__hypervisorType = hypervisor_type
+        self.__userLogFolderPath = user_logfolder_path
 
     def __parseConfig(self):
         '''
@@ -162,7 +164,8 @@ class MarvinInit:
             if log_obj:
                 ret = log_obj.\
                     createLogs(self.__testModName,
-                               self.__parsedConfig.logger)
+                               self.__parsedConfig.logger,
+                               self.__userLogFolderPath)
                 if ret != FAILED:
                     self.__logFolderPath = log_obj.getLogFolderPath()
                     self.__tcRunLogger = log_obj.getLogger()

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ef9e2a93/tools/marvin/marvin/marvinLog.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/marvinLog.py b/tools/marvin/marvin/marvinLog.py
index 6168987..65687aa 100644
--- a/tools/marvin/marvin/marvinLog.py
+++ b/tools/marvin/marvin/marvinLog.py
@@ -127,7 +127,8 @@ class MarvinLog:
 
     def createLogs(self,
                    test_module_name=None,
-                   log_cfg=None):
+                   log_cfg=None,
+                   user_provided_logpath=None):
         '''
         @Name : createLogs
         @Desc : Gets the Logger with file paths initialized and created
@@ -135,6 +136,10 @@ class MarvinLog:
                  creating log folder path
                  log_cfg: Log Configuration provided inside of
                  Configuration
+                 user_provided_logpath:LogPath provided by user
+                                       If user provided log path
+                                       is available, then one in cfg
+                                       will  not be picked up.
         @Output : SUCCESS\FAILED
         '''
         try:
@@ -146,8 +151,9 @@ class MarvinLog:
                 temp_path = str(test_module_name) + \
                     "__" + str(temp_ts) + "_" + random_gen()
 
-            temp_dir = "MarvinLogs"
-            if ((log_cfg is not None) and
+            if user_provided_logpath:
+                temp_dir = user_provided_logpath
+            elif ((log_cfg is not None) and
                     ('LogFolderPath' in log_cfg.__dict__.keys()) and
                     (log_cfg.__dict__.get('LogFolderPath') is not None)):
                 temp_dir = \

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ef9e2a93/tools/marvin/marvin/marvinPlugin.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/marvinPlugin.py b/tools/marvin/marvin/marvinPlugin.py
index ae839e8..4200a65 100644
--- a/tools/marvin/marvin/marvinPlugin.py
+++ b/tools/marvin/marvin/marvinPlugin.py
@@ -64,6 +64,10 @@ class MarvinPlugin(Plugin):
         self.__tcRunLogger = None
         self.__testModName = ''
         self.__hypervisorType = None
+        '''
+        The Log Path provided by user where all logs are routed to
+        '''
+        self.__userLogPath = None
         Plugin.__init__(self)
 
     def configure(self, options, conf):
@@ -81,6 +85,7 @@ class MarvinPlugin(Plugin):
         self.__deployDcFlag = options.deployDc
         self.__zoneForTests = options.zone
         self.__hypervisorType = options.hypervisor_type
+        self.__userLogPath = options.logFolder
         self.conf = conf
         if self.startMarvin() == FAILED:
             print "\nStarting Marvin Failed, exiting. Please Check"
@@ -112,6 +117,12 @@ class MarvinPlugin(Plugin):
                           dest="hypervisor_type",
                           help="Runs all tests against the specified "
                                "zone and hypervisor Type")
+        parser.add_option("--log-folder-path", action="store",
+                          default=None,
+                          dest="logFolder",
+                          help="Collects all logs under the user specified"
+                               "folder"
+                          )
         Plugin.options(self, parser, env)
 
     def wantClass(self, cls):
@@ -221,7 +232,8 @@ class MarvinPlugin(Plugin):
                                         self.__deployDcFlag,
                                         None,
                                         self.__zoneForTests,
-                                        self.__hypervisorType)
+                                        self.__hypervisorType,
+                                        self.__userLogPath)
             if obj_marvininit and obj_marvininit.init() == SUCCESS:
                 self.__testClient = obj_marvininit.getTestClient()
                 self.__tcRunLogger = obj_marvininit.getLogger()
@@ -275,20 +287,21 @@ class MarvinPlugin(Plugin):
 
     def finalize(self, result):
         try:
-            src = self.__logFolderPath
-            log_cfg = self.__parsedConfig.logger
-            tmp = log_cfg.__dict__.get('LogFolderPath') + "/MarvinLogs"
-            dst = tmp + "//" + random_gen()
-            mod_name = "test_suite"
-            if self.__testModName:
-                mod_name = self.__testModName.split(".")
-                if len(mod_name) > 2:
-                    mod_name = mod_name[-2]
-            if mod_name:
-                dst = tmp + "/" + mod_name + "_" + random_gen()
-            cmd = "mv " + src + " " + dst
-            os.system(cmd)
-            print "===final results are now copied to: %s===" % str(dst)
+            if not self.__userLogPath:
+                src = self.__logFolderPath
+                log_cfg = self.__parsedConfig.logger
+                tmp = log_cfg.__dict__.get('LogFolderPath') + "/MarvinLogs"
+                dst = tmp + "//" + random_gen()
+                mod_name = "test_suite"
+                if self.__testModName:
+                    mod_name = self.__testModName.split(".")
+                    if len(mod_name) > 2:
+                        mod_name = mod_name[-2]
+                if mod_name:
+                    dst = tmp + "/" + mod_name + "_" + random_gen()
+                cmd = "mv " + src + " " + dst
+                os.system(cmd)
+                print "===final results are now copied to: %s===" % str(dst)
         except Exception, e:
             print "=== Exception occurred under finalize :%s ===" % \
                   str(GetDetailExceptionInfo(e))


Mime
View raw message