Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error if run job task #48

Open
alvic2000 opened this issue Mar 14, 2023 · 1 comment
Open

Error if run job task #48

alvic2000 opened this issue Mar 14, 2023 · 1 comment

Comments

@alvic2000
Copy link

Environment

  • Python version: 3.9.16
  • Nautobot version: 1.5.11
  • nautobot-ssot-vsphere version: 0.1.4

Expected Behavior

Job run without errors

Observed Behavior

Job finished with error
An exception occurred: KeyError: 'value'

Traceback (most recent call last):
File "/opt/nautobot/.local/lib/python3.9/site-packages/nautobot_ssot/jobs/base.py", line 332, in run
self.sync_data()
File "/opt/nautobot/.local/lib/python3.9/site-packages/nautobot_ssot_vsphere/jobs.py", line 146, in sync_data
vsphere_source.load()
File "/opt/nautobot/.local/lib/python3.9/site-packages/nautobot_ssot_vsphere/diffsync/adapters/adapter_vsphere.py", line 227, in load
self.load_data()
File "/opt/nautobot/.local/lib/python3.9/site-packages/nautobot_ssot_vsphere/diffsync/adapters/adapter_vsphere.py", line 197, in load_data
self.load_virtualmachines(cluster, diffsync_cluster)
File "/opt/nautobot/.local/lib/python3.9/site-packages/nautobot_ssot_vsphere/diffsync/adapters/adapter_vsphere.py", line 69, in load_virtualmachines
self.load_vm_interfaces(
File "/opt/nautobot/.local/lib/python3.9/site-packages/nautobot_ssot_vsphere/diffsync/adapters/adapter_vsphere.py", line 158, in load_vm_interfaces
ipv4_addresses, ipv6_addresses = self.load_ip_addresses(
File "/opt/nautobot/.local/lib/python3.9/site-packages/nautobot_ssot_vsphere/diffsync/adapters/adapter_vsphere.py", line 82, in load_ip_addresses
for interface in vsphere_vm_interfaces.json()["value"]:
KeyError: 'value'
image

Step before failed
image

Steps to Reproduce

  1. Fresh nautobot installation.
  2. Install nautobot-ssot-vsphere python package
  3. Run job
    Jobs - Jobs - SSoT - Virtualization ([VMWare vSphere ⟹ Nautobot]) - Run
    image
@h4ndzdatm0ld
Copy link
Owner

Hey, sorry completely missed this. Seems like an easy fix. Happy to accept a PR to handle this more gracefully.

for interface in vsphere_vm_interfaces.json()["value"]:
KeyError: 'value'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants