Hi guys,
I got a problem when I need to subscribe the UCS event. When I send the subscription HTTP request to UCS, I can not receive any reply, and the session will hang up till to time out. During the session's life, I change the configuration data, which is supposed to generate an event and publish it to the subscribers. But the UCS plugin dose not receive anything.
1: If I can receive response of subscribing request, I can keep the session alive and read the session in a loop, so that I can handle the data in time. But I can not receive anything, the request is blocked.
2: If the request will response nothing, and the session just hang up for the future event, I think I should have received the events when I change the config, But I didn't.
So, now I have two problem.
1: Why the request session can not receive any response?
2: Why I can not receive events? even when I change the config
The API usage link is: http://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/sw/api/b_ucs_api_book/b_ucs_api_book_chapter_010.html#r_eventsubscribe
which mentions that the event subscribing request will response nothing or a response.
If you know how to solve this problem, please help me!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here's example use with curl to subscribe to all events:
$ curl --insecure -d '<aaaLogin inName="admin" inPassword="password" />' https://172.16.143.157/nuova
<aaaLogin cookie="" response="yes" outCookie="1487209775/ec4c1515-0ae4-4fc3-a7c2-17a16d51e6d2" outRefreshPeriod="600" outPriv="admin,read-only" outDomains="org-root" outChannel="noencssl" outEvtChannel="noencssl" outSessionId="" outVersion="3.1(2e)" outName=""> </aaaLogin>
$ curl --insecure -d '<eventSubscribe cookie="1487209775/ec4c1515-0ae4-4fc3-a7c2-17a16d51e6d2"/>' https://172.16.143.157/nuova
18327
<methodVessel cookie=""> <inStimuli> <configMoChangeEvent cookie="" inEid="92927"> <inConfig> <lsServer assocState="associating" configState="applied" descr="demo" dn="org-root/ls-SP_OSP_Compute_2"
...
Note that to avoid timeouts you'll want to use aaaKeepAlive as described here:
Also note that a general event subscription will generate a lot of traffic. The python SDK provides a strait forward way to filter the subscription as documented here: Table of Contents — ucsmsdk 0.9.1.0 documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comments
0 comments
Please sign in to leave a comment.