code: def logon():
      '''
      Logs into the cimc device and returns the session cookie.
      '''
      content = {}
      payload = "<aaaLogin inName='{0}' inPassword='{1}'></aaaLogin>".format(DETAILS['username'], DETAILS['password'])
      r = __utils__['http.query'](DETAILS['url'],
                                  data=payload,
                                  method='POST',
                                  decode_type='plain',
                                  decode=True,
                                  verify_ssl=False,
                                  raise_error=False,
                                  status=True,
                                  headers=DETAILS['headers'])
  
      _validate_response_code(r['status'])
  
      answer = re.findall(r'(<[\s\S.]*>)', r['text'])[0]
      items = ET.fromstring(answer)
      for item in items.attrib:
          content[item] = items.attrib[item]
  
      if 'outCookie' not in content:
          raise salt.exceptions.CommandExecutionError("Unable to log into proxy device.")
  
      return content['outCookie'f logon():
      '''
      Logs into the cimc device and returns the session cookie.
      '''
      content = {}
      payload = "<aaaLogin inName='{0}' inPassword='{1}'></aaaLogin>".format(DETAILS['username'], DETAILS['password'])
      r = __utils__['http.query'](DETAILS['url'],
                                  data=payload,
                                  method='POST',
                                  decode_type='plain',
                                  decode=True,
                                  verify_ssl=False,
                                  raise_error=False,
                                  status=True,
                                  headers=DETAILS['headers'])
  
      _validate_response_code(r['status'])
  
      answer = re.findall(r'(<[\s\S.]*>)', r['text'])[0]
      items = ET.fromstring(answer)
      for item in items.attrib:
          content[item] = items.attrib[item]
  
      if 'outCookie' not in content:
          raise salt.exceptions.CommandExecutionError("Unable to log into proxy device.")
  
      return content['outCookie']
docs: Logs into the cimc device and returns the session cookie.