rest_client.py

first
This commit is contained in:
av1nxsh 2021-03-02 14:24:00 +05:30 committed by GitHub
parent 4e51364057
commit 7c35d107ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,6 +174,14 @@ class FtRestClient():
"""
return self._get("show_config")
def ping(self):
"""simple ping"""
if self.show_config()['state']=="running":
return {"status": "pong"}
else:
return{"status": "not_running"}
def logs(self, limit=None):
"""Show latest logs.