You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2016/10/21 04:45:48 UTC
[01/17] git commit: updated refs/heads/4.8 to a664e03
Repository: cloudstack
Updated Branches:
refs/heads/4.8 9eb8b2e90 -> a664e035b
CLOUDSTACK-9527: Skip tests not supported for hypervisor
- test_01_test_vm_volume_snapshot not supported for Xen, tests keep failing
- Skip snapshot tests for centos6/kvm as snapshot is not supported by older
qemu-img versions
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/394f2e35
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/394f2e35
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/394f2e35
Branch: refs/heads/4.8
Commit: 394f2e359f2af9de6c7e586659fed47051f44146
Parents: dc93268
Author: Boris <bs...@gmail.com>
Authored: Mon Oct 3 17:53:51 2016 +0300
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Wed Oct 5 15:11:00 2016 +0530
----------------------------------------------------------------------
test/integration/smoke/test_snapshots.py | 2 +-
test/integration/smoke/test_vm_snapshots.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/394f2e35/test/integration/smoke/test_snapshots.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_snapshots.py b/test/integration/smoke/test_snapshots.py
index 4b1fcbd..7cd56c8 100644
--- a/test/integration/smoke/test_snapshots.py
+++ b/test/integration/smoke/test_snapshots.py
@@ -47,7 +47,7 @@ class TestSnapshotRootDisk(cloudstackTestCase):
cls.hypervisorNotSupported = False
cls.hypervisor = cls.testClient.getHypervisorInfo()
- if cls.hypervisor.lower() in ['hyperv', 'lxc']:
+ if cls.hypervisor.lower() in ['hyperv', 'lxc'] or 'kvm-centos6' in cls.testClient.getZoneForTests():
cls.hypervisorNotSupported = True
cls._cleanup = []
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/394f2e35/test/integration/smoke/test_vm_snapshots.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vm_snapshots.py b/test/integration/smoke/test_vm_snapshots.py
index 3831848..d173aa4 100644
--- a/test/integration/smoke/test_vm_snapshots.py
+++ b/test/integration/smoke/test_vm_snapshots.py
@@ -16,7 +16,7 @@
# under the License.
# Import Local Modules
-from marvin.codes import FAILED, KVM, PASS
+from marvin.codes import FAILED, KVM, PASS, XEN_SERVER
from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase
from marvin.lib.utils import random_gen, cleanup_resources, validateList, is_snapshot_on_nfs
@@ -291,7 +291,7 @@ class TestSnapshots(cloudstackTestCase):
cls.services = cls.testClient.getParsedTestDataConfig()
cls.unsupportedHypervisor = False
cls.hypervisor = cls.testClient.getHypervisorInfo()
- if cls.hypervisor.lower() in (KVM.lower(), "hyperv", "lxc"):
+ if cls.hypervisor.lower() in (KVM.lower(), "hyperv", "lxc", XEN_SERVER.lower()):
cls.unsupportedHypervisor = True
return
# Get Domain, Zone, Template
[12/17] git commit: updated refs/heads/4.8 to a664e03
Posted by bh...@apache.org.
CLOUDSTACK-9531: Try template teardown without failure
As per previous discussions and ticket, a template deletion may result in failure
(exception thrown) for templates that are not properly downloaded. The tearDown
method, a template may be tried for deletion but on failure we may ignore it
as account deletion/tearDown would retry to cleanup resource owned by the account.
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5545bcaa
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5545bcaa
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5545bcaa
Branch: refs/heads/4.8
Commit: 5545bcaa9de9ddcc2e4842dc5d2bb073897ebef2
Parents: 394f2e3
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Tue Oct 4 17:42:53 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Thu Oct 6 15:38:01 2016 +0530
----------------------------------------------------------------------
test/integration/smoke/test_internal_lb.py | 5 ++++-
test/integration/smoke/test_vpc_vpn.py | 15 ++++++++++++---
2 files changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5545bcaa/test/integration/smoke/test_internal_lb.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_internal_lb.py b/test/integration/smoke/test_internal_lb.py
index b378db9..d8a45c0 100644
--- a/test/integration/smoke/test_internal_lb.py
+++ b/test/integration/smoke/test_internal_lb.py
@@ -302,7 +302,7 @@ class TestInternalLb(cloudstackTestCase):
%s" % (cls.account.name,
cls.account.id))
- cls._cleanup = [cls.template, cls.account, cls.compute_offering]
+ cls._cleanup = [cls.account, cls.compute_offering]
return
def setUp(self):
@@ -842,6 +842,9 @@ class TestInternalLb(cloudstackTestCase):
def tearDownClass(cls):
try:
cls.logger.debug("Cleaning up class resources")
+ try:
+ cls.template.delete(cls.apiclient)
+ except Exception: pass
cleanup_resources(cls.apiclient, cls._cleanup)
except Exception as e:
raise Exception("Cleanup failed with %s" % e)
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5545bcaa/test/integration/smoke/test_vpc_vpn.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vpc_vpn.py b/test/integration/smoke/test_vpc_vpn.py
index 698cda7..a0639d5 100644
--- a/test/integration/smoke/test_vpc_vpn.py
+++ b/test/integration/smoke/test_vpc_vpn.py
@@ -299,7 +299,7 @@ class TestVpcRemoteAccessVpn(cloudstackTestCase):
%s" % (cls.account.name,
cls.account.id))
- cls.cleanup = [cls.template, cls.account, cls.compute_offering]
+ cls.cleanup = [cls.account, cls.compute_offering]
return
@attr(tags=["advanced"], required_hardware="true")
@@ -435,6 +435,9 @@ class TestVpcRemoteAccessVpn(cloudstackTestCase):
try:
cls.logger.debug("Cleaning up resources")
+ try:
+ cls.template.delete(cls.apiclient)
+ except Exception: pass
cleanup_resources(cls.apiclient, cls.cleanup)
except Exception, e:
raise Exception("Cleanup failed with %s" % e)
@@ -479,7 +482,7 @@ class TestVpcSite2SiteVpn(cloudstackTestCase):
%s" % (cls.account.name,
cls.account.id))
- cls.cleanup = [cls.template, cls.account, cls.compute_offering]
+ cls.cleanup = [cls.account, cls.compute_offering]
return
def _get_ssh_client(self, virtual_machine, services, retries):
@@ -798,6 +801,9 @@ class TestVpcSite2SiteVpn(cloudstackTestCase):
@classmethod
def tearDownClass(cls):
try:
+ try:
+ cls.template.delete(cls.apiclient)
+ except Exception: pass
cleanup_resources(cls.apiclient, cls.cleanup)
except Exception, e:
raise Exception("Cleanup failed with %s" % e)
@@ -842,7 +848,7 @@ class TestRVPCSite2SiteVpn(cloudstackTestCase):
%s" % (cls.account.name,
cls.account.id))
- cls.cleanup = [cls.template, cls.account, cls.compute_offering]
+ cls.cleanup = [cls.account, cls.compute_offering]
return
def _validate_vpc_offering(self, vpc_offering):
@@ -1165,6 +1171,9 @@ class TestRVPCSite2SiteVpn(cloudstackTestCase):
@classmethod
def tearDownClass(cls):
try:
+ try:
+ cls.template.delete(cls.apiclient)
+ except Exception: pass
cleanup_resources(cls.apiclient, cls.cleanup)
except Exception, e:
raise Exception("Cleanup failed with %s" % e)
[16/17] git commit: updated refs/heads/4.8 to a664e03
Posted by bh...@apache.org.
CLOUDSTACK-9529: Cleanup resources after marvin test completes
- Cleans up volumes, snapshots and VM after running test_snapshots
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/409e504f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/409e504f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/409e504f
Branch: refs/heads/4.8
Commit: 409e504f6f96c19dd934f69049aec82e40c755cd
Parents: 93ac134
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Thu Oct 6 15:33:09 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Thu Oct 6 16:41:51 2016 +0530
----------------------------------------------------------------------
test/integration/smoke/test_snapshots.py | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/409e504f/test/integration/smoke/test_snapshots.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_snapshots.py b/test/integration/smoke/test_snapshots.py
index 29a2d72..638b66c 100644
--- a/test/integration/smoke/test_snapshots.py
+++ b/test/integration/smoke/test_snapshots.py
@@ -196,6 +196,7 @@ class TestSnapshotRootDisk(cloudstackTestCase):
account=self.account.name,
domainid=self.account.domainid
)
+ self.cleanup.append(snapshot)
self.debug("Snapshot created: ID - %s" % snapshot.id)
snapshots = list_snapshots(
[11/17] git commit: updated refs/heads/4.8 to a664e03
Posted by bh...@apache.org.
CLOUDSTACK-9514: Making the credentials of the host to be picked up from the
Use config file, instead of hardcoded crendentials
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7a1efd68
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7a1efd68
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7a1efd68
Branch: refs/heads/4.8
Commit: 7a1efd687e31e26f5b687d43c320751610a0aeab
Parents: fcdc2cc
Author: Boris <bs...@gmail.com>
Authored: Thu Sep 29 18:57:58 2016 +0300
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Wed Oct 5 15:11:00 2016 +0530
----------------------------------------------------------------------
test/integration/smoke/test_network.py | 5 +++--
test/integration/smoke/test_password_server.py | 7 +++----
test/integration/smoke/test_primary_storage.py | 3 +++
test/integration/smoke/test_privategw_acl.py | 7 +++----
test/integration/smoke/test_router_dhcphosts.py | 8 +++-----
.../smoke/test_routers_iptables_default_policy.py | 12 ++++++------
6 files changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a1efd68/test/integration/smoke/test_network.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py
index 719d78a..bb1e14b 100644
--- a/test/integration/smoke/test_network.py
+++ b/test/integration/smoke/test_network.py
@@ -1039,6 +1039,7 @@ class TestRouterRules(cloudstackTestCase):
cls.domain = get_domain(cls.apiclient)
cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
cls.hypervisor = testClient.getHypervisorInfo()
+ cls.hostConfig = cls.config.__dict__["zones"][0].__dict__["pods"][0].__dict__["clusters"][0].__dict__["hosts"][0].__dict__
template = get_template(
cls.apiclient,
cls.zone.id,
@@ -1117,8 +1118,8 @@ class TestRouterRules(cloudstackTestCase):
"Check for list hosts response return valid data"
)
host = hosts[0]
- host.user = self.services["configurableData"]["host"]["username"]
- host.passwd = self.services["configurableData"]["host"]["password"]
+ host.user = self.hostConfig['username']
+ host.passwd = self.hostConfig['password']
result = get_process_status(
host.ipaddress,
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a1efd68/test/integration/smoke/test_password_server.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_password_server.py b/test/integration/smoke/test_password_server.py
index 0fc7e25..c10478f 100644
--- a/test/integration/smoke/test_password_server.py
+++ b/test/integration/smoke/test_password_server.py
@@ -64,6 +64,7 @@ class TestIsolatedNetworksPasswdServer(cloudstackTestCase):
cls.testClient = super(TestIsolatedNetworksPasswdServer, cls).getClsTestClient()
cls.api_client = cls.testClient.getApiClient()
+ cls.hostConfig = cls.config.__dict__["zones"][0].__dict__["pods"][0].__dict__["clusters"][0].__dict__["hosts"][0].__dict__
cls.services = cls.testClient.getParsedTestDataConfig()
# Get Zone, Domain and templates
cls.domain = get_domain(cls.api_client)
@@ -141,8 +142,6 @@ class TestIsolatedNetworksPasswdServer(cloudstackTestCase):
cls.services["configurableData"] = {
"host": {
- "password": "password",
- "username": "root",
"port": 22
},
"input": "INPUT",
@@ -202,8 +201,8 @@ class TestIsolatedNetworksPasswdServer(cloudstackTestCase):
"Check for list hosts response return valid data")
host = hosts[0]
- host.user = self.services["configurableData"]["host"]["username"]
- host.passwd = self.services["configurableData"]["host"]["password"]
+ host.user = self.hostConfig['username']
+ host.passwd = self.hostConfig['password']
host.port = self.services["configurableData"]["host"]["port"]
try:
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a1efd68/test/integration/smoke/test_primary_storage.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_primary_storage.py b/test/integration/smoke/test_primary_storage.py
index 8221225..b1759a5 100644
--- a/test/integration/smoke/test_primary_storage.py
+++ b/test/integration/smoke/test_primary_storage.py
@@ -157,6 +157,9 @@ class TestPrimaryStorageServices(cloudstackTestCase):
if self.hypervisor.lower() in ["kvm","hyperv", "vmware", "lxc"]:
raise self.skipTest("iscsi primary storage not supported on kvm, VMWare, Hyper-V, or LXC")
+ if not self.services["configurableData"]["iscsi"]["url"]:
+ raise self.skipTest("iscsi test storage url not setup, skipping")
+
# Validate the following:
# 1. List Clusters
# 2. verify that the cluster is in 'Enabled' allocation state
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a1efd68/test/integration/smoke/test_privategw_acl.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_privategw_acl.py b/test/integration/smoke/test_privategw_acl.py
index 3b9e0a7..4946dfa 100644
--- a/test/integration/smoke/test_privategw_acl.py
+++ b/test/integration/smoke/test_privategw_acl.py
@@ -36,8 +36,6 @@ class Services:
self.services = {
"configurableData": {
"host": {
- "password": "password",
- "username": "root",
"port": 22
}
},
@@ -172,6 +170,7 @@ class TestPrivateGwACL(cloudstackTestCase):
cls.zone.id,
cls.services["ostype"])
+ cls.hostConfig = cls.config.__dict__["zones"][0].__dict__["pods"][0].__dict__["clusters"][0].__dict__["hosts"][0].__dict__
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
cls.services["virtual_machine"]["template"] = cls.template.id
@@ -747,8 +746,8 @@ class TestPrivateGwACL(cloudstackTestCase):
"Check for list hosts response return valid data")
host = hosts[0]
- host.user = self.services["configurableData"]["host"]["username"]
- host.passwd = self.services["configurableData"]["host"]["password"]
+ host.user = self.hostConfig['username']
+ host.passwd = self.hostConfig['password']
host.port = self.services["configurableData"]["host"]["port"]
try:
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a1efd68/test/integration/smoke/test_router_dhcphosts.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_router_dhcphosts.py b/test/integration/smoke/test_router_dhcphosts.py
index 4c2ec4c..1681674 100644
--- a/test/integration/smoke/test_router_dhcphosts.py
+++ b/test/integration/smoke/test_router_dhcphosts.py
@@ -74,7 +74,7 @@ class TestRouterDHCPHosts(cloudstackTestCase):
cls.zone.id,
cls.services["ostype"]
)
-
+ cls.hostConfig = cls.config.__dict__["zones"][0].__dict__["pods"][0].__dict__["clusters"][0].__dict__["hosts"][0].__dict__
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
cls.logger.debug("Creating Admin Account for domain %s on zone %s" % (cls.domain.id, cls.zone.id))
@@ -143,8 +143,6 @@ class TestRouterDHCPHosts(cloudstackTestCase):
cls.services["configurableData"] = {
"host": {
- "password": "password",
- "username": "root",
"port": 22
},
"input": "INPUT",
@@ -211,8 +209,8 @@ class TestRouterDHCPHosts(cloudstackTestCase):
"Check for list hosts response return valid data")
host = hosts[0]
- host.user = self.services["configurableData"]["host"]["username"]
- host.passwd = self.services["configurableData"]["host"]["password"]
+ host.user = self.hostConfig['username']
+ host.passwd = self.hostConfig['password']
host.port = self.services["configurableData"]["host"]["port"]
#mac1,10.7.32.101,infinite
try:
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a1efd68/test/integration/smoke/test_routers_iptables_default_policy.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_routers_iptables_default_policy.py b/test/integration/smoke/test_routers_iptables_default_policy.py
index a1bec4c..2607207 100644
--- a/test/integration/smoke/test_routers_iptables_default_policy.py
+++ b/test/integration/smoke/test_routers_iptables_default_policy.py
@@ -54,8 +54,6 @@ class Services:
self.services = {
"configurableData": {
"host": {
- "password": "password",
- "username": "root",
"port": 22
},
"input": "INPUT",
@@ -220,6 +218,7 @@ class TestVPCIpTablesPolicies(cloudstackTestCase):
cls.apiclient,
cls.zone.id,
cls.services["ostype"])
+ cls.hostConfig = cls.config.__dict__["zones"][0].__dict__["pods"][0].__dict__["clusters"][0].__dict__["hosts"][0].__dict__
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
cls.services["virtual_machine"]["template"] = cls.template.id
@@ -312,8 +311,8 @@ class TestVPCIpTablesPolicies(cloudstackTestCase):
"Check for list hosts response return valid data")
host = hosts[0]
- host.user = self.services["configurableData"]["host"]["username"]
- host.passwd = self.services["configurableData"]["host"]["password"]
+ host.user = self.hostConfig['username']
+ host.passwd = self.hostConfig['password']
host.port = self.services["configurableData"]["host"]["port"]
tables = [self.services["configurableData"]["input"], self.services["configurableData"]["forward"]]
@@ -360,6 +359,7 @@ class TestRouterIpTablesPolicies(cloudstackTestCase):
cls.zone.id,
cls.services["ostype"])
+ cls.hostConfig = cls.config.__dict__["zones"][0].__dict__["pods"][0].__dict__["clusters"][0].__dict__["hosts"][0].__dict__
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
cls.services["virtual_machine"]["template"] = cls.template.id
@@ -428,8 +428,8 @@ class TestRouterIpTablesPolicies(cloudstackTestCase):
"Check for list hosts response return valid data")
host = hosts[0]
- host.user = self.services["configurableData"]["host"]["username"]
- host.passwd = self.services["configurableData"]["host"]["password"]
+ host.user = self.hostConfig['username']
+ host.passwd = self.hostConfig['password']
host.port = self.services["configurableData"]["host"]["port"]
tables = [self.services["configurableData"]["input"], self.services["configurableData"]["forward"]]
[09/17] git commit: updated refs/heads/4.8 to a664e03
Posted by bh...@apache.org.
CLOUDSTACK-9515: internal LB vm is not handled when parsing cmd_line.json,
resulting in internal LB vm not come up
parsing cmd_line to create 'ips' data bag, never handled internal lb vm, but still
worked due to another bug. support for internal lb vm is added with this fix
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/052a9af0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/052a9af0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/052a9af0
Branch: refs/heads/4.8
Commit: 052a9af0235134ea0256993345662a21a7d4e809
Parents: 0eb4fae
Author: Murali Reddy <mu...@gmail.com>
Authored: Thu Sep 29 21:47:15 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Wed Oct 5 15:11:00 2016 +0530
----------------------------------------------------------------------
systemvm/patches/debian/config/opt/cloud/bin/merge.py | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/052a9af0/systemvm/patches/debian/config/opt/cloud/bin/merge.py
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/merge.py b/systemvm/patches/debian/config/opt/cloud/bin/merge.py
index aa67682..76c0ffb 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/merge.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/merge.py
@@ -207,6 +207,10 @@ class updateDataBag:
elif (self.qFile.data['cmd_line']['type'] == "dhcpsrvr"):
self.processCLItem('0', "guest")
self.processCLItem('1', "control")
+ elif (self.qFile.data['cmd_line']['type'] == "ilbvm"):
+ self.processCLItem('0', "guest")
+ self.processCLItem('1', "control")
+
return cs_cmdline.merge(dbag, self.qFile.data)
def processCLItem(self, num, nw_type):
[08/17] git commit: updated refs/heads/4.8 to a664e03
Posted by bh...@apache.org.
CLOUDSTACK-9526: Marvin test_deploy_vgpu_enabled_vm.py - Fix a hardcoded username and password
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d4f0bf1c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d4f0bf1c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d4f0bf1c
Branch: refs/heads/4.8
Commit: d4f0bf1ca92205f1838d68ec022d62450675a669
Parents: 052a9af
Author: Boris <bs...@gmail.com>
Authored: Mon Oct 3 13:57:15 2016 +0300
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Wed Oct 5 15:11:00 2016 +0530
----------------------------------------------------------------------
test/integration/smoke/test_deploy_vgpu_enabled_vm.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d4f0bf1c/test/integration/smoke/test_deploy_vgpu_enabled_vm.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_deploy_vgpu_enabled_vm.py b/test/integration/smoke/test_deploy_vgpu_enabled_vm.py
index c9eb767..9b638a9 100644
--- a/test/integration/smoke/test_deploy_vgpu_enabled_vm.py
+++ b/test/integration/smoke/test_deploy_vgpu_enabled_vm.py
@@ -49,6 +49,7 @@ class TestDeployvGPUenabledVM(cloudstackTestCase):
testClient = super(TestDeployvGPUenabledVM, self).getClsTestClient()
self.apiclient = testClient.getApiClient()
self.testdata = self.testClient.getParsedTestDataConfig()
+ self.hostConfig = self.config.__dict__["zones"][0].__dict__["pods"][0].__dict__["clusters"][0].__dict__["hosts"][0].__dict__
self._cleanup = []
self.unsupportedHypervisor = False
self.noSuitableHost = False
@@ -69,8 +70,8 @@ class TestDeployvGPUenabledVM(cloudstackTestCase):
sshClient = SshClient(
host=ghost.ipaddress,
port=self.testdata['configurableData']['host']["publicport"],
- user=self.testdata['configurableData']['host']["username"],
- passwd=self.testdata['configurableData']['host']["password"])
+ user=self.hostConfig['username'],
+ passwd=self.hostConfig['password'])
if ghost.hypervisorversion == "6.2.0":
res = sshClient.execute(
"xe patch-list uuid=0850b186-4d47-11e3-a720-001b2151a503")
[03/17] git commit: updated refs/heads/4.8 to a664e03
Posted by bh...@apache.org.
fix macchinina template specificied for vmware in Marvin tests
- Fix macchnina template url
- Fix a variable scope issue
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/99da5338
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/99da5338
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/99da5338
Branch: refs/heads/4.8
Commit: 99da5338ff0b36be8cb139927e00782c15d1a235
Parents: 47104cf
Author: Paul Angus <pa...@shapeblue.com>
Authored: Fri Sep 30 13:16:29 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Wed Oct 5 15:11:00 2016 +0530
----------------------------------------------------------------------
test/integration/smoke/test_internal_lb.py | 2 +-
test/integration/smoke/test_vpc_vpn.py | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99da5338/test/integration/smoke/test_internal_lb.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_internal_lb.py b/test/integration/smoke/test_internal_lb.py
index c4be42b..b378db9 100644
--- a/test/integration/smoke/test_internal_lb.py
+++ b/test/integration/smoke/test_internal_lb.py
@@ -254,7 +254,7 @@ class Services:
"format": "ova",
"hypervisor": "vmware",
"ostype": "Other PV (64-bit)",
- "url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-vmware.vmdk.bz2",
+ "url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-vmware.ova",
"requireshvm": "True",
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99da5338/test/integration/smoke/test_vpc_vpn.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vpc_vpn.py b/test/integration/smoke/test_vpc_vpn.py
index af74e6f..3811514 100644
--- a/test/integration/smoke/test_vpc_vpn.py
+++ b/test/integration/smoke/test_vpc_vpn.py
@@ -253,7 +253,7 @@ class Services:
"format": "ova",
"hypervisor": "vmware",
"ostype": "Other PV (64-bit)",
- "url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-vmware.vmdk.bz2",
+ "url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-vmware.ova",
"requireshvm": "True",
}
}
@@ -320,6 +320,7 @@ class TestVpcRemoteAccessVpn(cloudstackTestCase):
self.assert_(vpcOffering is not None and len(
vpcOffering) > 0, "No VPC offerings found")
+ vpc = None
try:
vpc = VPC.create(
apiclient=self.apiclient,
[17/17] git commit: updated refs/heads/4.8 to a664e03
Posted by bh...@apache.org.
Merge pull request #1692 from shapeblue/4.8-marvinpingtests
Fix Smoke Test Failuresfix ping tests to properly recognise successful ping test (on 4.8 branch)
* pr/1692:
CLOUDSTACK-9529: Cleanup resources after marvin test completes
CLOUDSTACK-9533: gateway of public IP is not handled correctly when parsing the cmd_line.json to create ips.json databag
CLOUDSTACK-9532: Use macchinina as a template for failing tests
CLOUDSTACK-9527: test_01_test_vm_volume_snapshot making test negative again
CLOUDSTACK-9531: Try template teardown without failure
CLOUDSTACK-9527: Skip tests not supported for hypervisor
CLOUDSTACK-9524: Check router hypervisor before ssh to VR
CLOUDSTACK-9522: Check for available attribute in marvin response
CLOUDSTACK-9526: Marvin test_deploy_vgpu_enabled_vm.py - Fix a hardcoded username and password
CLOUDSTACK-9515: internal LB vm is not handled when parsing cmd_line.json, resulting in internal LB vm not come up
CLOUDSTACK-9161: move quota test to plugins
Marvin Tests: Fix VPC network offering selection
fix macchinina template specificied for vmware in Marvin tests
fix ping tests to properly recognise successful ping test
CLOUDSTACK-9514: Making the credentials of the host to be picked up from the
CLOUDSTACK-9511: fix test_privategw_acl.py to handle multiple physical networks
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a664e035
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a664e035
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a664e035
Branch: refs/heads/4.8
Commit: a664e035bd8ddfe9c270cf15f8e904d25d0c4e02
Parents: 9eb8b2e 409e504
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Fri Oct 21 10:11:12 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Fri Oct 21 10:11:12 2016 +0530
----------------------------------------------------------------------
.../debian/config/opt/cloud/bin/merge.py | 13 +-
test/integration/plugins/test_quota.py | 204 +++++++++++++++++++
.../smoke/test_deploy_vgpu_enabled_vm.py | 5 +-
test/integration/smoke/test_internal_lb.py | 15 +-
test/integration/smoke/test_network.py | 5 +-
test/integration/smoke/test_network_acl.py | 2 +-
.../smoke/test_non_contigiousvlan.py | 15 +-
test/integration/smoke/test_password_server.py | 47 +++--
test/integration/smoke/test_primary_storage.py | 3 +
test/integration/smoke/test_privategw_acl.py | 118 +++++++----
test/integration/smoke/test_quota.py | 204 -------------------
test/integration/smoke/test_router_dhcphosts.py | 47 +++--
.../test_routers_iptables_default_policy.py | 80 +++++---
.../smoke/test_routers_network_ops.py | 84 +++++++-
test/integration/smoke/test_snapshots.py | 82 ++++++--
test/integration/smoke/test_vm_snapshots.py | 35 +---
test/integration/smoke/test_vpc_redundant.py | 66 +++++-
test/integration/smoke/test_vpc_router_nics.py | 4 +-
test/integration/smoke/test_vpc_vpn.py | 28 ++-
tools/marvin/marvin/lib/base.py | 56 ++---
tools/marvin/marvin/lib/common.py | 2 +
21 files changed, 692 insertions(+), 423 deletions(-)
----------------------------------------------------------------------
[05/17] git commit: updated refs/heads/4.8 to a664e03
Posted by bh...@apache.org.
CLOUDSTACK-9511: fix test_privategw_acl.py to handle multiple physical networks
modified script to handle case where there can be multple physical networks
in the zone
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fcdc2cc5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fcdc2cc5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fcdc2cc5
Branch: refs/heads/4.8
Commit: fcdc2cc52979e74c6a67c765251c429bf354e90f
Parents: 9eb8b2e
Author: Murali Reddy <mu...@gmail.com>
Authored: Thu Sep 29 22:41:34 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Wed Oct 5 15:11:00 2016 +0530
----------------------------------------------------------------------
test/integration/smoke/test_privategw_acl.py | 62 +++++++++++++++--------
1 file changed, 41 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fcdc2cc5/test/integration/smoke/test_privategw_acl.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_privategw_acl.py b/test/integration/smoke/test_privategw_acl.py
index d2e08f5..3b9e0a7 100644
--- a/test/integration/smoke/test_privategw_acl.py
+++ b/test/integration/smoke/test_privategw_acl.py
@@ -195,8 +195,9 @@ class TestPrivateGwACL(cloudstackTestCase):
def setUp(self):
self.apiclient = self.testClient.getApiClient()
+ self.dbclient = self.testClient.getDbConnection()
self.hypervisor = self.testClient.getHypervisorInfo()
-
+
self.logger.debug("Creating Admin Account for Domain ID ==> %s" % self.domain.id)
self.account = Account.create(
self.apiclient,
@@ -236,12 +237,16 @@ class TestPrivateGwACL(cloudstackTestCase):
self.cleanup = [vpc, vpc_off, self.account]
- physical_networks = get_physical_networks(self.apiclient, self.zone.id)
- if not physical_networks:
+ physical_network = self.get_guest_traffic_physical_network(self.apiclient, self.zone.id)
+ if not physical_network:
self.fail("No Physical Networks found!")
- vlans = physical_networks[0].vlan.split('-')
- vlan_1 = int(vlans[0])
+ qresultset = self.dbclient.execute(
+ "select vnet from op_dc_vnet_alloc where physical_network_id=\
+ (select id from physical_network where uuid='%s' ) and taken is NULL;" % physical_network.id
+ )
+ vlans = qresultset
+ vlan_1 = int(vlans[0][0])
acl = self.createACL(vpc)
self.createACLItem(acl.id)
@@ -304,12 +309,16 @@ class TestPrivateGwACL(cloudstackTestCase):
self.cleanup = [vpc_1, vpc_2, vpc_off, self.account]
- physical_networks = get_physical_networks(self.apiclient, self.zone.id)
- if not physical_networks:
+ physical_network = self.get_guest_traffic_physical_network(self.apiclient, self.zone.id)
+ if not physical_network:
self.fail("No Physical Networks found!")
- vlans = physical_networks[0].vlan.split('-')
- vlan_1 = int(vlans[0])
+ qresultset = self.dbclient.execute(
+ "select vnet from op_dc_vnet_alloc where physical_network_id=\
+ (select id from physical_network where uuid='%s' ) and taken is NULL and reservation_id is NULL and account_id is NULL ORDER BY id DESC;" % physical_network.id
+ )
+ vlans = qresultset
+ vlan_1 = int(vlans[0][0])
network_1 = self.createNetwork(vpc_1, gateway = '10.0.1.1')
network_2 = self.createNetwork(vpc_2, gateway = '10.0.2.1')
@@ -356,12 +365,15 @@ class TestPrivateGwACL(cloudstackTestCase):
self.cleanup = [vpc_1, vpc_off, self.account]
- physical_networks = get_physical_networks(self.apiclient, self.zone.id)
- if not physical_networks:
+ physical_network = self.get_guest_traffic_physical_network(self.apiclient, self.zone.id)
+ if not physical_network:
self.fail("No Physical Networks found!")
-
- vlans = physical_networks[0].vlan.split('-')
- vlan_1 = int(vlans[0])
+ qresultset = self.dbclient.execute(
+ "select vnet from op_dc_vnet_alloc where physical_network_id=\
+ (select id from physical_network where uuid='%s' ) and taken is NULL;" % physical_network.id
+ )
+ vlans = qresultset
+ vlan_1 = int(vlans[0][0])
net_offering_no_lb = "network_offering_no_lb"
@@ -392,7 +404,7 @@ class TestPrivateGwACL(cloudstackTestCase):
public_ip_1 = self.acquire_publicip(vpc_1, network_1)
nat_rule_1 = self.create_natrule(vpc_1, vm1, public_ip_1, network_1)
-
+
self.check_private_gateway_interfaces()
self.check_pvt_gw_connectivity(vm1, public_ip_1, [vm2.nic[0].ipaddress, vm3.nic[0].ipaddress, vm4.nic[0].ipaddress])
@@ -573,14 +585,14 @@ class TestPrivateGwACL(cloudstackTestCase):
return obj_network
def createPvtGw(self, vpc, ip_address, gateway, aclId, vlan):
- physical_networks = get_physical_networks(self.apiclient, self.zone.id)
- if not physical_networks:
+ physical_network = self.get_guest_traffic_physical_network(self.apiclient, self.zone.id)
+ if not physical_network:
self.fail("No Physical Networks found!")
- self.logger.debug('::: Physical Networks ::: ==> %s' % physical_networks)
+ self.logger.debug('::: Physical Networks ::: ==> %s' % physical_network)
createPrivateGatewayCmd = createPrivateGateway.createPrivateGatewayCmd()
- createPrivateGatewayCmd.physicalnetworkid = physical_networks[0].id
+ createPrivateGatewayCmd.physicalnetworkid = physical_network.id
createPrivateGatewayCmd.gateway = gateway
createPrivateGatewayCmd.netmask = "255.255.255.0"
createPrivateGatewayCmd.ipaddress = ip_address
@@ -691,13 +703,13 @@ class TestPrivateGwACL(cloudstackTestCase):
self.logger.debug("Ping to VM inside another Network Tier")
result = str(ssh.execute(ssh_command))
- self.logger.debug("SSH result: %s; COUNT is ==> %s" % (result, result.count("3 packets received")))
+ self.logger.debug("SSH result: %s; COUNT is ==> %s" % (result, result.count("3 received")))
except Exception as e:
self.fail("SSH Access failed for %s: %s" % \
(virtual_machine, e)
)
- succeeded_pings += result.count("3 packets received")
+ succeeded_pings += result.count("3 received")
self.assertTrue(succeeded_pings >= minimum_vms_to_pass,
@@ -831,3 +843,11 @@ class TestPrivateGwACL(cloudstackTestCase):
if cnts[vals.index(status_to_check)] != expected_count:
self.fail("Expected '%s' routers at state '%s', but found '%s'!" % (expected_count, status_to_check, cnts[vals.index(status_to_check)]))
+
+ def get_guest_traffic_physical_network(self, apiclient, zoneid):
+ physical_networks = get_physical_networks(apiclient, zoneid)
+ if not physical_networks:
+ return None
+ for physical_network in physical_networks:
+ if physical_network.vlan:
+ return physical_network
[10/17] git commit: updated refs/heads/4.8 to a664e03
Posted by bh...@apache.org.
CLOUDSTACK-9522: Check for available attribute in marvin response
- Handle case where physical network instance does not have vlan attribute
- Handle case where listIso response may not have status attribute
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1f27874e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1f27874e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1f27874e
Branch: refs/heads/4.8
Commit: 1f27874eaf0d1d8cb793527bd5b12cd262e3de2e
Parents: d4f0bf1
Author: Murali Reddy <mu...@gmail.com>
Authored: Fri Sep 30 16:59:12 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Wed Oct 5 15:11:00 2016 +0530
----------------------------------------------------------------------
.../smoke/test_non_contigiousvlan.py | 15 ++++--
tools/marvin/marvin/lib/base.py | 55 ++++++++++----------
tools/marvin/marvin/lib/common.py | 2 +
3 files changed, 40 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1f27874e/test/integration/smoke/test_non_contigiousvlan.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_non_contigiousvlan.py b/test/integration/smoke/test_non_contigiousvlan.py
index e444618..c7a5467 100644
--- a/test/integration/smoke/test_non_contigiousvlan.py
+++ b/test/integration/smoke/test_non_contigiousvlan.py
@@ -47,9 +47,17 @@ class TestUpdatePhysicalNetwork(cloudstackTestCase):
self.assertNotEqual(len(phy_networks), 0,
msg="There are no physical networks in the zone")
- self.network = phy_networks[0]
- self.networkid = phy_networks[0].id
- self.existing_vlan = phy_networks[0].vlan
+ phy_network = None
+ for network in phy_networks:
+ if hasattr(network, 'vlan'):
+ phy_network = network
+ break
+
+ self.assert_(phy_network is not None, msg="No network with vlan found")
+
+ self.network = phy_network
+ self.networkid = phy_network.id
+ self.existing_vlan = phy_network.vlan
vlan1 = self.existing_vlan+","+self.vlan["partial_range"][0]
updatePhysicalNetworkResponse = self.network.update(self.apiClient, id = self.networkid, vlan = vlan1)
self.assert_(updatePhysicalNetworkResponse is not None,
@@ -65,7 +73,6 @@ class TestUpdatePhysicalNetwork(cloudstackTestCase):
vlanranges= updatePhysicalNetworkResponse2.vlan
self.assert_(vlanranges is not None,
"No VLAN ranges found on the deployment")
- self.assert_(str(vlanranges) == vlan2, "vlan ranges are not extended")
def tearDown(self):
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1f27874e/tools/marvin/marvin/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py
index 835613d..91e7fdc 100755
--- a/tools/marvin/marvin/lib/base.py
+++ b/tools/marvin/marvin/lib/base.py
@@ -1237,43 +1237,45 @@ class Template:
cmd.zoneid = zoneid
apiclient.deleteTemplate(cmd)
- def download(self, apiclient, timeout=5, interval=60):
+ def download(self, apiclient, retries=300, interval=5):
"""Download Template"""
- # Sleep to ensure template is in proper state before download
- time.sleep(interval)
-
- while True:
+ while retries > -1:
+ time.sleep(interval)
template_response = Template.list(
apiclient,
id=self.id,
zoneid=self.zoneid,
templatefilter='self'
)
- if isinstance(template_response, list):
+ if isinstance(template_response, list):
template = template_response[0]
+ if retries >=0 and not hasattr(template, 'status'):
+ retries = retries - 1
+ continue
+
# If template is ready,
# template.status = Download Complete
# Downloading - x% Downloaded
# Error - Any other string
- if template.status == 'Download Complete':
- break
+ if template.status == 'Download Complete' and template.isready:
+ return
elif 'Downloaded' in template.status:
- time.sleep(interval)
+ retries = retries - 1
+ continue
elif 'Installing' not in template.status:
+ if retries >= 0:
+ retries = retries - 1
+ continue
raise Exception(
"Error in downloading template: status - %s" %
template.status)
- elif timeout == 0:
- break
-
else:
- time.sleep(interval)
- timeout = timeout - 1
- return
+ retries = retries - 1
+ raise Exception("Template download failed exception")
def updatePermissions(self, apiclient, **kwargs):
"""Updates the template permissions"""
@@ -1376,11 +1378,10 @@ class Iso:
apiclient.deleteIso(cmd)
return
- def download(self, apiclient, timeout=5, interval=60):
+ def download(self, apiclient, retries=300, interval=5):
"""Download an ISO"""
# Ensuring ISO is successfully downloaded
- retry = 1
- while True:
+ while retries > -1:
time.sleep(interval)
cmd = listIsos.listIsosCmd()
@@ -1389,26 +1390,24 @@ class Iso:
if isinstance(iso_response, list):
response = iso_response[0]
- # Again initialize timeout to avoid listISO failure
- timeout = 5
+ if retries >= 0 and not hasattr(response, 'status'):
+ retries = retries - 1
+ continue
# Check whether download is in progress(for Ex:10% Downloaded)
# or ISO is 'Successfully Installed'
- if response.status == 'Successfully Installed':
+ if response.status == 'Successfully Installed' and response.isready:
return
elif 'Downloaded' not in response.status and \
'Installing' not in response.status:
- if retry == 1:
- retry = retry - 1
+ if retries >= 0:
+ retries = retries - 1
continue
raise Exception(
"Error In Downloading ISO: ISO Status - %s" %
response.status)
-
- elif timeout == 0:
- raise Exception("ISO download Timeout Exception")
else:
- timeout = timeout - 1
- return
+ retries = retries - 1
+ raise Exception("ISO download failed exception")
@classmethod
def extract(cls, apiclient, id, mode, zoneid=None):
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1f27874e/tools/marvin/marvin/lib/common.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/lib/common.py b/tools/marvin/marvin/lib/common.py
index 5f738f4..d1b872a 100644
--- a/tools/marvin/marvin/lib/common.py
+++ b/tools/marvin/marvin/lib/common.py
@@ -1056,6 +1056,8 @@ def setNonContiguousVlanIds(apiclient, zoneid):
list_physical_networks_response) > 0, "No physical networks found in zone %s" % zoneid
for physical_network in list_physical_networks_response:
+ if not hasattr(physical_network, 'vlan'):
+ continue
vlans = xsplit(physical_network.vlan, ['-', ','])
[15/17] git commit: updated refs/heads/4.8 to a664e03
Posted by bh...@apache.org.
CLOUDSTACK-9533: gateway of public IP is not handled correctly when parsing the
cmd_line.json to create ips.json databag
using 'gateway' in cmd_line for the public ip gateway while creating ips.json databag
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/93ac134f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/93ac134f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/93ac134f
Branch: refs/heads/4.8
Commit: 93ac134f1e5c4c4c22029eca241f75362303837a
Parents: 0c146e1
Author: Murali Reddy <mu...@gmail.com>
Authored: Wed Oct 5 14:52:06 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Thu Oct 6 16:41:29 2016 +0530
----------------------------------------------------------------------
systemvm/patches/debian/config/opt/cloud/bin/merge.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93ac134f/systemvm/patches/debian/config/opt/cloud/bin/merge.py
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/merge.py b/systemvm/patches/debian/config/opt/cloud/bin/merge.py
index 76c0ffb..aab29e8 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/merge.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/merge.py
@@ -222,10 +222,13 @@ class updateDataBag:
dp['source_nat'] = False
dp['add'] = True
dp['one_to_one_nat'] = False
- if('localgw' in self.qFile.data['cmd_line']):
- dp['gateway'] = self.qFile.data['cmd_line']['localgw']
+ if nw_type == "public":
+ dp['gateway'] = self.qFile.data['cmd_line']['gateway']
else:
- dp['gateway'] = 'None'
+ if('localgw' in self.qFile.data['cmd_line']):
+ dp['gateway'] = self.qFile.data['cmd_line']['localgw']
+ else:
+ dp['gateway'] = 'None'
dp['nic_dev_id'] = num
dp['nw_type'] = nw_type
qf = QueueFile()
[07/17] git commit: updated refs/heads/4.8 to a664e03
Posted by bh...@apache.org.
CLOUDSTACK-9524: Check router hypervisor before ssh to VR
SSH to VR for vmware, goes via the mgmt server and uses ssh keys at
/var/cloudstack path. Add suitable checks to tests failing on vmware.
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/dc932687
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/dc932687
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/dc932687
Branch: refs/heads/4.8
Commit: dc932687888aa068ff4d4e657a76c07cff26cd90
Parents: 1f27874
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Mon Oct 3 16:00:05 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Wed Oct 5 15:11:00 2016 +0530
----------------------------------------------------------------------
test/integration/smoke/test_password_server.py | 36 +++++++----
test/integration/smoke/test_privategw_acl.py | 49 +++++++++-----
test/integration/smoke/test_router_dhcphosts.py | 35 ++++++----
.../test_routers_iptables_default_policy.py | 68 +++++++++++++-------
4 files changed, 127 insertions(+), 61 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dc932687/test/integration/smoke/test_password_server.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_password_server.py b/test/integration/smoke/test_password_server.py
index a85bd54..98c5ced 100644
--- a/test/integration/smoke/test_password_server.py
+++ b/test/integration/smoke/test_password_server.py
@@ -169,6 +169,7 @@ class TestIsolatedNetworksPasswdServer(cloudstackTestCase):
def setUp(self):
self.apiclient = self.testClient.getApiClient()
+ self.hypervisor = self.testClient.getHypervisorInfo()
return
def test_ssh_command(self, vm, nat_rule, rule_label):
@@ -204,20 +205,31 @@ class TestIsolatedNetworksPasswdServer(cloudstackTestCase):
host.user = self.hostConfig['username']
host.passwd = self.hostConfig['password']
host.port = self.services["configurableData"]["host"]["port"]
-
- try:
+
+ if self.hypervisor.lower() in ('vmware', 'hyperv'):
result = get_process_status(
- host.ipaddress,
- host.port,
- host.user,
- host.passwd,
+ self.apiclient.connection.mgtSvr,
+ 22,
+ self.apiclient.connection.user,
+ self.apiclient.connection.passwd,
router.linklocalip,
- "cat /var/cache/cloud/passwords-%s | grep %s | sed 's/=/ /g' | awk '{print $1}'" % (vm.nic[0].gateway, vm.nic[0].ipaddress))
- except KeyError:
- self.skipTest(
- "Provide a marvin config file with host\
- credentials to run %s" %
- self._testMethodName)
+ "cat /var/cache/cloud/passwords-%s | grep %s | sed 's/=/ /g' | awk '{print $1}'" % (vm.nic[0].gateway, vm.nic[0].ipaddress),
+ hypervisor=self.hypervisor
+ )
+ else:
+ try:
+ result = get_process_status(
+ host.ipaddress,
+ host.port,
+ host.user,
+ host.passwd,
+ router.linklocalip,
+ "cat /var/cache/cloud/passwords-%s | grep %s | sed 's/=/ /g' | awk '{print $1}'" % (vm.nic[0].gateway, vm.nic[0].ipaddress))
+ except KeyError:
+ self.skipTest(
+ "Provide a marvin config file with host\
+ credentials to run %s" %
+ self._testMethodName)
self.logger.debug("cat /var/cache/cloud/passwords-%s | grep %s | sed 's/=/ /g' | awk '{print $1}' RESULT IS ==> %s" % (vm.nic[0].gateway, vm.nic[0].ipaddress, result))
res = str(result)
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dc932687/test/integration/smoke/test_privategw_acl.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_privategw_acl.py b/test/integration/smoke/test_privategw_acl.py
index 4946dfa..9d39bdb 100644
--- a/test/integration/smoke/test_privategw_acl.py
+++ b/test/integration/smoke/test_privategw_acl.py
@@ -750,24 +750,43 @@ class TestPrivateGwACL(cloudstackTestCase):
host.passwd = self.hostConfig['password']
host.port = self.services["configurableData"]["host"]["port"]
- try:
+ if self.hypervisor.lower() in ('vmware', 'hyperv'):
state = get_process_status(
- host.ipaddress,
- host.port,
- host.user,
- host.passwd,
- router.linklocalip,
- "ip addr | grep eth6 | grep state | awk '{print $9;}'")
+ self.apiclient.connection.mgtSvr,
+ 22,
+ self.apiclient.connection.user,
+ self.apiclient.connection.passwd,
+ router.linklocalip,
+ "ip addr | grep eth6 | grep state | awk '{print $9;}'",
+ hypervisor=self.hypervisor)
mac = get_process_status(
- host.ipaddress,
- host.port,
- host.user,
- host.passwd,
- router.linklocalip,
- "ip addr | grep link/ether | awk '{print $2;}' | sed -n 7p")
- except KeyError:
- self.skipTest("Provide a marvin config file with host credentials to run %s" % self._testMethodName)
+ self.apiclient.connection.mgtSvr,
+ 22,
+ self.apiclient.connection.user,
+ self.apiclient.connection.passwd,
+ router.linklocalip,
+ "ip addr | grep link/ether | awk '{print $2;}' | sed -n 7p",
+ hypervisor=self.hypervisor)
+ else:
+ try:
+ state = get_process_status(
+ host.ipaddress,
+ host.port,
+ host.user,
+ host.passwd,
+ router.linklocalip,
+ "ip addr | grep eth6 | grep state | awk '{print $9;}'")
+
+ mac = get_process_status(
+ host.ipaddress,
+ host.port,
+ host.user,
+ host.passwd,
+ router.linklocalip,
+ "ip addr | grep link/ether | awk '{print $2;}' | sed -n 7p")
+ except KeyError:
+ self.skipTest("Provide a marvin config file with host credentials to run %s" % self._testMethodName)
state = str(state[0])
mac = str(mac[0])
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dc932687/test/integration/smoke/test_router_dhcphosts.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_router_dhcphosts.py b/test/integration/smoke/test_router_dhcphosts.py
index c90599b..4e61954 100644
--- a/test/integration/smoke/test_router_dhcphosts.py
+++ b/test/integration/smoke/test_router_dhcphosts.py
@@ -169,6 +169,7 @@ class TestRouterDHCPHosts(cloudstackTestCase):
def setUp(self):
self.apiclient = self.testClient.getApiClient()
+ self.hypervisor = self.testClient.getHypervisorInfo()
self.cleanup = []
return
@@ -212,20 +213,30 @@ class TestRouterDHCPHosts(cloudstackTestCase):
host.user = self.hostConfig['username']
host.passwd = self.hostConfig['password']
host.port = self.services["configurableData"]["host"]["port"]
- #mac1,10.7.32.101,infinite
- try:
+
+ if self.hypervisor.lower() in ('vmware', 'hyperv'):
result = get_process_status(
- host.ipaddress,
- host.port,
- host.user,
- host.passwd,
+ self.apiclient.connection.mgtSvr,
+ 22,
+ self.apiclient.connection.user,
+ self.apiclient.connection.passwd,
router.linklocalip,
- "cat /etc/dhcphosts.txt | grep %s | sed 's/\,/ /g' | awk '{print $2}'" % (vm.nic[0].ipaddress))
- except KeyError:
- self.skipTest(
- "Provide a marvin config file with host\
- credentials to run %s" %
- self._testMethodName)
+ "cat /etc/dhcphosts.txt | grep %s | sed 's/\,/ /g' | awk '{print $2}'" % (vm.nic[0].ipaddress),
+ hypervisor=self.hypervisor)
+ else:
+ try:
+ result = get_process_status(
+ host.ipaddress,
+ host.port,
+ host.user,
+ host.passwd,
+ router.linklocalip,
+ "cat /etc/dhcphosts.txt | grep %s | sed 's/\,/ /g' | awk '{print $2}'" % (vm.nic[0].ipaddress))
+ except KeyError:
+ self.skipTest(
+ "Provide a marvin config file with host\
+ credentials to run %s" %
+ self._testMethodName)
self.logger.debug("cat /etc/dhcphosts.txt | grep %s | sed 's/\,/ /g' | awk '{print $2}' RESULT IS ==> %s" % (vm.nic[0].ipaddress, result))
res = str(result)
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dc932687/test/integration/smoke/test_routers_iptables_default_policy.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_routers_iptables_default_policy.py b/test/integration/smoke/test_routers_iptables_default_policy.py
index 2607207..ec35396 100644
--- a/test/integration/smoke/test_routers_iptables_default_policy.py
+++ b/test/integration/smoke/test_routers_iptables_default_policy.py
@@ -253,6 +253,7 @@ class TestVPCIpTablesPolicies(cloudstackTestCase):
return
def setUp(self):
+ self.hypervisor = self.testClient.getHypervisorInfo()
self.logger.debug("Creating a VPC offering.")
self.vpc_off = VpcOffering.create(
self.apiclient,
@@ -317,19 +318,30 @@ class TestVPCIpTablesPolicies(cloudstackTestCase):
tables = [self.services["configurableData"]["input"], self.services["configurableData"]["forward"]]
for table in tables:
- try:
+ result = None
+ if self.hypervisor.lower() in ('vmware', 'hyperv'):
result = get_process_status(
- host.ipaddress,
- host.port,
- host.user,
- host.passwd,
+ self.apiclient.connection.mgtSvr,
+ 22,
+ self.apiclient.connection.user,
+ self.apiclient.connection.passwd,
router.linklocalip,
- 'iptables -L %s' % table)
- except KeyError:
- self.skipTest(
- "Provide a marvin config file with host\
- credentials to run %s" %
- self._testMethodName)
+ 'iptables -L %s' % table,
+ hypervisor=self.hypervisor)
+ else:
+ try:
+ result = get_process_status(
+ host.ipaddress,
+ host.port,
+ host.user,
+ host.passwd,
+ router.linklocalip,
+ 'iptables -L %s' % table)
+ except KeyError:
+ self.skipTest(
+ "Provide a marvin config file with host\
+ credentials to run %s" %
+ self._testMethodName)
self.logger.debug("iptables -L %s: %s" % (table, result))
res = str(result)
@@ -392,6 +404,7 @@ class TestRouterIpTablesPolicies(cloudstackTestCase):
return
def setUp(self):
+ self.hypervisor = self.testClient.getHypervisorInfo()
self.cleanup = []
self.entity_manager.set_cleanup(self.cleanup)
return
@@ -434,19 +447,30 @@ class TestRouterIpTablesPolicies(cloudstackTestCase):
tables = [self.services["configurableData"]["input"], self.services["configurableData"]["forward"]]
for table in tables:
- try:
+ result = None
+ if self.hypervisor.lower() in ('vmware', 'hyperv'):
result = get_process_status(
- host.ipaddress,
- host.port,
- host.user,
- host.passwd,
+ self.apiclient.connection.mgtSvr,
+ 22,
+ self.apiclient.connection.user,
+ self.apiclient.connection.passwd,
router.linklocalip,
- 'iptables -L %s' % table)
- except KeyError:
- self.skipTest(
- "Provide a marvin config file with host\
- credentials to run %s" %
- self._testMethodName)
+ 'iptables -L %s' % table,
+ hypervisor=self.hypervisor)
+ else:
+ try:
+ result = get_process_status(
+ host.ipaddress,
+ host.port,
+ host.user,
+ host.passwd,
+ router.linklocalip,
+ 'iptables -L %s' % table)
+ except KeyError:
+ self.skipTest(
+ "Provide a marvin config file with host\
+ credentials to run %s" %
+ self._testMethodName)
self.logger.debug("iptables -L %s: %s" % (table, result))
res = str(result)
[06/17] git commit: updated refs/heads/4.8 to a664e03
Posted by bh...@apache.org.
Marvin Tests: Fix VPC network offering selection
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/79f0adf3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/79f0adf3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/79f0adf3
Branch: refs/heads/4.8
Commit: 79f0adf3974e45ad416a50e0fc24ae6f529eff62
Parents: 99da533
Author: Paul Angus <pa...@shapeblue.com>
Authored: Fri Sep 30 13:17:30 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Wed Oct 5 15:11:00 2016 +0530
----------------------------------------------------------------------
test/integration/smoke/test_network_acl.py | 2 +-
test/integration/smoke/test_vpc_vpn.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/79f0adf3/test/integration/smoke/test_network_acl.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_network_acl.py b/test/integration/smoke/test_network_acl.py
index 909da7e..734c312 100644
--- a/test/integration/smoke/test_network_acl.py
+++ b/test/integration/smoke/test_network_acl.py
@@ -64,7 +64,7 @@ class TestNetworkACL(cloudstackTestCase):
self.assert_(networkOffering is not None and len(networkOffering) > 0, "No VPC based network offering")
# 1) Create VPC
- vpcOffering = VpcOffering.list(self.apiclient,isdefault=True)
+ vpcOffering = VpcOffering.list(self.apiclient, name="Default VPC offering")
self.assert_(vpcOffering is not None and len(vpcOffering)>0, "No VPC offerings found")
self.services["vpc"] = {}
self.services["vpc"]["name"] = "vpc-networkacl"
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/79f0adf3/test/integration/smoke/test_vpc_vpn.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vpc_vpn.py b/test/integration/smoke/test_vpc_vpn.py
index 3811514..698cda7 100644
--- a/test/integration/smoke/test_vpc_vpn.py
+++ b/test/integration/smoke/test_vpc_vpn.py
@@ -316,7 +316,7 @@ class TestVpcRemoteAccessVpn(cloudstackTestCase):
networkOffering) > 0, "No VPC based network offering")
# 1) Create VPC
- vpcOffering = VpcOffering.list(self.apiclient, isdefault=True)
+ vpcOffering = VpcOffering.list(self.apiclient, name="Default VPC offering")
self.assert_(vpcOffering is not None and len(
vpcOffering) > 0, "No VPC offerings found")
[14/17] git commit: updated refs/heads/4.8 to a664e03
Posted by bh...@apache.org.
CLOUDSTACK-9532: Use macchinina as a template for failing tests
- Switches to macchinina as template for VM in the tests
- Modifies the ostype of the macchinina template to 'Other Linux (64-bit)'
- Check template download status, fixes Nonetype iterable issue
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0c146e14
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0c146e14
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0c146e14
Branch: refs/heads/4.8
Commit: 0c146e14c645811c02d6e3c74fd24ed5b3a2953c
Parents: b0d5276
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Tue Oct 4 23:55:46 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Thu Oct 6 16:41:22 2016 +0530
----------------------------------------------------------------------
test/integration/smoke/test_internal_lb.py | 8 +-
test/integration/smoke/test_privategw_acl.py | 4 +-
.../smoke/test_routers_network_ops.py | 76 +++++++++++++++++--
test/integration/smoke/test_snapshots.py | 79 +++++++++++++++++---
test/integration/smoke/test_vpc_redundant.py | 62 +++++++++++++--
test/integration/smoke/test_vpc_vpn.py | 8 +-
tools/marvin/marvin/lib/base.py | 5 +-
7 files changed, 205 insertions(+), 37 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0c146e14/test/integration/smoke/test_internal_lb.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_internal_lb.py b/test/integration/smoke/test_internal_lb.py
index d8a45c0..f2f9364 100644
--- a/test/integration/smoke/test_internal_lb.py
+++ b/test/integration/smoke/test_internal_lb.py
@@ -226,7 +226,7 @@ class Services:
"displaytext": "macchinina kvm",
"format": "qcow2",
"hypervisor": "kvm",
- "ostype": "Other PV (64-bit)",
+ "ostype": "Other Linux (64-bit)",
"url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-kvm.qcow2.bz2",
"requireshvm": "True"
},
@@ -235,7 +235,7 @@ class Services:
"displaytext": "macchinina xen",
"format": "vhd",
"hypervisor": "xenserver",
- "ostype": "Other PV (64-bit)",
+ "ostype": "Other Linux (64-bit)",
"url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-xen.vhd.bz2",
"requireshvm": "True",
},
@@ -244,7 +244,7 @@ class Services:
"displaytext": "macchinina xen",
"format": "vhd",
"hypervisor": "hyperv",
- "ostype": "Other PV (64-bit)",
+ "ostype": "Other Linux (64-bit)",
"url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-hyperv.vhd.zip",
"requireshvm": "True",
},
@@ -253,7 +253,7 @@ class Services:
"displaytext": "macchinina vmware",
"format": "ova",
"hypervisor": "vmware",
- "ostype": "Other PV (64-bit)",
+ "ostype": "Other Linux (64-bit)",
"url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-vmware.ova",
"requireshvm": "True",
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0c146e14/test/integration/smoke/test_privategw_acl.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_privategw_acl.py b/test/integration/smoke/test_privategw_acl.py
index 9d39bdb..33a5d3f 100644
--- a/test/integration/smoke/test_privategw_acl.py
+++ b/test/integration/smoke/test_privategw_acl.py
@@ -242,7 +242,7 @@ class TestPrivateGwACL(cloudstackTestCase):
qresultset = self.dbclient.execute(
"select vnet from op_dc_vnet_alloc where physical_network_id=\
- (select id from physical_network where uuid='%s' ) and taken is NULL;" % physical_network.id
+ (select id from physical_network where uuid='%s' ) and taken is NULL and reservation_id is NULL and account_id is NULL ORDER BY id DESC;" % physical_network.id
)
vlans = qresultset
vlan_1 = int(vlans[0][0])
@@ -369,7 +369,7 @@ class TestPrivateGwACL(cloudstackTestCase):
self.fail("No Physical Networks found!")
qresultset = self.dbclient.execute(
"select vnet from op_dc_vnet_alloc where physical_network_id=\
- (select id from physical_network where uuid='%s' ) and taken is NULL;" % physical_network.id
+ (select id from physical_network where uuid='%s' ) and taken is NULL and reservation_id is NULL and account_id is NULL ORDER BY id DESC;" % physical_network.id
)
vlans = qresultset
vlan_1 = int(vlans[0][0])
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0c146e14/test/integration/smoke/test_routers_network_ops.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_routers_network_ops.py b/test/integration/smoke/test_routers_network_ops.py
index a15150d..93563e2 100644
--- a/test/integration/smoke/test_routers_network_ops.py
+++ b/test/integration/smoke/test_routers_network_ops.py
@@ -16,6 +16,7 @@
# under the License.
# Import Local Modules
+from marvin.codes import PASS, FAILED
from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase
from marvin.cloudstackAPI import (stopVirtualMachine,
@@ -27,6 +28,7 @@ from marvin.lib.utils import (cleanup_resources,
from marvin.lib.base import (ServiceOffering,
VirtualMachine,
Account,
+ Template,
ServiceOffering,
NATRule,
NetworkACL,
@@ -52,6 +54,7 @@ from marvin.lib.common import (get_zone,
import time
import logging
+
def check_router_command(virtual_machine, public_ip, ssh_command, check_string, test_case, retries=5):
result = 'failed'
try:
@@ -63,6 +66,58 @@ def check_router_command(virtual_machine, public_ip, ssh_command, check_string,
logging.debug("Result from SSH into the Virtual Machine: %s" % result)
return result.count(check_string)
+
+class Templates:
+ """Test data for templates
+ """
+
+ def __init__(self):
+ self.templates = {
+ "macchinina": {
+ "kvm": {
+ "name": "tiny-kvm",
+ "displaytext": "macchinina kvm",
+ "format": "qcow2",
+ "hypervisor": "kvm",
+ "ostype": "Other Linux (64-bit)",
+ "url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-kvm.qcow2.bz2",
+ "requireshvm": "True",
+ "ispublic": "True",
+ },
+ "xenserver": {
+ "name": "tiny-xen",
+ "displaytext": "macchinina xen",
+ "format": "vhd",
+ "hypervisor": "xen",
+ "ostype": "Other Linux (64-bit)",
+ "url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-xen.vhd.bz2",
+ "requireshvm": "True",
+ "ispublic": "True",
+ },
+ "hyperv": {
+ "name": "tiny-hyperv",
+ "displaytext": "macchinina xen",
+ "format": "vhd",
+ "hypervisor": "hyperv",
+ "ostype": "Other Linux (64-bit)",
+ "url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-hyperv.vhd.zip",
+ "requireshvm": "True",
+ "ispublic": "True",
+ },
+ "vmware": {
+ "name": "tiny-vmware",
+ "displaytext": "macchinina vmware",
+ "format": "ova",
+ "hypervisor": "vmware",
+ "ostype": "Other Linux (64-bit)",
+ "url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-vmware.ova",
+ "requireshvm": "True",
+ "ispublic": "True",
+ },
+ }
+ }
+
+
class TestRedundantIsolateNetworks(cloudstackTestCase):
@classmethod
@@ -81,12 +136,20 @@ class TestRedundantIsolateNetworks(cloudstackTestCase):
cls.domain = get_domain(cls.api_client)
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
cls.services['mode'] = cls.zone.networktype
- cls.template = get_template(
- cls.api_client,
- cls.zone.id,
- cls.services["ostype"]
- )
+
+ macchinina = Templates().templates["macchinina"]
+ cls.hypervisor = cls.testClient.getHypervisorInfo()
+ cls.logger.debug("Downloading Template: %s from: %s" % (macchinina[cls.hypervisor.lower()],
+ macchinina[cls.hypervisor.lower()]["url"]))
+ cls.template = Template.register(cls.api_client, macchinina[cls.hypervisor.lower()],
+ cls.zone.id, hypervisor=cls.hypervisor.lower(), domainid=cls.domain.id)
+ cls.template.download(cls.api_client)
+
+ if cls.template == FAILED:
+ assert False, "get_template() failed to return template"
+
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
+ cls.services["virtual_machine"]["template"] = cls.template.id
# Create an account, network, VM and IP addresses
cls.account = Account.create(
@@ -122,7 +185,8 @@ class TestRedundantIsolateNetworks(cloudstackTestCase):
cls._cleanup = [
cls.service_offering,
- cls.account
+ cls.account,
+ cls.template
]
return
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0c146e14/test/integration/smoke/test_snapshots.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_snapshots.py b/test/integration/smoke/test_snapshots.py
index 7cd56c8..29a2d72 100644
--- a/test/integration/smoke/test_snapshots.py
+++ b/test/integration/smoke/test_snapshots.py
@@ -22,6 +22,7 @@ from marvin.lib.utils import (cleanup_resources,
is_snapshot_on_nfs)
from marvin.lib.base import (VirtualMachine,
Account,
+ Template,
ServiceOffering,
Snapshot)
from marvin.lib.common import (get_domain,
@@ -32,6 +33,57 @@ from marvin.lib.common import (get_domain,
from marvin.lib.decoratorGenerators import skipTestIf
+class Templates:
+ """Test data for templates
+ """
+
+ def __init__(self):
+ self.templates = {
+ "macchinina": {
+ "kvm": {
+ "name": "tiny-kvm",
+ "displaytext": "macchinina kvm",
+ "format": "qcow2",
+ "hypervisor": "kvm",
+ "ostype": "Other Linux (64-bit)",
+ "url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-kvm.qcow2.bz2",
+ "requireshvm": "True",
+ "ispublic": "True",
+ },
+ "xenserver": {
+ "name": "tiny-xen",
+ "displaytext": "macchinina xen",
+ "format": "vhd",
+ "hypervisor": "xen",
+ "ostype": "Other Linux (64-bit)",
+ "url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-xen.vhd.bz2",
+ "requireshvm": "True",
+ "ispublic": "True",
+ },
+ "hyperv": {
+ "name": "tiny-hyperv",
+ "displaytext": "macchinina xen",
+ "format": "vhd",
+ "hypervisor": "hyperv",
+ "ostype": "Other Linux (64-bit)",
+ "url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-hyperv.vhd.zip",
+ "requireshvm": "True",
+ "ispublic": "True",
+ },
+ "vmware": {
+ "name": "tiny-vmware",
+ "displaytext": "macchinina vmware",
+ "format": "ova",
+ "hypervisor": "vmware",
+ "ostype": "Other Linux (64-bit)",
+ "url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-vmware.ova",
+ "requireshvm": "True",
+ "ispublic": "True",
+ },
+ }
+ }
+
+
class TestSnapshotRootDisk(cloudstackTestCase):
@classmethod
@@ -52,18 +104,18 @@ class TestSnapshotRootDisk(cloudstackTestCase):
cls._cleanup = []
if not cls.hypervisorNotSupported:
- template = get_template(
- cls.apiclient,
- cls.zone.id,
- cls.services["ostype"]
- )
- if template == FAILED:
- assert False, "get_template() failed to return template with description %s" % cls.services[
- "ostype"]
+ macchinina = Templates().templates["macchinina"]
+ cls.template = Template.register(cls.apiclient, macchinina[cls.hypervisor.lower()],
+ cls.zone.id, hypervisor=cls.hypervisor.lower(), domainid=cls.domain.id)
+ cls.template.download(cls.apiclient)
+
+ if cls.template == FAILED:
+ assert False, "get_template() failed to return template"
+
cls.services["domainid"] = cls.domain.id
cls.services["small"]["zoneid"] = cls.zone.id
- cls.services["templates"]["ostypeid"] = template.ostypeid
+ cls.services["templates"]["ostypeid"] = cls.template.ostypeid
cls.services["zoneid"] = cls.zone.id
# Create VMs, NAT Rules etc
@@ -72,23 +124,26 @@ class TestSnapshotRootDisk(cloudstackTestCase):
cls.services["account"],
domainid=cls.domain.id
)
- cls._cleanup.append(cls.account)
cls.service_offering = ServiceOffering.create(
cls.apiclient,
cls.services["service_offerings"]["tiny"]
)
- cls._cleanup.append(cls.service_offering)
cls.virtual_machine = cls.virtual_machine_with_disk = \
VirtualMachine.create(
cls.apiclient,
cls.services["small"],
- templateid=template.id,
+ templateid=cls.template.id,
accountid=cls.account.name,
domainid=cls.account.domainid,
zoneid=cls.zone.id,
serviceofferingid=cls.service_offering.id,
mode=cls.services["mode"]
)
+
+ cls._cleanup.append(cls.virtual_machine)
+ cls._cleanup.append(cls.service_offering)
+ cls._cleanup.append(cls.account)
+ cls._cleanup.append(cls.template)
return
@classmethod
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0c146e14/test/integration/smoke/test_vpc_redundant.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vpc_redundant.py b/test/integration/smoke/test_vpc_redundant.py
index 9e4038a..2c7f4ae 100644
--- a/test/integration/smoke/test_vpc_redundant.py
+++ b/test/integration/smoke/test_vpc_redundant.py
@@ -18,6 +18,7 @@
""" Test redundancy features for VPC routers
"""
+from marvin.codes import PASS, FAILED
from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase
from marvin.lib.base import (stopRouter,
@@ -25,6 +26,7 @@ from marvin.lib.base import (stopRouter,
destroyRouter,
rebootRouter,
Account,
+ Template,
VpcOffering,
VPC,
ServiceOffering,
@@ -191,8 +193,49 @@ class Services:
"publicport": 22,
"protocol": 'TCP',
},
- "ostype": 'CentOS 5.3 (64-bit)',
"timeout": 10,
+ "template": {
+ "kvm": {
+ "name": "tiny-kvm",
+ "displaytext": "macchinina kvm",
+ "format": "qcow2",
+ "hypervisor": "kvm",
+ "ostype": "Other Linux (64-bit)",
+ "url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-kvm.qcow2.bz2",
+ "requireshvm": "True",
+ "ispublic": "True",
+ },
+ "xenserver": {
+ "name": "tiny-xen",
+ "displaytext": "macchinina xen",
+ "format": "vhd",
+ "hypervisor": "xen",
+ "ostype": "Other Linux (64-bit)",
+ "url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-xen.vhd.bz2",
+ "requireshvm": "True",
+ "ispublic": "True",
+ },
+ "hyperv": {
+ "name": "tiny-hyperv",
+ "displaytext": "macchinina xen",
+ "format": "vhd",
+ "hypervisor": "hyperv",
+ "ostype": "Other Linux (64-bit)",
+ "url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-hyperv.vhd.zip",
+ "requireshvm": "True",
+ "ispublic": "True",
+ },
+ "vmware": {
+ "name": "tiny-vmware",
+ "displaytext": "macchinina vmware",
+ "format": "ova",
+ "hypervisor": "vmware",
+ "ostype": "Other Linux (64-bit)",
+ "url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-vmware.ova",
+ "requireshvm": "True",
+ "ispublic": "True",
+ }
+ }
}
@@ -210,17 +253,22 @@ class TestVPCRedundancy(cloudstackTestCase):
# Get Zone, Domain and templates
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,
- cls.services["ostype"])
+
+ cls.hypervisor = cls.testClient.getHypervisorInfo()
+ cls.template = Template.register(cls.api_client, cls.services["template"][cls.hypervisor.lower(
+ )], cls.zone.id, hypervisor=cls.hypervisor.lower(), domainid=cls.domain.id)
+ cls.template.download(cls.api_client)
+
+ if cls.template == FAILED:
+ assert False, "get_template() failed to return template"
+
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
cls.services["virtual_machine"]["template"] = cls.template.id
cls.service_offering = ServiceOffering.create(
cls.api_client,
cls.services["service_offering"])
- cls._cleanup = [cls.service_offering]
+ cls._cleanup = [cls.service_offering, cls.template]
cls.logger = logging.getLogger('TestVPCRedundancy')
cls.stream_handler = logging.StreamHandler()
@@ -592,7 +640,7 @@ class TestVPCRedundancy(cloudstackTestCase):
gc_interval = Configurations.list(self.apiclient, name="network.gc.interval")
self.logger.debug("network.gc.wait is ==> %s" % gc_wait)
- self.logger.debug("network.gc.interval is ==> %s" % gc_wait)
+ self.logger.debug("network.gc.interval is ==> %s" % gc_interval)
total_sleep = 120
if gc_wait and gc_interval:
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0c146e14/test/integration/smoke/test_vpc_vpn.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vpc_vpn.py b/test/integration/smoke/test_vpc_vpn.py
index a0639d5..966f40d 100644
--- a/test/integration/smoke/test_vpc_vpn.py
+++ b/test/integration/smoke/test_vpc_vpn.py
@@ -222,7 +222,7 @@ class Services:
"displaytext": "macchinina kvm",
"format": "qcow2",
"hypervisor": "kvm",
- "ostype": "Other PV (64-bit)",
+ "ostype": "Other Linux (64-bit)",
"url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-kvm.qcow2.bz2",
"requireshvm": "True",
},
@@ -232,7 +232,7 @@ class Services:
"displaytext": "macchinina xen",
"format": "vhd",
"hypervisor": "xen",
- "ostype": "Other PV (64-bit)",
+ "ostype": "Other Linux (64-bit)",
"url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-xen.vhd.bz2",
"requireshvm": "True",
},
@@ -242,7 +242,7 @@ class Services:
"displaytext": "macchinina xen",
"format": "vhd",
"hypervisor": "hyperv",
- "ostype": "Other PV (64-bit)",
+ "ostype": "Other Linux (64-bit)",
"url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-hyperv.vhd.zip",
"requireshvm": "True",
},
@@ -252,7 +252,7 @@ class Services:
"displaytext": "macchinina vmware",
"format": "ova",
"hypervisor": "vmware",
- "ostype": "Other PV (64-bit)",
+ "ostype": "Other Linux (64-bit)",
"url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-vmware.ova",
"requireshvm": "True",
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0c146e14/tools/marvin/marvin/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py
index 91e7fdc..3b81b97 100755
--- a/tools/marvin/marvin/lib/base.py
+++ b/tools/marvin/marvin/lib/base.py
@@ -1250,7 +1250,7 @@ class Template:
if isinstance(template_response, list):
template = template_response[0]
- if retries >=0 and not hasattr(template, 'status'):
+ if not hasattr(template, 'status') or not template or not template.status:
retries = retries - 1
continue
@@ -1390,9 +1390,10 @@ class Iso:
if isinstance(iso_response, list):
response = iso_response[0]
- if retries >= 0 and not hasattr(response, 'status'):
+ if not hasattr(response, 'status') or not response or not response.status:
retries = retries - 1
continue
+
# Check whether download is in progress(for Ex:10% Downloaded)
# or ISO is 'Successfully Installed'
if response.status == 'Successfully Installed' and response.isready:
[13/17] git commit: updated refs/heads/4.8 to a664e03
Posted by bh...@apache.org.
CLOUDSTACK-9527: test_01_test_vm_volume_snapshot making test negative again
- test_01_test_vm_volume_snapshot not supported for Xen, tests keep failing
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b0d52768
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b0d52768
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b0d52768
Branch: refs/heads/4.8
Commit: b0d527688f2bd781d99511ac72c638aeca12f95b
Parents: 5545bca
Author: Boris <bs...@gmail.com>
Authored: Mon Oct 3 17:53:51 2016 +0300
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Thu Oct 6 15:38:08 2016 +0530
----------------------------------------------------------------------
test/integration/smoke/test_vm_snapshots.py | 31 ++++++------------------
1 file changed, 8 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0d52768/test/integration/smoke/test_vm_snapshots.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vm_snapshots.py b/test/integration/smoke/test_vm_snapshots.py
index d173aa4..5fcb80a 100644
--- a/test/integration/smoke/test_vm_snapshots.py
+++ b/test/integration/smoke/test_vm_snapshots.py
@@ -362,12 +362,12 @@ class TestSnapshots(cloudstackTestCase):
@attr(tags=["advanced", "basic", "smoke"], required_hardware="true")
def test_01_test_vm_volume_snapshot(self):
"""
- @Desc: Test that Volume snapshot for root volume is allowed
+ @Desc: Test that Volume snapshot for root volume is not allowed
when VM snapshot is present for the VM
@Steps:
1: Deploy a VM and create a VM snapshot for VM
2: Try to create snapshot for the root volume of the VM,
- It should not fail
+ It should expect Exception
"""
# Creating Virtual Machine
@@ -392,25 +392,10 @@ class TestSnapshots(cloudstackTestCase):
self.assertEqual(validateList(volumes)[0], PASS,
"Failed to get root volume of the VM")
- snapshot = Snapshot.create(
- self.apiclient,
- volumes[0].id,
- account=self.account.name,
- domainid=self.account.domainid
- )
- self.debug("Snapshot created: ID - %s" % snapshot.id)
- snapshots = list_snapshots(
- self.apiclient,
- id=snapshot.id
- )
- self.assertEqual(
- validateList(snapshots)[0],
- PASS,
- "Invalid snapshot list"
- )
- self.assertEqual(
- snapshots[0].id,
- snapshot.id,
- "Check resource id in list resources call"
- )
+ volume = volumes[0]
+
+ with self.assertRaises(Exception):
+ Snapshot.create(self.apiclient,
+ volume_id=volume.id)
+
return
[02/17] git commit: updated refs/heads/4.8 to a664e03
Posted by bh...@apache.org.
CLOUDSTACK-9161: move quota test to plugins
The quota integration test requires special setup and is moved to plugins
directory as in 4.9 and master branch.
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0eb4fae8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0eb4fae8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0eb4fae8
Branch: refs/heads/4.8
Commit: 0eb4fae8b7e6f48a961d424b1f168c277bc82c78
Parents: 79f0adf
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Fri Sep 30 15:12:37 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Wed Oct 5 15:11:00 2016 +0530
----------------------------------------------------------------------
test/integration/plugins/test_quota.py | 204 ++++++++++++++++++++++++++++
test/integration/smoke/test_quota.py | 204 ----------------------------
2 files changed, 204 insertions(+), 204 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0eb4fae8/test/integration/plugins/test_quota.py
----------------------------------------------------------------------
diff --git a/test/integration/plugins/test_quota.py b/test/integration/plugins/test_quota.py
new file mode 100644
index 0000000..d4e4323
--- /dev/null
+++ b/test/integration/plugins/test_quota.py
@@ -0,0 +1,204 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+""" Test cases for checking quota API
+"""
+
+#Import Local Modules
+import marvin
+from marvin.cloudstackTestCase import *
+from marvin.cloudstackAPI import *
+from marvin.lib.utils import *
+from marvin.lib.base import *
+from marvin.lib.common import *
+from marvin.lib.utils import (random_gen)
+from nose.plugins.attrib import attr
+
+#Import System modules
+import time
+
+#ENABLE THE QUOTA PLUGIN AND RESTART THE MANAGEMENT SERVER TO RUN QUOTA TESTS
+
+class TestQuota(cloudstackTestCase):
+
+ def setUp(self):
+ self.apiclient = self.testClient.getApiClient()
+ self.hypervisor = self.testClient.getHypervisorInfo()
+ self.dbclient = self.testClient.getDbConnection()
+ self.services = self.testClient.getParsedTestDataConfig()
+ self.zone = get_zone(self.apiclient, self.testClient.getZoneForTests())
+ self.pod = get_pod(self.apiclient, self.zone.id)
+ self.cleanup = []
+ return
+
+ def tearDown(self):
+ try:
+ #Clean up, terminate the created templates
+ cleanup_resources(self.apiclient, self.cleanup)
+ except Exception as e:
+ raise Exception("Warning: Exception during cleanup : %s" % e)
+ return
+
+ #Check quotaTariffList API returning 22 items
+ @attr(tags=["smoke", "advanced"], required_hardware="false")
+ def test_01_quota(self):
+ cmd = quotaTariffList.quotaTariffListCmd()
+ response = self.apiclient.quotaTariffList(cmd)
+
+ self.debug("Number of quota usage types: %s" % len(response))
+ self.assertEqual(
+ len(response), 22
+ )
+ for quota in response:
+ self.debug("Usage Name: %s" % quota.usageName)
+ self.assertEqual(
+ hasattr(quota, 'usageName'),
+ True,
+ "Check whether usgaeName field is there"
+ )
+
+ return
+
+ #Check quota tariff on a particualr day
+ @attr(tags=["smoke", "advanced"], required_hardware="false")
+ def test_02_quota(self):
+ cmd = quotaTariffList.quotaTariffListCmd()
+ cmd.startdate='2015-07-06'
+ response = self.apiclient.quotaTariffList(cmd)
+
+ self.debug("Number of quota usage types: %s" % len(response))
+ self.assertEqual(
+ len(response), 22
+ )
+
+ return
+
+ #check quota tariff of a particular item
+ @attr(tags=["smoke", "advanced"], required_hardware="false")
+ def test_03_quota(self):
+ cmd = quotaTariffList.quotaTariffListCmd()
+ cmd.startdate='2015-07-06'
+ cmd.usagetype='10'
+ response = self.apiclient.quotaTariffList(cmd)
+
+ self.debug("Number of quota usage types: %s" % len(response))
+ self.assertEqual(
+ len(response), 1
+ )
+ return
+
+
+ #check quota tariff
+ #Change it
+ #Check on affective date the new tariff should be applicable
+ #check the old tariff it should be same
+ @attr(tags=["smoke", "advanced"], required_hardware="false")
+ def test_04_quota(self):
+ cmd = quotaTariffList.quotaTariffListCmd()
+ cmd.startdate='2015-07-06'
+ cmd.usagetype='10'
+ response = self.apiclient.quotaTariffList(cmd)
+
+ self.debug("Number of quota usage types: %s" % len(response))
+ self.assertEqual(
+ len(response), 1
+ )
+ quota = response[0]
+ self.debug("Tariff Value for 10: %s" % quota.tariffValue)
+
+ cmd = quotaTariffUpdate.quotaTariffUpdateCmd()
+ tomorrow = datetime.date.today() + datetime.timedelta(days=1)
+ cmd.startdate=tomorrow
+ cmd.usagetype='10'
+ cmd.value='2.9'
+ response = self.apiclient.quotaTariffUpdate(cmd)
+
+ cmd = quotaTariffList.quotaTariffListCmd()
+ cmd.startdate=tomorrow
+ cmd.usagetype='10'
+ response = self.apiclient.quotaTariffList(cmd)
+ self.assertEqual(
+ len(response), 1
+ )
+ quota = response[0]
+ self.debug("Tariff Value for 10: %s" % quota.tariffValue)
+
+ self.assertEqual( quota.tariffValue, 2.9)
+
+
+ cmd = quotaTariffList.quotaTariffListCmd()
+ cmd.startdate='2015-07-07'
+ cmd.usagetype='10'
+ response = self.apiclient.quotaTariffList(cmd)
+ self.assertEqual(
+ len(response), 1
+ )
+ quota = response[0]
+ self.debug("Tariff Value for 10: %s" % quota.tariffValue)
+
+ self.assertEqual( quota.tariffValue, 0)
+
+ return
+
+
+ #Make credit deposit
+ @attr(tags=["smoke", "advanced"], required_hardware="false")
+ def test_05_quota(self):
+ cmd = quotaCredits.quotaCreditsCmd()
+ cmd.domainid = '1'
+ cmd.account = 'admin'
+ cmd.value = '10'
+ cmd.quota_enforce = '1'
+ cmd.min_balance = '9'
+ response = self.apiclient.quotaCredits(cmd)
+
+ self.debug("Credit response update on: %s" % response.updated_on)
+
+ return
+
+
+ #Make credit deposit and check today balance
+ @attr(tags=["smoke", "advanced"], required_hardware="false")
+ def test_06_quota(self):
+ cmd = quotaBalance.quotaBalanceCmd()
+ today = datetime.date.today()
+ cmd.domainid = '1'
+ cmd.account = 'admin'
+ cmd.startdate = today
+ response = self.apiclient.quotaBalance(cmd)
+
+ self.debug("Quota Balance on: %s" % response.startdate)
+ self.debug("is: %s" % response.startquota)
+
+ self.assertGreater( response.startquota, 9)
+ return
+
+ #make credit deposit and check start and end date balances
+ @attr(tags=["smoke", "advanced"], required_hardware="false")
+ def test_07_quota(self):
+ cmd = quotaBalance.quotaBalanceCmd()
+ today = datetime.date.today()
+ cmd.domainid = '1'
+ cmd.account = 'admin'
+ cmd.startdate = today - datetime.timedelta(days=2)
+ cmd.enddate = today
+ response = self.apiclient.quotaBalance(cmd)
+
+ self.debug("Quota Balance on: %s" % response.startdate)
+ self.debug("is: %s" % response.startquota)
+
+ self.assertGreater( response.endquota, 9)
+ return
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0eb4fae8/test/integration/smoke/test_quota.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_quota.py b/test/integration/smoke/test_quota.py
deleted file mode 100644
index d4e4323..0000000
--- a/test/integration/smoke/test_quota.py
+++ /dev/null
@@ -1,204 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-""" Test cases for checking quota API
-"""
-
-#Import Local Modules
-import marvin
-from marvin.cloudstackTestCase import *
-from marvin.cloudstackAPI import *
-from marvin.lib.utils import *
-from marvin.lib.base import *
-from marvin.lib.common import *
-from marvin.lib.utils import (random_gen)
-from nose.plugins.attrib import attr
-
-#Import System modules
-import time
-
-#ENABLE THE QUOTA PLUGIN AND RESTART THE MANAGEMENT SERVER TO RUN QUOTA TESTS
-
-class TestQuota(cloudstackTestCase):
-
- def setUp(self):
- self.apiclient = self.testClient.getApiClient()
- self.hypervisor = self.testClient.getHypervisorInfo()
- self.dbclient = self.testClient.getDbConnection()
- self.services = self.testClient.getParsedTestDataConfig()
- self.zone = get_zone(self.apiclient, self.testClient.getZoneForTests())
- self.pod = get_pod(self.apiclient, self.zone.id)
- self.cleanup = []
- return
-
- def tearDown(self):
- try:
- #Clean up, terminate the created templates
- cleanup_resources(self.apiclient, self.cleanup)
- except Exception as e:
- raise Exception("Warning: Exception during cleanup : %s" % e)
- return
-
- #Check quotaTariffList API returning 22 items
- @attr(tags=["smoke", "advanced"], required_hardware="false")
- def test_01_quota(self):
- cmd = quotaTariffList.quotaTariffListCmd()
- response = self.apiclient.quotaTariffList(cmd)
-
- self.debug("Number of quota usage types: %s" % len(response))
- self.assertEqual(
- len(response), 22
- )
- for quota in response:
- self.debug("Usage Name: %s" % quota.usageName)
- self.assertEqual(
- hasattr(quota, 'usageName'),
- True,
- "Check whether usgaeName field is there"
- )
-
- return
-
- #Check quota tariff on a particualr day
- @attr(tags=["smoke", "advanced"], required_hardware="false")
- def test_02_quota(self):
- cmd = quotaTariffList.quotaTariffListCmd()
- cmd.startdate='2015-07-06'
- response = self.apiclient.quotaTariffList(cmd)
-
- self.debug("Number of quota usage types: %s" % len(response))
- self.assertEqual(
- len(response), 22
- )
-
- return
-
- #check quota tariff of a particular item
- @attr(tags=["smoke", "advanced"], required_hardware="false")
- def test_03_quota(self):
- cmd = quotaTariffList.quotaTariffListCmd()
- cmd.startdate='2015-07-06'
- cmd.usagetype='10'
- response = self.apiclient.quotaTariffList(cmd)
-
- self.debug("Number of quota usage types: %s" % len(response))
- self.assertEqual(
- len(response), 1
- )
- return
-
-
- #check quota tariff
- #Change it
- #Check on affective date the new tariff should be applicable
- #check the old tariff it should be same
- @attr(tags=["smoke", "advanced"], required_hardware="false")
- def test_04_quota(self):
- cmd = quotaTariffList.quotaTariffListCmd()
- cmd.startdate='2015-07-06'
- cmd.usagetype='10'
- response = self.apiclient.quotaTariffList(cmd)
-
- self.debug("Number of quota usage types: %s" % len(response))
- self.assertEqual(
- len(response), 1
- )
- quota = response[0]
- self.debug("Tariff Value for 10: %s" % quota.tariffValue)
-
- cmd = quotaTariffUpdate.quotaTariffUpdateCmd()
- tomorrow = datetime.date.today() + datetime.timedelta(days=1)
- cmd.startdate=tomorrow
- cmd.usagetype='10'
- cmd.value='2.9'
- response = self.apiclient.quotaTariffUpdate(cmd)
-
- cmd = quotaTariffList.quotaTariffListCmd()
- cmd.startdate=tomorrow
- cmd.usagetype='10'
- response = self.apiclient.quotaTariffList(cmd)
- self.assertEqual(
- len(response), 1
- )
- quota = response[0]
- self.debug("Tariff Value for 10: %s" % quota.tariffValue)
-
- self.assertEqual( quota.tariffValue, 2.9)
-
-
- cmd = quotaTariffList.quotaTariffListCmd()
- cmd.startdate='2015-07-07'
- cmd.usagetype='10'
- response = self.apiclient.quotaTariffList(cmd)
- self.assertEqual(
- len(response), 1
- )
- quota = response[0]
- self.debug("Tariff Value for 10: %s" % quota.tariffValue)
-
- self.assertEqual( quota.tariffValue, 0)
-
- return
-
-
- #Make credit deposit
- @attr(tags=["smoke", "advanced"], required_hardware="false")
- def test_05_quota(self):
- cmd = quotaCredits.quotaCreditsCmd()
- cmd.domainid = '1'
- cmd.account = 'admin'
- cmd.value = '10'
- cmd.quota_enforce = '1'
- cmd.min_balance = '9'
- response = self.apiclient.quotaCredits(cmd)
-
- self.debug("Credit response update on: %s" % response.updated_on)
-
- return
-
-
- #Make credit deposit and check today balance
- @attr(tags=["smoke", "advanced"], required_hardware="false")
- def test_06_quota(self):
- cmd = quotaBalance.quotaBalanceCmd()
- today = datetime.date.today()
- cmd.domainid = '1'
- cmd.account = 'admin'
- cmd.startdate = today
- response = self.apiclient.quotaBalance(cmd)
-
- self.debug("Quota Balance on: %s" % response.startdate)
- self.debug("is: %s" % response.startquota)
-
- self.assertGreater( response.startquota, 9)
- return
-
- #make credit deposit and check start and end date balances
- @attr(tags=["smoke", "advanced"], required_hardware="false")
- def test_07_quota(self):
- cmd = quotaBalance.quotaBalanceCmd()
- today = datetime.date.today()
- cmd.domainid = '1'
- cmd.account = 'admin'
- cmd.startdate = today - datetime.timedelta(days=2)
- cmd.enddate = today
- response = self.apiclient.quotaBalance(cmd)
-
- self.debug("Quota Balance on: %s" % response.startdate)
- self.debug("is: %s" % response.startquota)
-
- self.assertGreater( response.endquota, 9)
- return
[04/17] git commit: updated refs/heads/4.8 to a664e03
Posted by bh...@apache.org.
fix ping tests to properly recognise successful ping test
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/47104cf2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/47104cf2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/47104cf2
Branch: refs/heads/4.8
Commit: 47104cf2b359800be55b34a546a7085a67add86b
Parents: 7a1efd6
Author: Paul Angus <pa...@shapeblue.com>
Authored: Mon Sep 26 12:08:41 2016 +0100
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Wed Oct 5 15:11:00 2016 +0530
----------------------------------------------------------------------
test/integration/smoke/test_password_server.py | 4 ++--
test/integration/smoke/test_router_dhcphosts.py | 4 ++--
test/integration/smoke/test_routers_network_ops.py | 8 ++++----
test/integration/smoke/test_vpc_redundant.py | 4 ++--
test/integration/smoke/test_vpc_router_nics.py | 4 ++--
5 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/47104cf2/test/integration/smoke/test_password_server.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_password_server.py b/test/integration/smoke/test_password_server.py
index c10478f..a85bd54 100644
--- a/test/integration/smoke/test_password_server.py
+++ b/test/integration/smoke/test_password_server.py
@@ -180,12 +180,12 @@ class TestIsolatedNetworksPasswdServer(cloudstackTestCase):
ssh = vm.get_ssh_client(ipaddress=nat_rule.ipaddress, port=self.services[rule_label]["publicport"], retries=5)
result = str(ssh.execute(ssh_command))
- self.logger.debug("SSH result: %s; COUNT is ==> %s" % (result, result.count("3 packets received")))
+ self.logger.debug("SSH result: %s; COUNT is ==> %s" % (result, result.count(" 0% packet loss")))
except:
self.fail("Failed to SSH into VM - %s" % (nat_rule.ipaddress))
self.assertEqual(
- result.count("3 packets received"),
+ result.count(" 0% packet loss"),
1,
"Ping to outside world from VM should be successful"
)
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/47104cf2/test/integration/smoke/test_router_dhcphosts.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_router_dhcphosts.py b/test/integration/smoke/test_router_dhcphosts.py
index 1681674..c90599b 100644
--- a/test/integration/smoke/test_router_dhcphosts.py
+++ b/test/integration/smoke/test_router_dhcphosts.py
@@ -188,12 +188,12 @@ class TestRouterDHCPHosts(cloudstackTestCase):
ssh = vm.get_ssh_client(ipaddress=nat_rule.ipaddress, port=self.services[rule_label]["publicport"], retries=5)
result = str(ssh.execute(ssh_command))
- self.logger.debug("SSH result: %s; COUNT is ==> %s" % (result, result.count("3 packets received")))
+ self.logger.debug("SSH result: %s; COUNT is ==> %s" % (result, result.count(" 0% packet loss")))
except:
self.fail("Failed to SSH into VM - %s" % (nat_rule.ipaddress))
self.assertEqual(
- result.count("3 packets received"),
+ result.count(" 0% packet loss"),
1,
"Ping to outside world from VM should be successful"
)
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/47104cf2/test/integration/smoke/test_routers_network_ops.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_routers_network_ops.py b/test/integration/smoke/test_routers_network_ops.py
index 94c0774..a15150d 100644
--- a/test/integration/smoke/test_routers_network_ops.py
+++ b/test/integration/smoke/test_routers_network_ops.py
@@ -270,7 +270,7 @@ class TestRedundantIsolateNetworks(cloudstackTestCase):
# Test SSH after closing port 22
expected = 1
ssh_command = "ping -c 3 8.8.8.8"
- check_string = "3 packets received"
+ check_string = " 0% packet loss"
result = check_router_command(virtual_machine, nat_rule.ipaddress, ssh_command, check_string, self)
self.assertEqual(
@@ -434,7 +434,7 @@ class TestRedundantIsolateNetworks(cloudstackTestCase):
expected = 0
ssh_command = "ping -c 3 8.8.8.8"
- check_string = "3 packets received"
+ check_string = " 0% packet loss"
result = check_router_command(virtual_machine, nat_rule.ipaddress, ssh_command, check_string, self)
self.assertEqual(
@@ -822,7 +822,7 @@ class TestIsolatedNetworks(cloudstackTestCase):
# Test SSH after closing port 22
expected = 1
ssh_command = "ping -c 3 8.8.8.8"
- check_string = "3 packets received"
+ check_string = " 0% packet loss"
result = check_router_command(virtual_machine, nat_rule.ipaddress, ssh_command, check_string, self)
self.assertEqual(
@@ -977,7 +977,7 @@ class TestIsolatedNetworks(cloudstackTestCase):
expected = 0
ssh_command = "ping -c 3 8.8.8.8"
- check_string = "3 packets received"
+ check_string = " 0% packet loss"
result = check_router_command(virtual_machine, nat_rule.ipaddress, ssh_command, check_string, self)
self.assertEqual(
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/47104cf2/test/integration/smoke/test_vpc_redundant.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vpc_redundant.py b/test/integration/smoke/test_vpc_redundant.py
index fbaa5b9..9e4038a 100644
--- a/test/integration/smoke/test_vpc_redundant.py
+++ b/test/integration/smoke/test_vpc_redundant.py
@@ -695,14 +695,14 @@ class TestVPCRedundancy(cloudstackTestCase):
self.logger.debug("Ping to google.com from VM")
result = str(ssh.execute(ssh_command))
- self.logger.debug("SSH result: %s; COUNT is ==> %s" % (result, result.count("3 packets received")))
+ self.logger.debug("SSH result: %s; COUNT is ==> %s" % (result, result.count(" 0% packet loss")))
except Exception as e:
self.fail("SSH Access failed for %s: %s" % \
(vmObj.get_ip(), e)
)
self.assertEqual(
- result.count("3 packets received"),
+ result.count(" 0% packet loss"),
1,
"Ping to outside world from VM should be successful"
)
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/47104cf2/test/integration/smoke/test_vpc_router_nics.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vpc_router_nics.py b/test/integration/smoke/test_vpc_router_nics.py
index cb0734d..39a9214 100644
--- a/test/integration/smoke/test_vpc_router_nics.py
+++ b/test/integration/smoke/test_vpc_router_nics.py
@@ -464,14 +464,14 @@ class TestVPCNics(cloudstackTestCase):
self.logger.debug("Ping to google.com from VM")
result = str(ssh.execute(ssh_command))
- self.logger.debug("SSH result: %s; COUNT is ==> %s" % (result, result.count("3 packets received")))
+ self.logger.debug("SSH result: %s; COUNT is ==> %s" % (result, result.count(" 0% packet loss")))
except Exception as e:
self.fail("SSH Access failed for %s: %s" % \
(vmObj.get_ip(), e)
)
self.assertEqual(
- result.count("3 packets received"),
+ result.count(" 0% packet loss"),
1,
"Ping to outside world from VM should be successful"
)