def init(self, hosts=None, cacert=None, client_cert=None, client_key=None):
<EOL>try:<EOL><INDENT>import etcd<EOL>self.module = etcd<EOL><DEDENT>except ImportError:<EOL><INDENT>pass<EOL><DEDENT>if not self.module:<EOL><INDENT>return<EOL><DEDENT>self._parse_jetconfig()<EOL>hosts = env('<STR_LIT>', hosts)<EOL>protocol = env('<STR_LIT>', None)<EOL>cacert = env('<STR_LIT>', cacert)<EOL>client_cert = env('<STR_LIT>', client_cert)<EOL>client_key = env('<STR_LIT>', client_key)<EOL>username = None<EOL>password = None<EOL>auth = env('<STR_LIT>', None)<EOL>if auth:<EOL><INDENT>auth = auth.split('<STR_LIT::>')<EOL>auth.append('<STR_LIT>')<EOL>username = auth[<NUM_LIT:0>]<EOL>password = auth[<NUM_LIT:1>]<EOL><DEDENT>hosts = self._parse_hosts(hosts)<EOL>if hosts is None:<EOL><INDENT>return<EOL><DEDENT>kw = {}<EOL>kw['<STR_LIT>'] = True<EOL>if protocol:<EOL><INDENT>kw['<STR_LIT>'] = protocol<EOL><DEDENT>if username:<EOL><INDENT>kw['<STR_LIT:username>'] = username<EOL><DEDENT>if password:<EOL><INDENT>kw['<STR_LIT:password>'] = password<EOL><DEDENT>if cacert:<EOL><INDENT>kw['<STR_LIT>'] = os.path.abspath(cacert)<EOL><DEDENT>if client_cert and client_key:<EOL><INDENT>kw['<STR_LIT>'] = ((os.path.abspath(client_cert),<EOL>os.path.abspath(client_key)))<EOL><DEDENT>elif client_cert:<EOL><INDENT>kw['<STR_LIT>'] = os.path.abspath(client_cert)<EOL><DEDENT>if cacert or client_cert or client_key:<EOL><INDENT>kw['<STR_LIT>'] = '<STR_LIT>'<EOL><DEDENT>self.client = self.module.Client(hosts, **kw)<EOL>
Handle creating the new etcd client instance and other business.

:param hosts: Host string or list of hosts (default: `'127.0.0.1:2379'`)
:param cacert: CA cert filename (optional)
:param client_cert: Client cert filename (optional)
:param client_key: Client key filename (optional)
:type ca: str
:type cert: str
:type key: str