zenoss_client 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +1 -1
- data/VERSION +1 -1
- data/lib/zenoss/connection.rb +1 -0
- data/lib/zenoss/jsonapi/report_router.rb +5 -1
- data/test/fixtures/vcr_cassettes/6_2_1_initial_connection.yml +188 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0001_returns_an_Array_of_devices_when_searched_by_name.yml +107 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0002_returns_device_uptime_when_asked.yml +131 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0003_returns_an_Array_of_events_for_a_device.yml +100 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0004_returns_an_Array_of_historical_events_for_a_device.yml +100 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0005_returns_info_for_a_device_in_the_form_of_a_Hash.yml +265 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0006_returns_an_Array_of_events_for_all_devices.yml +100 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0007_fetches_the_report_tree.yml +164 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0008_fetches_available_report_types_and_returns_a_Hash.yml +100 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0009_renames_the_device.yml +184 -0
- data/test/test_helper.rb +14 -0
- data/test/zenoss_client_test.rb +3 -1
- metadata +13 -3
data/test/fixtures/vcr_cassettes/6_2_1_test_0006_returns_an_Array_of_events_for_all_devices.yml
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:8080/zport/dmd/zport/dmd/device_router
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '[{"action":"DeviceRouter","method":"getDevices","data":[{"uid":"/zport/dmd/Devices","params":{"name":"UnitTestDevice"}}],"type":"rpc","tid":18}]'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
Date:
|
15
|
+
- Tue, 19 Feb 2019 22:36:53 GMT
|
16
|
+
Content-Type:
|
17
|
+
- application/json; charset=utf-8
|
18
|
+
Cookie: ''
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 200
|
22
|
+
message: OK
|
23
|
+
headers:
|
24
|
+
Content-Type:
|
25
|
+
- application/json
|
26
|
+
Date:
|
27
|
+
- Tue, 19 Feb 2019 22:36:53 GMT
|
28
|
+
Server: ''
|
29
|
+
Strict-Transport-Security:
|
30
|
+
- max-age=31536000
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
X-Frame-Options:
|
34
|
+
- SAMEORIGIN
|
35
|
+
X-Xss-Protection:
|
36
|
+
- 1; mode=block
|
37
|
+
Content-Length:
|
38
|
+
- '905'
|
39
|
+
Set-Cookie: ''
|
40
|
+
body:
|
41
|
+
encoding: UTF-8
|
42
|
+
string: '{"uuid": "b735399e-ecb3-4029-9aa8-995aa42a33c3", "action": "DeviceRouter",
|
43
|
+
"result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"ipAddressString":
|
44
|
+
null, "serialNumber": "", "pythonClass": "Products.ZenModel.Device", "hwManufacturer":
|
45
|
+
null, "collector": "localhost", "osModel": null, "productionState": 400, "systems":
|
46
|
+
[], "priority": 3, "hwModel": null, "tagNumber": "", "osManufacturer": null,
|
47
|
+
"location": null, "groups": [], "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
|
48
|
+
"ipAddress": null, "events": {"info": {"count": 0, "acknowledged_count": 0},
|
49
|
+
"clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0, "acknowledged_count":
|
50
|
+
0}, "critical": {"count": 0, "acknowledged_count": 0}, "error": {"count":
|
51
|
+
0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count": 0}},
|
52
|
+
"name": "UnitTestDevice"}]}, "tid": 18, "type": "rpc", "method": "getDevices"}'
|
53
|
+
http_version:
|
54
|
+
recorded_at: Tue, 19 Feb 2019 22:36:53 GMT
|
55
|
+
- request:
|
56
|
+
method: post
|
57
|
+
uri: http://localhost:8080/zport/dmd/zport/dmd/evconsole_router
|
58
|
+
body:
|
59
|
+
encoding: UTF-8
|
60
|
+
string: '[{"action":"EventsRouter","method":"query","data":[{"limit":100,"start":0,"sort":"lastTime","dir":"DESC"}],"type":"rpc","tid":19}]'
|
61
|
+
headers:
|
62
|
+
User-Agent:
|
63
|
+
- HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
|
64
|
+
Accept:
|
65
|
+
- "*/*"
|
66
|
+
Date:
|
67
|
+
- Tue, 19 Feb 2019 22:36:53 GMT
|
68
|
+
Content-Type:
|
69
|
+
- application/json; charset=utf-8
|
70
|
+
Cookie: ''
|
71
|
+
response:
|
72
|
+
status:
|
73
|
+
code: 200
|
74
|
+
message: OK
|
75
|
+
headers:
|
76
|
+
Content-Type:
|
77
|
+
- application/json
|
78
|
+
Date:
|
79
|
+
- Tue, 19 Feb 2019 22:36:54 GMT
|
80
|
+
Server: ''
|
81
|
+
Strict-Transport-Security:
|
82
|
+
- max-age=31536000
|
83
|
+
Vary:
|
84
|
+
- Accept-Encoding
|
85
|
+
X-Frame-Options:
|
86
|
+
- SAMEORIGIN
|
87
|
+
X-Xss-Protection:
|
88
|
+
- 1; mode=block
|
89
|
+
Transfer-Encoding:
|
90
|
+
- chunked
|
91
|
+
Set-Cookie: ''
|
92
|
+
body:
|
93
|
+
encoding: UTF-8
|
94
|
+
string: '{"uuid": "1", "action": "EventsRouter", "result": {"totalCount": 1,
|
95
|
+
"events": [{"prodState": "Production", "dedupid": "fan", "eventKey": "1",
|
96
|
+
"evid": "1", "eventClass": {"uid": "/zport/dmd/Events/HW/Temparature/Fan"}}],
|
97
|
+
"success": true, "tid": 19, "type": "rpc", "method": "query"}}'
|
98
|
+
http_version:
|
99
|
+
recorded_at: Tue, 19 Feb 2019 22:36:54 GMT
|
100
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,164 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:8080/zport/dmd/zport/dmd/device_router
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '[{"action":"DeviceRouter","method":"getDevices","data":[{"uid":"/zport/dmd/Devices","params":{"name":"UnitTestDevice"}}],"type":"rpc","tid":9}]'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
Date:
|
15
|
+
- Tue, 19 Feb 2019 22:36:51 GMT
|
16
|
+
Content-Type:
|
17
|
+
- application/json; charset=utf-8
|
18
|
+
Cookie: ''
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 200
|
22
|
+
message: OK
|
23
|
+
headers:
|
24
|
+
Content-Type:
|
25
|
+
- application/json
|
26
|
+
Date:
|
27
|
+
- Tue, 19 Feb 2019 22:36:51 GMT
|
28
|
+
Server: ''
|
29
|
+
Strict-Transport-Security:
|
30
|
+
- max-age=31536000
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
X-Frame-Options:
|
34
|
+
- SAMEORIGIN
|
35
|
+
X-Xss-Protection:
|
36
|
+
- 1; mode=block
|
37
|
+
Content-Length:
|
38
|
+
- '904'
|
39
|
+
Set-Cookie: ''
|
40
|
+
body:
|
41
|
+
encoding: UTF-8
|
42
|
+
string: '{"uuid": "ae0a0972-7413-4995-8129-e279a35d8572", "action": "DeviceRouter",
|
43
|
+
"result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"ipAddressString":
|
44
|
+
null, "serialNumber": "", "pythonClass": "Products.ZenModel.Device", "hwManufacturer":
|
45
|
+
null, "collector": "localhost", "osModel": null, "productionState": 400, "systems":
|
46
|
+
[], "priority": 3, "hwModel": null, "tagNumber": "", "osManufacturer": null,
|
47
|
+
"location": null, "groups": [], "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
|
48
|
+
"ipAddress": null, "events": {"info": {"count": 0, "acknowledged_count": 0},
|
49
|
+
"clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0, "acknowledged_count":
|
50
|
+
0}, "critical": {"count": 0, "acknowledged_count": 0}, "error": {"count":
|
51
|
+
0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count": 0}},
|
52
|
+
"name": "UnitTestDevice"}]}, "tid": 9, "type": "rpc", "method": "getDevices"}'
|
53
|
+
http_version:
|
54
|
+
recorded_at: Tue, 19 Feb 2019 22:36:51 GMT
|
55
|
+
- request:
|
56
|
+
method: post
|
57
|
+
uri: http://localhost:8080/zport/dmd/zport/dmd/report_router
|
58
|
+
body:
|
59
|
+
encoding: UTF-8
|
60
|
+
string: '[{"action":"ReportRouter","method":"asyncGetTree","data":["/zport/dmd/Reports"],"type":"rpc","tid":10}]'
|
61
|
+
headers:
|
62
|
+
User-Agent:
|
63
|
+
- HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
|
64
|
+
Accept:
|
65
|
+
- "*/*"
|
66
|
+
Date:
|
67
|
+
- Tue, 19 Feb 2019 22:36:51 GMT
|
68
|
+
Content-Type:
|
69
|
+
- application/json; charset=utf-8
|
70
|
+
Cookie: ''
|
71
|
+
response:
|
72
|
+
status:
|
73
|
+
code: 200
|
74
|
+
message: OK
|
75
|
+
headers:
|
76
|
+
Content-Type:
|
77
|
+
- application/json
|
78
|
+
Date:
|
79
|
+
- Tue, 19 Feb 2019 22:36:51 GMT
|
80
|
+
Server: ''
|
81
|
+
Strict-Transport-Security:
|
82
|
+
- max-age=31536000
|
83
|
+
Vary:
|
84
|
+
- Accept-Encoding
|
85
|
+
X-Frame-Options:
|
86
|
+
- SAMEORIGIN
|
87
|
+
X-Xss-Protection:
|
88
|
+
- 1; mode=block
|
89
|
+
Transfer-Encoding:
|
90
|
+
- chunked
|
91
|
+
Set-Cookie: ''
|
92
|
+
body:
|
93
|
+
encoding: UTF-8
|
94
|
+
string: '{"uuid": "a359c5df-a88d-422b-b31e-dd08f13d82a5", "action": "ReportRouter",
|
95
|
+
"result": [{"leaf": false, "uid": "/zport/dmd/Reports", "text": {"count":
|
96
|
+
69, "text": "Reports", "description": "reports"}, "children": [{"leaf": false,
|
97
|
+
"uid": "/zport/dmd/Reports/AWS Reports", "text": {"count": 1, "text": "AWS
|
98
|
+
Reports", "description": "reports"}, "deletable": true, "iconCls": "severity-icon-small
|
99
|
+
clear", "path": "Reports/AWS Reports", "hidden": false, "id": ".zport.dmd.Reports.AWS
|
100
|
+
Reports", "edit_url": null}, {"leaf": false, "uid": "/zport/dmd/Reports/Azure",
|
101
|
+
"text": {"count": 1, "text": "Azure", "description": "reports"}, "deletable":
|
102
|
+
true, "iconCls": "severity-icon-small clear", "path": "Reports/Azure", "hidden":
|
103
|
+
false, "id": ".zport.dmd.Reports.Azure", "edit_url": null}, {"leaf": false,
|
104
|
+
"uid": "/zport/dmd/Reports/Cisco UCS Reports", "text": {"count": 2, "text":
|
105
|
+
"Cisco UCS Reports", "description": "reports"}, "deletable": true, "iconCls":
|
106
|
+
"severity-icon-small clear", "path": "Reports/Cisco UCS Reports", "hidden":
|
107
|
+
false, "id": ".zport.dmd.Reports.Cisco UCS Reports", "edit_url": null}, {"leaf":
|
108
|
+
false, "uid": "/zport/dmd/Reports/Configuration Management", "text": {"count":
|
109
|
+
2, "text": "Configuration Management", "description": "reports"}, "deletable":
|
110
|
+
true, "iconCls": "severity-icon-small clear", "path": "Reports/Configuration
|
111
|
+
Management", "hidden": false, "id": ".zport.dmd.Reports.Configuration Management",
|
112
|
+
"edit_url": null}, {"leaf": false, "uid": "/zport/dmd/Reports/Custom Device
|
113
|
+
Reports", "text": {"count": 1, "text": "Custom Device Reports", "description":
|
114
|
+
"reports"}, "deletable": false, "iconCls": "severity-icon-small clear", "path":
|
115
|
+
"Reports/Custom Device Reports", "hidden": false, "id": ".zport.dmd.Reports.Custom
|
116
|
+
Device Reports", "edit_url": null}, {"leaf": false, "uid": "/zport/dmd/Reports/Device
|
117
|
+
Reports", "text": {"count": 12, "text": "Device Reports", "description": "reports"},
|
118
|
+
"deletable": true, "iconCls": "severity-icon-small clear", "path": "Reports/Device
|
119
|
+
Reports", "hidden": false, "id": ".zport.dmd.Reports.Device Reports", "edit_url":
|
120
|
+
null}, {"leaf": false, "uid": "/zport/dmd/Reports/Enterprise Reports", "text":
|
121
|
+
{"count": 15, "text": "Enterprise Reports", "description": "reports"}, "deletable":
|
122
|
+
true, "iconCls": "severity-icon-small clear", "path": "Reports/Enterprise
|
123
|
+
Reports", "hidden": false, "id": ".zport.dmd.Reports.Enterprise Reports",
|
124
|
+
"edit_url": null}, {"leaf": false, "uid": "/zport/dmd/Reports/Event Reports",
|
125
|
+
"text": {"count": 4, "text": "Event Reports", "description": "reports"}, "deletable":
|
126
|
+
true, "iconCls": "severity-icon-small clear", "path": "Reports/Event Reports",
|
127
|
+
"hidden": false, "id": ".zport.dmd.Reports.Event Reports", "edit_url": null},
|
128
|
+
{"leaf": false, "uid": "/zport/dmd/Reports/Graph Reports", "text": {"count":
|
129
|
+
5, "text": "Graph Reports", "description": "reports"}, "deletable": false,
|
130
|
+
"iconCls": "severity-icon-small clear", "path": "Reports/Graph Reports", "hidden":
|
131
|
+
false, "id": ".zport.dmd.Reports.Graph Reports", "edit_url": null}, {"leaf":
|
132
|
+
false, "uid": "/zport/dmd/Reports/Juniper ERX", "text": {"count": 1, "text":
|
133
|
+
"Juniper ERX", "description": "reports"}, "deletable": true, "iconCls": "severity-icon-small
|
134
|
+
clear", "path": "Reports/Juniper ERX", "hidden": false, "id": ".zport.dmd.Reports.Juniper
|
135
|
+
ERX", "edit_url": null}, {"leaf": false, "uid": "/zport/dmd/Reports/Monitoring
|
136
|
+
Capabilities Reports", "text": {"count": 1, "text": "Monitoring Capabilities
|
137
|
+
Reports", "description": "reports"}, "deletable": true, "iconCls": "severity-icon-small
|
138
|
+
clear", "path": "Reports/Monitoring Capabilities Reports", "hidden": false,
|
139
|
+
"id": ".zport.dmd.Reports.Monitoring Capabilities Reports", "edit_url": null},
|
140
|
+
{"leaf": false, "uid": "/zport/dmd/Reports/Multi-Graph Reports", "text": {"count":
|
141
|
+
5, "text": "Multi-Graph Reports", "description": "reports"}, "deletable":
|
142
|
+
false, "iconCls": "severity-icon-small clear", "path": "Reports/Multi-Graph
|
143
|
+
Reports", "hidden": false, "id": ".zport.dmd.Reports.Multi-Graph Reports",
|
144
|
+
"edit_url": null}, {"leaf": false, "uid": "/zport/dmd/Reports/Performance
|
145
|
+
Reports", "text": {"count": 7, "text": "Performance Reports", "description":
|
146
|
+
"reports"}, "deletable": true, "iconCls": "severity-icon-small clear", "path":
|
147
|
+
"Reports/Performance Reports", "hidden": false, "id": ".zport.dmd.Reports.Performance
|
148
|
+
Reports", "edit_url": null}, {"leaf": false, "uid": "/zport/dmd/Reports/Storage",
|
149
|
+
"text": {"count": 3, "text": "Storage", "description": "reports"}, "deletable":
|
150
|
+
true, "iconCls": "severity-icon-small clear", "path": "Reports/Storage", "hidden":
|
151
|
+
false, "id": ".zport.dmd.Reports.Storage", "edit_url": null}, {"leaf": false,
|
152
|
+
"uid": "/zport/dmd/Reports/vSphere", "text": {"count": 8, "text": "vSphere",
|
153
|
+
"description": "reports"}, "deletable": true, "iconCls": "severity-icon-small
|
154
|
+
clear", "path": "Reports/vSphere", "hidden": false, "id": ".zport.dmd.Reports.vSphere",
|
155
|
+
"edit_url": null}, {"leaf": true, "uid": "/zport/dmd/Reports/96", "text":
|
156
|
+
"96", "columns": 1, "deletable": true, "isGraphReport": false, "isMultiGraphReport":
|
157
|
+
true, "hidden": false, "path": "Reports/96", "id": ".zport.dmd.Reports.96",
|
158
|
+
"edit_url": "/zport/dmd/Reports/96/editMultiGraphReport", "iconCls": "leaf"}],
|
159
|
+
"deletable": false, "iconCls": "severity-icon-small clear", "path": "Reports",
|
160
|
+
"hidden": false, "id": ".zport.dmd.Reports", "edit_url": null}], "tid": 10,
|
161
|
+
"type": "rpc", "method": "asyncGetTree"}'
|
162
|
+
http_version:
|
163
|
+
recorded_at: Tue, 19 Feb 2019 22:36:51 GMT
|
164
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,100 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:8080/zport/dmd/zport/dmd/device_router
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '[{"action":"DeviceRouter","method":"getDevices","data":[{"uid":"/zport/dmd/Devices","params":{"name":"UnitTestDevice"}}],"type":"rpc","tid":16}]'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
Date:
|
15
|
+
- Tue, 19 Feb 2019 22:36:53 GMT
|
16
|
+
Content-Type:
|
17
|
+
- application/json; charset=utf-8
|
18
|
+
Cookie: ''
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 200
|
22
|
+
message: OK
|
23
|
+
headers:
|
24
|
+
Content-Type:
|
25
|
+
- application/json
|
26
|
+
Date:
|
27
|
+
- Tue, 19 Feb 2019 22:36:53 GMT
|
28
|
+
Server: ''
|
29
|
+
Strict-Transport-Security:
|
30
|
+
- max-age=31536000
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
X-Frame-Options:
|
34
|
+
- SAMEORIGIN
|
35
|
+
X-Xss-Protection:
|
36
|
+
- 1; mode=block
|
37
|
+
Content-Length:
|
38
|
+
- '905'
|
39
|
+
Set-Cookie: ''
|
40
|
+
body:
|
41
|
+
encoding: UTF-8
|
42
|
+
string: '{"uuid": "b9b81b35-3cfd-4fc0-a7ad-b16938b99d65", "action": "DeviceRouter",
|
43
|
+
"result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"ipAddressString":
|
44
|
+
null, "serialNumber": "", "pythonClass": "Products.ZenModel.Device", "hwManufacturer":
|
45
|
+
null, "collector": "localhost", "osModel": null, "productionState": 400, "systems":
|
46
|
+
[], "priority": 3, "hwModel": null, "tagNumber": "", "osManufacturer": null,
|
47
|
+
"location": null, "groups": [], "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
|
48
|
+
"ipAddress": null, "events": {"info": {"count": 0, "acknowledged_count": 0},
|
49
|
+
"clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0, "acknowledged_count":
|
50
|
+
0}, "critical": {"count": 0, "acknowledged_count": 0}, "error": {"count":
|
51
|
+
0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count": 0}},
|
52
|
+
"name": "UnitTestDevice"}]}, "tid": 16, "type": "rpc", "method": "getDevices"}'
|
53
|
+
http_version:
|
54
|
+
recorded_at: Tue, 19 Feb 2019 22:36:53 GMT
|
55
|
+
- request:
|
56
|
+
method: post
|
57
|
+
uri: http://localhost:8080/zport/dmd/zport/dmd/report_router
|
58
|
+
body:
|
59
|
+
encoding: UTF-8
|
60
|
+
string: '[{"action":"ReportRouter","method":"getReportTypes","data":{},"type":"rpc","tid":17}]'
|
61
|
+
headers:
|
62
|
+
User-Agent:
|
63
|
+
- HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
|
64
|
+
Accept:
|
65
|
+
- "*/*"
|
66
|
+
Date:
|
67
|
+
- Tue, 19 Feb 2019 22:36:53 GMT
|
68
|
+
Content-Type:
|
69
|
+
- application/json; charset=utf-8
|
70
|
+
Cookie: ''
|
71
|
+
response:
|
72
|
+
status:
|
73
|
+
code: 200
|
74
|
+
message: OK
|
75
|
+
headers:
|
76
|
+
Content-Type:
|
77
|
+
- application/json
|
78
|
+
Date:
|
79
|
+
- Tue, 19 Feb 2019 22:36:53 GMT
|
80
|
+
Server: ''
|
81
|
+
Strict-Transport-Security:
|
82
|
+
- max-age=31536000
|
83
|
+
Vary:
|
84
|
+
- Accept-Encoding
|
85
|
+
X-Frame-Options:
|
86
|
+
- SAMEORIGIN
|
87
|
+
X-Xss-Protection:
|
88
|
+
- 1; mode=block
|
89
|
+
Content-Length:
|
90
|
+
- '307'
|
91
|
+
Set-Cookie: ''
|
92
|
+
body:
|
93
|
+
encoding: UTF-8
|
94
|
+
string: '{"uuid": "08c5bc38-197e-4adf-b1e2-e73c9b27ec35", "action": "ReportRouter",
|
95
|
+
"result": {"menuText": ["Custom Device Report", "Graph Report", "Multi-Graph
|
96
|
+
Report"], "reportTypes": ["customDeviceReport", "graphReport", "multiGraphReport"],
|
97
|
+
"success": true}, "tid": 17, "type": "rpc", "method": "getReportTypes"}'
|
98
|
+
http_version:
|
99
|
+
recorded_at: Tue, 19 Feb 2019 22:36:53 GMT
|
100
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,184 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:8080/zport/dmd/zport/dmd/device_router
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '[{"action":"DeviceRouter","method":"getDevices","data":[{"uid":"/zport/dmd/Devices","params":{"name":"UnitTestDevice"}}],"type":"rpc","tid":20}]'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
Date:
|
15
|
+
- Tue, 19 Feb 2019 22:36:54 GMT
|
16
|
+
Content-Type:
|
17
|
+
- application/json; charset=utf-8
|
18
|
+
Cookie: ''
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 200
|
22
|
+
message: OK
|
23
|
+
headers:
|
24
|
+
Content-Type:
|
25
|
+
- application/json
|
26
|
+
Date:
|
27
|
+
- Tue, 19 Feb 2019 22:36:55 GMT
|
28
|
+
Server: ''
|
29
|
+
Strict-Transport-Security:
|
30
|
+
- max-age=31536000
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
X-Frame-Options:
|
34
|
+
- SAMEORIGIN
|
35
|
+
X-Xss-Protection:
|
36
|
+
- 1; mode=block
|
37
|
+
Content-Length:
|
38
|
+
- '905'
|
39
|
+
Set-Cookie: ''
|
40
|
+
body:
|
41
|
+
encoding: UTF-8
|
42
|
+
string: '{"uuid": "bf5f4de2-a82e-475e-bc95-a78d718f445a", "action": "DeviceRouter",
|
43
|
+
"result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"ipAddressString":
|
44
|
+
null, "serialNumber": "", "pythonClass": "Products.ZenModel.Device", "hwManufacturer":
|
45
|
+
null, "collector": "localhost", "osModel": null, "productionState": 400, "systems":
|
46
|
+
[], "priority": 3, "hwModel": null, "tagNumber": "", "osManufacturer": null,
|
47
|
+
"location": null, "groups": [], "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
|
48
|
+
"ipAddress": null, "events": {"info": {"count": 0, "acknowledged_count": 0},
|
49
|
+
"clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0, "acknowledged_count":
|
50
|
+
0}, "critical": {"count": 0, "acknowledged_count": 0}, "error": {"count":
|
51
|
+
0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count": 0}},
|
52
|
+
"name": "UnitTestDevice"}]}, "tid": 20, "type": "rpc", "method": "getDevices"}'
|
53
|
+
http_version:
|
54
|
+
recorded_at: Tue, 19 Feb 2019 22:36:55 GMT
|
55
|
+
- request:
|
56
|
+
method: get
|
57
|
+
uri: http://localhost:8080/zport/dmd/zport/dmd/Devices/Server/devices/UnitTestDevice/renameDevice?newId=unit_test_temporary_device_name
|
58
|
+
body:
|
59
|
+
encoding: UTF-8
|
60
|
+
string: ''
|
61
|
+
headers:
|
62
|
+
User-Agent:
|
63
|
+
- HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
|
64
|
+
Accept:
|
65
|
+
- "*/*"
|
66
|
+
Date:
|
67
|
+
- Tue, 19 Feb 2019 22:36:55 GMT
|
68
|
+
Cookie: ''
|
69
|
+
response:
|
70
|
+
status:
|
71
|
+
code: 200
|
72
|
+
message: OK
|
73
|
+
headers:
|
74
|
+
Content-Length:
|
75
|
+
- '65'
|
76
|
+
Content-Type:
|
77
|
+
- text/plain; charset=utf-8
|
78
|
+
Date:
|
79
|
+
- Tue, 19 Feb 2019 22:36:56 GMT
|
80
|
+
Server: ''
|
81
|
+
Strict-Transport-Security:
|
82
|
+
- max-age=31536000
|
83
|
+
X-Frame-Options:
|
84
|
+
- SAMEORIGIN
|
85
|
+
X-Xss-Protection:
|
86
|
+
- 1; mode=block
|
87
|
+
Set-Cookie: ''
|
88
|
+
body:
|
89
|
+
encoding: UTF-8
|
90
|
+
string: "/zport/dmd/Devices/Server/devices/unit_test_temporary_device_name"
|
91
|
+
http_version:
|
92
|
+
recorded_at: Tue, 19 Feb 2019 22:36:56 GMT
|
93
|
+
- request:
|
94
|
+
method: post
|
95
|
+
uri: http://localhost:8080/zport/dmd/zport/dmd/device_router
|
96
|
+
body:
|
97
|
+
encoding: UTF-8
|
98
|
+
string: '[{"action":"DeviceRouter","method":"getDevices","data":[{"uid":"/zport/dmd/Devices","params":{"name":"unit_test_temporary_device_name"}}],"type":"rpc","tid":21}]'
|
99
|
+
headers:
|
100
|
+
User-Agent:
|
101
|
+
- HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
|
102
|
+
Accept:
|
103
|
+
- "*/*"
|
104
|
+
Date:
|
105
|
+
- Tue, 19 Feb 2019 22:36:56 GMT
|
106
|
+
Content-Type:
|
107
|
+
- application/json; charset=utf-8
|
108
|
+
Cookie: ''
|
109
|
+
response:
|
110
|
+
status:
|
111
|
+
code: 200
|
112
|
+
message: OK
|
113
|
+
headers:
|
114
|
+
Content-Type:
|
115
|
+
- application/json
|
116
|
+
Date:
|
117
|
+
- Tue, 19 Feb 2019 22:36:57 GMT
|
118
|
+
Server: ''
|
119
|
+
Strict-Transport-Security:
|
120
|
+
- max-age=31536000
|
121
|
+
Vary:
|
122
|
+
- Accept-Encoding
|
123
|
+
X-Frame-Options:
|
124
|
+
- SAMEORIGIN
|
125
|
+
X-Xss-Protection:
|
126
|
+
- 1; mode=block
|
127
|
+
Content-Length:
|
128
|
+
- '939'
|
129
|
+
Set-Cookie: ''
|
130
|
+
body:
|
131
|
+
encoding: UTF-8
|
132
|
+
string: '{"uuid": "6a913108-bbb3-45dd-927c-936a381fb5b7", "action": "DeviceRouter",
|
133
|
+
"result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"ipAddressString":
|
134
|
+
null, "serialNumber": "", "pythonClass": "Products.ZenModel.Device", "hwManufacturer":
|
135
|
+
null, "collector": "localhost", "osModel": null, "productionState": 400, "systems":
|
136
|
+
[], "priority": 3, "hwModel": null, "tagNumber": "", "osManufacturer": null,
|
137
|
+
"location": null, "groups": [], "uid": "/zport/dmd/Devices/Server/devices/unit_test_temporary_device_name",
|
138
|
+
"ipAddress": null, "events": {"info": {"count": 0, "acknowledged_count": 0},
|
139
|
+
"clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0, "acknowledged_count":
|
140
|
+
0}, "critical": {"count": 0, "acknowledged_count": 0}, "error": {"count":
|
141
|
+
0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count": 0}},
|
142
|
+
"name": "unit_test_temporary_device_name"}]}, "tid": 21, "type": "rpc", "method":
|
143
|
+
"getDevices"}'
|
144
|
+
http_version:
|
145
|
+
recorded_at: Tue, 19 Feb 2019 22:36:57 GMT
|
146
|
+
- request:
|
147
|
+
method: get
|
148
|
+
uri: http://localhost:8080/zport/dmd/zport/dmd/Devices/Server/devices/unit_test_temporary_device_name/renameDevice?newId=UnitTestDevice
|
149
|
+
body:
|
150
|
+
encoding: UTF-8
|
151
|
+
string: ''
|
152
|
+
headers:
|
153
|
+
User-Agent:
|
154
|
+
- HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
|
155
|
+
Accept:
|
156
|
+
- "*/*"
|
157
|
+
Date:
|
158
|
+
- Tue, 19 Feb 2019 22:36:57 GMT
|
159
|
+
Cookie: ''
|
160
|
+
response:
|
161
|
+
status:
|
162
|
+
code: 200
|
163
|
+
message: OK
|
164
|
+
headers:
|
165
|
+
Content-Length:
|
166
|
+
- '48'
|
167
|
+
Content-Type:
|
168
|
+
- text/plain; charset=utf-8
|
169
|
+
Date:
|
170
|
+
- Tue, 19 Feb 2019 22:36:57 GMT
|
171
|
+
Server: ''
|
172
|
+
Strict-Transport-Security:
|
173
|
+
- max-age=31536000
|
174
|
+
X-Frame-Options:
|
175
|
+
- SAMEORIGIN
|
176
|
+
X-Xss-Protection:
|
177
|
+
- 1; mode=block
|
178
|
+
Set-Cookie: ''
|
179
|
+
body:
|
180
|
+
encoding: UTF-8
|
181
|
+
string: "/zport/dmd/Devices/Server/devices/UnitTestDevice"
|
182
|
+
http_version:
|
183
|
+
recorded_at: Tue, 19 Feb 2019 22:36:57 GMT
|
184
|
+
recorded_with: VCR 4.0.0
|