Set tags on ipaddress over netboxshell #9531
-
Hello, I'am trying to set a tag to an ipaddress over the netboxshell. But I don't get it. I checked all methods below inside the Netbox UI but none of them are working.
10.10.10.10/24
['DoesNotExist', 'Meta', 'MultipleObjectsReturned', 'class', 'delattr', 'dict', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getstate', 'gt', 'hash', 'init', 'init_subclass', 'le', 'lt', 'module', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'setattr', 'setstate', 'sizeof', 'str', 'subclasshook', 'weakref', '_check_column_name_clashes', '_check_constraints', '_check_default_pk', '_check_field_name_clashes', '_check_fields', '_check_id_field', '_check_index_together', '_check_indexes', '_check_local_fields', '_check_long_column_names', '_check_m2m_through_same_relationship', '_check_managers', '_check_model', '_check_model_name_db_lookup_clashes', '_check_ordering', '_check_property_name_related_field_accessor_clashes', '_check_single_primary_key', '_check_swappable', '_check_unique_together', '_do_insert', '_do_update', '_get_FIELD_display', '_get_expr_references', '_get_next_or_previous_by_FIELD', '_get_next_or_previous_in_order', '_get_pk_val',
ipam.IPAddress.None
[72]
72
Check Me!
<Tag: Check Me!> I tried it with the pynetboxapi and it works. ip_obj = nb.ipam.ip_addresses.get(address='1010.10.10/24') Do I miss something? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Tag assignments are a many-to-many relationship, wherein a separate table is used to track each tag assignment to an object, so these work a bit differently from concrete model fields. To assign tags, use the
You can find complete documentation of the available methods in the django-taggit docs. Hope that helps! |
Beta Was this translation helpful? Give feedback.
Tag assignments are a many-to-many relationship, wherein a separate table is used to track each tag assignment to an object, so these work a bit differently from concrete model fields. To assign tags, use the
add()
orset()
method on the manager:You can find complete documentation of the available methods in the django-taggit docs. Hope that helps!