Skip to content

Conversation

@changlei-li
Copy link
Contributor

This PR is a cherry-pick to XS9 of #82

xenapi host.set_timezone to config the timezone of the host.
host.set_ntp_mode to manage the NTP. The NTP mode mapping
to xsconsole is:
DHCP - dhcp
Factory - default
Custom - manual
Disabled - none
host.set_ntp_custom_servers to configure the NTP servers
that used in Custom mode.

Signed-off-by: Changlei Li <changlei.li@cloud.com>
XAPI APIs can't set NTP Custom mode with empty custom NTP servers.
This is a meaningless selection that NTP is enabled but the time
sources are not configured. It is Disable NTP in fact.

Signed-off-by: Changlei Li <changlei.li@cloud.com>
The previous /etc/timezone is not on the system, but written by
xsconsole itself. It's more reasonable to read link from
/etc/localtime.
This is also consistent with XAPI's behavior.

Signed-off-by: Changlei Li <changlei.li@cloud.com>
@changlei-li changlei-li merged commit 972cd0b into xapi-project:master Dec 18, 2025
1 check passed
@changlei-li changlei-li deleted the private/changleli/xapi-ntp-apis-xs9 branch December 18, 2025 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants