ListProcessesInGuest not accepting single pid argument
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 763
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm currently trying to grab some info about a process I started in a VM.
I start the command with StartProgramInGuest() and get a long back with the pid.
When I now try to get info about that pid, I get an error:
File "/usr/local/lib/python2.7/dist-packages/pyvmomi-5.5.0-py2.7.egg/pyVmomi/VmomiSupport.py", line 553, in <lambda>
File "/usr/local/lib/python2.7/dist-packages/pyvmomi-5.5.0-py2.7.egg/pyVmomi/VmomiSupport.py", line 361, in _InvokeMethod
File "/usr/local/lib/python2.7/dist-packages/pyvmomi-5.5.0-py2.7.egg/pyVmomi/VmomiSupport.py", line 917, in CheckField
TypeError: 'long' object is not iterable
I use it like this:
proc = self.content.guestOperationsManager.processManager.ListProcessesInGuest(vm=vm, auth=creds, pids=pid)
If I leave out the pids I get an object with all the processes running.
Currently trying to understand if this is a bug in my code or in pyvmomi.
But looking at the specs here, https://github.com/vmware/pyvmomi/blob/master/docs/vim/vm/guest/ProcessManager.rst#id5, I am using the correct arguments.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ListProcessesInGuest and the argument validation shown in pyVmomi/VmomiSupport.py, then compare the pids parameter with docs/vim/vm/guest/ProcessManager.rst. Reproduce the call using a single pid and verify the expected behavior against a collection of pids. Done means the documented single-pid call no longer raises the iterable TypeError, with regression coverage if the repository provides tests for this API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100