1. 26 4月, 2016 9 次提交
    • J
      secret: Change virSecretDef variable names · 662bf30c
      John Ferlan 提交于
      Change 'ephemeral' to 'isephemeral' and 'private' to 'isprivate' since
      both are bools.
      662bf30c
    • J
      secret: Introduce virSecretObjGetValue and virSecretObjGetValueSize · 43d3e3c1
      John Ferlan 提交于
      Introduce the final accessor's to _virSecretObject data and move the
      structure from virsecretobj.h to virsecretobj.c
      
      The virSecretObjSetValue logic will handle setting both the secret
      value and the value_size. Some slight adjustments to the error path
      over what was in secretSetValue were made.
      
      Additionally, a slight logic change in secretGetValue where we'll
      check for the internalFlags and error out before checking for
      and erroring out for a NULL secret->value. That way, it won't be
      obvious to anyone that the secret value wasn't set rather they'll
      just know they cannot get the secret value since it's private.
      43d3e3c1
    • J
      secret: Introduce virSecretObj{Get|Set}Def · 9e1e5621
      John Ferlan 提交于
      Introduce fetch and set accessor to the secretObj->def field for usage
      by the driver to avoid the driver needing to know the format of virSecretObj
      9e1e5621
    • J
      secret: Introduce virSecretObjSave{Config|Data} · ac9ffd60
      John Ferlan 提交于
      Move and rename the secretRewriteFile, secretSaveDef, and secretSaveValue
      from secret_driver to virsecretobj
      
      Need to make some slight adjustments since the secretSave* functions
      called secretEnsureDirectory, but otherwise mostly just a move of code.
      ac9ffd60
    • J
      secret: Introduce virSecretObjDelete{Config|Data} · d467ac07
      John Ferlan 提交于
      Move and rename secretDeleteSaved from secret_driver into virsecretobj and
      split it up into two parts since there is error path code that looks to
      just delete the secret data file
      d467ac07
    • J
      secret: Move and rename secretLoadAllConfigs · 85ec94f8
      John Ferlan 提交于
      Move to secret_conf.c and rename to virSecretLoadAllConfigs. Also includes
      moving/renaming the supporting virSecretLoad, virSecretLoadValue, and
      virSecretLoadValidateUUID.
      85ec94f8
    • J
      secret: Use the hashed virSecretObjList · 993f9128
      John Ferlan 提交于
      This patch replaces most of the guts of secret_driver.c with recently
      added secret_conf.c APIs in order manage secret lists and objects
      using the hashed virSecretObjList* lookup API's.
      993f9128
    • J
      secret: Introduce virSecretUsageIDForDef · 615c8cce
      John Ferlan 提交于
      Move the driver specific secretUsageIDForDef into secret_conf.c. It could
      be more of a general purpose API.
      615c8cce
    • J
      secret: Create virsecretobj.c and virsecretconf.h · 4652b158
      John Ferlan 提交于
      Move virSecretObj from secret_driver.c to virsecretobj.h
      
      To support being able to create a hashed secrets list, move the
      virSecretObj to virsecretobj.h so that the code can at least find
      the definition.
      
      This should be a temporary situation while the virsecretobj.c code
      is patched in order to support a hashed secret object while still
      having the linked list support in secret_driver.c. Eventually, the
      goal is to move the virSecretObj into virsecretobj.c, although it
      is notable that the existing model from which virSecretObj was
      derived has virDomainObj in src/conf/domain_conf.h and virNetworkObj
      in src/conf/network_conf.h, so virSecretObj wouldn't be unique if
      it were to remain in virsecretobj.h  Still adding accessors to fetch
      and store hashed object data will be the end goal.
      
      Add definitions and infrastucture in virsecretobj.c to create and
      handle a hashed virSecretObj and virSecretObjList including the class,
      object, lock setup, and disposal API's. Nothing will call these yet.
      
      This infrastructure will replace the forward linked list logic
      within the secret_driver, eventually.
      4652b158
  2. 08 3月, 2016 1 次提交
  3. 01 3月, 2016 13 次提交
  4. 27 1月, 2015 2 次提交
    • D
      Removing probing of secondary drivers · 55ea7be7
      Daniel P. Berrange 提交于
      For stateless, client side drivers, it is never correct to
      probe for secondary drivers. It is only ever appropriate to
      use the secondary driver that is associated with the
      hypervisor in question. As a result the ESX & HyperV drivers
      have both been forced to do hacks where they register no-op
      drivers for the ones they don't implement.
      
      For stateful, server side drivers, we always just want to
      use the same built-in shared driver. The exception is
      virtualbox which is really a stateless driver and so wants
      to use its own server side secondary drivers. To deal with
      this virtualbox has to be built as 3 separate loadable
      modules to allow registration to work in the right order.
      
      This can all be simplified by introducing a new struct
      recording the precise set of secondary drivers each
      hypervisor driver wants
      
      struct _virConnectDriver {
          virHypervisorDriverPtr hypervisorDriver;
          virInterfaceDriverPtr interfaceDriver;
          virNetworkDriverPtr networkDriver;
          virNodeDeviceDriverPtr nodeDeviceDriver;
          virNWFilterDriverPtr nwfilterDriver;
          virSecretDriverPtr secretDriver;
          virStorageDriverPtr storageDriver;
      };
      
      Instead of registering the hypervisor driver, we now
      just register a virConnectDriver instead. This allows
      us to remove all probing of secondary drivers. Once we
      have chosen the primary driver, we immediately know the
      correct secondary drivers to use.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      55ea7be7
    • D
      Remove use of secretPrivateData from secret driver · 04101f23
      Daniel P. Berrange 提交于
      The secret driver can rely on its global state instead
      of the connect private data.
      04101f23
  5. 03 12月, 2014 1 次提交
    • J
      Replace virSecretFree with virObjectUnref · a0b13d35
      John Ferlan 提交于
      Since virSecretFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      a0b13d35
  6. 29 4月, 2014 1 次提交
    • E
      drivers: use virDirRead API · ddcf4730
      Eric Blake 提交于
      Convert all remaining clients of readdir to use the new
      interface, so that we can ensure (unlikely) errors while
      reading a directory are reported.
      
      * src/openvz/openvz_conf.c (openvzAssignUUIDs): Use new
      interface.
      * src/parallels/parallels_storage.c (parallelsFindVolumes)
      (parallelsFindVmVolumes): Report readdir failures.
      * src/qemu/qemu_driver.c (qemuDomainSnapshotLoad): Ignore readdir
      failures.
      * src/secret/secret_driver.c (loadSecrets): Likewise.
      * src/qemu/qemu_hostdev.c
      (qemuHostdevHostSupportsPassthroughVFIO): Report readdir failures.
      * src/xen/xen_inotify.c (xenInotifyOpen): Likewise.
      * src/xen/xm_internal.c (xenXMConfigCacheRefresh): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ddcf4730
  7. 25 3月, 2014 1 次提交
  8. 21 3月, 2014 1 次提交
  9. 18 3月, 2014 1 次提交
  10. 17 3月, 2014 1 次提交
  11. 11 7月, 2013 1 次提交
  12. 10 7月, 2013 1 次提交
  13. 03 7月, 2013 1 次提交
  14. 24 6月, 2013 1 次提交
  15. 09 5月, 2013 1 次提交
  16. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  17. 24 4月, 2013 3 次提交