cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gir...@apache.org
Subject git commit: updated refs/heads/4.3 to b4c4f7c
Date Sat, 21 Dec 2013 07:11:56 GMT
Updated Branches:
  refs/heads/4.3 0ddbae580 -> b4c4f7cbc


Revert "CLOUDSTACK-4780: Changes related to checking snapshot on NFS server"

This reverts commit 03811c0c46a3c74f4271b08faa8ce40a4e2598f7.


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

Branch: refs/heads/4.3
Commit: b4c4f7cbccd590d2b2d071b036a0444d3c5f2855
Parents: 0ddbae5
Author: Girish Shilamkar <girish@clogeny.com>
Authored: Sat Dec 21 12:41:29 2013 +0530
Committer: Girish Shilamkar <girish@clogeny.com>
Committed: Sat Dec 21 12:41:29 2013 +0530

----------------------------------------------------------------------
 .../component/test_add_remove_network.py        |  4 +-
 test/integration/component/test_snapshots.py    |  5 +-
 tools/marvin/marvin/integration/lib/common.py   | 68 ++++++--------------
 tools/marvin/marvin/integration/lib/utils.py    | 31 ++-------
 4 files changed, 27 insertions(+), 81 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b4c4f7cb/test/integration/component/test_add_remove_network.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_add_remove_network.py b/test/integration/component/test_add_remove_network.py
