Skip to content

Commit

Permalink
(NEXMANAGE-744) Remove psutil from dispatcher; only use dmidecode in …
Browse files Browse the repository at this point in the history
…telemetry (#554)
  • Loading branch information
gblewis1 authored Oct 1, 2024
1 parent 83ee9a2 commit af113a8
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion inbm-lib/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
license='Intel Proprietary',
packages=['inbm_lib', 'inbm_common_lib'],
include_package_data=True,
install_requires=['paho-mqtt==1.6.0', 'types-paho-mqtt==1.6.0.7', 'dmidecode==0.9.0', 'xmlschema==1.5.3', 'defusedxml==0.7.1', 'url-normalize==1.4.3', 'snoop==0.4.3', 'types-setuptools==71.1.0.20240813'],
install_requires=['paho-mqtt==1.6.0', 'types-paho-mqtt==1.6.0.7', 'xmlschema==1.5.3', 'defusedxml==0.7.1', 'url-normalize==1.4.3', 'snoop==0.4.3', 'types-setuptools==71.1.0.20240813'],
test_suite='pytest',
tests_require=test_deps,
extras_require=extras,
Expand Down
4 changes: 3 additions & 1 deletion inbm/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Updated 'cryptography' Python library in dispatcher to 43.0.1, fixing GHSA-h4gh-qq45-vh27.

### Changed
- Removed all references to `future` library as we do not use Python 2
- (NEXMANAGE-744) Remove `psutil` in favor if `shutil.disk_usage` to save space
- (NEXMANAGE-744) Don't pull in `dmidecode` in `inbm-lib` -- pull in only in `telemetry`
- (NEXMANAGE-744) Removed all references to `future` library as we do not use Python 2

## 4.2.5 - 2024-09-04
### Fixed
Expand Down
4 changes: 2 additions & 2 deletions inbm/dispatcher-agent/dispatcher/packagemanager/local_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import shutil
from typing import List

import psutil
from inbm_common_lib.utility import get_canonical_representation_of_path
from inbm_common_lib.utility import remove_file
from requests import Response
Expand Down Expand Up @@ -123,7 +122,8 @@ def get_free_space(self) -> int:
@return: free space on filesystem backing the repo
"""
return psutil.disk_usage(self.__directory)[2]
stat = os.statvfs(self.__directory)
return stat.f_frsize * stat.f_bavail

def delete_all(self) -> None:
"""Remove every object from the repo. For DirectoryRepo, remove all
Expand Down
2 changes: 0 additions & 2 deletions inbm/dispatcher-agent/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#Production

psutil==5.9.5
types-psutil==5.9.5.17
cryptography==43.0.1
jsonschema==4.20.0
types-jsonschema==4.20.0.0
Expand Down
3 changes: 2 additions & 1 deletion inbm/telemetry-agent/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ psutil==5.9.5
types-psutil==5.9.5.17
shortuuid==1.0.1
pyinstaller==5.13.1
setuptools==70.0.0
setuptools==70.0.0
dmidecode==0.9.0
2 changes: 1 addition & 1 deletion inbm/telemetry-agent/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
packages=find_packages(exclude=('tests', 'doc')),
include_package_data=True,
install_requires=['pytest', 'pytest-cov', 'pytest-mock',
'packaging', 'paho-mqtt', 'psutil'],
'packaging', 'paho-mqtt', 'psutil', 'dmidecode'],
test_suite='pytest',
tests_require=['pytest', 'pytest-cov', 'pytest-mock']
)

0 comments on commit af113a8

Please sign in to comment.