]> xenbits.xensource.com Git - libvirt.git/commitdiff
domain: Remove controller/net address whitelists
authorCole Robinson <crobinso@redhat.com>
Wed, 6 Jan 2016 20:44:30 +0000 (15:44 -0500)
committerCole Robinson <crobinso@redhat.com>
Fri, 18 Mar 2016 19:57:36 +0000 (15:57 -0400)
Judging by how the whitelist has skewed quite far from the original
error message, I think it's better to just drop these.

If someone wants to revive this check I suggest implementing it on
a per-HV driver basis with PostParse callbacks.

src/conf/domain_conf.c

index 7d68096f0e5510a187f10ad07ff991c261abaf66..c703ca8a0f50303a6645acb496c8981756bfacfe 100644 (file)
@@ -8115,17 +8115,6 @@ virDomainControllerDefParseXML(xmlNodePtr node,
         break;
     }
 
-    if (def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE &&
-        def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO &&
-        def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW &&
-        def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_S390 &&
-        def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO &&
-        def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                       _("Controllers must use the 'pci' address type"));
-        goto error;
-    }
-
  cleanup:
     ctxt->node = saved;
     VIR_FREE(typeStr);
@@ -8816,19 +8805,6 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
             goto error;
     }
 
-    /* XXX what about ISA/USB based NIC models - once we support
-     * them we should make sure address type is correct */
-    if (def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE &&
-        def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO &&
-        def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW &&
-        def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_S390 &&
-        def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO &&
-        def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                       _("Network interfaces must use 'pci' address type"));
-        goto error;
-    }
-
     switch (def->type) {
     case VIR_DOMAIN_NET_TYPE_NETWORK:
         if (network == NULL) {