vmware / vmware/pyvmomi

pyvmomi only returns and accepts URL encoded parameters

Open
#692 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs verification
Dominant language
Python
Stars
2.3k
Forks
763
PR merge metrics
No merged PRs in 30d

Description

When using a mixture of PowerCLI and pyvmomi, it's no longer possible to treat code the same because of the following difference in behavior of PowerCLI 10.x:

Example

PowerCLI (version < 10.x) Get-VDPortrgroup cmdlet returns a / as %2f

Now:

  • Portgroup in vCenter UI: 10.1.1.0/24 (App)
  • PowerCLI 10.x returns 10.1.1.0/24 (App)
  • PowerCLI 6.3.x returns 10.1.1.0%2f24 (App)
  • pyvmomi 6.7/ansible 2.4 seems to only honor the %2f

Error from pyvmomi/ansible:
Network '10.1.1.0/24 (App)' does not exists

Possible solution/workarounds

  • Change default behavior of pyvmomi to match PowerCLI 10.x behavior (return and accept non URL-encoded values such as / instead of %2f)
  • Allow override of URL encoding requirement to instead use non-URL encoded

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the URL-encoding difference described between PowerCLI, pyvmomi, and Ansible, using the network name 10.1.1.0/24 (App). Trace where pyvmomi returns and validates network parameters, then determine whether both encoded and non-encoded values should be accepted. Done means the reported network lookup works with the PowerCLI 10.x form without breaking existing encoded values.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.