ResourceDefinition
uris
/redfish/v1/Managers/manager_id/NtpService
properties
| 名称 | 类型 | 是否只读 | 取值范围/枚举值 | 说明 |
|---|---|---|---|---|
| @odata.context | string | true | - | NTP资源模型的OData描述信息 |
| @odata.id | string | true | - | NTP资源的访问路径 |
| @odata.type | string | true | - | NTP资源的类型 |
| Id | string | true | - | NTP ID |
| Name | string | true | - | NTP名字 |
| Description | string | true | - | NTP资源的描述信息 |
| ServiceEnabled | boolean | false | - | NTP使能 |
| PreferredNtpServer | string | false | - | 首选服务器地址 |
| AlternateNtpServer | string | false | - | 备用服务器地址 |
| ExtraNtpServer | string | false | - | 拓展的服务器地址 |
| NtpServerCount | number | true | - | 支持的服务器的个数,默认为3。 ● 3:3 ● 6:6 |
| NtpAddressOrigin | string | false | - | NTP模式 ● Static:静态模式 ● IPv4:IPv4动态模式 ● IPv6:IPv6动态模式 |
| ServerAuthenticationEnabled | boolean | false | - | 服务器身份认证 |
| CurrentPollingIntervalSeconds | number | true | - | 当前NTP轮询间隔,NTP开启时如果获取成功,则取值为当前的轮询间隔秒数,如果获取失败则取值为null,NTP关闭时取值为0说明BMC300 5.11.0版本开始支持。 |
| MinPollingInterval | number | false | - | 最小轮询间隔值,间隔时间为2的幂次方秒, 如:6 (2^6=64秒)。默认值为6(64秒),取值范围是3(8秒) 到17 (36小时) |
| MaxPollingInterval | number | false | - | 最大轮询间隔值,间隔时间为2的幂次方秒, 如:6 (2^6=64秒)。默认值为10(17分钟),取值范围是3(8秒) 到17 (36小时) |
| NTPKeyStatus | string | true | - | NTP Key上传状态: ● Uploaded:已上传 ● NotUploaded说明BMC300 5.11.0版本开始支持。 |
| Actions.#NtpService.ImportNtpKey { | object | true | - | NTP组密钥导入 |
| Actions.#NtpService.ImportNtpKey.target | string | true | - | 组密钥导入操作的路径 |
| Actions.#NtpService.ImportNtpKey.@Redfish.ActionInfo | string | true | - | 导入NTP组密钥的操作信息查询路径 |
| } | ||||
| Actions{} | object | true | - | NTP组密钥导入操作 |
supported_methods
- GET
- PATCH
- POST
HTTP methods
GET
命令功能
查询 NTP 配置资源信息
命令格式
URL: https://device_ip/redfish/v1/Managers/manager_id/NtpService
请求头:
X-Auth-Token: auth_value请求消息体: 无
参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| device_ip | 登录设备的IP地址 | IPv4或IPv6地址 |
| auth_value | 请求消息的鉴权参数 | 可通过/redfish/v1/SessionService/Sessions创建会话时获得 |
使用指南
NTP主备服务器的切换与BMC和NTP服务器之间的同步时间间隔(最小轮询间隔 ≤ 同 步时间间隔 ≤ 最大轮询间隔)有关,当BMC多次与主用服务器同步无响应时,NTP服 务器将切换为备用服务器。
使用实例
请求样例: GET https://device_ip/redfish/v1/Managers/manager_id/NtpService
X-Auth-Token: auth_value 请求消息体:无
响应样例:
{
"@odata.context": "/redfish/v1/$metadata#Managers/Members/Blade8/NtpService/$entity",
"@odata.id": "/redfish/v1/Managers/Blade8/NtpService",
"@odata.type": "#HwNtpService.v1_0_0.HwNtpService",
"Id": "NtpService",
"Name": "Ntp Service",
"Description": "NtpService Settings",
"ServiceEnabled": false,
"PreferredNtpServer": "",
"AlternateNtpServer": "",
"ExtraNtpServer": "",
"NtpServerCount": 3,
"NtpAddressOrigin": "Static",
"MinPollingInterval": 3,
"MaxPollingInterval": 4,
"ServerAuthenticationEnabled": false,
"CurrentPollingIntervalSeconds": 0,
"NTPKeyStatus": "NotUploaded",
"Actions": {
"#NtpService.ImportNtpKey": {
"target": "/redfish/v1/Managers/Blade8/NtpService/Actions/NtpService.ImportNtpKey",
"@Redfish.ActionInfo": "/redfish/v1/Managers/Blade8/NtpService/ImportNtpKeyActionInfo"
}
}
}响应码:200
PATCH
命令功能
修改 NTP 资源属性
命令格式
URL: https://device_ip/redfish/v1/Managers/manager_id/NtpService
请求头:
X-Auth-Token: auth_value
Content-Type: header_type
If-Match: ifmatch_value请求消息体:
{
"ServiceEnabled": ServiceEnabled,
"AlternateNtpServer": AlternateNtpServer,
"PreferredNtpServer": PreferredNtpServer,
"ExtraNtpServer": ExtraNtpServer,
"ServerAuthenticationEnabled": ServerAuthenticationEnabled,
"NtpAddressOrigin": NtpAddressOrigin,
"MinPollingInterval": MinValue,
"MaxPollingInterval": MaxValue
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| ServiceEnabled | NTP服务使能 | ● true:开启 ● false:关闭 |
| PreferredNtpServer | 首选NTP服务器地址 | ● IPv4 ● IPv6 ● 域名(非中文字符串类型值) ● 设置为空字符串或0.0.0.0时表示删除首选NTP服务地址 |
| AlternateNtpServer | 备选NTP服务器地址 | ● IPv4 ● IPv6 ● 域名(非中文字符串类型值) ● 设置为空字符串或0.0.0.0时表示删除备用NTP服务地址 |
| ExtraNtpServer | 拓展的NTP服务器地址 | ● IPv4 ● IPv6 ● 域名(非中文字符串类型值) ● 设置为空字符串或0.0.0.0时表示删除拓展NTP服务地址 |
| ServerAuthenticationEnabled | 服务器身份认证 | ● true:开启 ● false:关闭 |
| NtpAddressOrigin | 地址模式 | ● IPv4:从IPv4协议栈自动获取 ● Static:手动配置 ● IPv6:从IPv6协议栈自动获取 |
| MinPollingInterval | 最小轮询间隔值 | 最小轮询间隔值,间隔时间为2的幂次方秒, 如:6 (2^6=64秒)。默认值为6 (64秒),取值范围是3(8秒) 到17 (36小时),且取值不能大于最大轮询间隔值 |
| MaxPollingInterval | 最大轮询间隔值 | 最大轮询间隔值,间隔时间为2的幂次方秒, 如:6 (2^6=64秒)。默认值为10 (约17分钟),取值范围是3(8秒) 到17 (36小时),且取值不能小于最小轮询间隔值 |
使用指南
可同时设置多个服务的参数。
使用实例
请求样例: PATCH https://device_ip/redfish/v1/Managers/manager_id/NtpService
X-Auth-Token: auth_value Content-Type: header_type If-Match: ifmatch_value 请求消息体:
{
"ServiceEnabled": ServiceEnabled,
"AlternateNtpServer": AlternateNtpServer,
"PreferredNtpServer": PreferredNtpServer,
"ExtraNtpServer": ExtraNtpServer,
"ServerAuthenticationEnabled": ServerAuthenticationEnabled,
"NtpAddressOrigin": NtpAddressOrigin,
"MinPollingInterval": MinValue,
"MaxPollingInterval": MaxValue
}响应样例:
{
"@odata.context": "/redfish/v1/$metadata#Managers/Members/1/NtpService/$entity",
"@odata.id": "/redfish/v1/Managers/1/NtpService",
"@odata.type": "#HwNtpService.v1_0_0.HwNtpService",
"Id": "NtpService",
"Name": "Ntp Service",
"Description": "NtpService Settings",
"ServiceEnabled": false,
"PreferredNtpServer": "",
"AlternateNtpServer": "",
"ExtraNtpServer": "",
"NtpServerCount": 3,
"NtpAddressOrigin": "Static",
"MinPollingInterval": 3,
"MaxPollingInterval": 4,
"ServerAuthenticationEnabled": false,
"NTPKeyStatus": "NotUploaded",
"Actions": {
"#NtpService.ImportNtpKey": {
"target": "/redfish/v1/Managers/1/NtpService/Actions/NtpService.ImportNtpKey",
"@Redfish.ActionInfo": "/redfish/v1/Managers/1/NtpService/ImportNtpKeyActionInfo"
}
}
}响应码:200
POST (ACTION)
ImportNtpKey
命令功能
上传 NTP 组密钥
命令格式
URL: https://device_ip/redfish/v1/Managers/manager_id/NtpService/Actions/NtpService.ImportNtpKey
请求头:
X-Auth-Token: auth_value
Content-Type: header_type请求消息体:
{
"Type": type,
"Content": value
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| type | 上传NTP组密钥 | ● text,表明value值是密钥 ● URI,表明value值是URI(本地或者远程) |
| value | 内容 | 1:若type的值是text,则value是密钥的内容2:若type的值是URI,则value是证书的路径。可以是证书本地路径(只能在/tmp目录下)或者远程路径(支持的文件传输的协议有https、sftp、nfs、cifs、scp) |
使用指南
无
使用实例
请求样例: POST https://device_ip/redfish/v1/Managers/manager_id/NtpService/Actions/NtpService.ImportNtpKey
X-Auth-Token: auth_value Content-Type: header_type 请求消息体:
{
"Type": type,
"Content": value
}响应样例:
{
"error": {
"code": "Base.1.0.GeneralError",
"message": "A general error has occurred. See ExtendedInfo for more information.",
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"MessageId": "Base.1.0.UploadNTPSecureGroupKeysuccessfully",
"RelatedProperties": [],
"Message": "The NTP group key is uploaded successfully.",
"MessageArgs": [],
"Severity": "OK",
"Resolution": "None."
}
]
}
}响应码:200