cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [1/3] git commit: updated refs/heads/rbac to e5d7226
Date Mon, 03 Mar 2014 00:15:23 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/rbac bf479e75c -> e5d722654


Fix IAM VM marvin test.

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

Branch: refs/heads/rbac
Commit: ae9be657e4674cf18cf05a1f63c50bcae675a99e
Parents: bf479e7
Author: Min Chen <min.chen@citrix.com>
Authored: Fri Feb 28 17:33:10 2014 -0800
Committer: Min Chen <min.chen@citrix.com>
Committed: Fri Feb 28 17:33:10 2014 -0800

----------------------------------------------------------------------
 test/integration/smoke/test_vm_iam.py       | 52 ++++++++++++------------
 tools/marvin/marvin/integration/lib/base.py |  2 +-
 2 files changed, 27 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae9be657/test/integration/smoke/test_vm_iam.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vm_iam.py b/test/integration/smoke/test_vm_iam.py
index 48bc884..89e1c1c 100644
--- a/test/integration/smoke/test_vm_iam.py
+++ b/test/integration/smoke/test_vm_iam.py
@@ -85,7 +85,7 @@ class Services:
                     "memory": 128,
                 },
             },
-            "ostype": 'CentOS 5.3 (64-bit)',
+            "ostype": 'CentOS 5.6 (64-bit)',
             # iam group and policy information
             "service_desk_iam_grp" : {
                 "name" : "Service Desk",
@@ -106,7 +106,7 @@ class TestVMIam(cloudstackTestCase):
         self.apiclient = super(TestVMIam, self).getClsTestClient().getApiClient()
         self.services = Services().services
         
-        # backup default apikey and secretkey
+         # backup default apikey and secretkey
         self.default_apikey = self.apiclient.connection.apiKey
         self.default_secretkey = self.apiclient.connection.securityKey
 
@@ -230,7 +230,7 @@ class TestVMIam(cloudstackTestCase):
             self.apiclient, 
             self.services["service_desk_iam_grp"]
         )                             
- 
+
         self.vm_read_policy = IAMPolicy.create(
             self.apiclient, 
             self.services["vm_readonly_iam_policy"]
@@ -255,7 +255,7 @@ class TestVMIam(cloudstackTestCase):
                         self.srv_desk_grp,
                         self.vm_grant_policy
                         ]
-
+ 
     @classmethod
     def tearDownClass(self):
         self.apiclient = super(TestVMIAM, self).getClsTestClient().getApiClient()
@@ -270,7 +270,7 @@ class TestVMIam(cloudstackTestCase):
     def tearDown(self):
         # restore back default apikey and secretkey
         self.apiclient.connection.apiKey = self.default_apikey
-        self.apiclient.connection.secretKey = self.default_secretkey
+        self.apiclient.connection.securityKey = self.default_secretkey
         cleanup_resources(self.apiclient, self.cleanup)
         return
 
@@ -282,7 +282,7 @@ class TestVMIam(cloudstackTestCase):
         self.debug("Listing VM for account: %s" % self.account_1A.name)
 
         self.apiclient.connection.apiKey = self.user_1A_apikey
-        self.apiclient.connection.secretKey = self.user_1A_secretkey
+        self.apiclient.connection.securityKey = self.user_1A_secretkey
         list_vm_response = list_virtual_machines(
                                             self.apiclient
                                             )
@@ -303,9 +303,9 @@ class TestVMIam(cloudstackTestCase):
             "Virtual Machine names do not match"
         )
 
-        self.debug("Listing VM for account: %s" % self.account_1B.id)
+        self.debug("Listing VM for account: %s" % self.account_1B.name)
         self.apiclient.connection.apiKey = self.user_1B_apikey
-        self.apiclient.connection.secretKey = self.user_1B_secretkey
+        self.apiclient.connection.securityKey = self.user_1B_secretkey
         list_vm_response = list_virtual_machines(
                                             self.apiclient
                                             )
@@ -326,10 +326,10 @@ class TestVMIam(cloudstackTestCase):
             "Virtual Machine names do not match"
         )
         
-        self.debug("Listing VM for account: %s" % self.account_2A.id)
+        self.debug("Listing VM for account: %s" % self.account_2A.name)
 
         self.apiclient.connection.apiKey = self.user_2A_apikey
-        self.apiclient.connection.secretKey = self.user_2A_secretkey
+        self.apiclient.connection.securityKey = self.user_2A_secretkey
         list_vm_response = list_virtual_machines(
                                             self.apiclient
                                             )
@@ -362,7 +362,7 @@ class TestVMIam(cloudstackTestCase):
 
         self.debug("Granting Domain %s VM read only access to account: %s" % (self.domain_2.name,
self.account_1B.name))
         
-        self.srv_desk_grp.addAccount(self.apiclient, [self.account_1B.id])
+        self.srv_desk_grp.addAccount(self.apiclient, [self.account_1B])
         domain_permission = {}
         domain_permission['action'] = "listVirtualMachines"
         domain_permission['entitytype'] = "VirtualMachine"
@@ -370,9 +370,9 @@ class TestVMIam(cloudstackTestCase):
         domain_permission['scopeid'] = self.domain_2.id
         self.vm_read_policy.addPermission(self.apiclient, domain_permission)
         
-        self.debug("Listing VM for account: %s" % self.account_1B.id)
+        self.debug("Listing VM for account: %s" % self.account_1B.name)
         self.apiclient.connection.apiKey = self.user_1B_apikey
