License Management
This section describes the configuration model matching license management (including virtual licenses).
Data Model
The configuration model file matching license management is huawei-device.yang.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/huawei-device:config-virtual-license/item-list |
Indicates the control item list of a virtual license. |
NA |
Currently, a maximum of 32 control items can be delivered to a device. |
/huawei-device:config-virtual-license/item-list/item-type |
Indicates the name of a control item in the virtual license. |
The value is of the enumerated type. Currently, only VXLAN is supported. |
NA |
/huawei-device:config-virtual-license/item-list/item-resource-value |
Indicates the resource value of a control item. |
The value is an integer that ranges from 0 to 65535. |
For resources that can only be enabled or disabled, the value can be 1 or 0. For other resource requirements, the values are the detailed resource values. |
/huawei-device:config-virtual-license/item-list/expired-date |
Indicates the expiration date of the control item. |
The value is permanent or a character string in the format of YYYY-MM-DD. |
for example, 2018-01-01. For a permanent commercial license, the value is set to permanent; otherwise, the value is set to a valid date in the format of YYYY-MM-DD. |
/huawei-device:config-virtual-license/magic-word |
Indicates the magic number of the delivered packet. |
The value is a string of 1 to 2048 case-sensitive characters without spaces, hyphens (-), or question marks (?). |
The device and the controller define the public and private keys. The controller delivers a virtual license to the device based on the keys. The keys are not provided externally. |
/huawei-device:active-license/filename |
Indicates the name of the license file to be activated. |
The value is a string that ranges from 1 to 255. |
NA |
/huawei-device:device-state/license-status |
The device license state. |
NA |
NA |
/huawei-device:device-state/license-status/state |
Current license state. |
The value is of the enumerated type. The options are as follows:
|
NA |
/huawei-device:device-state/license-status/active-date-time |
The date and time of activating license. |
The value is a string, for example: 2019-04-16T21:32:41+00:00. |
NA |
/huawei-device:device-state/license-status/expired-date |
Expired date of license. |
The value is a string, for example: 2019-01-01. |
NA |
Delivering a Virtual License
This section provides a sample of delivering a virtual license using the edit-config method.
Operation |
XPATH |
---|---|
edit-config |
/huawei-device/config-virtual-license |
Data Requirements
Item |
Data |
Description |
---|---|---|
Control item in the virtual license |
VXLAN |
The control item in the virtual license is VXLAN. |
Resource value of the control item |
10 |
The resource value of the control item is 10. |
Expiration date of the control item in the virtual license |
2019-08-08 |
The expiration date of the virtual license is 2019-08-08. |
The time for delivering the virtual license |
2018-12-29 10:04:28:655 |
The time for delivering the virtual license is 2018-12-29 10:04:28:655 |
Key |
**** |
The self-recovery duration is 30 seconds. |
Request Example
<?xml version='1.0' encoding='UTF-8'?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0"> <edit-config> <target> <running/> </target> <config> <dev:config-virtual-license xmlns:dev="urn:huawei:params:xml:ns:yang:huawei-device"> <dev:item-list> <dev:item-type>vxlan</dev:item-type> <dev:item-resource-value>10</dev:item-resource-value> <dev:expired-date>2019-08-08</dev:expired-date> <dev:config-time>2018-12-29 10:04:28:655</dev:config-time> </dev:item-list> <dev:magic-word>****</dev:magic-word> </dev:config-virtual-license> </config> </edit-config> </rpc>
Response Example
Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <ok/> </rpc-reply>
Sample of failed response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <rpc-error> <error-app-tag>1</error-app-tag> <error-message>Service process failed.</error-message> <error-info>Error on node /huawei-device:config-virtual-license/item-list[item-type="vxlan"]</error-info> </rpc-error> </rpc-reply>
Retrieving a Virtual License
This section provides a sample of retrieving a virtual license using the edit-config method.
Operation |
XPATH |
---|---|
edit-config |
/huawei-device/config-virtual-license |
Data Requirements
Item |
Data |
Description |
---|---|---|
Control item in the virtual license |
VXLAN |
The control item in the virtual license is VXLAN. |
Resource value of the control item |
1 |
The resource value of the control item is 1. |
Expiration date of the control item in the virtual license |
2019-08-08 |
The expiration date of the virtual license is 2019-08-08. |
Request Example
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <dev:config-virtual-license xmlns:dev="urn:huawei:params:xml:ns:yang:huawei-device"> <dev:item-list xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="remove"> <dev:item-type>vxlan</dev:item-type> <dev:item-resource-value>1</dev:item-resource-value> <dev:expired-date>2019-08-08</dev:expired-date> </dev:item-list> </dev:config-virtual-license> </config> </edit-config> </rpc>
Response Example
Sample of successful response
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="50"> <ok/> </rpc-reply>
Sample of failed response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <rpc-error> <error-app-tag>1</error-app-tag> <error-message>Service process failed.</error-message> <error-info>Error on node /huawei-device:config-virtual-license/item-list[item-type="vxlan"]</error-info> </rpc-error> </rpc-reply>
Active License
This section provides a sample of activating license using the edit-config method.
Operation |
XPATH |
---|---|
edit-config |
/huawei-device/active-license |
Data Requirements
Item |
Data |
Description |
---|---|---|
License file |
lics_all_201902.dat |
The name of the license file to be activated is lics_all_201902.dat |
Request Example
<?xml version="1.0" encoding="UTF-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="968a598f-2f71-11e9-9634-a4898190b532"> <dev:active-license xmlns:dev="urn:huawei:params:xml:ns:yang:huawei-device"> <dev:filename>lics_all_201902.dat</dev:filename> </dev:active-license> </rpc>
Response Example
Sample of successful response
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="50"> <ok/> </rpc-reply>
Sample of failed response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="968a598f-2f71-11e9-9634-a4898190b532"> <rpc-error xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-app-tag>-1</error-app-tag> <error-path/> <error-message> The file flash:/lics_all_201902.dat does not exist.</error-message> </rpc-error> </rpc-reply>