From f1d1387dd641e5bc1c3c50d70f21276f322b65cb Mon Sep 17 00:00:00 2001 From: Shailaja Date: Fri, 7 Jun 2024 15:46:42 +0530 Subject: [PATCH] fixed the indentation and defination for empty function --- agent.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/agent.py b/agent.py index cac4543..94b4ad9 100644 --- a/agent.py +++ b/agent.py @@ -46,6 +46,24 @@ class ServerData: return os_id def create_post_data(self): + ram, disk = self.get_ram_and_disk() + cpu_count = self.get_cpu_count() + bandwidth = self.get_bandwidth() + os_id = self.get_os() + + post_data = { + 'hostname': self.hostname, + 'public_ip': self.public_ip, + 'ram': ram, + 'disk': disk, + 'cpu_count': cpu_count, + 'bandwidth': bandwidth, + 'os_id': os_id + } + + logging.info(f"Post Data: {post_data}") + return post_data + class ServerManager: def __init__(self, host, api_key):