Class: Dcmgr::Rpc::HvaContext
- Inherits:
-
Object
- Object
- Dcmgr::Rpc::HvaContext
- Defined in:
- lib/dcmgr/rpc/hva_handler.rb
Instance Method Summary collapse
-
#initialize(hvahandler) ⇒ HvaContext
constructor
A new instance of HvaContext.
- #inst ⇒ Object
- #inst_data_dir ⇒ Object
- #inst_id ⇒ Object
- #metadata_img_path ⇒ Object
- #node ⇒ Object
- #os_devpath ⇒ Object
- #vol ⇒ Object
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
#inst ⇒ Object
512 513 514 |
# File 'lib/dcmgr/rpc/hva_handler.rb', line 512 def inst @hva.instance_variable_get(:@inst) end |
#inst_data_dir ⇒ Object
528 529 530 |
# File 'lib/dcmgr/rpc/hva_handler.rb', line 528 def inst_data_dir File.("#{inst_id}", node.manifest.config.vm_data_dir) end |
#inst_id ⇒ Object
508 509 510 |
# File 'lib/dcmgr/rpc/hva_handler.rb', line 508 def inst_id @hva.instance_variable_get(:@inst_id) end |
#metadata_img_path ⇒ Object
520 521 522 |
# File 'lib/dcmgr/rpc/hva_handler.rb', line 520 def File.('metadata.img', inst_data_dir) end |
#node ⇒ Object
504 505 506 |
# File 'lib/dcmgr/rpc/hva_handler.rb', line 504 def node @hva.instance_variable_get(:@node) end |
#os_devpath ⇒ Object
516 517 518 |
# File 'lib/dcmgr/rpc/hva_handler.rb', line 516 def os_devpath @hva.instance_variable_get(:@os_devpath) end |
#vol ⇒ Object
524 525 526 |
# File 'lib/dcmgr/rpc/hva_handler.rb', line 524 def vol @hva.instance_variable_get(:@vol) end |