Method: HPE3PAR_API#remove_initiator_chap

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

#remove_initiator_chap(host_name, debug = false) ⇒ Object



756
757
758
759
760
761
762
763
764
765
766
767
768
769
# File 'lib/puppet/util/hpe3par_api.rb', line 756

def remove_initiator_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')}
    cl.modify_host(host_name, mod_request)
    Puppet.info("Host #{host_name} modified to remove initiator chap")
  rescue Hpe3parSdk::HPE3PARException => ex
    Puppet.err(ex.message)
    raise ex
  ensure
    cl.logout
  end
end