def _send_request(self, operation, url, payload, desc):
res = None<EOL>try:<EOL><INDENT>payload_json = None<EOL>if payload and payload != '<STR_LIT>':<EOL><INDENT>payload_json = jsonutils.dumps(payload)<EOL><DEDENT>self._login()<EOL>desc_lookup = {'<STR_LIT:POST>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>', '<STR_LIT:GET>': '<STR_LIT>'}<EOL>res = requests.request(operation, url, data=payload_json,<EOL>headers=self._req_headers,<EOL>timeout=self.timeout_resp, verify=False)<EOL>desc += desc_lookup.get(operation, operation.lower())<EOL>LOG.info("<STR_LIT>",<EOL>{'<STR_LIT>': desc, '<STR_LIT:url>': url, '<STR_LIT>': payload})<EOL>self._logout()<EOL><DEDENT>except (requests.HTTPError, requests.Timeout,<EOL>requests.ConnectionError) as exc:<EOL><INDENT>LOG.exception('<STR_LIT>', exc)<EOL>raise dexc.DfaClientRequestFailed(reason=exc)<EOL><DEDENT>return res<EOL>
Send request to DCNM.