vmware / vmware/pyvmomi

Issue attempting to filter a dvs view by config.lacpGroupConfig

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

Nobody has claimed this yet.

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

Description

I'm interested in examining the LAG/LACP configuration of a DVS via a view. I'm using the vconnector.core.get_distributed_vswitch_view() to do this currently and it works if I use config as an argument to path_set, but that is a bit broad for my purposes.

dvs_view = connection.get_distributed_vswitch_view()
sets = ['config',
      # 'config.lacpGroupConfig',  Unfortunately not available.]
dvswitches = connection.collect_properties(
    view_ref=dvs_view,
    obj_type=vim.DistributedVirtualSwitch,
    path_set=sets)

I'd like to filter by config.lacpGroupConfig but that does not appear to be a valid property to filter on in the collect_properties call.

(ERROR) - (vmodl.query.InvalidProperty) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   msg = '',
   faultCause = <unset>,
   faultMessage = (vmodl.LocalizableMessage) [],
   name = u'config.lacpGroupConfig'
}

I'm curious, if this is due to VmwareDistributedVirtualSwitch object extending the DistributedVirtualSwitch, and that the former is not instantiated until after connection.collect_properties is called, or something to that affect?

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 with connection.get_distributed_vswitch_view() and connection.collect_properties(), focusing on path_set entries for DistributedVirtualSwitch. Compare the working config path with config.lacpGroupConfig and inspect the reported vmodl.query.InvalidProperty error. Done means determining whether the property is supported for this view and documenting the resulting behavior or limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.