Locale Script python reference
LMI Locale Provider client library.
-
lmi.scripts.locale.get_locale(ns)[source]
Get locale.
Return type: | LMIInstance/LMI_Locale |
-
lmi.scripts.locale.set_local_rtc(ns, value, fix_system)[source]
Set whether the RTC is maintained in local time/UTC.
Parameters: |
- value (bool) – True/False for RTC maintained in localtime/UTC.
- fix_system (bool) – If set, the time is read again from the RTC
and the system clock adjusted according to the new setting.
|
-
lmi.scripts.locale.set_locale(ns, locales, values)[source]
Set given locale variables with new values.
Parameters: |
- locales (list) – List of locale variable names to be set.
- values (list) – List of new values for locale variables.
|
-
lmi.scripts.locale.set_ntp(ns, value)[source]
Enable/disable synchronization of the system clock
with a remote NTP server using systemd-timesyncd.
Parameters: | value (bool) – True/False for NTP enabled/disabled. |
-
lmi.scripts.locale.set_time(ns, timeval, add, subtract)[source]
Set the system clock.
Parameters: |
- timeval (string) – New system time or difference in seconds
from current system time (if relative is True).
- add (bool) – If True, passed time value is expected to be
in seconds and will be added to the current system time.
- subtract (bool) – If True, passed time value is expected to be
in seconds and will be subtracted from the current system time.
|
-
lmi.scripts.locale.set_timezone(ns, timezone)[source]
Set the system timezone.
Parameters: | timezone (string) – New system timezone. |
-
lmi.scripts.locale.set_vc_keyboard(ns, keymap, keymap_toggle, convert)[source]
Set the key mapping on the virtual console.
Parameters: |
- keymap (string) – Requested keyboard mapping for the
virtual console.
- keymap_toggle (string) – Requested toggle keyboard
mapping for the virtual console.
- convert (bool) – Whether also X11 keyboard should be set
to the nearest X11 keyboard setting for the chosen
console keyboard setting.
|
-
lmi.scripts.locale.set_x11_keymap(ns, layouts, model, variant, options, convert)[source]
Set the default key mapping of the X11 server.
Parameters: |
- layouts (string) – Requested X11 keyboard mappings.
- model (string) – Requested X11 keyboard model.
- variant (string) – Requested X11 keyboard variant.
- options (string) – Requested X11 keyboard options.
- convert (bool) – Whether also console keyboard should be set
to the nearest console keyboard setting for the chosen
X11 keyboard setting.
|