Class: Dcmgr::Rpc::HvaContext

Inherits:
Object
  • Object
show all
Defined in:
lib/dcmgr/rpc/hva_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(hvahandler) ⇒ HvaContext

Returns a new instance of HvaContext.



499
500
501
502
# File 'lib/dcmgr/rpc/hva_handler.rb', line 499

def initialize(hvahandler)
  raise "Invalid Class: #{hvahandler}" unless hvahandler.instance_of?(HvaHandler)
  @hva = hvahandler
end

Instance Method Details

#instObject



512
513
514
# File 'lib/dcmgr/rpc/hva_handler.rb', line 512

def inst
  @hva.instance_variable_get(:@inst)
end

#inst_data_dirObject



528
529
530
# File 'lib/dcmgr/rpc/hva_handler.rb', line 528

def inst_data_dir
  File.expand_path("#{inst_id}", node.manifest.config.vm_data_dir)
end

#inst_idObject



508
509
510
# File 'lib/dcmgr/rpc/hva_handler.rb', line 508

def inst_id
  @hva.instance_variable_get(:@inst_id)
end

#metadata_img_pathObject



520
521
522
# File 'lib/dcmgr/rpc/hva_handler.rb', line 520

def 
  File.expand_path('metadata.img', inst_data_dir)
end

#nodeObject



504
505
506
# File 'lib/dcmgr/rpc/hva_handler.rb', line 504

def node
  @hva.instance_variable_get(:@node)
end

#os_devpathObject



516
517
518
# File 'lib/dcmgr/rpc/hva_handler.rb', line 516

def os_devpath
  @hva.instance_variable_get(:@os_devpath)
end

#volObject



524
525
526
# File 'lib/dcmgr/rpc/hva_handler.rb', line 524

def vol
  @hva.instance_variable_get(:@vol)
end