lib/puppet/compellent/transport.rb
# Execute Storage Manager Login Endpoint and return response that contains cookie and other version information
#
# @return [Object] HTTP Response
#
# @example return
#   {"hostName"=>"172.17.0.53",
#   "provider"=>"EnterpriseManager",
#    "locale"=>"en_US",
#    "source"=>"REST",
#    "userName"=>"SushilR@aidev.com",
#    "connected"=>true,
#    "userId"=>434228,
#    "application"=>"",
#    "providerVersion"=>"16.2.1.228",
#    "webServicesPort"=>3033,
#    "sessionKey"=>1475261164332,
#    "applicationVersion"=>"",
#    "apiBuild"=>651,
#    "apiVersion"=>"3.1",
#    "commandLine"=>false,
#    "minApiVersion"=>"0.1",
#    "connectionKey"=>"",
#    "secureString"=>"",
#    "useHttps"=>false,
#    "objectType"=>"ApiConnection",
#    "instanceId"=>"0",
#    "instanceName"=>"ApiConnection"}
Execute Storage Manager Login Endpoint and return response that contains cookie and other version information
Execute Storage Manager Login Endpoint and return response that contains cookie and other version information
def em_login
        login_base_url="https://#{CGI.escape(self.user)}:#{CGI.escape(self.password)}@#{self.host}:#{self.port}/api/rest"
        url = "#{login_base_url}/ApiConnection/Login"
        response = RestClient::Request.execute(:url => url,
                                               :method => :post,
                                               :verify_ssl => false ,
                                               :payload => '{}',
                                               :headers => {:content_type => :json,
                                                            :accept => :json ,
                                                            'x-dell-api-version'=> '2.0' })
        response
      end
def em_login login_base_url = "https://#{CGI.escape(self.user)}:#{CGI.escape(self.password)}@#{self.host}:#{self.port}/api/rest" url = "#{login_base_url}/ApiConnection/Login" response = RestClient :: Request . execute ( :url => url , :method => :post , :verify_ssl => false , :payload => '{}' , :headers => { :content_type => :json , :accept => :json , 'x-dell-api-version' => '2.0' } ) response end
Execute Storage Manager Login Endpoint and return response that contains cookie and other version information
Execute Storage Manager Login Endpoint and return response that contains cookie and other version information
None
Object
example
None