Source code for nipyapi.system

# -*- coding: utf-8 -*-

For system and cluster level functions interacting with the underlying NiFi

from __future__ import absolute_import
import nipyapi

__all__ = [
    "get_system_diagnostics", "get_cluster", "get_node",

[docs] def get_system_diagnostics(): """ Returns NiFi Sytems diagnostics page Returns (json): """ with nipyapi.utils.rest_exceptions(): return nipyapi.nifi.SystemDiagnosticsApi().get_system_diagnostics()
[docs] def get_cluster(): """ EXPERIMENTAL Returns the contents of the NiFi cluster Returns (json): """ with nipyapi.utils.rest_exceptions(): return nipyapi.nifi.ControllerApi().get_cluster()
[docs] def get_node(nid): """ Returns the cluster node information Args: nid (str): The UUID of the Node to target Returns: """ with nipyapi.utils.rest_exceptions(): return nipyapi.nifi.ControllerApi().get_node(nid)
[docs] def get_nifi_version_info(): """ Returns the version information of the connected NiFi instance Returns (VersionInfoDTO): """ diags = get_system_diagnostics() return diags.system_diagnostics.aggregate_snapshot.version_info