695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
|
# File 'lib/puppet/util/hpe3par_api.rb', line 695
def create_host(host_name, domain = nil, fcwwns = nil, iscsi_names = nil, persona = nil, debug = false)
cl = Hpe3parSdk::Client.new(@rest_url, debug: debug)
begin
cl.login(@url.user, @url.password)
optional = {}
unless domain.nil?
optional['domain'] = domain
end
unless persona.nil?
optional['persona'] = Hpe3parSdk::HostPersona.const_get(persona)
end
cl.create_host(host_name, iscsi_names, fcwwns, optional)
rescue Hpe3parSdk::HPE3PARException => ex
raise ex
ensure
cl.logout
end
end
|