@@ -56,7 +56,7 @@ def __init__(self):
5656 "displaytext" : "Tiny Instance" ,
5757 "cpunumber" : 1 ,
5858 "cpuspeed" : 100 , # in MHz
59- "memory" : 5120 , # In MBs
59+ "memory" : 2048 , # In MBs
6060 },
6161 "virtual_machine" : {
6262 "displayname" : "TestVM" ,
@@ -183,7 +183,7 @@ def setupAccounts(self):
183183
184184 Resources .updateLimit (self .apiclient ,
185185 resourcetype = 9 ,
186- max = 15360 ,
186+ max = 6144 ,
187187 account = self .child_do_admin_1 .name ,
188188 domainid = self .child_do_admin_1 .domainid )
189189
@@ -203,17 +203,17 @@ def setupAccounts(self):
203203
204204 Resources .updateLimit (self .apiclient ,
205205 resourcetype = 9 ,
206- max = 15360 ,
206+ max = 6144 ,
207207 account = self .child_do_admin_2 .name ,
208208 domainid = self .child_do_admin_2 .domainid )
209209 return
210210
211211 @attr (tags = ["advanced" , "advancedns" ,"simulator" ])
212212 def test_01_change_service_offering (self ):
213- """Test Deploy VM with 5 GB RAM & verify the usage"""
213+ """Test Deploy VM with specified RAM & verify the usage"""
214214
215215 # Validate the following
216- # 1. Create compute offering with 5 GB RAM & Deploy VM in the created domain
216+ # 1. Create compute offering with specified RAM & Deploy VM in the created domain
217217 # 2. List Resource count for the root admin Memory usage
218218 # 3. Upgrade and downgrade service offering
219219 # 4. Resource count should list properly for the domain
@@ -228,7 +228,7 @@ def test_01_change_service_offering(self):
228228 self .domain = domain
229229
230230 #Resetting memory count in service offering
231- self .services ["service_offering" ]["memory" ] = 5120
231+ self .services ["service_offering" ]["memory" ] = 2048
232232
233233 self .debug ("Creating an instance with service offering: %s" %
234234 self .service_offering .name )
@@ -266,24 +266,24 @@ def test_01_change_service_offering(self):
266266 self .assertEqual (resource_count_after_stop , expected_resource_count ,
267267 "Resource count should be same after stopping the instance" )
268268
269- self .debug ("Creating service offering with 7 GB RAM" )
270- self .services ["service_offering" ]["memory" ] = 7168
271- self .service_offering_7gb = ServiceOffering .create (
269+ self .debug ("Creating service offering with 5 GB RAM" )
270+ self .services ["service_offering" ]["memory" ] = 5120
271+ self .service_offering_5gb = ServiceOffering .create (
272272 self .apiclient ,
273273 self .services ["service_offering" ]
274274 )
275275 # Adding to cleanup list after execution
276- self .cleanup .append (self .service_offering_7gb )
276+ self .cleanup .append (self .service_offering_5gb )
277277
278278 self .debug (
279279 "Upgrade service offering of instance %s from %s to %s" %
280280 (vm .name ,
281281 self .service_offering .name ,
282- self .service_offering_7gb .name ))
282+ self .service_offering_5gb .name ))
283283
284284 try :
285285 vm .change_service_offering (self .apiclient ,
286- serviceOfferingId = self .service_offering_7gb .id )
286+ serviceOfferingId = self .service_offering_5gb .id )
287287 except Exception as e :
288288 self .fail ("Failed to change service offering of vm %s - %s" %
289289 (vm .name , e ))
@@ -305,7 +305,7 @@ def test_01_change_service_offering(self):
305305 self .debug (
306306 "Down grade service offering of instance %s from %s to %s" %
307307 (vm .name ,
308- self .service_offering_7gb .name ,
308+ self .service_offering_5gb .name ,
309309 self .service_offering .name ))
310310
311311 try :
@@ -349,15 +349,15 @@ def test_01_change_service_offering(self):
349349
350350 @attr (tags = ["advanced" , "advancedns" ,"simulator" ])
351351 def test_02_migrate_vm (self ):
352- """Test Deploy VM with 5 GB RAM & verify the usage"""
352+ """Test Deploy VM with specified RAM & verify the usage"""
353353
354354 # Validate the following
355- # 1. Create compute offering with 5 GB RAM & Deploy VM in the created domain
355+ # 1. Create compute offering with specified RAM & Deploy VM in the created domain
356356 # 2. List Resource count for the root admin Memory usage
357357 # 3. Migrate vm to another host, resource count should list properly.
358358
359359 #Resetting memory count in service offering
360- self .services ["service_offering" ]["memory" ] = 5120
360+ self .services ["service_offering" ]["memory" ] = 2048
361361
362362 self .debug ("Setting up account and domain hierarchy" )
363363 self .setupAccounts ()
@@ -408,15 +408,15 @@ def test_02_migrate_vm(self):
408408
409409 @attr (tags = ["advanced" , "advancedns" ,"simulator" ])
410410 def test_03_delete_vm (self ):
411- """Test Deploy VM with 5 GB RAM & verify the usage"""
411+ """Test Deploy VM with specified RAM & verify the usage"""
412412
413413 # Validate the following
414- # 1. Create compute offering with 5 GB RAM & Deploy VM in the created domain
414+ # 1. Create compute offering with specified RAM & Deploy VM in the created domain
415415 # 2. List Resource count for the root admin Memory usage
416416 # 3. Delete vm, resource count should list as 0 after delete operation.
417417
418418 # Resetting the memory count of service offering
419- self .services ["service_offering" ]["memory" ] = 5120
419+ self .services ["service_offering" ]["memory" ] = 2048
420420
421421 self .debug ("Setting up account and domain hierarchy" )
422422 self .setupAccounts ()
@@ -467,16 +467,16 @@ def test_03_delete_vm(self):
467467
468468 @attr (tags = ["advanced" , "advancedns" ,"simulator" ])
469469 def test_04_deploy_multiple_vm (self ):
470- """Test Deploy multiple VM with 5 GB RAM & verify the usage"""
470+ """Test Deploy multiple VM with specified RAM & verify the usage"""
471471
472472 # Validate the following
473- # 1. Create compute offering with 5 GB RAM
473+ # 1. Create compute offering with specified RAM
474474 # 2. Deploy multiple VMs with this service offering
475475 # 3. List Resource count for the root admin Memory usage
476476 # 4. Memory usage should list properly
477477
478478 # Resetting the memory count of service offering
479- self .services ["service_offering" ]["memory" ] = 5120
479+ self .services ["service_offering" ]["memory" ] = 2048
480480
481481 self .debug ("Setting up account and domain hierarchy" )
482482 self .setupAccounts ()
@@ -607,7 +607,7 @@ def setupAccounts(self):
607607 self .domain .name )
608608 Resources .updateLimit (self .apiclient ,
609609 resourcetype = 9 ,
610- max = 10240 ,
610+ max = 4096 ,
611611 account = self .parentd_admin .name ,
612612 domainid = self .parentd_admin .domainid )
613613 self .debug ("Creating a sub-domain under: %s" % self .parent_domain .name )
@@ -631,14 +631,14 @@ def setupAccounts(self):
631631 self .cdomain_1 .name )
632632 Resources .updateLimit (self .apiclient ,
633633 resourcetype = 9 ,
634- max = 5120 ,
634+ max = 2048 ,
635635 domainid = self .cadmin_1 .domainid )
636636
637637 self .debug ("Updating the Memory resource count for account: %s" %
638638 self .cadmin_1 .name )
639639 Resources .updateLimit (self .apiclient ,
640640 resourcetype = 9 ,
641- max = 2148 ,
641+ max = 2048 ,
642642 account = self .cadmin_1 .name ,
643643 domainid = self .cadmin_1 .domainid )
644644
@@ -653,14 +653,14 @@ def setupAccounts(self):
653653 self .cdomain_2 .name )
654654 Resources .updateLimit (self .apiclient ,
655655 resourcetype = 9 ,
656- max = 5120 ,
656+ max = 2048 ,
657657 domainid = self .cadmin_2 .domainid )
658658
659659 self .debug ("Updating the Memory resource count for domain: %s" %
660660 self .cadmin_2 .name )
661661 Resources .updateLimit (self .apiclient ,
662662 resourcetype = 9 ,
663- max = 2148 ,
663+ max = 2048 ,
664664 account = self .cadmin_2 .name ,
665665 domainid = self .cadmin_2 .domainid )
666666
@@ -684,9 +684,8 @@ def test_01_multiple_child_domains(self):
684684 """Test memory limits with multiple child domains"""
685685
686686 # Validate the following
687- # 1. Create Domain1 with 10 GB RAM and 2 child domains with 5 GB
688- # each.Assign 2 GB for Domain1 admin1 & Domain1 User1 .Assign 2
689- # GB for Domain2 admin1 & Domain2 User1
687+ # 1. Create Domain1 with 4 GB RAM and 2 child domains with 2 GB
688+ # each.
690689 # 2. Deploy VM's by Domain1 admin1/user1/ Domain2 user1/Admin1 account
691690 # and verify the resource updates
692691 # 3. Deploy VM by admin account after reaching max parent domain limit
0 commit comments