12
12
from ..error import KepHTTPError
13
13
from ..ua_gateway .common import _INTER_TYPE , _create_url_cert , INSTANCE_CERTIFICATE
14
14
15
+ import warnings
16
+ from ..helpers .deprecation_utils import _deprecated
17
+
18
+
19
+ # Enable DeprecationWarnings to be visible
20
+ warnings .simplefilter ('always' , DeprecationWarning )
21
+
22
+ @_deprecated ("This function is deprecated and will be removed in a future release. Use `get_instance_certificate()` in UAG client or server module instead." )
15
23
def get_instance_certificate (server : server ) -> dict :
16
- '''Returns the properties of the UAG instance certificate object in the UAG certificate store.
24
+ '''
25
+ DEPRECATED: This function is deprecated and will be removed in a future release. Use `get_instance_certificate()`
26
+ in UAG client or server module instead for Kepware 6.18+.
27
+
28
+ Returns the properties of the UAG instance certificate object in the UAG certificate store.
17
29
These are UAG instance certificates that are used by UAG for trust purposes in the UA security model.
18
30
19
31
:param server: instance of the `server` class
@@ -26,25 +38,13 @@ def get_instance_certificate(server: server) -> dict:
26
38
r = server ._config_get (server .url + _create_url_cert (_INTER_TYPE .CERTS , INSTANCE_CERTIFICATE ))
27
39
return r .payload
28
40
29
- # def get_all_certificates(server: server, *, options: dict = None) -> list:
30
- # TODO: Implement if/when multiple instance certificates can be configured.
31
- # '''Returns list of all UAG instance certificate objects and their properties in the UAG certificate store.
32
- # These are UAG instance certificates that are used by UAG for trust purposes in the UA security model.
33
-
34
- # :param server: instance of the `server` class
35
- # :param options: *(optional)* Dict of parameters to filter, sort or pagenate the list of certificates. Options are `filter`,
36
- # `sortOrder`, `sortProperty`, `pageNumber`, and `pageSize`
37
-
38
- # :return: List of data for all certificates in Kepware server UAG server endpoint certificate store
39
-
40
- # :raises KepHTTPError: If urllib provides an HTTPError
41
- # :raises KepURLError: If urllib provides an URLError
42
- # '''
43
- # r = server._config_get(server.url + _create_url_cert(_INTER_TYPE.CERTS), params= options)
44
- # return r.payload
45
-
41
+ @_deprecated ("This function is deprecated and will be removed in a future release. Use `TBD` instead." )
46
42
def reissue_self_signed_instance_certificate (server : server ) -> bool :
47
- '''Deletes and reissues a self-signed UAG instance certificate object in the UAG certificate store.
43
+ '''
44
+ DEPRECATED: This function is deprecated and will be removed in a future release. Use `get_instance_certificate()`
45
+ in UAG client or server module instead for Kepware 6.18+.
46
+
47
+ Deletes and reissues a self-signed UAG instance certificate object in the UAG certificate store.
48
48
This is the UAG instance certificate that are used by UAG for trust purposes in the UA security model.
49
49
50
50
:param server: instance of the `server` class
0 commit comments