1. 20 10月, 2017 10 次提交
    • J
      qemu: Create a wrapper around qemuMonitorSetCapabilities · 19bade7a
      Jiri Denemark 提交于
      The new function is called qemuProcessInitMonitor and it will enter/exit
      the monitor so that the caller doesn't have to deal with this.
      
      The goal of this patch is to simplify the code in qemuConnectMonitor
      which would otherwise be a bit hairy after the following patch.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      19bade7a
    • J
      interfaces: Convert virInterfaceObjList to virObjectRWLockable · 6094d6ec
      John Ferlan 提交于
      Rather than a forward linked list, let's use the virHashTable in
      order to manage the objsName data.
      
      Requires numerous changes from List to Object management similar to
      many other drivers/vir*obj.c modules
      6094d6ec
    • J
      interface: Make _virInterfaceObjList virObjectRWLockable · 4102e228
      John Ferlan 提交于
      Modify the allocation to be a real RWLockable object and add the
      various RWLock{Read|Write} and RWUnlock calls to process the list
      of interfaces.
      4102e228
    • J
      conf: Add/Allow parsing the encryption in the disk source · 37537a7c
      John Ferlan 提交于
      Since the virStorageEncryptionPtr encryption; is a member of
       _virStorageSource it really should be allowed to be a subelement
      of the disk <source> for various disk formats:
      
         Source{File|Dir|Block|Volume}
         SourceProtocol{RBD|ISCSI|NBD|Gluster|Simple|HTTP}
      
      NB: Simple includes sheepdog, ftp, ftps, tftp
      
      That way we can set up to allow the <encryption> element to be
      formatted within the disk source, but we still need to be wary
      from whence the element was read - see keep track and when it
      comes to format the data, ensure it's written in the correct place.
      
      Modify the qemuxml2argvtest to add a parse failure when there is an
      <encryption> as a child of <disk> *and* an <encryption> as a child
      of <source>.
      
      The virschematest will read the new test files and validate from a
      RNG viewpoint things are fine.
      37537a7c
    • J
      conf: Add/Allow parsing the auth in the disk source · 8002d3cb
      John Ferlan 提交于
      Since the virStorageAuthDefPtr auth; is a member of _virStorageSource
      it really should be allowed to be a subelement of the disk <source>
      for the RBD and iSCSI prototcols. That way we can set up to allow
      the <auth> element to be formatted within the disk source.
      
      Since we've allowed the <auth> to be a child of <disk>, we'll need
      to keep track of how it was read so that when writing out we'll know
      whether to format as child of <disk> or <source>. For the argv2xml
      parsing, let's format under <source> as a preference. Do not allow
      <auth> to be both a child of <disk> and <source>.
      
      Modify the qemuxml2argvtest to add a parse failure when there is an
      <auth> as a child of <disk> *and* an <auth> as a child of <source>.
      
      Add tests to validate that if the <auth> was found in <source>, then
      the resulting xml2xml and xml2arg works just fine.  The two new .args
      file are exact copies of the non "-source" version of the file.
      
      The virschematest will read the new test files and validate from a
      RNG viewpoint things are fine
      
      Update the virstoragefile, virstoragetest, and args2xml file to show
      the "preference" to place <auth> as a child of <source>.
      8002d3cb
    • J
      qemu: Move encinfo from private disk to private disk src · 0e2e2248
      John Ferlan 提交于
      Since the encryption information can also be disk source specific
      move it from qemuDomainDiskPrivate to qemuDomainStorageSourcePrivate
      
      Since the last allocated element from qemuDomainDiskPrivate is
      removed, that means we no longer need qemuDomainDiskPrivateDispose.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      0e2e2248
    • J
      qemu: Relocate qemuDomainSecretInfoPtr to qemuDomainStorageSourcePrivate · ab0e32fb
      John Ferlan 提交于
      Since the secret information is really virStorageSource specific
      piece of data, let's manage the privateData from there instead of
      at the Disk level.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      ab0e32fb
    • J
      qemu: Introduce privateData object for virStorageSource · 3ff3eb70
      John Ferlan 提交于
      Add the object definition and helpers to store security-related private
      data for virStorageSources.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      3ff3eb70
    • J
      util: storage: Introduce privateData for _virStorageSource · 1f38445e
      John Ferlan 提交于
      Introduce the bare necessities to add privateData to _virStorageSource.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      1f38445e
    • J
      qemu: Add missing encinfo cleanup · 76a5ca62
      John Ferlan 提交于
      When commit id 'da86c6c2' added support for diskPriv->encinfo in
      qemuDomainSecretDiskPrepare a change to qemuDomainSecretDiskDestroy
      to was missed. Although qemuDomainDiskPrivateDispose probably would
      do the trick.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      76a5ca62
  2. 19 10月, 2017 30 次提交