-        self.apiclient.connection.secretKey = self.user_1B_secretkey
+        self.apiclient.connection.securityKey = self.user_1B_secretkey
         list_vm_response = list_virtual_machines(
                                             self.apiclient
                                             )
@@ -418,9 +418,9 @@ class TestVMIam(cloudstackTestCase):
         account_permission['scopeid'] = self.account_1A.id
         self.vm_read_policy.addPermission(self.apiclient, account_permission)
         
-        self.debug("Listing VM for account: %s" % self.account_1B.id)
+        self.debug("Listing VM for account: %s" % self.account_1B.name)
         self.apiclient.connection.apiKey = self.user_1B_apikey
-        self.apiclient.connection.secretKey = self.user_1B_secretkey
+        self.apiclient.connection.securityKey = self.user_1B_secretkey
         list_vm_response = list_virtual_machines(
                                             self.apiclient
                                             )
@@ -471,9 +471,9 @@ class TestVMIam(cloudstackTestCase):
         account_permission['scopeid'] = self.account_1A.id
         self.vm_read_policy.removePermission(self.apiclient, account_permission)
         
-        self.debug("Listing VM for account: %s" % self.account_1B.id)
+        self.debug("Listing VM for account: %s" % self.account_1B.name)
         self.apiclient.connection.apiKey = self.user_1B_apikey
-        self.apiclient.connection.secretKey = self.user_1B_secretkey
+        self.apiclient.connection.securityKey = self.user_1B_secretkey
         list_vm_response = list_virtual_machines(
                                             self.apiclient
                                             )
@@ -514,9 +514,9 @@ class TestVMIam(cloudstackTestCase):
         domain_permission['scopeid'] = self.domain_2.id
         self.vm_read_policy.removePermission(self.apiclient, domain_permission)
         
-        self.debug("Listing VM for account: %s" % self.account_1B.id)
+        self.debug("Listing VM for account: %s" % self.account_1B.name)
         self.apiclient.connection.apiKey = self.user_1B_apikey
-        self.apiclient.connection.secretKey = self.user_1B_secretkey
+        self.apiclient.connection.securityKey = self.user_1B_secretkey
         list_vm_response = list_virtual_machines(
                                             self.apiclient
                                             )
@@ -555,9 +555,9 @@ class TestVMIam(cloudstackTestCase):
         res_permission['scopeid'] = self.virtual_machine_1A.id
         self.vm_read_policy.addPermission(self.apiclient, res_permission)
         
-        self.debug("Listing VM for account: %s" % self.account_1B.id)
+        self.debug("Listing VM for account: %s" % self.account_1B.name)
         self.apiclient.connection.apiKey = self.user_1B_apikey
-        self.apiclient.connection.secretKey = self.user_1B_secretkey
+        self.apiclient.connection.securityKey = self.user_1B_secretkey
         list_vm_response = list_virtual_machines(
                                             self.apiclient
                                             )
@@ -604,7 +604,7 @@ class TestVMIam(cloudstackTestCase):
         
         self.debug("Listing VM for account: %s" % self.account_1B.id)
         self.apiclient.connection.apiKey = self.user_1B_apikey
-        self.apiclient.connection.secretKey = self.user_1B_secretkey
+        self.apiclient.connection.securityKey = self.user_1B_secretkey
         list_vm_response = list_virtual_machines(
                                             self.apiclient
                                             )
@@ -643,11 +643,11 @@ class TestVMIam(cloudstackTestCase):
         res_permission['scope'] = "RESOURCE"
         res_permission['scopeid'] = self.virtual_machine_1A.id
         self.vm_grant_policy.addPermission(self.apiclient, res_permission)
-        self.vm_grant_policy.attachAccount(self.apiclient, [self.account_1B.id])
+        self.vm_grant_policy.attachAccount(self.apiclient, [self.account_1B])
         
         self.debug("Listing VM for account: %s" % self.account_1B.id)
         self.apiclient.connection.apiKey = self.user_1B_apikey
-        self.apiclient.connection.secretKey = self.user_1B_secretkey
+        self.apiclient.connection.securityKey = self.user_1B_secretkey
         list_vm_response = list_virtual_machines(
                                             self.apiclient
                                             )
@@ -685,11 +685,11 @@ class TestVMIam(cloudstackTestCase):
 
         self.debug("Revoking VM %s read only access from account: %s by attaching policy
to account" % (self.virtual_machine_1A.name, self.account_1B.name))
         
-        self.vm_grant_policy.detachAccount(self.apiclient, [self.account_1B.id])
+        self.vm_grant_policy.detachAccount(self.apiclient, [self.account_1B])
         
         self.debug("Listing VM for account: %s" % self.account_1B.id)
         self.apiclient.connection.apiKey = self.user_1B_apikey
-        self.apiclient.connection.secretKey = self.user_1B_secretkey
+        self.apiclient.connection.securityKey = self.user_1B_secretkey
         list_vm_response = list_virtual_machines(
                                             self.apiclient
                                             )

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae9be657/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 c508323..15f59ca 100755
--- a/tools/marvin/marvin/integration/lib/base.py
+++ b/tools/marvin/marvin/integration/lib/base.py
@@ -3698,7 +3698,7 @@ class IAMPolicy:
             cmd.account = account
         if domainid:
             cmd.domainid = domainid
-        return AclGroup(apiclient.createIAMPolicy(cmd).__dict__)
+        return IAMPolicy(apiclient.createIAMPolicy(cmd).__dict__)
 
     def update(self, apiclient):
         pass


Mime
View raw message