Skip to content

CP-49148: Convert rrdd-example.py to python3 #5900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

stephenchengCloud
Copy link
Contributor

Since this is only an example file, no xenrt test.
This file is not installed on dom0, should do no harm.

  • pylint and pytype check passed
  • Manually tested the main logic works in python3:
Python 3.11.0 (main, Jun 21 2024, 03:47:37) [GCC 13.3.1 20240522 (Red Hat 13.3.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> cmd = "free -k | grep Mem | awk '{print $2, $3, $4}'"
>>> import os
>>> vs = os.popen(cmd).read().strip().split()
>>> vs
['16336416', '4351784', '1958616']

Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
@psafont psafont merged commit 355b55a into xapi-project:feature/py3 Jul 31, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants