LicenseService
更新时间: 2026/07/01
在Gitcode上查看源码

ResourceDefinition

uris

  • /redfish/v1/Managers/manager_id/LicenseService

properties

名称类型是否只读取值范围/枚举值说明
@odata.contextstringtrueLicense服务资源模型的OData描述信息
@odata.idstringtrueLicense服务资源的访问路径
@odata.typestringtrueLicense服务资源的类型
IdstringtrueLicense服务资源的Id
NamestringtrueLicense服务资源的名称
CapabilityarraytrueLicense管理的能力
● Local,支持管理本地的license
● Remote,支持管理远程的License
DeviceESNstringtrue设备的ESN
InstalledStatusstringtrueLicense文件的安装状态
● NotInstalled,未安装
● Installed,已安装
● Installing,安装中
RevokeTicketstringtrueLicense失效码
LicenseClassstringtrue本地license文件管理时,license文件级别,当license文件为远程管理时,此字段无效
● NotInstalled,未安装
● Advanced,高级
LicenseStatusstringtrueLicense的状态
● N/A,未定义
● Default,默认状态
● GracePeriod,宽限状态
● Normal,正常状态
● Emergency,紧急状态
● Commissioning,调测状态
● Unknown,未知状态
FileFormatVersionstringtrueLicense文件格式版本
CopyRightstringtrueLicense文件版权信息
LSNstringtrueLicense SN
LicenseTypestringtrueLicense类型
GraceDaynumbertrueLicense宽限期天数
CreatorstringtrueLicense签发者
IssuerstringtrueLicense申请者
CreateTimestringtrueLicense创建时间
CustomerstringtrueLicense使用者名称
CountrystringtrueLicense使用者所在国家或地区
OfficestringtrueLicense使用者所在城市
ESNstringtrue授权的设备ESN
ProductNamestringtrue销售的产品名称
Valuenumbertrue销售量
ValidDatestringtrue授权截止日期
IsControlledstringtrue该特性是否按授权值控制
Descriptionstringtrue销售项描述
Groupstringtrue授权项所在的组名
Statestringtrue本地license管理时,控制器项的状态,默认为未定义状态
● N/A,未定义
● Default,默认状态
● GracePeriod,宽限状态
● Normal,正常状态
● Emergency,紧急状态
RemoteControlValuenumbertrue远程license授权值
FeatureKey销售项对应的功能开关型授权项true-
RemainGraceDaynumbertrue宽限状态剩余的天数
RemainCommissioningDaynumbertrue调测状态剩余的天数
ProductESNValidStatestringtrue产品ESN是否有效
● Valid,有效
● Invalid,无效
FileStatestringtrueLicense文件是否正常
● Normal,正常
● Incorrect,损坏
ProductESNMatchStatestringtrueLicense文件的ESN是否与实际的产品ESN匹配
● Matched,匹配
● Unmatched,不匹配
ProductVersionMatchStatestringtrueLicense文件的产品版本是否与实际的产品版本一致
● Matched,匹配
● Unmatched,不匹配
codestringtrue指示消息注册表中特定消息ID的字符串。
messagestringtrue与消息注册表中的消息对应的易读的错误消息。
MessageIdstringtrue消息ID
RelatedPropertiesarraytrue消息相关属性
Messagestringtrue详细信息
MessageArgsarraytrue信息参数
Severitystringtrue严重性Redfish支持的严重级别包括:OK、Warning、Critical。
Resolutionstringtrue解决建议

supported_methods

  • GET
  • POST

HTTP methods

GET

命令功能

查询 License 服务信息

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/LicenseService

请求头:

X-Auth-Token: auth_value

请求消息体: 无

参数说明

参数参数说明取值
device_ip登录设备的IP地址IPv4或IPv6地址
auth_value请求消息的鉴权参数可通过/redfish/v1/SessionService/Sessions创建会话时获得

使用指南

V3服务器和部分V5服务器不支持此功能,详情请查阅BMC用户指南。 GA140C机型不支持

使用实例

请求样例: GET https://device_ip/redfish/v1/Managers/manager_id/LicenseService

