Method: HPE3PAR_API#remove_target_chap

Defined in:
lib/puppet/util/hpe3par_api.rb

#remove_target_chap(host_name, debug = false) ⇒ Object



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.(@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