@@ -748,6 +748,13 @@ def test_05_templates_per_account(self):
748748 # able to create template without any error
749749
750750 try :
751+ apiclient_account1 = self .testClient .getUserApiClient (
752+ UserName = self .account_1 .name ,
753+ DomainName = self .account_1 .domain )
754+
755+ apiclient_account2 = self .testClient .getUserApiClient (
756+ UserName = self .account_2 .name ,
757+ DomainName = self .account_2 .domain )
751758 self .debug (
752759 "Updating template resource limit for account: %s" %
753760 self .account_1 .name )
@@ -818,7 +825,7 @@ def test_05_templates_per_account(self):
818825 "Creating template from volume: %s" % volume .id )
819826 # Create a template from the ROOTDISK (Account 1)
820827 template_1 = Template .create (
821- self . apiclient ,
828+ apiclient_account1 ,
822829 self .services ["template" ],
823830 volumeid = volume .id ,
824831 account = self .account_1 .name ,
@@ -837,7 +844,7 @@ def test_05_templates_per_account(self):
837844 # Exception should be raised for second snapshot (account_1)
838845 with self .assertRaises (Exception ):
839846 Template .create (
840- self . apiclient ,
847+ apiclient_account1 ,
841848 self .services ["template" ],
842849 volumeid = volume .id ,
843850 account = self .account_1 .name ,
@@ -864,7 +871,7 @@ def test_05_templates_per_account(self):
864871 "Creating template from volume: %s" % volume .id )
865872 # Create a snapshot from the ROOTDISK (Account 1)
866873 template_2 = Template .create (
867- self . apiclient ,
874+ apiclient_account2 ,
868875 self .services ["template" ],
869876 volumeid = volume .id ,
870877 account = self .account_2 .name ,
@@ -882,7 +889,7 @@ def test_05_templates_per_account(self):
882889 "Creating template from volume: %s" % volume .id )
883890 # Create a second volume from the ROOTDISK (Account 2)
884891 template_3 = Template .create (
885- self . apiclient ,
892+ apiclient_account2 ,
886893 self .services ["template" ],
887894 volumeid = volume .id ,
888895 account = self .account_2 .name ,
0 commit comments