Bug 1081373 - "Remove Hardware" context memu displayed for none hardware item on guest detail page and could not work.
Summary: "Remove Hardware" context memu displayed for none hardware item on guest deta...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Giuseppe Scrivano
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1081374
TreeView+ depends on / blocked
 
Reported: 2014-03-27 06:14 UTC by zhengqin
Modified: 2014-03-27 12:52 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1081374 (view as bug list)
Environment:
Last Closed: 2014-03-27 12:52:09 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description zhengqin 2014-03-27 06:14:20 UTC
Description of problem:
Version-Release number of selected component:
virt-manager-0.10.0-20.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Start virt-manager with --debug.

2. Open a guest's detail page.

3. Right-click on "Overview" item, and the context memu pops up with options "Add Hardware" and "Remove Hardware".

4. Choose option "Remove Hardware".

Actual result:
1. Debug error will pop up "AttributeError: str object has no attribute 'virtual_device_type'"
----------------------------------------------------------------
2014-03-27 13:37:56,618 (details:576): Showing VM details: <vmmDomain object at 0x2764d70 (virtManager+domain+vmmDomain at 0x1b7fae0)>
2014-03-27 13:38:01,480 (cliutils:87): Uncaught exception:
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 1532, in remove_xml_dev
    devtype = info.virtual_device_type
AttributeError: 'str' object has no attribute 'virtual_device_type'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 1532, in remove_xml_dev
    devtype = info.virtual_device_type
AttributeError: 'str' object has no attribute 'virtual_device_type'
----------------------------------------------------------------
2. There is no response when choosing "Remove Hardware"
3. There is no "Remove" button at right-lower window for Overview page.


Expected results:
1. "Remove Hardware" option should be removed on context memu since "Overview" is not a hardware.





Additional info:
1. This issue also occurs on RHEL6.
2. This issue also occurs for "Performance", "Processor", "Memory" and "Boot Options"
3. Could not remove Mouse if only one mouse device exists.

Comment 1 Giuseppe Scrivano 2014-03-27 12:52:09 UTC
closed upstream with:

commit 37eecb215d137ffb6e98f36adfa37f96220d7287
Author: Giuseppe Scrivano <gscrivan>
Date:   Thu Mar 27 12:40:42 2014 +0100

    virtManager: hide "Remove Hardware" for non-devices
    
    The menu item "Remove Hardware" in the Overview window is valid only
    when a hardware device is selected, hide it in any other case.
    
    Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1081373
    
    Signed-off-by: Giuseppe Scrivano <gscrivan>


Note You need to log in before you can comment on or make changes to this bug.