Class: Dcmgr::NodeModules::StaTgtInitializer

Inherits:
Isono::NodeModules::Base
  • Object
show all
Includes:
Helpers::CliHelper, Logger
Defined in:
lib/dcmgr/node_modules/sta_tgt_initializer.rb

Instance Method Summary collapse

Methods included from Logger

create, default_logdev, included

Methods included from Helpers::CliHelper

#sh, #tryagain

Instance Method Details

#register_volumesObject



22
23
24
25
26
27
28
# File 'lib/dcmgr/node_modules/sta_tgt_initializer.rb', line 22

def register_volumes
  volumes = rpc.request('sta-collector', 'get_available_volumes', node.node_id)
  iscsit = Dcmgr::Drivers::IscsiTarget.select_iscsi_target(self.node.manifest.config.iscsi_target, self.node)
  volumes.each { |volume|
    iscsit.register(volume)
  }
end

#rpcObject



30
31
32
# File 'lib/dcmgr/node_modules/sta_tgt_initializer.rb', line 30

def rpc
  @rpc ||= Isono::NodeModules::RpcChannel.new(@node)
end