X-Auth-Token: auth_value 请求消息体:无

响应样例:

json
{
  "@odata.context": "/redfish/v1/$metadata#Managers/Members/1/LicenseService/$entity",
  "@odata.id": "/redfish/v1/Managers/1/LicenseService",
  "@odata.type": "#HwLicenseService.v1_0_0.HwLicenseService",
  "Id": "LicenseService",
  "Name": "License Service",
  "Capability": [
    "Local",
    "Remote"
  ],
  "DeviceESN": "1FB811FE20CA8B952718A5CE66C28790CA41A2F6",
  "InstalledStatus": "Installed",
  "RevokeTicket": "",
  "LicenseClass": "Advanced",
  "LicenseStatus": "Normal",
  "LicenseInfo": {
    "FileFormatVersion": "3.10",
    "GeneralInfo": {
      "CopyRight": "",
      "LSN": "LIC20180820LDLM5C",
      "LicenseType": "Commercial",
      "GraceDay": 60,
      "Creator": "",
      "Issuer": "License Distribution Center",
      "CreateTime": "2018-08-20 20:13:44"
    },
    "CustomerInfo": {
      "Customer": "",
      "Country": "China",
      "Office": "ShenZhen"
    },
    "NodeInfo": {
      "Name": "Server",
      "ESN": "1FB811FE20CA8B952718A5CE66C28790CA41A2F6"
    },
    "SaleInfo": {
      "OfferingProduct": {
        "ProductName": "2288H_V5",
        "SaleItem": [
          {
            "Name": "iBMCV2-02-AF01",
            "Value": 5,
            "ValidDate": "PERMANENT",
            "IsControlled": "Controlled",
            "Description": "iBMC V2 Advanced-1 Server",
            "FeatureKey": [
              {
                "Name": "Smart Provisioning, Data Acquisition",
                "Group": "AFG-01",
                "Value": 1,
                "ValidDate": "PERMANENT",
                "IsControlled": "Controlled",
                "State": "Normal",
                "RemoteControlValue": 0
              }
            ]
          }
        ]
      }
    },
    "KeyInfo": {
      "FeatureKey": [
        {
          "Name": "Smart Provisioning, Data Acquisition",
          "Group": "",
          "Value": 0,
          "ValidDate": "",
          "IsControlled": "Controlled",
          "State": "N/A",
          "RemoteControlValue": 0
        }
      ]
    }
  },
  "AlarmInfo": {
    "RemainGraceDay": 0,
    "RemainCommissioningDay": 0,
    "ProductESNValidState": "Valid",
    "FileState": "Normal",
    "ProductESNMatchState": "Matched",
    "ProductVersionMatchState": "Matched"
  },
  "Actions": {
    "#LicenseService.InstallLicense": {
      "target": "/redfish/v1/Managers/1/LicenseService/Actions/LicenseService.InstallLicense",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/LicenseService/InstallLicenseActionInfo"
    },
    "#LicenseService.ExportLicense": {
      "target": "/redfish/v1/Managers/1/LicenseService/Actions/LicenseService.ExportLicense",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/LicenseService/ExportLicenseActionInfo"
    },
    "#LicenseService.RevokeLicense": {
      "target": "/redfish/v1/Managers/1/LicenseService/Actions/LicenseService.RevokeLicense",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/LicenseService/RevokeLicenseActionInfo"
    },
    "#LicenseService.DeleteLicense": {
      "target": "/redfish/v1/Managers/1/LicenseService/Actions/LicenseService.DeleteLicense",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/LicenseService/DeleteLicenseActionInfo"
    }
  }
}

响应码:200

POST (ACTION)

InstallLicense

命令功能

安装 license

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/LicenseService/Actions/LicenseService.InstallLicense

请求头:

X-Auth-Token: auth_value
Content-Type: header_type

请求消息体:

