From: Lukas Wagner <l.wagner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Max Carrara <m.carrara@proxmox.com>
Subject: Re: [pve-devel] [PATCH v1 pve-esxi-import-tools 0/5] Improve listvms.py
Date: Wed, 20 Mar 2024 10:42:08 +0100 [thread overview]
Message-ID: <5cf1224f-5baa-4177-ae04-fe33cead8562@proxmox.com> (raw)
In-Reply-To: <20240319153250.629369-1-m.carrara@proxmox.com>
On 2024-03-19 16:32, Max Carrara wrote:
> This series adds a bunch of improvements for listvms.py, most notably
> better typing (and thus better linting support) as well as parsing
> arguments via the Python STL's `argparse` [0]. For more information,
> please see the individual patches.
>
> All patches were additionally tested in order to ensure that the JSON
> output on successful invocations remains unchanged. This was done as
> follows:
>
> # on master
> ./listvms.py $ARGS | jq > ref.json
> # after each patch
> ./listvms.py $ARGS | jq > output.json
> diff -u ref.json output.json
>
> Furthermore, I built the repo's package and installed it on my local
> system, and re-added my virtual ESXi host in the storage settings. The
> plugin worked as expected - all my VMs on the ESXi hosts showed up and
> were able to be live-imported.
>
Looks good to me.
Since this is type-hinted Python code, maybe the following `mypy.ini` would make sense?
```
[mypy]
[mypy-pyVmomi]
ignore_missing_imports = True
[mypy-pyVim.*]
ignore_missing_imports = True
```
Otherwise `mypy` complains about missing type stubs for those two modules :)
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
--
- Lukas
next prev parent reply other threads:[~2024-03-20 9:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-19 15:32 Max Carrara
2024-03-19 15:32 ` [pve-devel] [PATCH v1 pve-esxi-import-tools 1/5] listvms: remove unused import and variable Max Carrara
2024-03-19 15:32 ` [pve-devel] [PATCH v1 pve-esxi-import-tools 2/5] listvms: reorder imports Max Carrara
2024-03-19 15:32 ` [pve-devel] [PATCH v1 pve-esxi-import-tools 3/5] listvms: improve typing and add dataclasses to represent dicts Max Carrara
2024-03-20 9:38 ` Lukas Wagner
2024-03-20 10:08 ` Max Carrara
2024-03-19 15:32 ` [pve-devel] [PATCH v1 pve-esxi-import-tools 4/5] listvms: add arg parser, context manager for connections, fetch helper Max Carrara
2024-03-20 9:39 ` Lukas Wagner
2024-03-20 10:08 ` Max Carrara
2024-03-20 12:45 ` Wolfgang Bumiller
2024-03-20 17:00 ` Max Carrara
2024-03-19 15:32 ` [pve-devel] [PATCH v1 pve-esxi-import-tools 5/5] listvms: run formatter Max Carrara
2024-03-20 9:42 ` Lukas Wagner [this message]
2024-03-20 10:08 ` [pve-devel] [PATCH v1 pve-esxi-import-tools 0/5] Improve listvms.py Max Carrara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5cf1224f-5baa-4177-ae04-fe33cead8562@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=m.carrara@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox