Yeah apparently this doesn't exist in libvirt 1.2.1:
https://github.com/libvirt/libvirt/blob/v1.2.1/src/conf/nwfilter_conf.c#L2979
Which is our minimum supported version, and ubuntu 14.04 runs with 1.2.2.
In ubuntu 16.04 we're running with libvirt 1.3.1 which shows the check and error:
https://github.com/libvirt/libvirt/blob/v1.3.1/src/conf/nwfilter_conf.c#L3099-L3101
virReportError(VIR_ERR_OPERATION_FAILED, _("filter '%s' already exists with uuid %s"), def->name, uuidstr);
It's unfortunate that there isn't a specific error code, we'll have to check for VIR_ERR_OPERATION_FAILED and the message.
Yeah apparently this doesn't exist in libvirt 1.2.1:
https:/ /github. com/libvirt/ libvirt/ blob/v1. 2.1/src/ conf/nwfilter_ conf.c# L2979
Which is our minimum supported version, and ubuntu 14.04 runs with 1.2.2.
In ubuntu 16.04 we're running with libvirt 1.3.1 which shows the check and error:
https:/ /github. com/libvirt/ libvirt/ blob/v1. 3.1/src/ conf/nwfilter_ conf.c# L3099-L3101
It's unfortunate that there isn't a specific error code, we'll have to check for VIR_ERR_ OPERATION_ FAILED and the message.