1212from ..error import KepHTTPError
1313from ..ua_gateway .common import _INTER_TYPE , _create_url_cert , INSTANCE_CERTIFICATE
1414
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." )
1523def 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.
1729 These are UAG instance certificates that are used by UAG for trust purposes in the UA security model.
1830
1931 :param server: instance of the `server` class
@@ -26,25 +38,13 @@ def get_instance_certificate(server: server) -> dict:
2638 r = server ._config_get (server .url + _create_url_cert (_INTER_TYPE .CERTS , INSTANCE_CERTIFICATE ))
2739 return r .payload
2840
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." )
4642def 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.
4848 This is the UAG instance certificate that are used by UAG for trust purposes in the UA security model.
4949
5050 :param server: instance of the `server` class
0 commit comments