onvif-python 0.0.4__py3-none-any.whl → 0.0.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- onvif/__init__.py +2 -2
- onvif/client.py +92 -69
- onvif/operator.py +3 -1
- onvif/services/accesscontrol.py +5 -0
- onvif/services/accessrules.py +5 -0
- onvif/services/actionengine.py +5 -0
- onvif/services/analytics/analytics.py +5 -0
- onvif/services/analytics/ruleengine.py +5 -0
- onvif/services/analyticsdevice.py +4 -3
- onvif/services/appmgmt.py +5 -0
- onvif/services/authenticationbehavior.py +5 -0
- onvif/services/credential.py +5 -0
- onvif/services/deviceio.py +5 -0
- onvif/services/devicemgmt.py +6 -1
- onvif/services/display.py +5 -0
- onvif/services/doorcontrol.py +5 -0
- onvif/services/events/events.py +5 -0
- onvif/services/events/notification.py +4 -0
- onvif/services/events/pullpoint.py +4 -0
- onvif/services/events/subscription.py +4 -0
- onvif/services/imaging.py +6 -1
- onvif/services/media.py +5 -0
- onvif/services/media2.py +5 -0
- onvif/services/provisioning.py +5 -0
- onvif/services/ptz.py +5 -0
- onvif/services/receiver.py +5 -0
- onvif/services/recording.py +5 -0
- onvif/services/replay.py +5 -0
- onvif/services/schedule.py +5 -0
- onvif/services/search.py +5 -0
- onvif/services/security/advancedsecurity.py +5 -0
- onvif/services/security/authorizationserver.py +5 -0
- onvif/services/security/dot1x.py +5 -0
- onvif/services/security/jwt.py +5 -0
- onvif/services/security/keystore.py +5 -0
- onvif/services/security/mediasigning.py +5 -0
- onvif/services/security/tlsserver.py +5 -0
- onvif/services/thermal.py +5 -0
- onvif/services/uplink.py +5 -0
- onvif/utils/__init__.py +2 -1
- onvif/utils/xml_capture.py +110 -0
- onvif/utils/zeep.py +143 -87
- onvif/wsdl/ver10/schema/onvif.xsd +1 -0
- {onvif_python-0.0.4.dist-info → onvif_python-0.0.6.dist-info}/METADATA +56 -20
- {onvif_python-0.0.4.dist-info → onvif_python-0.0.6.dist-info}/RECORD +48 -47
- {onvif_python-0.0.4.dist-info → onvif_python-0.0.6.dist-info}/WHEEL +0 -0
- {onvif_python-0.0.4.dist-info → onvif_python-0.0.6.dist-info}/licenses/LICENSE.md +0 -0
- {onvif_python-0.0.4.dist-info → onvif_python-0.0.6.dist-info}/top_level.txt +0 -0
onvif/__init__.py
CHANGED
onvif/client.py
CHANGED
|
@@ -41,7 +41,12 @@ from .services import (
|
|
|
41
41
|
MediaSigning,
|
|
42
42
|
)
|
|
43
43
|
from .operator import CacheMode
|
|
44
|
-
from .utils.zeep import
|
|
44
|
+
from .utils.zeep import (
|
|
45
|
+
apply_patch as _apply_zeep_patch,
|
|
46
|
+
remove_patch as _remove_zeep_patch,
|
|
47
|
+
)
|
|
48
|
+
from .utils.wsdl import ONVIFWSDL
|
|
49
|
+
from .utils.xml_capture import XMLCapturePlugin
|
|
45
50
|
|
|
46
51
|
|
|
47
52
|
class ONVIFClient:
|
|
@@ -56,15 +61,22 @@ class ONVIFClient:
|
|
|
56
61
|
use_https=False,
|
|
57
62
|
verify_ssl=True,
|
|
58
63
|
apply_patch=True,
|
|
64
|
+
capture_xml=False,
|
|
59
65
|
):
|
|
60
66
|
self.apply_patch = apply_patch
|
|
61
|
-
|
|
67
|
+
|
|
62
68
|
# Apply or remove zeep patch based on user preference
|
|
63
69
|
if apply_patch:
|
|
64
70
|
_apply_zeep_patch()
|
|
65
71
|
else:
|
|
66
72
|
_remove_zeep_patch()
|
|
67
|
-
|
|
73
|
+
|
|
74
|
+
# Initialize XML capture plugin if requested
|
|
75
|
+
self.xml_plugin = None
|
|
76
|
+
if capture_xml:
|
|
77
|
+
self.xml_plugin = XMLCapturePlugin()
|
|
78
|
+
|
|
79
|
+
# Pass to ONVIFOperator
|
|
68
80
|
self.common_args = {
|
|
69
81
|
"host": host,
|
|
70
82
|
"port": port,
|
|
@@ -74,14 +86,22 @@ class ONVIFClient:
|
|
|
74
86
|
"cache": cache,
|
|
75
87
|
"use_https": use_https,
|
|
76
88
|
"verify_ssl": verify_ssl,
|
|
77
|
-
"apply_flatten": apply_patch,
|
|
89
|
+
"apply_flatten": apply_patch,
|
|
90
|
+
"plugins": [self.xml_plugin] if self.xml_plugin else None,
|
|
78
91
|
}
|
|
79
92
|
|
|
80
93
|
# Device Management (Core) service is always available
|
|
81
94
|
self._devicemgmt = Device(**self.common_args)
|
|
82
95
|
|
|
83
|
-
# Retrieve device
|
|
84
|
-
self.
|
|
96
|
+
# Retrieve device services once and create namespace -> XAddr mapping
|
|
97
|
+
self.services = self._devicemgmt.GetServices(IncludeCapability=False)
|
|
98
|
+
self._service_map = {}
|
|
99
|
+
for service in self.services:
|
|
100
|
+
namespace = getattr(service, "Namespace", None)
|
|
101
|
+
xaddr = getattr(service, "XAddr", None)
|
|
102
|
+
|
|
103
|
+
if namespace and xaddr:
|
|
104
|
+
self._service_map[namespace] = xaddr
|
|
85
105
|
|
|
86
106
|
# Lazy init for other services
|
|
87
107
|
|
|
@@ -141,45 +161,48 @@ class ONVIFClient:
|
|
|
141
161
|
self._authorizationserver = None
|
|
142
162
|
self._mediasigning = None
|
|
143
163
|
|
|
144
|
-
|
|
145
164
|
def _get_xaddr(self, service_name: str, service_path: str):
|
|
146
165
|
"""
|
|
147
|
-
Resolve XAddr from
|
|
148
|
-
|
|
166
|
+
Resolve XAddr from GetServices based on namespace mapping.
|
|
167
|
+
Falls back to default URL if service not found.
|
|
149
168
|
"""
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
#
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
169
|
+
# Get the namespace for this service from WSDL_MAP
|
|
170
|
+
try:
|
|
171
|
+
# Try to get the service definition from WSDL_MAP
|
|
172
|
+
# Most services use ver10, some use ver20
|
|
173
|
+
wsdl_def = None
|
|
174
|
+
|
|
175
|
+
# Try ver10 first, then ver20
|
|
176
|
+
if service_name in ONVIFWSDL.WSDL_MAP:
|
|
177
|
+
if "ver10" in ONVIFWSDL.WSDL_MAP[service_name]:
|
|
178
|
+
wsdl_def = ONVIFWSDL.WSDL_MAP[service_name]["ver10"]
|
|
179
|
+
elif "ver20" in ONVIFWSDL.WSDL_MAP[service_name]:
|
|
180
|
+
wsdl_def = ONVIFWSDL.WSDL_MAP[service_name]["ver20"]
|
|
181
|
+
|
|
182
|
+
if wsdl_def:
|
|
183
|
+
namespace = wsdl_def["namespace"]
|
|
184
|
+
xaddr = self._service_map.get(namespace)
|
|
185
|
+
|
|
186
|
+
if xaddr:
|
|
187
|
+
# Rewrite host/port if needed
|
|
188
|
+
parsed = urlparse(xaddr)
|
|
189
|
+
device_host = parsed.hostname
|
|
190
|
+
device_port = parsed.port
|
|
191
|
+
connect_host = self.common_args["host"]
|
|
192
|
+
connect_port = self.common_args["port"]
|
|
193
|
+
|
|
194
|
+
if (device_host != connect_host) or (device_port != connect_port):
|
|
195
|
+
protocol = "https" if self.common_args["use_https"] else "http"
|
|
196
|
+
new_netloc = f"{connect_host}:{connect_port}"
|
|
197
|
+
rewritten = urlunparse(
|
|
198
|
+
(protocol, new_netloc, parsed.path, "", "", "")
|
|
199
|
+
)
|
|
200
|
+
return rewritten
|
|
201
|
+
return xaddr
|
|
202
|
+
except Exception:
|
|
203
|
+
pass
|
|
204
|
+
|
|
205
|
+
# Fallback to default URL
|
|
183
206
|
protocol = "https" if self.common_args["use_https"] else "http"
|
|
184
207
|
return f"{protocol}://{self.common_args['host']}:{self.common_args['port']}/onvif/{service_path}"
|
|
185
208
|
|
|
@@ -193,7 +216,7 @@ class ONVIFClient:
|
|
|
193
216
|
def events(self):
|
|
194
217
|
if self._events is None:
|
|
195
218
|
self._events = Events(
|
|
196
|
-
xaddr=self._get_xaddr("
|
|
219
|
+
xaddr=self._get_xaddr("events", "Events"), **self.common_args
|
|
197
220
|
)
|
|
198
221
|
return self._events
|
|
199
222
|
|
|
@@ -220,7 +243,7 @@ class ONVIFClient:
|
|
|
220
243
|
def notification(self):
|
|
221
244
|
if self._notification is None:
|
|
222
245
|
self._notification = Notification(
|
|
223
|
-
xaddr=self._get_xaddr("
|
|
246
|
+
xaddr=self._get_xaddr("notification", "Events"), **self.common_args
|
|
224
247
|
)
|
|
225
248
|
return self._notification
|
|
226
249
|
|
|
@@ -249,7 +272,7 @@ class ONVIFClient:
|
|
|
249
272
|
def imaging(self):
|
|
250
273
|
if self._imaging is None:
|
|
251
274
|
self._imaging = Imaging(
|
|
252
|
-
xaddr=self._get_xaddr("
|
|
275
|
+
xaddr=self._get_xaddr("imaging", "Imaging"), **self.common_args
|
|
253
276
|
)
|
|
254
277
|
return self._imaging
|
|
255
278
|
|
|
@@ -258,14 +281,14 @@ class ONVIFClient:
|
|
|
258
281
|
def media(self):
|
|
259
282
|
if self._media is None:
|
|
260
283
|
self._media = Media(
|
|
261
|
-
xaddr=self._get_xaddr("
|
|
284
|
+
xaddr=self._get_xaddr("media", "Media"), **self.common_args
|
|
262
285
|
)
|
|
263
286
|
return self._media
|
|
264
287
|
|
|
265
288
|
def media2(self):
|
|
266
289
|
if self._media2 is None:
|
|
267
290
|
self._media2 = Media2(
|
|
268
|
-
xaddr=self._get_xaddr("
|
|
291
|
+
xaddr=self._get_xaddr("media2", "Media2"), **self.common_args
|
|
269
292
|
)
|
|
270
293
|
return self._media2
|
|
271
294
|
|
|
@@ -273,7 +296,7 @@ class ONVIFClient:
|
|
|
273
296
|
|
|
274
297
|
def ptz(self):
|
|
275
298
|
if self._ptz is None:
|
|
276
|
-
self._ptz = PTZ(xaddr=self._get_xaddr("
|
|
299
|
+
self._ptz = PTZ(xaddr=self._get_xaddr("ptz", "PTZ"), **self.common_args)
|
|
277
300
|
return self._ptz
|
|
278
301
|
|
|
279
302
|
# DeviceIO
|
|
@@ -281,7 +304,7 @@ class ONVIFClient:
|
|
|
281
304
|
def deviceio(self):
|
|
282
305
|
if self._deviceio is None:
|
|
283
306
|
self._deviceio = DeviceIO(
|
|
284
|
-
xaddr=self._get_xaddr("
|
|
307
|
+
xaddr=self._get_xaddr("deviceio", "DeviceIO"), **self.common_args
|
|
285
308
|
)
|
|
286
309
|
return self._deviceio
|
|
287
310
|
|
|
@@ -290,7 +313,7 @@ class ONVIFClient:
|
|
|
290
313
|
def display(self):
|
|
291
314
|
if self._display is None:
|
|
292
315
|
self._display = Display(
|
|
293
|
-
xaddr=self._get_xaddr("
|
|
316
|
+
xaddr=self._get_xaddr("display", "Display"), **self.common_args
|
|
294
317
|
)
|
|
295
318
|
return self._display
|
|
296
319
|
|
|
@@ -299,21 +322,21 @@ class ONVIFClient:
|
|
|
299
322
|
def analytics(self):
|
|
300
323
|
if self._analytics is None:
|
|
301
324
|
self._analytics = Analytics(
|
|
302
|
-
xaddr=self._get_xaddr("
|
|
325
|
+
xaddr=self._get_xaddr("analytics", "Analytics"), **self.common_args
|
|
303
326
|
)
|
|
304
327
|
return self._analytics
|
|
305
328
|
|
|
306
329
|
def ruleengine(self):
|
|
307
330
|
if self._ruleengine is None:
|
|
308
331
|
self._ruleengine = RuleEngine(
|
|
309
|
-
xaddr=self._get_xaddr("
|
|
332
|
+
xaddr=self._get_xaddr("ruleengine", "Analytics"), **self.common_args
|
|
310
333
|
)
|
|
311
334
|
return self._ruleengine
|
|
312
335
|
|
|
313
336
|
def analyticsdevice(self):
|
|
314
337
|
if self._analyticsdevice is None:
|
|
315
338
|
self._analyticsdevice = AnalyticsDevice(
|
|
316
|
-
xaddr=self._get_xaddr("
|
|
339
|
+
xaddr=self._get_xaddr("analyticsdevice", "AnalyticsDevice"),
|
|
317
340
|
**self.common_args,
|
|
318
341
|
)
|
|
319
342
|
return self._analyticsdevice
|
|
@@ -323,7 +346,7 @@ class ONVIFClient:
|
|
|
323
346
|
def accesscontrol(self):
|
|
324
347
|
if self._accesscontrol is None:
|
|
325
348
|
self._accesscontrol = AccessControl(
|
|
326
|
-
xaddr=self._get_xaddr("
|
|
349
|
+
xaddr=self._get_xaddr("accesscontrol", "AccessControl"),
|
|
327
350
|
**self.common_args,
|
|
328
351
|
)
|
|
329
352
|
return self._accesscontrol
|
|
@@ -331,7 +354,7 @@ class ONVIFClient:
|
|
|
331
354
|
def doorcontrol(self):
|
|
332
355
|
if self._doorcontrol is None:
|
|
333
356
|
self._doorcontrol = DoorControl(
|
|
334
|
-
xaddr=self._get_xaddr("
|
|
357
|
+
xaddr=self._get_xaddr("doorcontrol", "DoorControl"), **self.common_args
|
|
335
358
|
)
|
|
336
359
|
return self._doorcontrol
|
|
337
360
|
|
|
@@ -340,7 +363,7 @@ class ONVIFClient:
|
|
|
340
363
|
def accessrules(self):
|
|
341
364
|
if self._accessrules is None:
|
|
342
365
|
self._accessrules = AccessRules(
|
|
343
|
-
xaddr=self._get_xaddr("
|
|
366
|
+
xaddr=self._get_xaddr("accessrules", "AccessRules"), **self.common_args
|
|
344
367
|
)
|
|
345
368
|
return self._accessrules
|
|
346
369
|
|
|
@@ -349,7 +372,7 @@ class ONVIFClient:
|
|
|
349
372
|
def actionengine(self):
|
|
350
373
|
if self._actionengine is None:
|
|
351
374
|
self._actionengine = ActionEngine(
|
|
352
|
-
xaddr=self._get_xaddr("
|
|
375
|
+
xaddr=self._get_xaddr("actionengine", "ActionEngine"),
|
|
353
376
|
**self.common_args,
|
|
354
377
|
)
|
|
355
378
|
return self._actionengine
|
|
@@ -359,7 +382,7 @@ class ONVIFClient:
|
|
|
359
382
|
def appmanagement(self):
|
|
360
383
|
if self._appmanagement is None:
|
|
361
384
|
self._appmanagement = AppManagement(
|
|
362
|
-
xaddr=self._get_xaddr("
|
|
385
|
+
xaddr=self._get_xaddr("appmgmt", "AppManagement"),
|
|
363
386
|
**self.common_args,
|
|
364
387
|
)
|
|
365
388
|
return self._appmanagement
|
|
@@ -370,7 +393,7 @@ class ONVIFClient:
|
|
|
370
393
|
if self._authenticationbehavior is None:
|
|
371
394
|
self._authenticationbehavior = AuthenticationBehavior(
|
|
372
395
|
xaddr=self._get_xaddr(
|
|
373
|
-
"
|
|
396
|
+
"authenticationbehavior", "AuthenticationBehavior"
|
|
374
397
|
),
|
|
375
398
|
**self.common_args,
|
|
376
399
|
)
|
|
@@ -381,7 +404,7 @@ class ONVIFClient:
|
|
|
381
404
|
def credential(self):
|
|
382
405
|
if self._credential is None:
|
|
383
406
|
self._credential = Credential(
|
|
384
|
-
xaddr=self._get_xaddr("
|
|
407
|
+
xaddr=self._get_xaddr("credential", "Credential"),
|
|
385
408
|
**self.common_args,
|
|
386
409
|
)
|
|
387
410
|
return self._credential
|
|
@@ -391,7 +414,7 @@ class ONVIFClient:
|
|
|
391
414
|
def recording(self):
|
|
392
415
|
if self._recording is None:
|
|
393
416
|
self._recording = Recording(
|
|
394
|
-
xaddr=self._get_xaddr("
|
|
417
|
+
xaddr=self._get_xaddr("recording", "Recording"),
|
|
395
418
|
**self.common_args,
|
|
396
419
|
)
|
|
397
420
|
return self._recording
|
|
@@ -401,7 +424,7 @@ class ONVIFClient:
|
|
|
401
424
|
def replay(self):
|
|
402
425
|
if self._replay is None:
|
|
403
426
|
self._replay = Replay(
|
|
404
|
-
xaddr=self._get_xaddr("
|
|
427
|
+
xaddr=self._get_xaddr("replay", "Replay"),
|
|
405
428
|
**self.common_args,
|
|
406
429
|
)
|
|
407
430
|
return self._replay
|
|
@@ -411,7 +434,7 @@ class ONVIFClient:
|
|
|
411
434
|
def provisioning(self):
|
|
412
435
|
if self._provisioning is None:
|
|
413
436
|
self._provisioning = Provisioning(
|
|
414
|
-
xaddr=self._get_xaddr("
|
|
437
|
+
xaddr=self._get_xaddr("provisioning", "Provisioning"),
|
|
415
438
|
**self.common_args,
|
|
416
439
|
)
|
|
417
440
|
return self._provisioning
|
|
@@ -421,7 +444,7 @@ class ONVIFClient:
|
|
|
421
444
|
def receiver(self):
|
|
422
445
|
if self._receiver is None:
|
|
423
446
|
self._receiver = Receiver(
|
|
424
|
-
xaddr=self._get_xaddr("
|
|
447
|
+
xaddr=self._get_xaddr("receiver", "Receiver"),
|
|
425
448
|
**self.common_args,
|
|
426
449
|
)
|
|
427
450
|
return self._receiver
|
|
@@ -431,7 +454,7 @@ class ONVIFClient:
|
|
|
431
454
|
def schedule(self):
|
|
432
455
|
if self._schedule is None:
|
|
433
456
|
self._schedule = Schedule(
|
|
434
|
-
xaddr=self._get_xaddr("
|
|
457
|
+
xaddr=self._get_xaddr("schedule", "Schedule"),
|
|
435
458
|
**self.common_args,
|
|
436
459
|
)
|
|
437
460
|
return self._schedule
|
|
@@ -441,7 +464,7 @@ class ONVIFClient:
|
|
|
441
464
|
def search(self):
|
|
442
465
|
if self._search is None:
|
|
443
466
|
self._search = Search(
|
|
444
|
-
xaddr=self._get_xaddr("
|
|
467
|
+
xaddr=self._get_xaddr("search", "SearchRecording"),
|
|
445
468
|
**self.common_args,
|
|
446
469
|
)
|
|
447
470
|
return self._search
|
|
@@ -451,7 +474,7 @@ class ONVIFClient:
|
|
|
451
474
|
def thermal(self):
|
|
452
475
|
if self._thermal is None:
|
|
453
476
|
self._thermal = Thermal(
|
|
454
|
-
xaddr=self._get_xaddr("
|
|
477
|
+
xaddr=self._get_xaddr("thermal", "Thermal"),
|
|
455
478
|
**self.common_args,
|
|
456
479
|
)
|
|
457
480
|
return self._thermal
|
|
@@ -461,7 +484,7 @@ class ONVIFClient:
|
|
|
461
484
|
def uplink(self):
|
|
462
485
|
if self._uplink is None:
|
|
463
486
|
self._uplink = Uplink(
|
|
464
|
-
xaddr=self._get_xaddr("
|
|
487
|
+
xaddr=self._get_xaddr("uplink", "Uplink"),
|
|
465
488
|
**self.common_args,
|
|
466
489
|
)
|
|
467
490
|
return self._uplink
|
|
@@ -471,7 +494,7 @@ class ONVIFClient:
|
|
|
471
494
|
def security(self):
|
|
472
495
|
if self._security is None:
|
|
473
496
|
self._security = AdvancedSecurity(
|
|
474
|
-
xaddr=self._get_xaddr("
|
|
497
|
+
xaddr=self._get_xaddr("advancedsecurity", "Security"),
|
|
475
498
|
**self.common_args,
|
|
476
499
|
)
|
|
477
500
|
return self._security
|
onvif/operator.py
CHANGED
|
@@ -53,6 +53,7 @@ class ONVIFOperator:
|
|
|
53
53
|
use_https: bool = False,
|
|
54
54
|
verify_ssl: bool = True,
|
|
55
55
|
apply_flatten: bool = True,
|
|
56
|
+
plugins: list = None,
|
|
56
57
|
):
|
|
57
58
|
self.wsdl_path = wsdl_path
|
|
58
59
|
self.host = host
|
|
@@ -109,6 +110,7 @@ class ONVIFOperator:
|
|
|
109
110
|
transport=transport,
|
|
110
111
|
settings=settings,
|
|
111
112
|
wsse=wsse,
|
|
113
|
+
plugins=plugins,
|
|
112
114
|
)
|
|
113
115
|
|
|
114
116
|
if not binding:
|
|
@@ -125,7 +127,7 @@ class ONVIFOperator:
|
|
|
125
127
|
|
|
126
128
|
try:
|
|
127
129
|
result = func(*args, **kwargs)
|
|
128
|
-
# Post-process to flatten xsd:any fields if enabled
|
|
130
|
+
# Post-process to flatten xsd:any fields if enabled (> v0.0.4 patch)
|
|
129
131
|
if self.apply_flatten:
|
|
130
132
|
return flatten_xsd_any_fields(result)
|
|
131
133
|
return result
|
onvif/services/accesscontrol.py
CHANGED
|
@@ -6,6 +6,11 @@ from ..utils import ONVIFWSDL
|
|
|
6
6
|
|
|
7
7
|
class AccessControl:
|
|
8
8
|
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
# References:
|
|
10
|
+
# - ONVIF Release 2.3 (May 2013) Release Notes
|
|
11
|
+
# - PACSBinding (ver10/pacs/accesscontrol.wsdl)
|
|
12
|
+
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver10/pacs/accesscontrol.wsdl
|
|
13
|
+
|
|
9
14
|
definition = ONVIFWSDL.get_definition("accesscontrol")
|
|
10
15
|
self.operator = ONVIFOperator(
|
|
11
16
|
definition["path"],
|
onvif/services/accessrules.py
CHANGED
|
@@ -6,6 +6,11 @@ from ..utils import ONVIFWSDL
|
|
|
6
6
|
|
|
7
7
|
class AccessRules:
|
|
8
8
|
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
# References:
|
|
10
|
+
# - ONVIF Release 2.6 (June 2015) Release Notes
|
|
11
|
+
# - AccessRulesBinding (ver10/accessrules/wsdl/accessrules.wsdl)
|
|
12
|
+
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver10/accessrules/wsdl/accessrules.wsdl
|
|
13
|
+
|
|
9
14
|
definition = ONVIFWSDL.get_definition("accessrules")
|
|
10
15
|
self.operator = ONVIFOperator(
|
|
11
16
|
definition["path"],
|
onvif/services/actionengine.py
CHANGED
|
@@ -6,6 +6,11 @@ from ..utils import ONVIFWSDL
|
|
|
6
6
|
|
|
7
7
|
class ActionEngine:
|
|
8
8
|
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
# References:
|
|
10
|
+
# - ONVIF Release 2.2 (September 2012) Release Notes
|
|
11
|
+
# - ActionEngineBinding (ver10/actionengine.wsdl)
|
|
12
|
+
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver10/actionengine.wsdl
|
|
13
|
+
|
|
9
14
|
definition = ONVIFWSDL.get_definition("actionengine")
|
|
10
15
|
self.operator = ONVIFOperator(
|
|
11
16
|
definition["path"],
|
|
@@ -6,6 +6,11 @@ from ...utils import ONVIFWSDL
|
|
|
6
6
|
|
|
7
7
|
class Analytics:
|
|
8
8
|
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
# References:
|
|
10
|
+
# - ONVIF Release 2.41 (December 2013) Release Notes
|
|
11
|
+
# - AnalyticsEngineBinding (ver20/analytics/wsdl/analytics.wsdl)
|
|
12
|
+
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver20/analytics/wsdl/analytics.wsdl
|
|
13
|
+
|
|
9
14
|
definition = ONVIFWSDL.get_definition("analytics", "ver20")
|
|
10
15
|
self.operator = ONVIFOperator(
|
|
11
16
|
definition["path"],
|
|
@@ -6,6 +6,11 @@ from ...utils import ONVIFWSDL
|
|
|
6
6
|
|
|
7
7
|
class RuleEngine:
|
|
8
8
|
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
# References:
|
|
10
|
+
# - ONVIF Release 2.41 (December 2013) Release Notes
|
|
11
|
+
# - RuleEngineBinding (ver20/analytics/wsdl/analytics.wsdl)
|
|
12
|
+
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver20/analytics/wsdl/analytics.wsdl
|
|
13
|
+
|
|
9
14
|
definition = ONVIFWSDL.get_definition("ruleengine", "ver20")
|
|
10
15
|
self.operator = ONVIFOperator(
|
|
11
16
|
definition["path"],
|
|
@@ -15,11 +15,12 @@ class AnalyticsDevice:
|
|
|
15
15
|
# (pre-2019) that may still expose an AnalyticsDevice XAddr.
|
|
16
16
|
#
|
|
17
17
|
# In modern ONVIF-compliant devices, you should prefer using the Analytics
|
|
18
|
-
# service (`onvif/services/analytics.py`). If the device does not
|
|
19
|
-
#
|
|
20
|
-
# this class will result in SOAP faults.
|
|
18
|
+
# service (`onvif/services/analytics/analytics.py`). If the device does not list
|
|
19
|
+
# AnalyticsDevice in `GetServices` response, then this service is not available
|
|
20
|
+
# on the device and calling this class will result in SOAP faults.
|
|
21
21
|
#
|
|
22
22
|
# References:
|
|
23
|
+
# - Introduce in ONVIF Release 2.1 (June 2011) Split from Core 2.0
|
|
23
24
|
# - ONVIF Release 18.12 (December 2018) Release Notes
|
|
24
25
|
# - AnalyticsDeviceBinding (ver10/analyticsdevice.wsdl)
|
|
25
26
|
# - Successor: Analytics Service (ver20/analytics/wsdl/analytics.wsdl)
|
onvif/services/appmgmt.py
CHANGED
|
@@ -6,6 +6,11 @@ from ..utils import ONVIFWSDL
|
|
|
6
6
|
|
|
7
7
|
class AppManagement:
|
|
8
8
|
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
# References:
|
|
10
|
+
# - ONVIF Release 19.12 (December 2019) Release Notes
|
|
11
|
+
# - AppManagementBinding (ver10/appmgmt/wsdl/appmgmt.wsdl)
|
|
12
|
+
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver10/appmgmt/wsdl/appmgmt.wsdl
|
|
13
|
+
|
|
9
14
|
definition = ONVIFWSDL.get_definition("appmgmt")
|
|
10
15
|
self.operator = ONVIFOperator(
|
|
11
16
|
definition["path"],
|
|
@@ -6,6 +6,11 @@ from ..utils import ONVIFWSDL
|
|
|
6
6
|
|
|
7
7
|
class AuthenticationBehavior:
|
|
8
8
|
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
# References:
|
|
10
|
+
# - ONVIF Release 18.06 (June 2018) Release Notes
|
|
11
|
+
# - AuthenticationBehaviorBinding (ver10/authenticationbehavior/wsdl/authenticationbehavior.wsdl)
|
|
12
|
+
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver10/authenticationbehavior/wsdl/authenticationbehavior.wsdl
|
|
13
|
+
|
|
9
14
|
definition = ONVIFWSDL.get_definition("authenticationbehavior")
|
|
10
15
|
self.operator = ONVIFOperator(
|
|
11
16
|
definition["path"],
|
onvif/services/credential.py
CHANGED
|
@@ -6,6 +6,11 @@ from ..utils import ONVIFWSDL
|
|
|
6
6
|
|
|
7
7
|
class Credential:
|
|
8
8
|
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
# References:
|
|
10
|
+
# - ONVIF Release 2.6 (June 2015) Release Notes
|
|
11
|
+
# - CredentialBinding (ver10/credential/wsdl/credential.wsdl)
|
|
12
|
+
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver10/credential/wsdl/credential.wsdl
|
|
13
|
+
|
|
9
14
|
definition = ONVIFWSDL.get_definition("credential")
|
|
10
15
|
self.operator = ONVIFOperator(
|
|
11
16
|
definition["path"],
|
onvif/services/deviceio.py
CHANGED
|
@@ -6,6 +6,11 @@ from ..utils import ONVIFWSDL
|
|
|
6
6
|
|
|
7
7
|
class DeviceIO:
|
|
8
8
|
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
# References:
|
|
10
|
+
# - ONVIF Release 2.1 (June 2011) Split from Core 2.0
|
|
11
|
+
# - DeviceIOBinding (ver10/deviceio.wsdl)
|
|
12
|
+
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver10/deviceio.wsdl
|
|
13
|
+
|
|
9
14
|
definition = ONVIFWSDL.get_definition("deviceio")
|
|
10
15
|
self.operator = ONVIFOperator(
|
|
11
16
|
definition["path"],
|
onvif/services/devicemgmt.py
CHANGED
|
@@ -6,6 +6,11 @@ from ..utils import ONVIFWSDL
|
|
|
6
6
|
|
|
7
7
|
class Device:
|
|
8
8
|
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
# References:
|
|
10
|
+
# - ONVIF Core
|
|
11
|
+
# - DeviceBinding (ver10/device/wsdl/devicemgmt.wsdl)
|
|
12
|
+
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver10/device/wsdl/devicemgmt.wsdl
|
|
13
|
+
|
|
9
14
|
definition = ONVIFWSDL.get_definition("devicemgmt")
|
|
10
15
|
self.operator = ONVIFOperator(
|
|
11
16
|
definition["path"],
|
|
@@ -25,7 +30,7 @@ class Device:
|
|
|
25
30
|
return self.operator.call("GetDeviceInformation")
|
|
26
31
|
|
|
27
32
|
def SetSystemDateAndTime(
|
|
28
|
-
self, DateTimeType, DaylightSavings
|
|
33
|
+
self, DateTimeType, DaylightSavings, TimeZone=None, UTCDateTime=None
|
|
29
34
|
):
|
|
30
35
|
return self.operator.call(
|
|
31
36
|
"SetSystemDateAndTime",
|
onvif/services/display.py
CHANGED
|
@@ -6,6 +6,11 @@ from ..utils import ONVIFWSDL
|
|
|
6
6
|
|
|
7
7
|
class Display:
|
|
8
8
|
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
# References:
|
|
10
|
+
# - ONVIF Release 2.1 (June 2011) Split from Core 2.0
|
|
11
|
+
# - DisplayBinding (ver10/display.wsdl)
|
|
12
|
+
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver10/display.wsdl
|
|
13
|
+
|
|
9
14
|
definition = ONVIFWSDL.get_definition("display")
|
|
10
15
|
self.operator = ONVIFOperator(
|
|
11
16
|
definition["path"],
|
onvif/services/doorcontrol.py
CHANGED
|
@@ -6,6 +6,11 @@ from ..utils import ONVIFWSDL
|
|
|
6
6
|
|
|
7
7
|
class DoorControl:
|
|
8
8
|
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
# References:
|
|
10
|
+
# - ONVIF Release 2.3 (May 2013) Release Notes
|
|
11
|
+
# - DoorControlBinding (ver10/pacs/doorcontrol.wsdl)
|
|
12
|
+
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver10/pacs/doorcontrol.wsdl
|
|
13
|
+
|
|
9
14
|
definition = ONVIFWSDL.get_definition("doorcontrol")
|
|
10
15
|
self.operator = ONVIFOperator(
|
|
11
16
|
definition["path"],
|
onvif/services/events/events.py
CHANGED
|
@@ -6,6 +6,11 @@ from ...utils import ONVIFWSDL
|
|
|
6
6
|
|
|
7
7
|
class Events:
|
|
8
8
|
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
# References:
|
|
10
|
+
# - ONVIF Core
|
|
11
|
+
# - EventBinding (ver10/events/wsdl/event-vs.wsdl)
|
|
12
|
+
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver10/events/wsdl/event.wsdl
|
|
13
|
+
|
|
9
14
|
definition = ONVIFWSDL.get_definition("events")
|
|
10
15
|
self.operator = ONVIFOperator(
|
|
11
16
|
definition["path"],
|
|
@@ -6,6 +6,10 @@ from ...utils import ONVIFWSDL
|
|
|
6
6
|
|
|
7
7
|
class Notification:
|
|
8
8
|
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
# References:
|
|
10
|
+
# - NotificationProducerBinding (ver10/events/wsdl/event-vs.wsdl)
|
|
11
|
+
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver10/events/wsdl/event.wsdl
|
|
12
|
+
|
|
9
13
|
definition = ONVIFWSDL.get_definition("notification")
|
|
10
14
|
self.operator = ONVIFOperator(
|
|
11
15
|
definition["path"],
|
|
@@ -6,6 +6,10 @@ from ...utils import ONVIFWSDL
|
|
|
6
6
|
|
|
7
7
|
class PullPoint:
|
|
8
8
|
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
# References:
|
|
10
|
+
# - PullPointSubscriptionBinding (ver10/events/wsdl/event-vs.wsdl)
|
|
11
|
+
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver10/events/wsdl/event.wsdl
|
|
12
|
+
|
|
9
13
|
definition = ONVIFWSDL.get_definition("pullpoint")
|
|
10
14
|
self.operator = ONVIFOperator(
|
|
11
15
|
definition["path"],
|
|
@@ -6,6 +6,10 @@ from ...utils import ONVIFWSDL
|
|
|
6
6
|
|
|
7
7
|
class Subscription:
|
|
8
8
|
def __init__(self, xaddr=None, **kwargs):
|
|
9
|
+
# References:
|
|
10
|
+
# - SubscriptionManagerBinding (ver10/events/wsdl/event-vs.wsdl)
|
|
11
|
+
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver10/events/wsdl/event.wsdl
|
|
12
|
+
|
|
9
13
|
definition = ONVIFWSDL.get_definition("subscription")
|
|
10
14
|
self.operator = ONVIFOperator(
|
|
11
15
|
definition["path"],
|