-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathauthenticationbehavior.py
More file actions
88 lines (67 loc) · 3.48 KB
/
Copy pathauthenticationbehavior.py
File metadata and controls
88 lines (67 loc) · 3.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# onvif/services/authenticationbehavior.py
from ..operator import ONVIFOperator
from ..utils import ONVIFWSDL, ONVIFService
class AuthenticationBehavior(ONVIFService):
def __init__(self, xaddr=None, **kwargs):
# References:
# - ONVIF Release 18.06 (June 2018) Release Notes
# - AuthenticationBehaviorBinding (ver10/authenticationbehavior/wsdl/authenticationbehavior.wsdl)
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver10/authenticationbehavior/wsdl/authenticationbehavior.wsdl
definition = ONVIFWSDL.get_definition("authenticationbehavior")
self.operator = ONVIFOperator(
definition["path"],
binding=f"{{{definition['namespace']}}}{definition['binding']}",
service_path="AuthenticationBehavior", # fallback
xaddr=xaddr,
**kwargs,
)
def GetServiceCapabilities(self):
return self.operator.call("GetServiceCapabilities")
def GetAuthenticationProfileInfo(self, Token):
return self.operator.call("GetAuthenticationProfileInfo", Token=Token)
def GetAuthenticationProfileInfoList(self, Limit=None, StartReference=None):
return self.operator.call(
"GetAuthenticationProfileInfoList",
Limit=Limit,
StartReference=StartReference,
)
def GetAuthenticationProfiles(self, Token):
return self.operator.call("GetAuthenticationProfiles", Token=Token)
def GetAuthenticationProfileList(self, Limit=None, StartReference=None):
return self.operator.call(
"GetAuthenticationProfileList", Limit=Limit, StartReference=StartReference
)
def CreateAuthenticationProfile(self, AuthenticationProfile):
return self.operator.call(
"CreateAuthenticationProfile", AuthenticationProfile=AuthenticationProfile
)
def SetAuthenticationProfile(self, AuthenticationProfile):
return self.operator.call(
"SetAuthenticationProfile", AuthenticationProfile=AuthenticationProfile
)
def ModifyAuthenticationProfile(self, AuthenticationProfile):
return self.operator.call(
"ModifyAuthenticationProfile", AuthenticationProfile=AuthenticationProfile
)
def DeleteAuthenticationProfile(self, Token):
return self.operator.call("DeleteAuthenticationProfile", Token=Token)
def GetSecurityLevelInfo(self, Token):
return self.operator.call("GetSecurityLevelInfo", Token=Token)
def GetSecurityLevelInfoList(self, Limit=None, StartReference=None):
return self.operator.call(
"GetSecurityLevelInfoList", Limit=Limit, StartReference=StartReference
)
def GetSecurityLevels(self, Token):
return self.operator.call("GetSecurityLevels", Token=Token)
def GetSecurityLevelList(self, Limit=None, StartReference=None):
return self.operator.call(
"GetSecurityLevelList", Limit=Limit, StartReference=StartReference
)
def CreateSecurityLevel(self, SecurityLevel):
return self.operator.call("CreateSecurityLevel", SecurityLevel=SecurityLevel)
def SetSecurityLevel(self, SecurityLevel):
return self.operator.call("SetSecurityLevel", SecurityLevel=SecurityLevel)
def ModifySecurityLevel(self, SecurityLevel):
return self.operator.call("ModifySecurityLevel", SecurityLevel=SecurityLevel)
def DeleteSecurityLevel(self, Token):
return self.operator.call("DeleteSecurityLevel", Token=Token)