blob: 74b69168244efe187f4eed0835923c4a640a749f [file] [log] [blame]
nickhuang6b31f8f2019-09-26 02:02:14 +00001// Copyright 2018 Open Networking Foundation
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15At the root of the device-management source tree
161. cd demotest
17 make demotest
18 ./demotest
192. Create another ssh session
20 cd ./demotest/cmd_cleint
21 make cmd_cl
22 ./cmd_cl
23
24 then it will have "CMD to send:" prompt
25 You can use the following "client cmd" to test.
26
27 Example:
28
29 For the first time, you need to use "attach:ipaddress:port:vendorname:freq" to set the device's IP related info.
30 If successful, you will get "[ipaddress:port]CMD to send:" prompt to indicate what device you attached now.
31 This attach will subscribe default 3 types events into the server.
32 You can use the following wget to check if any events subscriptions on the device.
33
34 wget --no-check-certificate \
35 -qO- https://RFSERVERIP:8888/redfish/v1/EventService/Subscriptions/ \
36 | python -m json.tool
37
38 You can also use "unsub:add:rm:alert" to unsubscribe all 3 types of event subscriptions on the device.
39
40 And use "QUIT" to leave test.
41
42--------------------------------------------------------------------------------------
43Test items client cmd
44--------------------------------------------------------------------------------------
45set device info Example:
46
47Set IP 192.168.4.27 port 8888 vendor "edgecore" freq 180
48 attach:192.168.4.27:8888:edgecore:180
49--------------------------------------------------------------------------------------
50set multi-deivies info Example:
51
52 attach:192.168.4.27:8888:edgecore:180
53 attach:192.168.3.34:8888:edgecore:180
54--------------------------------------------------------------------------------------
55UnSubscribe all events(ResourceAdded/ResourceRemoved/Alert) unsub:add:rm:alert
56--------------------------------------------------------------------------------------
57Subscribe all events(ResourceAdded/ResourceRemoved/Alert) sub:add:rm:alert
58--------------------------------------------------------------------------------------
59Subscribe and unsubscribe an event Example:
60
61Subscribe ResourceAdded event sub:add
62Subscribe ResourceRemoved event sub:rm
63Subscribe Alert event sub:alert
64Unsubscribe ResourceAdded event unsub:add
65Unsubscribe ResourceRemoved event unsub:rm
66Unsubscribe Alert event unsub:alert
67--------------------------------------------------------------------------------------
68Subscribe and unsubscribe multiple events, out of order Use the above commands to do test.
69--------------------------------------------------------------------------------------
70Subscribe an unsupported event sub:update
71--------------------------------------------------------------------------------------
72Subscribe to an already subscribed event Example:
73
74 sub:add
75 sub:add
76--------------------------------------------------------------------------------------
77Unsubscribe an unsupported event unsub:update
78--------------------------------------------------------------------------------------
79Unsubscribe a supported but not-subscribed event Example:
80
81 unsub:add:rm:alert
82 unsub:add
83 unsub:rm
84 unsub:alert
85--------------------------------------------------------------------------------------
86Change polling interval Example:
87
88Set frequecny to 30 seconds
89 period:30
90--------------------------------------------------------------------------------------
91Show support event list showeventlist
92--------------------------------------------------------------------------------------
93* During and after each test, verify the list of events subscribed wget --no-check-certificate \
94 -qO- https://192.168.4.27:8888/redfish/v1/EventService/Subscriptions/ \
95 | python -m json.tool
96--------------------------------------------------------------------------------------