You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/07/17 15:58:15 UTC
[1/4] git commit: updated refs/heads/master to 22cb5be
Updated Branches:
refs/heads/master 2d6644d96 -> 22cb5be8b
CLOUDSTACK-2273: cleanup using user api client for domain admins
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9f9510be
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9f9510be
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9f9510be
Branch: refs/heads/master
Commit: 9f9510be9189346ed72ff92705d284de91d53c6f
Parents: cfd892f
Author: ashutoshkelkar <as...@clogeny.com>
Authored: Wed Jul 17 15:26:34 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Wed Jul 17 19:23:57 2013 +0530
----------------------------------------------------------------------
test/integration/component/test_assign_vm.py | 29 +++++++++++++++++++----
1 file changed, 24 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9f9510be/test/integration/component/test_assign_vm.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_assign_vm.py b/test/integration/component/test_assign_vm.py
index 8bc98fe..55c174b 100644
--- a/test/integration/component/test_assign_vm.py
+++ b/test/integration/component/test_assign_vm.py
@@ -353,8 +353,11 @@ class TestVMOwnership(cloudstackTestCase):
# 1. deploy VM in sub subdomain1
# 2. stop VM in sub subdomain1
# 3. assignVirtualMachine to subdomain2
+ userapiclient = self.testClient.getUserApiClient(account=self.sdomain_account_user1['account'].name,
+ domain=self.sdomain_account_user1['domain'].name,
+ type=2)
self.create_vm(self.sdomain_account_user1['account'], self.sdomain_account_user1['domain'])
- self.assertRaises(Exception, self.virtual_machine.assign_virtual_machine, self.apiclient, self.sdomain_account_user2['account'].name ,self.sdomain_account_user2['domain'].id)
+ self.assertRaises(Exception, self.virtual_machine.assign_virtual_machine, userapiclient, self.sdomain_account_user2['account'].name ,self.sdomain_account_user2['domain'].id)
@attr(tags = ["advanced"])
@log_test_exceptions
@@ -386,8 +389,11 @@ class TestVMOwnership(cloudstackTestCase):
# Validate the following:
# 1. deploy VM in sub subdomain1 with volumes.
# 3. assignVirtualMachine to subdomain2
+ userapiclient = self.testClient.getUserApiClient(account=self.sdomain_account_user1['account'].name,
+ domain=self.sdomain_account_user1['domain'].name,
+ type=2)
self.create_vm(self.sdomain_account_user1['account'], self.sdomain_account_user1['domain'],volume=self.sdomain_account_user1['volume'])
- self.assertRaises(Exception, self.virtual_machine.assign_virtual_machine, self.apiclient, self.sdomain_account_user2['account'].name ,self.sdomain_account_user2['domain'].id)
+ self.assertRaises(Exception, self.virtual_machine.assign_virtual_machine, userapiclient, self.sdomain_account_user2['account'].name ,self.sdomain_account_user2['domain'].id)
# Check all volumes attached to same VM
list_volume_response = list_volumes(self.apiclient,
virtualmachineid=self.virtual_machine.id,
@@ -398,6 +404,8 @@ class TestVMOwnership(cloudstackTestCase):
"Check list volumes response for valid list")
self.assertNotEqual(list_volume_response[0].domainid, self.sdomain_account_user2['domain'].id, "Volume ownership not changed.")
+ self.virtual_machine.detach_volume(self.apiclient,
+ self.sdomain_account_user1['volume'])
@attr(tags = ["advanced"])
@log_test_exceptions
@@ -423,8 +431,11 @@ class TestVMOwnership(cloudstackTestCase):
# Validate the following:
# 1. deploy VM in sub subdomain1 with snapshot.
# 3. assignVirtualMachine to subdomain2
+ userapiclient = self.testClient.getUserApiClient(account=self.sdomain_account_user1['account'].name,
+ domain=self.sdomain_account_user1['domain'].name,
+ type=2)
self.create_vm(self.sdomain_account_user1['account'], self.sdomain_account_user1['domain'], project=self.sdomain_account_user1['project'])
- self.assertRaises(Exception, self.virtual_machine.assign_virtual_machine, self.apiclient, self.sdomain_account_user2['account'].name ,self.sdomain_account_user2['domain'].id)
+ self.assertRaises(Exception, self.virtual_machine.assign_virtual_machine, userapiclient, self.sdomain_account_user2['account'].name ,self.sdomain_account_user2['domain'].id)
@attr(tags = ["advanced"])
@log_test_exceptions
@@ -439,8 +450,11 @@ class TestVMOwnership(cloudstackTestCase):
account=self.sdomain_account_user2['account'].name,
domainid=self.sdomain_account_user2['domain'].id,
max=0)
+ userapiclient = self.testClient.getUserApiClient(account=self.sdomain_account_user1['account'].name,
+ domain=self.sdomain_account_user1['domain'].name,
+ type=2)
self.create_vm(self.sdomain_account_user1['account'], self.sdomain_account_user1['domain'], snapshot=True)
- self.assertRaises(Exception, self.virtual_machine.assign_virtual_machine, self.apiclient, self.sdomain_account_user2['account'].name ,self.sdomain_account_user2['domain'].id)
+ self.assertRaises(Exception, self.virtual_machine.assign_virtual_machine, userapiclient, self.sdomain_account_user2['account'].name ,self.sdomain_account_user2['domain'].id)
@attr(tags = ["advanced"])
@log_test_exceptions
@@ -456,5 +470,10 @@ class TestVMOwnership(cloudstackTestCase):
account=self.sdomain_account_user2['account'].name,
domainid=self.sdomain_account_user2['domain'].id,
max=0)
+ userapiclient = self.testClient.getUserApiClient(account=self.sdomain_account_user1['account'].name,
+ domain=self.sdomain_account_user1['domain'].name,
+ type=2)
self.create_vm(self.sdomain_account_user1['account'], self.sdomain_account_user1['domain'], snapshot=True, volume=self.sdomain_account_user1['volume'])
- self.assertRaises(Exception, self.virtual_machine.assign_virtual_machine, self.apiclient, self.sdomain_account_user2['account'].name ,self.sdomain_account_user2['domain'].id)
+ self.assertRaises(Exception, self.virtual_machine.assign_virtual_machine, userapiclient, self.sdomain_account_user2['account'].name ,self.sdomain_account_user2['domain'].id)
+ self.virtual_machine.detach_volume(self.apiclient,
+ self.sdomain_account_user1['volume'])
[2/4] git commit: updated refs/heads/master to 22cb5be
Posted by ts...@apache.org.
Fixes CLOUDSTACK-3582
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cfd892fc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cfd892fc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cfd892fc
Branch: refs/heads/master
Commit: cfd892fc3b72def40ab4cde78a7b844510bb860a
Parents: 2d6644d
Author: Sowmya Krishnan <so...@citrix.com>
Authored: Wed Jul 17 12:16:53 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Wed Jul 17 19:23:57 2013 +0530
----------------------------------------------------------------------
test/integration/component/test_netscaler_lb.py | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cfd892fc/test/integration/component/test_netscaler_lb.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_netscaler_lb.py b/test/integration/component/test_netscaler_lb.py
index 146b4c6..4253ada 100644
--- a/test/integration/component/test_netscaler_lb.py
+++ b/test/integration/component/test_netscaler_lb.py
@@ -2778,11 +2778,27 @@ class TestVmWithLb(cloudstackTestCase):
hostnames.append(result)
self.debug("Hostnames: %s" % str(hostnames))
- self.assertNotEqual(
+ if hostnames[0] == hostnames[1]:
+ ssh_3 = self.vm_2.get_ssh_client(
+ ipaddress=self.public_ip_1.ipaddress.ipaddress,
+ reconnect=True
+ )
+ self.debug("Command: hostname")
+ result = ssh_3.execute("hostname")
+ self.debug("Output: %s" % result)
+ hostnames.append(result)
+
+ self.assertNotEqual(
hostnames[0],
- hostnames[1],
+ hostnames[2],
"Both request should be served by different instances"
)
+ else:
+ self.assertNotEqual(
+ hostnames[0],
+ hostnames[1],
+ "Both request should be served by different instances"
+ )
except Exception as e:
self.fail("Exception occured during SSH: %s - %s" % (
self.public_ip_1.ipaddress.ipaddress,
[3/4] git commit: updated refs/heads/master to 22cb5be
Posted by ts...@apache.org.
CLOUDSTACK-3586: Fixed regression test cases for Affinity Groups
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/234db056
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/234db056
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/234db056
Branch: refs/heads/master
Commit: 234db0561ffd7499f1237fb5b7428c0b6fc51601
Parents: 9f9510b
Author: Girish Shilamkar <gi...@clogeny.com>
Authored: Wed Jul 17 00:39:18 2013 -0400
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Wed Jul 17 19:23:58 2013 +0530
----------------------------------------------------------------------
test/integration/component/test_affinity_groups.py | 4 ++--
tools/marvin/marvin/integration/lib/base.py | 7 +++++--
2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/234db056/test/integration/component/test_affinity_groups.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_affinity_groups.py b/test/integration/component/test_affinity_groups.py
index 44bf90c..be93827 100644
--- a/test/integration/component/test_affinity_groups.py
+++ b/test/integration/component/test_affinity_groups.py
@@ -1078,7 +1078,7 @@ class TestDeployVMAffinityGroups(cloudstackTestCase):
templateid=self.template.id,
serviceofferingid=self.service_offering.id,
affinitygroupnames=ag_list,
- affinitygroupids=ag_ids
+ affinitygroupids=ag_ids
)
self.debug('Created VM=%s in Affinity Group=%s' %
(vm.id, ag_list))
@@ -1114,7 +1114,7 @@ class TestDeployVMAffinityGroups(cloudstackTestCase):
"""
self.create_aff_grp(aff_grp=self.services["host_anti_affinity_0"])
- vm1, hostid1 = self.create_vm_in_aff_grps([self.aff_grp[0].name])
+ vm1, hostid1 = self.create_vm_in_aff_grps(ag_list=[self.aff_grp[0].name])
vm1.delete(self.api_client)
wait_for_cleanup(self.apiclient, ["expunge.delay", "expunge.interval"])
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/234db056/tools/marvin/marvin/integration/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py
index bc8c603..161d03c 100755
--- a/tools/marvin/marvin/integration/lib/base.py
+++ b/tools/marvin/marvin/integration/lib/base.py
@@ -237,7 +237,7 @@ class VirtualMachine:
def create(cls, apiclient, services, templateid=None, accountid=None,
domainid=None, zoneid=None, networkids=None, serviceofferingid=None,
securitygroupids=None, projectid=None, startvm=None,
- diskofferingid=None, affinitygroupnames=None, group=None,
+ diskofferingid=None, affinitygroupnames=None, affinitygroupids=None, group=None,
hostid=None, keypair=None, mode='basic', method='GET'):
"""Create the instance"""
@@ -299,6 +299,9 @@ class VirtualMachine:
elif affinitygroupnames:
cmd.affinitygroupnames = affinitygroupnames
+ if affinitygroupids:
+ cmd.affinitygroupids = affinitygroupids
+
if projectid:
cmd.projectid = projectid
@@ -2988,7 +2991,7 @@ class AffinityGroup:
if name is not None:
cmd.name = name
if account is not None:
- cmd.account = account
+ cmd.accountname = account
if domainid is not None:
cmd.domaindid = domainid
[4/4] git commit: updated refs/heads/master to 22cb5be
Posted by ts...@apache.org.
CLOUDSTACK-3592: Fix project email reference.
Emails belong to user's within accounts. Refer to the first user within
the account and use his email for account invites.
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/22cb5be8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/22cb5be8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/22cb5be8
Branch: refs/heads/master
Commit: 22cb5be8b6e38fb9e27f86e264c6438e10192311
Parents: 234db05
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Wed Jul 17 19:22:58 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Wed Jul 17 19:26:21 2013 +0530
----------------------------------------------------------------------
test/integration/component/test_projects.py | 28 ++++++++++++++----------
1 file changed, 16 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/22cb5be8/test/integration/component/test_projects.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_projects.py b/test/integration/component/test_projects.py
index 5f37f96..39e9bee 100644
--- a/test/integration/component/test_projects.py
+++ b/test/integration/component/test_projects.py
@@ -170,8 +170,7 @@ class TestMultipleProjectCreation(cloudstackTestCase):
@attr(tags = ["advanced", "basic", "sg", "eip", "advancedns", "simulator"])
def test_01_create_multiple_projects_by_account(self):
- """ Verify an account can own multiple projects and can belong to
- multiple projects
+ """ Verify an account can own multiple projects and can belong to multiple projects
"""
# Validate the following
# 1. Create multiple project. Verify at step 1 An account is allowed
@@ -245,22 +244,27 @@ class TestMultipleProjectCreation(cloudstackTestCase):
"Check list project response returns a valid project"
)
+ self.assert_(isinstance(self.user.user, list))
+ self.assert_(len(self.user.user) > 0, msg="Account %s has no users" % self.user.name)
+ self.debug("Adding account %s to project with email %s" % (self.user.name, self.user.user[0].email))
+ email = self.user.user[0].email
+
# Add user to the project
project_1.addAccount(
self.apiclient,
self.user.name,
- self.user.email
+ email
)
# listProjectAccount to verify the user is added to project or not
- accounts_reponse = Project.listAccounts(
+ accounts_response = Project.listAccounts(
self.apiclient,
projectid=project_1.id,
account=self.user.name,
)
- self.debug(accounts_reponse)
+ self.debug(accounts_response)
self.assertEqual(
- isinstance(accounts_reponse, list),
+ isinstance(accounts_response, list),
True,
"Check for a valid list accounts response"
)
@@ -270,7 +274,7 @@ class TestMultipleProjectCreation(cloudstackTestCase):
0,
"Check list project response returns a valid project"
)
- account = accounts_reponse[0]
+ account = accounts_response[0]
self.assertEqual(
account.role,
@@ -281,18 +285,18 @@ class TestMultipleProjectCreation(cloudstackTestCase):
project_2.addAccount(
self.apiclient,
self.user.name,
- self.user.email
+ email
)
# listProjectAccount to verify the user is added to project or not
- accounts_reponse = Project.listAccounts(
+ accounts_response = Project.listAccounts(
self.apiclient,
projectid=project_2.id,
account=self.user.name,
)
- self.debug(accounts_reponse)
+ self.debug(accounts_response)
self.assertEqual(
- isinstance(accounts_reponse, list),
+ isinstance(accounts_response, list),
True,
"Check for a valid list accounts response"
)
@@ -302,7 +306,7 @@ class TestMultipleProjectCreation(cloudstackTestCase):
0,
"Check list project response returns a valid project"
)
- account = accounts_reponse[0]
+ account = accounts_response[0]
self.assertEqual(
account.role,