Class: Console::Libvirt

Inherits:
Object
  • Object
show all
Defined in:
lib/console/libvirt.rb

Instance Method Summary collapse

Constructor Details

#initialize(path = PTS_PATH) ⇒ Libvirt

Returns a new instance of Libvirt.



10
11
12
# File 'lib/console/libvirt.rb', line 10

def initialize(path=PTS_PATH)
   @pts_path=path	
end

Instance Method Details

#libvirt_ptsObject



14
15
16
17
18
19
# File 'lib/console/libvirt.rb', line 14

def libvirt_pts
		Dir.entries(@pts_path).find_all do |pts|
   uid = File.stat("#{@pts_path}/#{pts}").uid
   Etc.getpwuid(uid).name.eql?(LIBVIRT_USER)
		end
end