- 18 4月, 2019 4 次提交
-
-
由 Daniel P. Berrangé 提交于
Ports allocated on virtual networks with type=nat|route|open all get given an actual type of 'network'. Only ports in networks with type=bridge use an actual type of 'bridge'. This distinction makes little sense since the virtualization drivers will treat both actual types in exactly the same way, as they're all just bridge devices a VM needs to be connected to. This doesn't affect user visible XML since the "actual" device XML is internal only, but we need code to convert the data upgrades. Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The virNetDevBandwidthParse method uses the interface type to decide whether to allow use of the "floor" parameter. Using the interface type is not convenient as callers may not have that available, but still wish to allow use of "floor". Switch to an explicit boolean to control its usage. Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Reword error messages to make it clear that the combined floor settings of all NICs are exceeding the network inbound peak/average settings. Including the actual values being checked helps to diagnose what is actually wrong. Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
In extreme cases libvirt can get mixed up about what VMs are running and attached to a network leading to the cached floor sum value being outdated. When this happens the only option is to destroy the network and then restart libvirtd. If we set floor sum back to zero when starting the network, we avoid the need for a libvirtd restart at least. Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 17 4月, 2019 35 次提交
-
-
由 Syed Humaid 提交于
Replaced all virSaveLastError and virSetError/virFreeError usages to virErrorPreserveLast and virErrorRestore respectively. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NSyed Humaid <syedhumaidbinharoon@gmail.com>
-
由 Daniel P. Berrangé 提交于
The networkPlugBandwidth & networkUnplugBandwidth methods currently take a virDomainNetDefPtr. To remove the dependency on the domain config struct, pass individual parameters instead. Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
All but one of the network types supports port profiles. Rather than duplicating the code to merge profiles 3 times, do it once and then later report an error if used from the wrong place. Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
Firstly, VIR_STRDUP() accepts NULL, so there is no need to check if the string we want to duplicate is not-NULL. Secondly, virDomainNetSetModelString() also accepts NULL. Thirdly, we have VIR_AUTOFREE(). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Andrea Bolognani 提交于
It has made Clang very unhappy ever since 6bf7c676. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Nikolay Shirokovskiy 提交于
Fix for commit ffc0fbeb refactoring snapshot code. Reviewed-by: NCole Robinson <crobinso@redhat.com> ACKed-by: NMaxim Nestratov <mnestratov@virtuozzo.com> Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Nikolay Shirokovskiy 提交于
Fix for commit 1ab05da2 refactoring snapshot code. Reviewed-by: NCole Robinson <crobinso@redhat.com> ACKed-by: NMaxim Nestratov <mnestratov@virtuozzo.com> Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Nikolay Shirokovskiy 提交于
f1056279 removed virDomainSnapshotDef.current and leaved using vm->current_snapshot only. Later 4819f54b moved current snapshot tracking to virDomainSnapshotObjList. As vz driver never used vm->current_snaphot this patch includes fixes after both commits. Reviewed-by: NCole Robinson <crobinso@redhat.com> ACKed-by: NMaxim Nestratov <mnestratov@virtuozzo.com> Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Andrea Bolognani 提交于
After the recent changes, there are only a few places left where we use the explicit path instead of taking advantage of the publicly available define; let's get rid of those too. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Andrea Bolognani 提交于
As evidenced by all existing callers, the only directory it makes sense to use is TEST_QEMU_CAPS_PATH, so let's just bake that into the function. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Andrea Bolognani 提交于
As evidenced by all existing callers, the only directory it makes sense to use is TEST_QEMU_CAPS_PATH, so let's just bake that into the function. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Andrea Bolognani 提交于
The value (with a slightly different name) is currently private to testutilsqemu, but since we use this path all over the place it makes sense to define it publicly and avoid repetition. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Eric Blake 提交于
Now that we can override the post-parse handling, let's update the testsuite to provide the desired timestamp/name rather than ignoring the non-deterministic one that was previously being generated. A few output files need timestamps added now that they are no longer ignored. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Eric Blake 提交于
Wire up the accessor functions necessary for the testsuite to install an alternative post-parse handler from normal drivers. I could have modified the signature for virDomainXMLOptionNew() to take another parameter, but thought it was easier to add a new set function rather than chase down all existing callers. Until code actually sets the override, there is no change in behavior. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Eric Blake 提交于
Move the non-deterministic code that sets snapshot properties independently of what the incoming XML described to instead live in a default post-parse function common to virDomainMoment (as checkpoints will also reuse it in later patches). This patch is just code motion, with no difference to any callers; but the next patch will further refactor things to allow for a per-driver override, used by the testsuite to perform deterministic post-parse actions for better coverage of parser/formatter code. Note that the post-parse code is intentionally not run during a snapshot redefine, since that code path already requires a valid snapshot name and creation time from the XML. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Eric Blake 提交于
None of the existing drivers actually use the 0-valued 'nostate' snapshot state; rather, it was a fluke of implementation. In fact, some drivers, like qemu, actively reject 'nostate' as invalid during a snapshot redefine. Normally, a driver computes the state post-parse from the current domain, and thus virDomainSnapshotGetXMLDesc() will never expose the state. However, since the testsuite lacks any associated domain to copy state from, and lacks post-parse processing that normal drivers have, the testsuite output had several spots with the state, coupled with a regex filter to ignore the oddity. It is better to follow the lead of other XML defaults, by not outputting anything during format if post-parse defaults have not been applied, and rejecting the default value during parsing. The testsuite needs a bit of an update, by adding another flag for when to simulate a post-parse action of setting a snapshot state, but none of the drivers are impacted other than rejecting XML that was previously already suspicious in nature. Similarly, don't expose creation time 0 (for now, only possible if a user redefined a snapshot to claim creation at the Epoch, but also happens once setting the creation time is deferred to a post-parse handler). This is also a step towards cleaning up snapshot_conf.c to separate its existing post-parse work (namely, setting the creationTime and default snapshot name) from the pure parsing work, so that we can get rid of the testsuite hack of regex filtering of the XML and instead have more accurate testing of our parser/formatter code. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Eric Blake 提交于
Upcoming changes want to separate out a post-parse massaging of snapshots separate from parsing the XML, so as not to be dependent on filtering out an ever-changing timestamp from the testsuite. Along the way, this means we will want to add yet another conditional to the snapshot xml2xml tests on whether to perform post-processing steps to canned values. This will be easier to read if we consolidate all the decisions into a flags variable, instead of adding yet another boolean. While at it, drop the redundant inout test of "noparent" (once is enough). Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
This requires drivers to opt in to handle the raw modelstr network model, all others will error if a passed in XML value is not in the model enum. Enable this feature for libxl/xen/xm and qemu drivers Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Convert the vbox driver to net model enum, which requires adding enum values for Am79C970A, Am79C973, 82540EM, 82545EM, 82543GC. We preserve the same casing that vbox historically used for these model names. Remove the now unused virDomainNetStrcaseeqModelString Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Convert the vmware/vmx driver to net model enum, which requires adding enum values for vlance, vmxnet, vmxnet2, and vmxnet3. Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
vbox and vmx drivers do net case insensitive net model comparisons, so for example 'VMXNET3' and 'vmxnet3' and 'VmxNeT3' in the XML will translate to the same driver configuration. To convert these drivers to use net model enum, we will need to do case insensitive comparisons as well. Essentially we implement virEnumToString, but with case insensitive comparison. XML will always be formatted with the enum model string we track internally, but we will accept any case insensitive variant. Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
This converts the qemu driver to the net model enum, for all the model values that we have hardcoded for various checks, which adds e1000e, virtio-transitional, virtio-non-transitional, usb-net, spapr-vlan, lan9118, smc91c111 Because the qemu driver has historically also allowed the raw model string onto the qemu command line, this isn't a full conversion. Unwinding that will require more thought. However for all new driver code we should be adding explicit enum values for any model name we have special handling for. Remove the now unused virDomainNetStreqModelString Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
The bhyve driver only works with the virtio and e1000 models, which we already have in the enum. Some error reporting is slightly downgraded to avoid some subtle usage of modelstr Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
The vz driver only handles three models: virtio, e1000, and rtl8139. Add enum values for those models, and convert the vz driver to handling net->model natively Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
This adds a network model enum. The virDomainNetDef property is named 'model' like most other devices. When the XML parser or a driver calls NetSetModelString, if the passed string is in the enum, we will set net->model, otherwise we copy the string into net->modelstr Add a single example for the 'netfront' xen model, and wire that up, just to verify it's all working Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
We will be adding a 'model' enum in upcoming patches. Rename the existing value to make the differentiation clear Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
To ease converting the net->model value to an enum, add the wrapper functions: virDomainNetGetModelString virDomainNetSetModelString virDomainNetStreqModelString virDomainNetStrcaseeqModelString Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Examples of passing unknown strings through <interface> <model type=X/> Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Demostrate DO_TEST_CAPS_ARCH_LATEST by converting the test case 'aarch64-os-firmware-efi' Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Convert these test cases to use DO_TEST_CAPS_LATEST * genid * genid-auto This ensures the test infrastructure is working as expected for a test case with explicit -active and -inactive XML test data Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Convert these test cases to use DO_TEST_CAPS_LATEST * os-firmware-bios * os-firmware-efi * os-firmware-efi-secboot Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Convert these test cases to use DO_TEST_CAPS_LATEST * virtio-transitional * virtio-non-transitional Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Add DO_TEST_CAPS* macros, lifted from qemuxml2argvtest. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Use the same pattern that is used in qemuxml2argvtest, setting the name in a static testQemuInfo instance inside the test macros Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 16 4月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
Switch over to use the new API for re-attaching the bridge device Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-