network: backend for virNetworkUpdate of interface list
<interface> elements are location inside the <forward> element of a network. There is only one <forward> element in any network, but it might have many <interface> elements. This element only contains a single attribute, "dev", which is the name of a network device (e.g. "eth0"). Since there is only a single attribute, the modify operation isn't supported for this "section", only add-first, add-last, and delete. Also, note that it's not permitted to delete an interface from the list while any guest is using it. We may later decide this is safe (because removing it from the list really only excludes it from consideration in future guest allocations of interfaces, but doesn't affect any guests currently connected), but for now this limitation seems prudent (of course when changing the persistent config, this limitation doesn't apply, because the persistent config doesn't support the concept of "in used"). Another limitation - it is also possible for the interfraces in this list to be described by PCI address rather than netdev name. However, I noticed while writing this function that we currently don't support defining interfaces that way in config - the only method of getting interfaces specified as <adress type='pci' ..../> instead of <interface dev='xx'/> is to provide a <pf dev='yy'/> element under forward, and let the entries in the interface list be automatically populated with the virtual functions (VF) of the physical function device given in <pg>. As with the other virNetworkUpdate section backends, support for this section is completely contained within a single static function, no other changes were required, and only functions already called from elsewhere within the same file are used in the new content for this existing function (i.e., adding this code should not cause a new build problem on any platform).
Showing
想要评论请 注册 或 登录