def export_host(self, host, path):
    '\n        Exports a host to a local folder. Contexts and instance are exported\n        also.\n\n        @param host: The host to export.\n        @type host: L{Host}\n        @param path: Path to local directory.\n        @type path: string\n        '
    self._export_entity(host, path)
    if (host.state != Host.State.DEFINED):
        try:
            instance = host.get_instance()
            instance.dump_json(os.path.join(path, 'instance.json'))
        except PythonApiException:
            pass
    app_folder = os.path.join(path, 'applications')
    ensure(app_folder)
    for context in host.applications():
        context.dump_json(os.path.join(app_folder, (context.application + '.json')))
    try:
        host.get_platform().dump_json(os.path.join(path, 'platform.json'))
    except EntityNotFoundException:
        pass
    try:
        host.get_distribution().dump_json(os.path.join(path, 'distribution.json'))
    except EntityNotFoundException:
        pass
Exports a host to a local folder. Contexts and instance are exported
also.

@param host: The host to export.
@type host: L{Host}
@param path: Path to local directory.
@type path: string
def export_host(self, host, path):
    '\n        Exports a host to a local folder. Contexts and instance are exported\n        also.\n\n        @param host: The host to export.\n        @type host: L{Host}\n        @param path: Path to local directory.\n        @type path: string\n        '
    self._export_entity(host, path)
    if (host.state != Host.State.DEFINED):
        try:
            instance = host.get_instance()
            instance.dump_json(os.path.join(path, 'instance.json'))
        except PythonApiException:
            pass
    app_folder = os.path.join(path, 'applications')
    ensure(app_folder)
    for context in host.applications():
        context.dump_json(os.path.join(app_folder, (context.application + '.json')))
    try:
        host.get_platform().dump_json(os.path.join(path, 'platform.json'))
    except EntityNotFoundException:
        pass
    try:
        host.get_distribution().dump_json(os.path.join(path, 'distribution.json'))
    except EntityNotFoundException:
        pass