json
{
  "FileSource": source,
  "Type": type,
  "Content": value
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
sourceLicense的来源来源有
● BMC
● FusionDirector
● eSight未配置该参数时,默认为BMC
type安装license文件的方式● text,表明value值是license内容
● URI,表明value值是URI(本地路径或者远程路径),其它类型暂不支持。
value内容1、可以为license的内容2、可以为证书本地路径(只能在/tmp目录下)或者远程路径 (支持的文件传输的协议有https、sftp、nfs、cifs、scp)

使用指南

V3服务器和部分V5服务器不支持此功能,详情请查阅BMC用户指南。 GA140C机型不支持

使用实例

请求样例: POST https://device_ip/redfish/v1/Managers/manager_id/LicenseService/Actions/LicenseService.InstallLicense

X-Auth-Token: auth_value Content-Type: header_type 请求消息体:

json
{
  "FileSource": source,
  "Type": type,
  "Content": value
}

响应样例:

json
{
  "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": "iBMC.1.0.LicenseInstallSuccess",
        "RelatedProperties": [],
        "Message": "The license has been installed successfully.",
        "MessageArgs": [],
        "Severity": "OK",
        "Resolution": "None"
      }
    ]
  }
}

响应码:200

POST (ACTION)

ExportLicense

命令功能

导出 license

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/LicenseService/Actions/LicenseService.ExportLicense

请求头:

X-Auth-Token: auth_value
Content-Type: header_type

请求消息体:

json
{
  "Type": type,
  "Content": value
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
type导出类型URI,表明value值是URI(本地路径或者远程路径),其它类型暂不支持。
value导出文件路径导出到证书本地路径(只能在/tmp目录下)或者远程路径 (支持的文件传输的协议有https、sftp、nfs、cifs、scp)

使用指南

V3服务器和部分V5服务器不支持此功能,详情请查阅BMC用户指南。 GA140C机型不支持

使用实例

请求样例: POST https://device_ip/redfish/v1/Managers/manager_id/LicenseService/Actions/LicenseService.ExportLicense

X-Auth-Token: auth_value Content-Type: header_type 请求消息体:

json
{
  "Type": type,
  "Content": value
}

响应样例:

json
{
  "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": "iBMC.1.0.Success",
        "RelatedProperties": [],
        "Message": "Successfully Completed Request.",
        "MessageArgs": [],
        "Severity": "OK",
        "Resolution": "None"
      }
    ]
  }
}

响应码:200

POST (ACTION)

RevokeLicense

命令功能

失效 license

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/LicenseService/Actions/LicenseService.RevokeLicense

请求头:

X-Auth-Token: auth_value
Content-Type: header_type

请求消息体:

json
{}

请求头参数说明

参见 请求头参数说明

请求体参数说明

使用指南

V3服务器和部分V5服务器不支持此功能,详情请查阅BMC用户指南。 GA140C机型不支持

使用实例

请求样例: POST https://device_ip/redfish/v1/Managers/manager_id/LicenseService/Actions/LicenseService.RevokeLicense

X-Auth-Token: auth_value Content-Type: header_type 请求消息体:

json
{}

响应样例:

json
{
  "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": "iBMC.1.0.LicenseRevokeSuccess",
        "RelatedProperties": [],
        "Message": "The revoke ticket is 1234567890ABCDEFG.",
        "MessageArgs": [],
        "Severity": "OK",
        "Resolution": "None"
      }
    ]
  }
}

响应码:200

POST (ACTION)

DeleteLicense

命令功能

删除 license

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/LicenseService/Actions/LicenseService.DeleteLicense

请求头:

X-Auth-Token: auth_value
Content-Type: header_type

请求消息体:

json
{}

请求头参数说明

参见 请求头参数说明

请求体参数说明

使用指南

V3服务器和部分V5服务器不支持此功能,详情请查阅BMC用户指南。 GA140C机型不支持

使用实例

请求样例: POST https://device_ip/redfish/v1/Managers/manager_id/LicenseService/Actions/LicenseService.DeleteLicense

X-Auth-Token: auth_value Content-Type: header_type 请求消息体:

json
{}

响应样例:

json
{
  "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": "iBMC.1.0.Success",
        "RelatedProperties": [],
        "Message": "Successfully Completed Request.",
        "MessageArgs": [],
        "Severity": "OK",
        "Resolution": "None"
      }
    ]
  }
}

响应码:200