1. 23 10月, 2019 1 次提交
  2. 15 10月, 2019 2 次提交
  3. 25 9月, 2019 1 次提交
  4. 27 7月, 2019 1 次提交
    • E
      backup: Introduce virDomainCheckpoint APIs · 0d44788f
      Eric Blake 提交于
      Introduce a bunch of new public APIs related to backup checkpoints.
      Checkpoints are modeled heavily after virDomainSnapshotPtr (both
      represent a point in time of the guest), although a snapshot exists
      with the intent of rolling back to that state, while a checkpoint
      exists to make it possible to create an incremental backup at a later
      time.  We may have a future hypervisor that can completely manage
      checkpoints without libvirt metadata, but the first two planned
      hypervisors (qemu and test) both always use libvirt for tracking
      metadata relations between checkpoints, so for now, I've deferred
      the counterpart of virDomainSnapshotHasMetadata for a separate
      API addition at a later date if there is ever a need for it.
      
      Note that until we allow snapshots and checkpoints to exist
      simultaneously on the same domain (although the actual prevention of
      this will be in a separate patch for the sake of an easier revert down
      the road), that it is not possible to branch out to create more than
      one checkpoint child to a given parent, although it may become
      possible later when we revert to a snapshot that coincides with a
      checkpoint.  This also means that for now, the decision of which
      checkpoint becomes the parent of a newly created one is the only
      checkpoint with no child (so while there are APIs for dealing with a
      current snapshot, we do not need those for checkpoints).  We may end
      up exposing a notion of a current checkpoint later, but it's easier to
      add stuff when proven needed than to blindly support it now and wish
      we hadn't exposed it.
      
      The following map shows the API relations to snapshots, with new APIs
      on the right:
      
      Operate on a domain object to create/redefine a child:
      virDomainSnapshotCreateXML          virDomainCheckpointCreateXML
      
      Operate on a child object for lifetime management:
      virDomainSnapshotDelete             virDomainCheckpointDelete
      virDomainSnapshotFree               virDomainCheckpointFree
      virDomainSnapshotRef                virDomainCheckpointRef
      
      Operate on a child object to learn more about it:
      virDomainSnapshotGetXMLDesc         virDomainCheckpointGetXMLDesc
      virDomainSnapshotGetConnect         virDomainCheckpointGetConnect
      virDomainSnapshotGetDomain          virDomainCheckpointGetDomain
      virDomainSnapshotGetName            virDomainCheckpiontGetName
      virDomainSnapshotGetParent          virDomainCheckpiontGetParent
      virDomainSnapshotHasMetadata        (deferred for later)
      virDomainSnapshotIsCurrent          (no counterpart, see note above)
      
      Operate on a domain object to list all children:
      virDomainSnapshotNum                (no counterparts, these are the old
      virDomainSnapshotListNames           racy interfaces)
      virDomainSnapshotListAllSnapshots   virDomainListAllCheckpoints
      
      Operate on a child object to list descendents:
      virDomainSnapshotNumChildren        (no counterparts, these are the old
      virDomainSnapshotListChildrenNames   racy interfaces)
      virDomainSnapshotListAllChildren    virDomainCheckpointListAllChildren
      
      Operate on a domain to locate a particular child:
      virDomainSnapshotLookupByName       virDomainCheckpointLookupByName
      virDomainSnapshotCurrent            (no counterpart, see note above)
      virDomainHasCurrentSnapshot         (no counterpart, old racy interface)
      
      Operate on a snapshot to roll back to earlier state:
      virDomainSnapshotRevert             (no counterpart, instead checkpoints
                                           are used in incremental backups via
      				     XML to virDomainBackupBegin)
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      0d44788f
  5. 31 1月, 2019 1 次提交
    • P
      docs: Format bit shift and hex notation for bitwise flag enums · 63cbad4e
      Peter Krempa 提交于
      Big number itself does not make much sense in some cases. Format the
      bitshift format as well.
      
      Changes our web page docs from:
      
      VIR_MIGRATE_POSTCOPY = 32768 : Setting the VIR_MIGRATE_POSTCOPY...
      VIR_MIGRATE_TLS      = 65536 : Setting the VIR_MIGRATE_TLS flag...
      
      to:
      
      VIR_MIGRATE_POSTCOPY = 32768 (0x8000; 1 << 15)  : Setting the VIR_MIGRATE_POSTCOPY...
      VIR_MIGRATE_TLS      = 65536 (0x10000; 1 << 16) : Setting the VIR_MIGRATE_TLS flag...
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      63cbad4e
  6. 14 12月, 2018 2 次提交
    • D
      Enforce a standard header file guard symbol name · 568a4172
      Daniel P. Berrangé 提交于
      Require that all headers are guarded by a symbol named
      
        LIBVIRT_$FILENAME
      
      where $FILENAME is the uppercased filename, with all characters
      outside a-z changed into '_'.
      
      Note we do not use a leading __ because that is technically a
      namespace reserved for the toolchain.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      568a4172
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  7. 20 3月, 2018 18 次提交
  8. 19 3月, 2018 1 次提交
  9. 17 3月, 2018 2 次提交
  10. 16 3月, 2018 7 次提交
  11. 19 9月, 2017 1 次提交
    • A
      python: Don't hardcode interpreter path · f34fdd5a
      Andrea Bolognani 提交于
      This is particularly useful on operating systems that don't ship
      Python as part of the base system (eg. FreeBSD) while still working
      just as well as it did before on Linux.
      
      While at it, make it explicit that our scripts are only going to
      work with Python 2, and remove the usage of unbuffered I/O, which
      as far as I can tell has no effect on the output files.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      f34fdd5a
  12. 24 7月, 2017 1 次提交
    • M
      apibuild.py: Handle enum comments properly · 6efdd94d
      Michal Privoznik 提交于
      After f4cb85c6 we only have two options for placing enum
      values descriptions. It's either:
      
          typedef enum {
              /* Some long description. Therefore it's placed before
               * the value. */
              VIR_ENUM_A_VAL = 1,
          } virEnumA;
      
      or:
      
          typedef enum {
              VIR_ENUM_B_VAL = 1, /* Some short description */
          } virEnumB;
      
      However, our apibuild.py script is not able to deal with the
      former one. It messes up comments. To fix this couple of things
      needs to be done:
      
      a) DO NOT reset self.comment in parseEnumBlock(). This is a
      result from our tokenizer. Upon calling token() if it finds a
      comment block it stores it in self.comment and returns the next
      token (which is not comment). Therefore, if we reset self.comment
      we might lose the first comment in the enum block.
      
      b) we need a variable to track if the current enum block uses
      value descriptions before or after values. That is if it's type
      virEnumA or virEnumB. Depending on that, it we're dealing with
      virEnumA type and the current token is a comma ',' we can add the
      value into the list as we already have everything needed:
      comment, name and value.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NMartin Kletzander <mkletzan@redhat.com>
      6efdd94d
  13. 08 11月, 2016 1 次提交
    • G
      Unbreak rebuilding docs with release tarballs · 214c226f
      Guido Günther 提交于
      Release tarballs ship the include/libvirt/libvirt-common.h.
      
      when srcdir != builddir we end up including libvirt-common.h twice: from
      $top_srcdir/include/libvirt-common.h and from
      $builddir/include/libvirt-common.h leading to
      
        function virTypedParamsGetUInt from /tmp/buildd/libvirt-2.4.0/debian/build/docs/../include/libvirt/libvirt-common.h redeclared in /tmp/buildd/libvirt-2.4.0/docs/../include/libvirt/libvirt-common.h
        function virTypedParamsAddBoolean from /tmp/buildd/libvirt-2.4.0/debian/build/docs/../include/libvirt/libvirt-common.h redeclared in /tmp/buildd/libvirt-2.4.0/docs/../include/libvirt/libvirt-common.h
         …
      
      Only add the builddir to the search list if there is no pregenerated
      libvirt-common.h.
      
      Reuse the existing check that predates the libvirt.h → libvirt-common.h
      split and that probably was meant for exactly that.
      
      References: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842452
      214c226f
  14. 20 7月, 2016 1 次提交
    • J
      hvsupport: use a regex instead of XML::XPath · ad9e72f5
      Ján Tomko 提交于
      When generating the hvsupport.html.in file, we parse the -api.xml
      files generated by apibuild.py to know in which HTML file the API
      function is.
      
      Doing an XPath query for every single 'function' element in the
      file is inefficient.
      
      Since the XML file is generated by another of our build scripts
      (apibuild.py, using Python's standard 'output.write' XML library),
      just find the function name->file mapping by a regex upfront.
      
      Also add a note about this next to the line that generates it
      in apibuild.py and do not check if XML::XPath is installed in
      bootstrap since we no longer use it.
      ad9e72f5