From d92ea455fd5d1f73347a532a51eeda9e02ba2cf6 Mon Sep 17 00:00:00 2001 From: jamesdreid Date: Wed, 27 Nov 2024 06:40:36 -0600 Subject: [PATCH] Change get call to monitor call During the login function, a system status check is made using the GET method, but that points the call to the CMDB API endpoints which is deprecated in 7.4 and causes errors. Swapping the call over to the monitor endpoint should fix the failures. --- fortiosapi/fortiosapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortiosapi/fortiosapi.py b/fortiosapi/fortiosapi.py index 7071bb5..0ba9286 100644 --- a/fortiosapi/fortiosapi.py +++ b/fortiosapi/fortiosapi.py @@ -264,7 +264,7 @@ def tokenlogin(self, host, apitoken, verify=True, cert=None, timeout=12, vdom="g self.timeout = timeout LOG.debug("host is %s", host) - resp_lic = self.get('system', 'status', vdom=vdom) + resp_lic = self.monitor('system', 'status', vdom=vdom) LOG.debug("response system/status : %s", resp_lic) try: self._fortiversion = resp_lic['version']