def ucs_manager_connect(self, ucsm_ip):
if not self.ucsmsdk:<EOL><INDENT>self.ucsmsdk = self._import_ucsmsdk()<EOL><DEDENT>ucsm = CONF.ml2_cisco_ucsm.ucsms.get(ucsm_ip)<EOL>if not ucsm or not ucsm.ucsm_username or not ucsm.ucsm_password:<EOL><INDENT>LOG.error('<STR_LIT>'<EOL>'<STR_LIT>', ucsm_ip)<EOL>return None<EOL><DEDENT>handle = self.ucsmsdk.UcsHandle()<EOL>try:<EOL><INDENT>handle.Login(ucsm_ip, ucsm.ucsm_username, ucsm.ucsm_password)<EOL><DEDENT>except Exception as e:<EOL><INDENT>raise cexc.UcsmConnectFailed(ucsm_ip=ucsm_ip, exc=e)<EOL><DEDENT>return handle<EOL>
Connects to a UCS Manager.