@classmethod<EOL><INDENT>def auto_client(cls, host, server, ca_path=None, ca_contents=None,<EOL>cert_path=None, cert_contents=None, key_path=None,<EOL>key_contents=None):<DEDENT>
<EOL>client = {<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": True,<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": True<EOL>}<EOL>port = server.get('<STR_LIT:port>') or <NUM_LIT><EOL>client['<STR_LIT>'] = [{'<STR_LIT:host>': host, '<STR_LIT:port>': port}]<EOL>if server.get('<STR_LIT>') == '<STR_LIT>':<EOL><INDENT>client['<STR_LIT>'] = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>client['<STR_LIT>'] = '<STR_LIT>'<EOL><DEDENT>if '<STR_LIT>' in server or '<STR_LIT>' in server:<EOL><INDENT>client['<STR_LIT>'] = True<EOL><DEDENT>if '<STR_LIT>' not in server or not server['<STR_LIT>']:<EOL><INDENT>client['<STR_LIT>'] = False<EOL><DEDENT>ns_cert_type = {None: '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>'}<EOL>client['<STR_LIT>'] = ns_cert_type[server.get('<STR_LIT>')]<EOL>remote_cert_tls = {None: '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>'}<EOL>client['<STR_LIT>'] = remote_cert_tls[server.get('<STR_LIT>')]<EOL>copy_keys = ['<STR_LIT:name>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:key>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT:user>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT:float>', '<STR_LIT>', '<STR_LIT>']<EOL>for key in copy_keys:<EOL><INDENT>if key in server:<EOL><INDENT>client[key] = server[key]<EOL><DEDENT><DEDENT>files = cls._auto_client_files(client, ca_path, ca_contents,<EOL>cert_path, cert_contents,<EOL>key_path, key_contents)<EOL>return {<EOL>'<STR_LIT>': [client],<EOL>'<STR_LIT>': files<EOL>}<EOL>
Returns a configuration dictionary representing an OpenVPN client configuration
that is compatible with the passed server configuration.

:param host: remote VPN server
:param server: dictionary representing a single OpenVPN server configuration
:param ca_path: optional string representing path to CA, will consequently add
                a file in the resulting configuration dictionary
:param ca_contents: optional string representing contents of CA file
:param cert_path: optional string representing path to certificate, will consequently add
                a file in the resulting configuration dictionary
:param cert_contents: optional string representing contents of cert file
:param key_path: optional string representing path to key, will consequently add
                a file in the resulting configuration dictionary
:param key_contents: optional string representing contents of key file
:returns: dictionary representing a single OpenVPN client configuration