[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 21/72] scripts/qemu-ga-client: add module docstring
From: |
John Snow |
Subject: |
[PATCH v2 21/72] scripts/qemu-ga-client: add module docstring |
Date: |
Tue, 3 Nov 2020 19:35:11 -0500 |
Turn that nice usage comment into a docstring.
Signed-off-by: John Snow <jsnow@redhat.com>
---
scripts/qmp/qemu-ga-client | 65 +++++++++++++++++++-------------------
1 file changed, 33 insertions(+), 32 deletions(-)
diff --git a/scripts/qmp/qemu-ga-client b/scripts/qmp/qemu-ga-client
index 73d262e8beb4..1061d2eb1437 100755
--- a/scripts/qmp/qemu-ga-client
+++ b/scripts/qmp/qemu-ga-client
@@ -1,41 +1,42 @@
#!/usr/bin/env python3
-# QEMU Guest Agent Client
-#
# Copyright (C) 2012 Ryota Ozaki <ozaki.ryota@gmail.com>
#
# This work is licensed under the terms of the GNU GPL, version 2. See
# the COPYING file in the top-level directory.
-#
-# Usage:
-#
-# Start QEMU with:
-#
-# # qemu [...] -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 \
-# -device virtio-serial \
-# -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0
-#
-# Run the script:
-#
-# $ qemu-ga-client --address=/tmp/qga.sock <command> [args...]
-#
-# or
-#
-# $ export QGA_CLIENT_ADDRESS=/tmp/qga.sock
-# $ qemu-ga-client <command> [args...]
-#
-# For example:
-#
-# $ qemu-ga-client cat /etc/resolv.conf
-# # Generated by NetworkManager
-# nameserver 10.0.2.3
-# $ qemu-ga-client fsfreeze status
-# thawed
-# $ qemu-ga-client fsfreeze freeze
-# 2 filesystems frozen
-#
-# See also: https://wiki.qemu.org/Features/QAPI/GuestAgent
-#
+
+"""
+QEMU Guest Agent Client
+
+Usage:
+
+Start QEMU with:
+
+# qemu [...] -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 \
+ -device virtio-serial \
+ -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0
+
+Run the script:
+
+$ qemu-ga-client --address=/tmp/qga.sock <command> [args...]
+
+or
+
+$ export QGA_CLIENT_ADDRESS=/tmp/qga.sock
+$ qemu-ga-client <command> [args...]
+
+For example:
+
+$ qemu-ga-client cat /etc/resolv.conf
+# Generated by NetworkManager
+nameserver 10.0.2.3
+$ qemu-ga-client fsfreeze status
+thawed
+$ qemu-ga-client fsfreeze freeze
+2 filesystems frozen
+
+See also: https://wiki.qemu.org/Features/QAPI/GuestAgent
+"""
import argparse
import base64
--
2.26.2
- [PATCH v2 10/72] scripts/qom-fuse: use QOMCommand.qom_list(), (continued)
- [PATCH v2 10/72] scripts/qom-fuse: use QOMCommand.qom_list(), John Snow, 2020/11/03
- [PATCH v2 13/72] scripts/qom-fuse: move to python/qemu/qmp/qom_fuse.py, John Snow, 2020/11/03
- [PATCH v2 15/72] python: add fuse command to 'qom' tools, John Snow, 2020/11/03
- [PATCH v2 18/72] scripts/qemu-ga-client: apply (most) flake8 rules, John Snow, 2020/11/03
- [PATCH v2 20/72] scripts/qemu-ga-client: replace deprecated optparse with argparse, John Snow, 2020/11/03
- [PATCH v2 19/72] scripts/qemu-ga-client: Fix exception handling, John Snow, 2020/11/03
- [PATCH v2 26/72] python/qemu-ga-client: add entry point, John Snow, 2020/11/03
- [PATCH v2 29/72] scripts/qmp-shell: Apply flake8 rules, John Snow, 2020/11/03
- [PATCH v2 23/72] python/qmp: Correct type of QMPReturnValue, John Snow, 2020/11/03
- [PATCH v2 28/72] scripts/qmp-shell: apply isort rules, John Snow, 2020/11/03
- [PATCH v2 21/72] scripts/qemu-ga-client: add module docstring,
John Snow <=
- [PATCH v2 27/72] scripts/qemu-ga-client: Add forwarder stub, John Snow, 2020/11/03
- [PATCH v2 25/72] scripts/qemu-ga-client: move to python/qemu/qmp/qemu_ga_client.py, John Snow, 2020/11/03
- [PATCH v2 17/72] scripts/qemu-ga-client: apply isort rules, John Snow, 2020/11/03
- [PATCH v2 14/72] scripts/qom-fuse: add redirection shim to python/qemu/qmp/qom-fuse.py, John Snow, 2020/11/03
- [PATCH v2 22/72] scripts/qemu-ga-client: apply (most) pylint rules, John Snow, 2020/11/03
- [PATCH v2 31/72] scripts/qmp-shell: fix exception handling, John Snow, 2020/11/03
- [PATCH v2 32/72] scripts/qmp-shell: fix connect method signature, John Snow, 2020/11/03
- [PATCH v2 30/72] scripts/qmp-shell: fix show_banner signature, John Snow, 2020/11/03
- [PATCH v2 35/72] scripts/qmp-shell: Use python3-style super(), John Snow, 2020/11/03
- [PATCH v2 34/72] scripts/qmp-shell: use @classmethod where appropriate, John Snow, 2020/11/03