-
Notifications
You must be signed in to change notification settings - Fork 32
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
Improper list format #65
Comments
Hi, thanks for the report. I'm not entirely certain I understand the described issue though. What are |
This does look like pynautobot. And the list is a list of objects. There is a string representation of these. |
@JL95741 does this make sense? |
@JL95741 this is normal, expected behavior. Your So while it looks like If you wanted to get the list of names as strings, you could do something like this:
@nautobot/pynautobot, perhaps we can take this as feedback to change the |
Makes sense to make the change in fact. I'll add that to the next milestone. Would that be a breaking change? I don't think it would @lampwins |
I would not consider modification of a |
Closing for #67 |
Environment
Steps to Reproduce
data_list contains details on the device via webhook including hostname.
nautobot = self.nautobot_obj
device_hostname = data_list.get('nethostname')
devices = nautobot.dcim.devices
device_obj = devices.filter(name=device_hostname)
interface_list = interfaces.filter(device=device_hostname)
2.run the following in python:
print(type(interface_list))
print(interface_list)
Expected Behavior
<class 'list'>
['Ethernet1/1', 'Ethernet1/2']
Observed Behavior
<class 'list'>
[Ethernet1/1, Ethernet1/2]
The text was updated successfully, but these errors were encountered: