788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
|
# File 'lib/puppet/util/hpe3par_api.rb', line 788
def remove_target_chap(host_name, debug = false)
cl = Hpe3parSdk::Client.new(@rest_url, debug: debug)
begin
cl.login(@url.user, @url.password)
mod_request = {'chapOperation' => Hpe3parSdk::HostEditOperation.const_get('REMOVE'),
'chapRemoveTargetOnly' => true}
cl.modify_host(host_name, mod_request)
Puppet.info("Host #{host_name} modified to remove target chap")
rescue Hpe3parSdk::HPE3PARException => ex
Puppet.err(ex.message)
raise ex
ensure
cl.logout
end
end
|