Sha256: 2f69a8482d839ec1fdd613fd956abc3f9882035c8ef26bea5c86a6153e04383e

Contents?: true

Size: 712 Bytes

Versions: 11

Compression:

Stored size: 712 Bytes

Contents

module VagrantPlugins
  module ProviderLibvirt
    module Util
      module StorageUtil
        def storage_uid(env)
          env[:machine].provider_config.qemu_use_session ? Process.uid : 0
        end

        def storage_gid(env)
          env[:machine].provider_config.qemu_use_session ? Process.gid : 0
        end

        def storage_pool_path(env)
          if env[:machine].provider_config.storage_pool_path
            env[:machine].provider_config.storage_pool_path
          elsif env[:machine].provider_config.qemu_use_session
            File.expand_path('~/.local/share/libvirt/images')
          else
            '/var/lib/libvirt/images'
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
vagrant-libvirt-0.5.3 lib/vagrant-libvirt/util/storage_util.rb
vagrant-libvirt-0.5.2 lib/vagrant-libvirt/util/storage_util.rb
vagrant-libvirt-0.5.1 lib/vagrant-libvirt/util/storage_util.rb
vagrant-libvirt-0.5.0 lib/vagrant-libvirt/util/storage_util.rb
vagrant-libvirt-0.4.1 lib/vagrant-libvirt/util/storage_util.rb
vagrant-libvirt-0.4.0 lib/vagrant-libvirt/util/storage_util.rb
vagrant-libvirt-0.3.0 lib/vagrant-libvirt/util/storage_util.rb
vagrant-libvirt-0.2.1 lib/vagrant-libvirt/util/storage_util.rb
vagrant-libvirt-0.1.2 lib/vagrant-libvirt/util/storage_util.rb
vagrant-libvirt-0.1.0 lib/vagrant-libvirt/util/storage_util.rb
vagrant-libvirt-0.0.45 lib/vagrant-libvirt/util/storage_util.rb