From c5474b1f3c3c4c06696425712913c087ae11df46 Mon Sep 17 00:00:00 2001 From: Swapnil Date: Tue, 25 Jun 2024 15:35:33 +0530 Subject: [PATCH] refactor - remove server_id from create_note_data --- agent.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/agent.py b/agent.py index a3b7b9d..fc3a8ad 100644 --- a/agent.py +++ b/agent.py @@ -163,7 +163,7 @@ class ServerData: logging.info("Post data created") return post_data - def create_note_data(self, server_id): + def create_note_data(self): chassis_info = None for section in self.dmidecode_data: if section['DMIType'] == 1: @@ -183,7 +183,6 @@ class ServerData: chassis_model, chassis_serial, processor_model, processor_count, '\n'.join(['R1', 'R2', 'R3'])) note_data = { - 'service_id': server_id, 'note': note, } return note_data @@ -298,7 +297,7 @@ def main(): server_id = server_manager.upsert_server(post_data) logging.info('Server id: {}'.format(server_id)) - note_data = server_data.create_note_data(server_id) + note_data = server_data.create_note_data() server_manager.upsert_note(note_data, server_id) if __name__ == '__main__':