Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 289121 Details for
Bug 351681
[RFE] deleting machine should remove diskfile
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch for deleting img files when deleting machine (optional choice)
delete_image_files.patch (text/plain), 1.69 KB, created by
Michal Fabry
on 2007-12-14 15:24:28 UTC
(
hide
)
Description:
patch for deleting img files when deleting machine (optional choice)
Filename:
MIME Type:
Creator:
Michal Fabry
Created:
2007-12-14 15:24:28 UTC
Size:
1.69 KB
patch
obsolete
>diff -Naur virt-manager-0.5.2_old/src/virtManager/manager.py virt-manager-0.5.2/src/virtManager/manager.py >--- virt-manager-0.5.2_old/src/virtManager/manager.py 2007-12-12 18:10:05.000000000 +0100 >+++ virt-manager-0.5.2/src/virtManager/manager.py 2007-12-14 16:21:41.000000000 +0100 >@@ -23,6 +23,7 @@ > import threading > import logging > import sys >+import os > > import sparkline > import libvirt >@@ -708,13 +709,38 @@ > _("This will permanently delete the vm \"%s,\" are you sure?") % vm.get_name()) > result = warn.run() > warn.destroy() >+ > if result == gtk.RESPONSE_NO: > return >+ >+ diskinfo = vm.get_disk_devices() >+ disklist = [] >+ >+ for disk in diskinfo: >+ if disk[0] == "file": >+ disklist.append(disk[1]) >+ > conn = vm.get_connection() >+ if disklist != []: >+ warn_delete_image = gtk.MessageDialog(self.window.get_widget("vmm-manager"), >+ gtk.DIALOG_DESTROY_WITH_PARENT, >+ gtk.MESSAGE_WARNING, >+ gtk.BUTTONS_YES_NO, >+ _("Do you want to remove image(s) below?\n\n%s") % "\n".join(disklist)) >+ >+ result_delete_image = warn_delete_image.run() >+ warn_delete_image.destroy() >+ >+ if result_delete_image == gtk.RESPONSE_YES: >+ for disk_file in disklist: >+ try: >+ os.remove(disk_file) >+ except: >+ pass >+ > vm.delete() > conn.tick(noStatsUpdate=True) >- >- >+ > def show_about(self, src): > self.emit("action-show-about") >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 351681
: 289121 |
289131