Chaffelson / nipyapi

A convenient Python wrapper for Apache NiFi
Other
244 stars 76 forks source link

JSON Output issues on nipyapi.system.get_system_diagnostics() #162

Closed AODBA closed 4 years ago

AODBA commented 4 years ago

Description

The output is wrongly formatted. Eg:

np.system.get_system_diagnostics()
{'system_diagnostics': {'aggregate_snapshot': {'available_processors': 8,
                                               'content_repository_storage_usage': [{'free_space': '16.28 '
                                                                                                   'GB',
                                                                                     'free_space_bytes': 17481236480,
                                                                                     'identifier': 'default',
                                                                                     'total_space': '79.99 '
                                                                                                    'GB',
                                                                                     'total_space_bytes': 85886742528,
                                                                                     'used_space': '63.71 '
                                                                                                   'GB',
                                                                                     'used_space_bytes': 68405506048,
                                                                                     'utilization': '80.0%'}],

What I Did

see:

total_space': '79.99 '
            'GB',

It seems that he treats space as new line so it wraps it in commas and by doing so it invalidates the json.

The rest-api returns the right json ouptut

Urgency

Not very urgent