- 18 10月, 2019 1 次提交
-
-
由 Julio Faracco 提交于
This commit adds resolution element with parameters 'x' and 'y' into video XML domain group definition. Both, properties were added into an element called 'resolution' and it was added inside 'model' element. They are set as optional. This element does not follow QEMU properties 'xres' and 'yres' format. Both HTML documentation and schema were changed too. This commit includes a simple test case to cover resolution for QEMU video models. The new XML format for resolution looks like: <model ...> <resolution x='800' y='600'/> </model> Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
-
- 21 8月, 2019 1 次提交
-
-
由 Ján Tomko 提交于
Now that virDomainXMLNamespace matches virXMLNamespace, we no longer need to keep both around. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 27 7月, 2019 2 次提交
-
-
由 Eric Blake 提交于
Create a new file for managing a list of checkpoint objects, borrowing heavily from existing virDomainSnapshotObjList paradigms. Note that while snapshots definitely have a use case for multiple children to a single parent (create a base snapshot, create a child snapshot, revert to the base, then create another child snapshot), it's harder to predict how checkpoints will play out with reverting to prior points in time. Thus, in initial use, given a list of checkpoints, you never have more than one child, and we can treat the most-recent leaf node as the parent of the next node creation, without having to expose a notion of a current node in XML or public API. However, as the snapshot machinery is already generic, it is easier to reuse the generic machinery that tracks relations between domain moments than it is to open-code a new list-management scheme just for checkpoints (hence, we still have internal functions related to a current checkpoint, even though that has no observable effect externally, as well as the addition of a function to easily find the lone leaf in the list to use as the current checkpoint). Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Eric Blake 提交于
Add a new file checkpoint_conf.c that performs the translation to and from new XML describing a checkpoint. The code shares a common base class with snapshots, since a checkpoint similarly represents the domain state at a moment in time. Add some basic testing of round trip XML handling through the new code. Of note - this code intentionally differs from snapshots in that XML schema validation is unconditional, rather than based on a public API flag. We have many existing interfaces that still need to add a flag for opt-in schema validation, but those interfaces have existing clients that may not have been producing strictly-compliant XML, or we may still uncover bugs where our RNG grammar is inconsistent with our code (where omitting the opt-in flag allows existing apps to keep working while waiting for an RNG patch). But since checkpoints are brand-new, it's easier to ensure the code matches the schema by always using the schema. If needed, a later patch could extend the API and add a flag to turn on to request schema validation, rather than having it forced (possibly just the validation of the <domain> sub-element during REDEFINE) - but if a user encounters XML that looks like it should be good but fails to validate with our RNG schema, they would either have to upgrade to a new libvirt that adds the new flag, or upgrade to a new libvirt that fixes the RNG schema, which implies adding such a flag won't help much. Also, the redefine flag requires the <domain> sub-element to be present, rather than catering to historical back-compat to older versions. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 13 6月, 2019 1 次提交
-
-
由 Jonathon Jongsma 提交于
Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 22 3月, 2019 3 次提交
-
-
由 Eric Blake 提交于
The new code here very heavily resembles the code in virDomainSnapshotObjList. There are still a couple of spots that are tied a little too heavily to snapshots (the free function lacks a polymorphic cleanup until we refactor code to use virObject; and an upcoming patch will add internal VIR_DOMAIN_MOMENT_LIST flags to replace the snapshot flag bits), but in general this is fairly close to the state needed to add checkpoint lists. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Eric Blake 提交于
Now that the core of SnapshotObj is agnostic to snapshots and can be shared with upcoming checkpoint code, it is time to rename the struct and the functions specific to list operations. A later patch will shuffle which file holds the common code. This is a fairly mechanical patch. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Eric Blake 提交于
Pull out the common parts of virDomainSnapshotDef that will be reused for virDomainCheckpointDef into a new base class. Adjust all callers that use the direct fields (some of it is churn that disappears when the next patch refactors virDomainSnapshotObj; oh well...). Someday, I hope to switch this type to be a subclass of virObject, but that requires a more thorough audit of cleanup paths, and besides minimal incremental changes are easier to review. As for the choice of naming: I promised my teenage daughter Evelyn that I'd give her credit for her contribution to this commit. I asked her "What would be a good name for a base class for DomainSnapshot and DomainCheckpoint". After explaining what a base class was (using the classic OOB Square and Circle inherit from Shape), she came up with "DomainMoment", which is way better than my initial thought of "DomainPointInTime" or "DomainPIT". Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 16 3月, 2019 4 次提交
-
-
由 Eric Blake 提交于
snapshot_conf.h was mixing three separate types: the snapshot definition, the snapshot object, and the snapshot object list. Separate out the snapshot object code into its own file, which includes moving a typedef to avoid circular inclusions. Mostly straight code motion, although I fixed a comment along the way, now that virDomainSnapshotForEachDescendent now guarantees a topological visit (missed in b647d219). Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Eric Blake 提交于
It's easier to locate a typedef if they are stored in sorted order; do so mechanically via: $ sed -i '/typedef struct/ {N; N; s/\n//g}' src/conf/virconftypes.h $ # sorting the lines $ sed -i '/typedef struct/ s/;/;\n/g' src/conf/virconftypes.h Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Eric Blake 提交于
As explained in the previous patch, collecting pointer typedefs into a common header makes it easier to avoid circular inclusions. Continue the efforts by pulling the appropriate typedefs from capabilities.h into the new header. This patch is just straight code motion (all typedefs are listed in the same order before and after the patch); a later patch will sort things for legibility. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Eric Blake 提交于
Right now, snapshot_conf.h is rather large - it deals with three separate types: virDomainSnapshotDef (the snapshot definition as it maps to XML), virDomainSnapshotObj (an object containing a def and the relationship to other snapshots), and virDomainSnapshotObjList (a list of snapshot objects), where two of the three types are currently public rather than opaque. What's more, the types are circular: a snapshot def includes a virDomainPtr, which contains a snapshot list, which includes a snapshot object, which includes a snapshot def. In order to split the three objects into separate files, while still allowing each header to use sane typedefs to incomplete pointers, the obvious solution is to lift the typedefs into yet another header, with no other dependencies. Start the split by factoring out all struct typedefs from domain_conf.h (enum typedefs don't get used in function signatures, and function typedefs tend not to suffer from circular referencing, so those stay put). The only other exception is virDomainStateReason, which is only ever used directly rather than via a pointer. This patch is just straight code motion (all typedefs are listed in the same order before and after the patch); a later patch will sort things for legibility. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-