def _netmiko_open(self, device_type, netmiko_optional_args=None):
if netmiko_optional_args is None:<EOL><INDENT>netmiko_optional_args = {}<EOL><DEDENT>try:<EOL><INDENT>self._netmiko_device = ConnectHandler(<EOL>device_type=device_type,<EOL>host=self.hostname,<EOL>username=self.username,<EOL>password=self.password,<EOL>timeout=self.timeout,<EOL>**netmiko_optional_args<EOL>)<EOL><DEDENT>except NetMikoTimeoutException:<EOL><INDENT>raise ConnectionException("<STR_LIT>".format(self.hostname))<EOL><DEDENT>self._netmiko_device.enable()<EOL>return self._netmiko_device<EOL>
Standardized method of creating a Netmiko connection using napalm attributes.