1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

7376 csv tags (#10802)

* 7376 add tags to CSV import

* 7376 change help text

* 7376 validate tags

* 7376 fix tests

* 7376 add tag validation tests

* Introduce CSVModelMultipleChoiceField for CSV import tag assignment

* Clean up CSVImportTestCase

Co-authored-by: jeremystretch <jstretch@ns1.com>
This commit is contained in:
Arthur Hanson
2022-11-04 07:50:43 -07:00
committed by GitHub
parent bc6b5bc4be
commit cdeb65e2fb
9 changed files with 165 additions and 61 deletions

View File

@@ -26,7 +26,7 @@ class TenantGroupCSVForm(NetBoxModelCSVForm):
class Meta:
model = TenantGroup
fields = ('name', 'slug', 'parent', 'description')
fields = ('name', 'slug', 'parent', 'description', 'tags')
class TenantCSVForm(NetBoxModelCSVForm):
@@ -40,7 +40,7 @@ class TenantCSVForm(NetBoxModelCSVForm):
class Meta:
model = Tenant
fields = ('name', 'slug', 'group', 'description', 'comments')
fields = ('name', 'slug', 'group', 'description', 'comments', 'tags')
#
@@ -58,7 +58,7 @@ class ContactGroupCSVForm(NetBoxModelCSVForm):
class Meta:
model = ContactGroup
fields = ('name', 'slug', 'parent', 'description')
fields = ('name', 'slug', 'parent', 'description', 'tags')
class ContactRoleCSVForm(NetBoxModelCSVForm):
@@ -79,4 +79,4 @@ class ContactCSVForm(NetBoxModelCSVForm):
class Meta:
model = Contact
fields = ('name', 'title', 'phone', 'email', 'address', 'link', 'group', 'description', 'comments')
fields = ('name', 'title', 'phone', 'email', 'address', 'link', 'group', 'description', 'comments', 'tags')