vmware / vmware/pyvmomi

Possible to Get Custom Attribute?

Open
#792 7 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 can get customValue from a VM when pulling its information. I organize my VMs by a custom attributes. For example, 'owner'.

Is there anyway to see all custom attributes with its name? I notice its only be an index id.

In this case, 44 = "owner"

(vim.CustomFieldsManager.Value) [
(vim.CustomFieldsManager.StringValue) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
key = 44,
value = 'JohnDoe'
}

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 the vim.CustomFieldsManager.Value example in the issue and trace the pyvmomi bindings for CustomFieldsManager. Check the VMware vSphere API documentation for how numeric custom-field keys map to names; done means documenting or exposing a supported way to retrieve those names, with a focused test if the bindings require a change.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.