Skip to content

Cannot import created CustomObject #150

@FabryUr

Description

@FabryUr

Plugin Version

0.1.0

NetBox Version

4.3.4

Python Version

3.10.12

Steps to Reproduce

Create a custom object with name field parameter.
Have a script/plugin where you import data models, like Device, Interface and so on.
write this import line: from netbox_custom_objects.models import CustomObject
and this code:

manholes = CustomObject.objects.all()
for m in manholes:
        print(m.id)
        print(m.name)

Expected Behavior

It should be able to import the created custom object from the DB as it is possible with Device, Interface and so on.
Or there should be some guidelines how to import them.
Now I can get every custom object, but I can only read out the id of it, no other information regarding the objects.

Observed Behavior

Image I was trying many code lines, and for now it looks like only API call works, which is not too good for plugin development. The reason why I need import in a plugin, because I have a plugin for device map, and we created some custom objects that has GPS coordinate, and we would like to see them on the map.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions