create dvs in network folder
Open
Nobody has claimed this yet.
question
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 763
- PR merge metrics
- No merged PRs in 30d
Description
Hello Team,
i am using pyvmomi to create dvs and i am able to create it under data-center, but i have separate network folder is available under same data center and i wanted to create dvs inside this network folder only , can someone tell me how we can achieve this using pymomi
def state_create_vds(si, module):
datacenter = find_datacenter_by_name(si, module.params['datacenter_name'])
network_folder = datacenter.networkFolder
vds_create_spec = _create_vds_spec(si, False, module)
try:
if not module.check_mode:
task = network_folder.CreateDVS_Task(vds_create_spec)
changed, vds_created = wait_for_task(task)
module.exit_json(changed=changed, result=vds_created.name)
except Exception, e:
module.fail_json(msg=str(e))
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 state_create_vds and the datacenter.networkFolder/CreateDVS_Task calls shown in the issue. Check the pyvmomi API behavior for creating a distributed virtual switch in a nested network folder, then define whether the result should be a code change or usage guidance and how placement would be verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100