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).
Creating an Event Subscription

Creating an Event Subscription

Function

Create an event subscription.

Format

./urest -H HOST -p PORT -U USERNAME -P PASSWORD addeventsubs -D DESTINATION -T {StatusChange,ResourceUpdated,ResourceAdded,ResourceRemoved,Alert} [{StatusChange,ResourceUpdated,ResourceAdded,ResourceRemoved,Alert} ...] -HEAD HTTPHEADERS [HTTPHEADERS ...] -CON CONTEXT -PRO {Redfish} -I MESSAGEIDS [MESSAGEIDS ...] -O ORIGINRESOURCES [ORIGINRESOURCES ...]

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.

-

DESTINATION

Event subscription receiving address. It is a mandatory parameter.

Valid HTTPS receiving address.

{StatusChange,ResourceUpdated,ResourceAdded,ResourceRemoved,Alert} [{StatusChange,ResourceUpdated,ResourceAdded,ResourceRemoved,Alert} ...]

Event type of the event subscription listening. It is a mandatory parameter.

The values are as follows:

  • StatusChange: resource status change event
  • ResourceUpdated: resource update event
  • ResourceAdded: resource adding event
  • ResourceRemoved: resource removal event
  • Alert: alarm event

HTTPHEADERS [HTTPHEADERS ...]

Event subscription HTTP header parameter, which needs to be carried during event reporting. It is an optional parameter.

The value needs to be in key value format and is displayed as None during the query.

CONTEXT

Event subscription context information. It is a mandatory parameter.

String

{Redfish}

Protocol used for the event subscription. It is a mandatory parameter.

The current value can only be Redfish.

MESSAGEIDS [MESSAGEIDS ...]

Event subscription message ID matching list. It is an optional parameter.

Combination of valid message IDs defined in the event registry

ORIGINRESOURCES [ORIGINRESOURCES ...]

Event subscription event source matching list. It is an optional parameter.

Combination of valid resource URIs

Usage Guidelines

The event receiving address specified for the subscription to be created must be different from the receiving address of a subscription that already exists.

Example

Obtain help information.

[root@localhost bin]# ./urest -H 172.100.10.45 -U root -P ****** addeventsubs -h
usage: urest addeventsubs [-h] -D DESTINATION -T 
                               {StatusChange,ResourceUpdated,ResourceAdded,ResourceRemoved,Alert} 
                               [{StatusChange,ResourceUpdated,ResourceAdded,ResourceRemoved,Alert} ...] 
                               [-HEAD HTTPHEADERS [HTTPHEADERS ...]] -CON 
                               CONTEXT -PRO {Redfish} 
                               [-I MESSAGEIDS [MESSAGEIDS ...]] 
                               [-O ORIGINRESOURCES [ORIGINRESOURCES ...]] 

optional arguments: 
  -h, --help            show this help message and exit 
  -D DESTINATION        destination of the event subscriptions 
  -T {StatusChange,ResourceUpdated,ResourceAdded,ResourceRemoved,Alert} [{StatusChange,ResourceUpdated,ResourceAdded,ResourceRemoved,Alert} ...] 
                        types of events to be monitored. one or multiple 
                        values that are not duplicate can be set. use a space 
                        to separate multiple values 
  -HEAD HTTPHEADERS [HTTPHEADERS ...] 
                        event subscription HTTP header parameters to be 
                        carried when an event is reported, the argument must 
                        be in the key1 value1 key2 value2 ... format 
  -CON CONTEXT          event subscription context information. use double 
                        quotation marks ("") to enclose it 
  -PRO {Redfish}        protocol used by the event subscription 
  -I MESSAGEIDS [MESSAGEIDS ...] 
                        message ID matching list of the event subscription 
  -O ORIGINRESOURCES [ORIGINRESOURCES ...] 
                        mapping between event subscriptions and event sources

Create an event subscription.

[root@localhost bin]# ./urest -H 10.10.10.10 -U ****** -P ****** addeventsubs -D https://10.10.10.10 -T StatusChange -PRO Redfish -CON 123
Success: successfully completed request
Translation
Download
Updated: 2020-02-13

Document ID: EDOC1000176182

Views: 121707

Downloads: 588

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Share
Previous Next