diff --git a/tests/xmlparse-xml/network-vf-pool-in.xml b/tests/xmlparse-xml/network-vf-pool-in.xml index 542757de7..4acede0ae 100644 --- a/tests/xmlparse-xml/network-vf-pool-in.xml +++ b/tests/xmlparse-xml/network-vf-pool-in.xml @@ -2,6 +2,5 @@ passthrough -
diff --git a/tests/xmlparse-xml/network-vf-pool-out.xml b/tests/xmlparse-xml/network-vf-pool-out.xml index 836441183..62a730501 100644 --- a/tests/xmlparse-xml/network-vf-pool-out.xml +++ b/tests/xmlparse-xml/network-vf-pool-out.xml @@ -2,6 +2,5 @@ new-foo -
diff --git a/tests/xmlparse.py b/tests/xmlparse.py index 6df86d958..efe5429b7 100644 --- a/tests/xmlparse.py +++ b/tests/xmlparse.py @@ -1385,13 +1385,6 @@ class XMLParseTest(unittest.TestCase): check = self._make_checker(net.forward.pf[0]) check("dev", "eth3") - check = self._make_checker(net.forward.vfs[0]) - check("type", "pci") - check("domain", 0x0000) - check("bus", 0x03) - check("slot", 0x10) - check("function", 0x0) - utils.diff_compare(net.get_xml(), outfile) utils.test_create(self.conn, net.get_xml(), "networkDefineXML") diff --git a/ui/hostnets.ui b/ui/hostnets.ui index c739746f2..4b59a42a0 100644 --- a/ui/hostnets.ui +++ b/ui/hostnets.ui @@ -234,6 +234,7 @@ True True + True True @@ -384,6 +385,7 @@ True True + True True @@ -531,108 +533,6 @@ 2 - - - True - True - - - True - False - vertical - 3 - - - True - False - 5 - 6 - - - True - False - start - label - True - - - 1 - 0 - - - - - True - False - start - Physical Function: - - - 0 - 0 - - - - - False - True - 0 - - - - - True - False - start - Virtual Functions: - True - - - False - True - 1 - - - - - 144 - True - True - in - - - True - True - - - - - - - - True - True - 2 - - - - - - - True - False - <b>_SR-IOV information</b> - True - True - - - - - True - True - 3 - - diff --git a/virtManager/hostnets.py b/virtManager/hostnets.py index e60be5a98..3cf7cc2a2 100644 --- a/virtManager/hostnets.py +++ b/virtManager/hostnets.py @@ -9,8 +9,6 @@ import logging from gi.repository import Gtk from gi.repository import Pango -from virtinst import NodeDevice - from . import uiutil from .asyncjob import vmmAsyncJob from .baseclass import vmmGObjectUI @@ -108,19 +106,6 @@ class vmmHostNets(vmmGObjectUI): self.widget("net-list").append_column(netCol) netListModel.set_sort_column_id(1, Gtk.SortType.ASCENDING) - # Virtual Function list - # [vf-name] - vf_list = self.widget("vf-list") - vf_list_model = Gtk.ListStore(str) - vf_list.set_model(vf_list_model) - vf_list.set_headers_visible(False) - - vfTextCol = Gtk.TreeViewColumn() - vf_txt = Gtk.CellRendererText() - vfTextCol.pack_start(vf_txt, True) - vfTextCol.add_attribute(vf_txt, 'text', 0) - vf_list.append_column(vfTextCol) - self._xmleditor = vmmXMLEditor(self.builder, self.topwin, self.widget("net-details-align"), self.widget("net-details")) @@ -264,34 +249,6 @@ class vmmHostNets(vmmGObjectUI): routevia = routeaddr + ", gateway=" + routevia self.widget("net-ipv6-route").set_text(routevia or "") - def _populate_sriov_state(self, net): - (is_vf_pool, pf_name, vfs) = net.get_sriov_vf_networks() - - self.widget("net-sriov-expander").set_visible(is_vf_pool) - if not pf_name: - self.widget("pf-name").set_text("N/A") - return - - self.widget("pf-name").set_text(pf_name) - - vf_list_model = self.widget("vf-list").get_model() - vf_list_model.clear() - for vf in vfs: - addrStr = "%x:%x:%x.%x" % (vf.domain, vf.bus, vf.slot, vf.function) - pcidev = NodeDevice.lookupNodedevFromString(self.conn.get_backend(), - addrStr) - - vf_name = None - - netdevs = self.conn.filter_nodedevs("net") - for netdev in netdevs: - logging.debug(netdev.xmlobj.parent) - if pcidev.name == netdev.xmlobj.parent: - vf_name = netdev.xmlobj.interface - break - - vf_list_model.append([vf_name or addrStr]) - def _populate_net_state(self, net): active = net.is_active() @@ -319,7 +276,6 @@ class vmmHostNets(vmmGObjectUI): self._populate_net_ipv4_state(net) self._populate_net_ipv6_state(net) - self._populate_sriov_state(net) self._xmleditor.set_xml_from_libvirtobject(net) @@ -357,7 +313,6 @@ class vmmHostNets(vmmGObjectUI): return logging.debug("Stopping network '%s'", net.get_name()) - self.widget("vf-list").get_model().clear() vmmAsyncJob.simple_async_noshow(net.stop, [], self, _("Error stopping network '%s'") % net.get_name()) diff --git a/virtManager/network.py b/virtManager/network.py index 9297647e0..f8d041a26 100644 --- a/virtManager/network.py +++ b/virtManager/network.py @@ -176,18 +176,6 @@ class vmmNetwork(vmmLibvirtObject): ret = self._get_network("ipv6") return ret + [self._get_static_route("ipv6")] - def get_sriov_vf_networks(self): - xmlobj = self.get_xmlobj() - pf_name = None - vfs = None - ret = False - if xmlobj.forward.mode == "hostdev": - ret = True - if xmlobj.forward.pf: - pf_name = xmlobj.forward.pf[0].dev - vfs = xmlobj.forward.vfs - return (ret, pf_name, vfs) - def pretty_forward_mode(self): mode = self.xmlobj.forward.mode dev = self.xmlobj.forward.dev diff --git a/virtinst/network.py b/virtinst/network.py index ecd7e5983..86b17d06d 100644 --- a/virtinst/network.py +++ b/virtinst/network.py @@ -54,15 +54,6 @@ class _NetworkForwardPf(XMLBuilder): dev = XMLProperty("./@dev") -class _NetworkForwardAddress(XMLBuilder): - XML_NAME = "address" - type = XMLProperty("./@type") - domain = XMLProperty("./@domain", is_int=True) - bus = XMLProperty("./@bus", is_int=True) - slot = XMLProperty("./@slot", is_int=True) - function = XMLProperty("./@function", is_int=True) - - class _NetworkForward(XMLBuilder): XML_NAME = "forward" @@ -70,7 +61,6 @@ class _NetworkForward(XMLBuilder): dev = XMLProperty("./@dev") managed = XMLProperty("./@managed") pf = XMLChildProperty(_NetworkForwardPf) - vfs = XMLChildProperty(_NetworkForwardAddress) class _NetworkPortgroup(XMLBuilder):