index b607ff1..f1508e1 100644
--- a/test/integration/component/test_add_remove_network.py
+++ b/test/integration/component/test_add_remove_network.py
@@ -47,12 +47,12 @@ from marvin.integration.lib.common import (get_domain,
                                         list_events,
                                         list_zones,
                                         get_free_vlan,
+                                        get_hypervisor_type,
                                         update_resource_limit
                                         )
 
 from marvin.integration.lib.utils import (validateList,
-					                      random_gen,
-                                          get_hypervisor_type)
+					                      random_gen)
 
 from marvin.cloudstackAPI import (addNicToVirtualMachine,
                                   removeNicFromVirtualMachine,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b4c4f7cb/test/integration/component/test_snapshots.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_snapshots.py b/test/integration/component/test_snapshots.py
index 17579d6..d3fac42 100644
--- a/test/integration/component/test_snapshots.py
+++ b/test/integration/component/test_snapshots.py
@@ -36,13 +36,12 @@ from marvin.integration.lib.common import   (get_domain,
                                              list_snapshots,
                                              list_templates,
                                              list_virtual_machines,
-                                             )
+                                             get_hypervisor_type)
 
 from marvin.integration.lib.utils import    (cleanup_resources,
                                              format_volume_to_ext3,
                                              random_gen,
-                                             is_snapshot_on_nfs,
-                                             get_hypervisor_type)
+                                             is_snapshot_on_nfs)
 
 from marvin.cloudstackAPI import            detachVolume
 import time

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b4c4f7cb/tools/marvin/marvin/integration/lib/common.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/common.py b/tools/marvin/marvin/integration/lib/common.py
index d23d745..096b073 100644
--- a/tools/marvin/marvin/integration/lib/common.py
+++ b/tools/marvin/marvin/integration/lib/common.py
@@ -18,56 +18,11 @@
 """
 
 #Import Local Modules
-from marvin.cloudstackAPI import (listConfigurations,
-                                  listPhysicalNetworks,
-                                  listRegions,
-                                  addNetworkServiceProvider,
-                                  updateNetworkServiceProvider,
-                                  listDomains,
-                                  listZones,
-                                  listPods,
-                                  listOsTypes,
-                                  listTemplates,
-                                  updateResourceLimit,
-                                  listRouters,
-                                  listNetworks,
-                                  listClusters,
-                                  listSystemVms,
-                                  listStoragePools,
-                                  listVirtualMachines,
-                                  listLoadBalancerRuleInstances,
-                                  listFirewallRules,
-                                  listVolumes,
-                                  listIsos,
-                                  listAccounts,
-                                  listSnapshotPolicies,
-                                  listDiskOfferings,
-                                  listVlanIpRanges,
-                                  listUsageRecords,
-                                  listNetworkServiceProviders,
-                                  listHosts,
-                                  listPublicIpAddresses,
-                                  listPortForwardingRules,
-                                  listLoadBalancerRules,
-                                  listSnapshots,
-                                  listUsers,
-                                  listEvents,
-                                  listServiceOfferings,
-                                  listVirtualRouterElements,
-                                  listNetworkOfferings,
-                                  listResourceLimits,
-                                  listVPCOfferings)
-from marvin.integration.lib.base import (Configurations,
-                                         NetScaler,
-                                         Template,
-                                         Resources,
-                                         PhysicalNetwork,
-                                         Host)
-from marvin.integration.lib.utils import (get_process_status,
-                                          xsplit)
-
+from marvin.cloudstackAPI import *
 from marvin.sshClient import SshClient
-import random
+from utils import *
+from base import *
+from marvin.codes import PASS
 
 #Import System modules
 import time
@@ -136,7 +91,7 @@ def add_netscaler(apiclient, zoneid, NSservice):
       cmd = updateNetworkServiceProvider.updateNetworkServiceProviderCmd()
       cmd.id = netscaler_provider.id
       cmd.state =  'Enabled'
-      apiclient.updateNetworkServiceProvider(cmd)
+      response = apiclient.updateNetworkServiceProvider(cmd)
 
     return netscaler
 
@@ -244,6 +199,19 @@ def get_template(apiclient, zoneid, ostype, services=None):
                                                                     ostypeid)
     return
 
+def get_hypervisor_type(apiclient):
+
+    """Return the hypervisor type of the hosts in setup"""
+
+    hosts = list_hosts(apiclient, type='Routing', listall=True)
+
+    hosts_list_validation_result = validateList(hosts)
+
+    assert hosts_list_validation_result[0] == PASS, "host list validation failed"
+
+    return hosts_list_validation_result[1].hypervisor
+
+
 def download_systemplates_sec_storage(server, services):
     """Download System templates on sec storage"""
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b4c4f7cb/tools/marvin/marvin/integration/lib/utils.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/utils.py b/tools/marvin/marvin/integration/lib/utils.py
index 25ebe28..d046235 100644
--- a/tools/marvin/marvin/integration/lib/utils.py
+++ b/tools/marvin/marvin/integration/lib/utils.py
@@ -28,13 +28,10 @@ import email
 import socket
 import urlparse
 import datetime
-from marvin.cloudstackAPI import cloudstackAPIClient, listHosts
+from marvin.cloudstackAPI import *
 from marvin.sshClient import SshClient
-from marvin.codes import (FAIL,
-                          PASS,
-                          MATCH_NOT_FOUND,
-                          INVALID_INPUT,
-                          EMPTY_LIST)
+from marvin.codes import *
+
 
 def restart_mgmt_server(server):
     """Restarts the management server"""
@@ -240,18 +237,6 @@ def xsplit(txt, seps):
         txt = txt.replace(sep, default_sep)
     return [i.strip() for i in txt.split(default_sep)]
 
-def get_hypervisor_type(apiclient):
-
-    """Return the hypervisor type of the hosts in setup"""
-
-    cmd = listHosts.listHostsCmd()
-    cmd.type = 'Routing'
-    cmd.listall = True
-    hosts = apiclient.listHosts(cmd)
-    hosts_list_validation_result = validateList(hosts)
-    assert hosts_list_validation_result[0] == PASS, "host list validation failed"
-    return hosts_list_validation_result[1].hypervisor
-
 def is_snapshot_on_nfs(apiclient, dbconn, config, zoneid, snapshotid):
     """
     Checks whether a snapshot with id (not UUID) `snapshotid` is present on the nfs storage
@@ -263,12 +248,8 @@ def is_snapshot_on_nfs(apiclient, dbconn, config, zoneid, snapshotid):
     @param snapshotid: uuid of the snapshot
     @return: True if snapshot is found, False otherwise
     """
-    # snapshot extension to be appended to the snapshot path obtained from db
-    snapshot_extensions = {"vmware": ".ovf",
-                            "kvm": "",
-                            "xenserver": ".vhd"}
 
-    from base import ImageStore
+    from base import ImageStore, Snapshot
     secondaryStores = ImageStore.list(apiclient, zoneid=zoneid)
 
     assert isinstance(secondaryStores, list), "Not a valid response for listImageStores"
@@ -300,9 +281,7 @@ def is_snapshot_on_nfs(apiclient, dbconn, config, zoneid, snapshotid):
         #Snapshot does not exist
         return False
 
-    hypervisor = get_hypervisor_type(apiclient)
-    # append snapshot extension based on hypervisor, to the snapshot path
-    snapshotPath = str(qresultset[0][0]) + snapshot_extensions[str(hypervisor).lower()]
+    snapshotPath = qresultset[0][0]
 
     nfsurl = secondaryStore.url
     from urllib2 import urlparse


Mime
View raw message