avast / avast/labmanager-unit-vsphere
Key error when accessing vSphere folder
- Dominant language
- Python
- Stars
- 3
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
```
Traceback (most recent call last):
File "/app_python/labmanager-unit-vsphere/vcenter/vcenter.py", line 947, in __collect_system_folders
raise e
File "/app_python/labmanager-unit-vsphere/vcenter/vcenter.py", line 915, in __collect_system_folders
root_folder_moref = self.__get_system_root_folder()
File "/app_python/labmanager-unit-vsphere/vcenter/vcenter.py", line 823, in __get_system_root_folder
folder = self.vm_folders[settings.app['vsphere']['folder']]
KeyError: '/vm/qa/your_cluster'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app_python/labmanager-unit-vsphere/vcenter/vcenter.py", line 308, in deploy
self.vm_folders.create_folder(settings.app['vsphere']['folder']),
File "/app_python/labmanager-unit-vsphere/vcenter/vcenter.py", line 881, in create_folder
self.__collect_system_folders()
File "/app_python/labmanager-unit-vsphere/vcenter/vcenter.py", line 949, in __collect_system_folders
objView.DestroyView()
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in vcenter/vcenter.py at __get_system_root_folder (line 823), then follow __collect_system_folders and create_folder around lines 881-949. Reproduce deployment with the configured /vm/qa/your_cluster path and inspect why the key is absent; done means folder access no longer raises this KeyError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100