2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2024-11-21 17:11:52 +00:00
2 rspconfig ntpservers
xuweibj edited this page 2017-12-08 11:17:30 +08:00

Mini-design for OpenBMC rspconfig ntpservers

Background

To provide a command to config ntpservers of OpenBMC for each network.

Set password: # curl c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": ["xxxxxx"] }' https://x.x.x.x/xyz/openbmc_project/network/#NIC#/attr/NTPServers

Interface

rspconfig ntpservers

rspconfig ntpservers=xxxxxx

Status Machine

Get NTP Servers information

LOGIN —> RSPCONFIG_GET

Set NTP Servers information

LOGIN —> RSPCONFIG_GET_(1)_ —> RSPCONFIG_SET_NTPSERVERS_REQUEST —> RSPCONFIG_SET_NTPSERVERS_RESPONSE -> RSPCONFIG_GET

(1) Get the NIC name that current IP configured on for the request URL.

Display the result

For single Internet:

# rspconfig cn1 ntpservers 
cn1: BMC NTPServers: MN1

For multiple Internet:

# rspconfig cn1 ntpservers 
cn1: BMC NTPServers for eth0: MN1
cn1: BMC NTPServers for eth0_11: MN2