Werk #6057

TitleChanged GUI internal API functions
Date2018-05-07 19:36:36
Check_MK EditionCheck_MK Raw Edition (CRE)
Check_MK Version1.6.0i1
Level2 - Prominent Change
ClassNew Feature
CompatibilityIncompatible - Manual interaction might be required

During development of version 1.6 we have made a lot of internal changes to the GUI internal code. In case you developed you own GUI extensions, you may likely be affected by this. The following table tries to summarize the most relevant changes to make it easier for you to port your custom code:

Moved exceptions to gui_exceptions module

Use from gui_exceptions import .. to import the exception objects you need. Available are: MKAuthException, MKUnauthenticatedException, MKGeneralException, MKUserError, MKInternalError.

Moved lqencode() to livestatus module

Use import livestatus and livestatus.lqencode().

Moved format_plugin_output() to views

Use import view and views.format_plugin_output().

Moved make_nagios_directory() and make_nagios_directories() to cmk.store

Use import cmk.store and cmk.store.mkdir() or cmk.store.makedirs().

Dropped create_user_file()

Use cmk.store.save_file() instead.

Dropped bytes_human_readable()

Use cmk.render.bytes() instead.

Dropped date_human_readable()

Use cmk.render.date() instead.

Dropped percent_human_redable()

Use cmk.render.percent() instead.

Moved make_utf8() to cmk.utils

Use cmk.utils.make_utf8().

Moved quote_shell_string() to cmk.utils

Use cmk.utils.quote_shell_string().

Moved pnp_cleanup() to cmk.utils

Use cmk.utils.pnp_cleanup().

Moved aquire_lock(), release_all_locks(), have_lock() and release_lock() to cmk.store

Use e.g. cmk.store.aquire_lock().

Dropped age_human_readable()

Use cmk.render.approx_age() instead.

Moved render_scientific() to cmk.render

Use cmk.render.scientific().

Moved render_scientific() to cmk.render

Use cmk.render.physical_precision().

Moved several functions to new utils module

Use e.g. utils.drop_dotzero().

These have moved been moved:

  • drop_dotzero()
  • cmp_version()
  • num_split()
  • saveint()
  • savefloat()
  • get_random_string()
  • gen_id()
  • load_web_plugins()

Dropped tryint()

This has totally been dropped. Implement it on your own in case you really need this.