No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

FusionServer Tools 2.0 uREST User Guide 16

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Setting Login Rule Information

Setting Login Rule Information

Function

Set login rule information.

Format

./urest -H HOST -p PORT -U USERNAME -P PASSWORD setloginrule -T {Rule1,Rule2,Rule3} -S {False,True} -ST [STARTTIME [STARTTIME ...]] -ET [ENDTIME [ENDTIME ...]] -IP IP -MAC MAC

Parameters

Parameter

Description

Value

HOST

iBMC IP address or domain name. It is a mandatory parameter. If an IPv6 address is used, the IPv6 address must be included in square brackets, such as [1001::1001].

-

PORT

Port number. The default value is 443. It is an optional parameter.

Enter the port number if the default value 443 is not used.

USERNAME

iBMC user name. It is a mandatory parameter.

-

PASSWORD

Password of the iBMC user. It is a mandatory parameter.

-

-T {Rule1,Rule2,Rule3}

Login rule number. It is a mandatory parameter.

  • Rule1
  • Rule2
  • Rule3

-S {False,True}

Login rule enabling status. It is an optional parameter.

  • True
  • False

-ST [STARTTIME [STARTTIME ...]]

Start time of user login allowed by the rule. It is an optional parameter.

Period of user login allowed by the rule. The value can be in one of the following formats:

  • YYYY-MM-DD: indicates the start and end dates allowed for user login. For example, the start date is 2013-08-30 and the end date is 2013-12-30.
  • HH:MM: indicates the daily period allowed for user login. For example, the start time is 08:30 and the end time is 20:30.
  • YYYY-MM-DD HH:MM: indicates the specific period allowed for user login. For example, the start time is 2013-08-30 08:30 and the end time is 2013-12-30 20:30.
NOTE:
  • The start and end years cannot be later than 2050.
  • In a login rule, the start and end time must be in the same format.

-ET [ENDTIME [ENDTIME ...]]

End time of user login allowed by the rule. It is an optional parameter.

IP

IP address. It is an optional parameter.

Specific IP address or IP address segment allowed by the rule. The value can be in one of the following formats:

  • xxx.xxx.xxx.xxx: indicates a single IP address.
  • xxx.xxx.xxx.xxx/mask: indicates an IP address segment. mask indicates the subnet mask length, which ranges from 1 to 32.

MAC

MAC address. It is an optional parameter.

Specific MAC address or MAC address header allowed by the rule. The value can be in one of the following formats:

  • xx:xx:xx:xx:xx:xx: indicates a single MAC address.
  • xx:xx:xx: indicates the MAC address header.

Usage Guidelines

None

Example

Obtain help information.

[root@localhost bin]# ./urest -H 10.10.10.10 -U ****** -P ****** setloginrule -h 
usage: urest setloginrule [-h] -T {Rule1,Rule2,Rule3} [-S {False,True}] 
                               [-ST [STARTTIME [STARTTIME ...]]] 
                               [-ET [ENDTIME [ENDTIME ...]]] [-IP IP] 
                               [-MAC MAC] 

optional arguments: 
  -h, --help            show this help message and exit 
  -T {Rule1,Rule2,Rule3} 
                        login rule 
  -S {False,True}       login rule enable status 
  -ST [STARTTIME [STARTTIME ...]] 
                        start time, the time formats YYYY-MM-DD HH:MM, YYYY- 
                        MM-DD, and HH:MM are supported. however, the start 
                        time and end time must be in the same format 
  -ET [ENDTIME [ENDTIME ...]] 
                        end time, the time formats YYYY-MM-DD HH:MM, YYYY-MM- 
                        DD, and HH:MM are supported. however, the end time and 
                        start time must be in the same format 
  -IP IP                IP address can be in IPv4 or IPv4/subnet mask format, 
                        and the subnet mask range is 1 to 32 
  -MAC MAC              MAC address can be the first three parts (xx:xx:xx) or 
                        the complete MAC address (xx:xx:xx:xx:xx:xx)

Query login rule information.

[root@localhost bin]# ./urest -H 10.10.10.10 -U ****** -P ****** getloginrule 
---------------------------------------- 
MemberId            : Rule1 
RuleEnabled         : False 
StartTime           : None 
EndTime             : None 
Mac                 : None 
IP                  : None 
---------------------------------------- 
MemberId            : Rule2 
RuleEnabled         : False 
StartTime           : None 
EndTime             : None 
Mac                 : None 
IP                  : None 
---------------------------------------- 
MemberId            : Rule3 
RuleEnabled         : False 
StartTime           : None 
EndTime             : None 
Mac                 : None 
IP                  : None 
----------------------------------------

Set login rule information.

[root@localhost bin]# ./urest -H 10.10.10.10 -U ****** -P ****** setloginrule -T Rule1 -S True -ST 2017-08-30 -ET 2035-08-30 -IP 255.255.0.0 -MAC 00:50:ab 
Success: successfully completed request
Translation
Download
Updated: 2020-02-13

Document ID: EDOC1000176182

Views: 122344

Downloads: 591

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Share
Previous Next