Repository navigation
Template cleanup : Update vm_template table to set template as removed on deletion #4748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0dfaca4
6d4abfd
eec6bfd
8edbe0b
e62bbb1
e1c66c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1322,6 +1322,7 @@ def test_03_deploy_vm_wrong_checksum(self): | |
| """ | ||
| self.template["checksum"]="{MD5}XXXXXXX" | ||
| tmpl = Template.register(self.apiclient, self.template, zoneid=self.zone.id, hypervisor=self.hypervisor, randomize_name=False) | ||
| self.cleanup.append(tmpl) | ||
|
|
||
| try: | ||
| virtual_machine = VirtualMachine.create( | ||
|
|
@@ -1332,11 +1333,9 @@ def test_03_deploy_vm_wrong_checksum(self): | |
| domainid=self.account.domainid, | ||
| serviceofferingid=self.service_offering.id | ||
| ) | ||
| self.cleanup.append(tmpl) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i'd say this, lines 1339 and 1340 should be removed. As this code is at the moment virtual_machne will be appended to cleanup only if the create fails and a cleanup should go directly after a create (or register) and only if the remove happens for some other reason it should be removed from the list again (if a double delete would be a problem) |
||
| self.cleanup.append(virtual_machine) | ||
| self.fail("Expected to fail deployment") | ||
| except Exception as e: | ||
| self.debug("Expected exception") | ||
|
|
||
| self.cleanup.append(virtual_machine) | ||
| self.cleanup.append(tmpl) | ||
| return | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| CS_URL=http://10.0.35.240:8080 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @DaanHoogland . It was supposed to be referenced at listUnRemovedTemplatesByStates() - fixed it.