1. 19 9月, 2017 5 次提交
    • J
      storage: Internally represent @autostart as bool · ccc8c311
      John Ferlan 提交于
      Since it's been used that way anyway, let's just convert it to a bool
      and only make the external representation be an int.
      ccc8c311
    • J
      storage: Introduce APIs to search/scan storage pool volumes list · 5bf9b655
      John Ferlan 提交于
      Introduce virStoragePoolObjForEachVolume to scan each volume
      calling the passed callback function until all volumes have been
      processed in the storage pool volume list, unless the callback
      function returns an error.
      
      Introduce virStoragePoolObjSearchVolume to search each volume
      calling the passed callback function until it returns true
      indicating that the desired volume was found.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      5bf9b655
    • J
      storage: Introduce storage volume add, delete, count APIs · 40630a8e
      John Ferlan 提交于
      Create/use virStoragePoolObjAddVol in order to add volumes onto list.
      
      Create/use virStoragePoolObjRemoveVol in order to remove volumes from list.
      
      Create/use virStoragePoolObjGetVolumesCount to get count of volumes on list.
      
      For the storage driver, the logic alters when the volumes.obj list grows
      to after we've fetched the volobj. This is an optimization of sorts, but
      also doesn't "needlessly" grow the volumes.objs list and then just decr
      the count if the virGetStorageVol fails.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      40630a8e
    • J
      storage: Introduce virStoragePoolObjNew · 407e6a36
      John Ferlan 提交于
      Create/use a helper to perform object allocation.
      
      Adjust storagevolxml2argvtest.c in order to use the allocator and
      setting of the obj->def.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      407e6a36
    • J
      storage: Create accessor API's for virStoragePoolObj · b3198286
      John Ferlan 提交于
      In preparation for making a private object, create accessor API's for
      consumer storage functions to use:
      
          virStoragePoolObjGetDef
          virStoragePoolObjSetDef
          virStoragePoolObjGetNewDef
          virStoragePoolObjDefUseNewDef
          virStoragePoolObjGetConfigFile
          virStoragePoolObjSetConfigFile
          virStoragePoolObjGetAutostartLink
          virStoragePoolObjIsActive
          virStoragePoolObjSetActive
          virStoragePoolObjIsAutostart
          virStoragePoolObjSetAutostart
          virStoragePoolObjGetAsyncjobs
          virStoragePoolObjIncrAsyncjobs
          virStoragePoolObjDecrAsyncjobs
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      b3198286
  2. 17 8月, 2017 1 次提交
  3. 22 7月, 2017 2 次提交
  4. 11 4月, 2017 6 次提交
  5. 18 3月, 2017 3 次提交