From ebce0ab6205d23bdddba4d9f5806f0fe3e0179b1 Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Sun, 29 May 2022 12:29:40 +0200 Subject: [PATCH] Add system info + bump to 0.10.3 (#128) * add get_system_info * bump pynetgear to 0.10.3 --- pynetgear/const.py | 1 + pynetgear/router.py | 14 ++++++++++++++ setup.py | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/pynetgear/const.py b/pynetgear/const.py index 7eb6dd2..fd99929 100644 --- a/pynetgear/const.py +++ b/pynetgear/const.py @@ -75,6 +75,7 @@ GET_SUPPORT_FEATURE_LIST_XML = "GetSupportFeatureListXML" GET_ATTACHED_DEVICES = "GetAttachDevice" GET_ATTACHED_DEVICES_2 = "GetAttachDevice2" +GET_SYSTEM_INFO = "GetSystemInfo" # SET_DEVICE_NAME_ICON_BY_MAC = 'SetDeviceNameIconByMAC' # SET_DEVICE_NAME = 'SetNetgearDeviceName' diff --git a/pynetgear/router.py b/pynetgear/router.py index fea60da..7ee3c69 100644 --- a/pynetgear/router.py +++ b/pynetgear/router.py @@ -750,6 +750,20 @@ def update_new_firmware(self): {"YesOrNo": "1"}, ) + def get_system_info(self): + """ + Get system Info and return dict like: + - NewCPUUtilization + - NewPhysicalMemory + - NewMemoryUtilization + - NewPhysicalFlash + - NewAvailableFlash + """ + return self._get( + c.SERVICE_DEVICE_INFO, + c.GET_SYSTEM_INFO, + ) + def check_ethernet_link(self): """ Check the ethernet link status and return dict like: diff --git a/setup.py b/setup.py index 607f927..7893ea2 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from codecs import open REPO_URL = "http://github.com/MatMaul/pynetgear" -VERSION = "0.10.2" +VERSION = "0.10.3" with open("requirements.txt") as f: required = f.read().splitlines()