@@ -733,33 +733,38 @@ def test_04_deploy_vm_for_other_user_and_test_vm_operations(self):
733733 self .exec_command ("self.user_apiclient" , command , expected = False )
734734 self .exec_command ("self.otheruser_apiclient" , command , expected = True )
735735
736- # 22. Destroy vm2, should succeed by vm owner
736+ # 22. Start VM before destroying, to recreate ROOT volume that was deleted as part of restore operation
737+ command = """self.virtual_machine.start({apiclient})"""
738+ self .exec_command ("self.user_apiclient" , command , expected = False )
739+ self .exec_command ("self.otheruser_apiclient" , command , expected = True )
740+
741+ # 23. Destroy vm2, should succeed by vm owner
737742 command = """self.virtual_machine.delete({apiclient}, expunge=False)"""
738743 self .exec_command ("self.user_apiclient" , command , expected = False )
739744 self .exec_command ("self.otheruser_apiclient" , command , expected = True )
740745
741- # 23 . Recover vm2, should succeed by vm owner
746+ # 24 . Recover vm2, should succeed by vm owner
742747 allow_expunge_recover_vm = Configurations .list (self .apiclient , name = "allow.user.expunge.recover.vm" )[0 ].value
743748 self .logger .debug ("Global configuration allow.user.expunge.recover.vm = %s" , allow_expunge_recover_vm )
744749 if allow_expunge_recover_vm == "true" :
745750 command = """self.virtual_machine.recover({apiclient})"""
746751 self .exec_command ("self.user_apiclient" , command , expected = False )
747752 self .exec_command ("self.otheruser_apiclient" , command , expected = True )
748753
749- # 24 . Destroy vm2, should succeed by vm owner
754+ # 25 . Destroy vm2, should succeed by vm owner
750755 command = """self.virtual_machine.delete({apiclient}, expunge=False)"""
751756 self .exec_command ("self.user_apiclient" , command , expected = False )
752757 self .exec_command ("self.otheruser_apiclient" , command , expected = True )
753758
754- # 25 . Expunge vm2, should succeed by vm owner
759+ # 26 . Expunge vm2, should succeed by vm owner
755760 if allow_expunge_recover_vm == "true" :
756761 command = """self.virtual_machine.expunge({apiclient})"""
757762 self .exec_command ("self.user_apiclient" , command , expected = False )
758763 self .exec_command ("self.otheruser_apiclient" , command , expected = True )
759764 else :
760765 self .virtual_machine .expunge (self .apiclient )
761766
762- # 26 . Reset network permissions, should succeed by network owner
767+ # 27 . Reset network permissions, should succeed by network owner
763768 command = """self.reset_network_permission({apiclient}, self.user_network, expected=True)"""
764769 self .exec_command ("self.otheruser_apiclient" , command , expected = False )
765770 self .exec_command ("self.user_apiclient" , command , expected = True )
0 commit comments