Bug 1726586 - virt-manager throws error when enabling IPv6 during virtual network creation and switching to XML tab
Summary: virt-manager throws error when enabling IPv6 during virtual network creation ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-03 08:51 UTC by Simon Kobyda
Modified: 2020-01-29 23:57 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-01-29 23:57:15 UTC
Embargoed:


Attachments (Terms of Use)

Description Simon Kobyda 2019-07-03 08:51:19 UTC
Description of problem:
virt-manager throws error when enabling IPv6 during virtual network creation and switching to XML tab

Version-Release number of selected component (if applicable):
2.2.0

How reproducible:


Steps to Reproduce:
1. Open window for adding a new virtual network
2. In IPv6 configuration, check Enable IPv6. Leave "Network" option empty.
3. Switch to XML tab

Actual results:
virt-manager returns error:
Error building XML: 'NoneType' object has no attribute 'network_address'

Traceback (most recent call last):
  File "/home/skobyda/Work/virt-manager/virtManager/createnet.py", line 447, in _build_xmlobj
    xmlobj = self._build_xmlobj_from_ui()
  File "/home/skobyda/Work/virt-manager/virtManager/createnet.py", line 431, in _build_xmlobj_from_ui
    ipobj.address = str(ip.network_address + 1)
AttributeError: 'NoneType' object has no attribute 'network_address'


Expected results:
See adjusted XML or virt-manager should not allow to leave "Network" option empty.

Comment 1 Cole Robinson 2019-07-03 23:16:21 UTC
Thanks for the report. Yeah this is annoying, and will hit for a ipv4 and the dhcp fields too. Something to clean up when adding full test_ui code coverage

Comment 2 Cole Robinson 2020-01-29 23:57:15 UTC
Fixed upstream now

commit 5573aeb44100bcabdc24ab1cd19ec96bb4cb9d62 (HEAD -> master, origin/master, origin/HEAD, work)
Author: Cole Robinson <crobinso>
Date:   Wed Jan 29 18:43:58 2020 -0500

    createnet: Fix XML editor error when dhcp fields are empty


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