mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-21 21:02:23 -06:00
Closes #15238: Include description field in brief mode
This commit is contained in:
@@ -39,7 +39,7 @@ class TunnelGroupSerializer(NetBoxModelSerializer):
|
||||
'id', 'url', 'display', 'name', 'slug', 'description', 'tags', 'custom_fields', 'created', 'last_updated',
|
||||
'tunnel_count',
|
||||
]
|
||||
brief_fields = ('id', 'url', 'display', 'name', 'slug', 'tunnel_count')
|
||||
brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'tunnel_count')
|
||||
|
||||
|
||||
class TunnelSerializer(NetBoxModelSerializer):
|
||||
@@ -74,7 +74,7 @@ class TunnelSerializer(NetBoxModelSerializer):
|
||||
'id', 'url', 'display', 'name', 'status', 'group', 'encapsulation', 'ipsec_profile', 'tenant', 'tunnel_id',
|
||||
'description', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', 'terminations_count',
|
||||
)
|
||||
brief_fields = ('id', 'url', 'display', 'name')
|
||||
brief_fields = ('id', 'url', 'display', 'name', 'description')
|
||||
|
||||
|
||||
class TunnelTerminationSerializer(NetBoxModelSerializer):
|
||||
@@ -135,7 +135,7 @@ class IKEProposalSerializer(NetBoxModelSerializer):
|
||||
'authentication_algorithm', 'group', 'sa_lifetime', 'comments', 'tags', 'custom_fields', 'created',
|
||||
'last_updated',
|
||||
)
|
||||
brief_fields = ('id', 'url', 'display', 'name')
|
||||
brief_fields = ('id', 'url', 'display', 'name', 'description')
|
||||
|
||||
|
||||
class IKEPolicySerializer(NetBoxModelSerializer):
|
||||
@@ -161,7 +161,7 @@ class IKEPolicySerializer(NetBoxModelSerializer):
|
||||
'id', 'url', 'display', 'name', 'description', 'version', 'mode', 'proposals', 'preshared_key', 'comments',
|
||||
'tags', 'custom_fields', 'created', 'last_updated',
|
||||
)
|
||||
brief_fields = ('id', 'url', 'display', 'name')
|
||||
brief_fields = ('id', 'url', 'display', 'name', 'description')
|
||||
|
||||
|
||||
class IPSecProposalSerializer(NetBoxModelSerializer):
|
||||
@@ -181,7 +181,7 @@ class IPSecProposalSerializer(NetBoxModelSerializer):
|
||||
'id', 'url', 'display', 'name', 'description', 'encryption_algorithm', 'authentication_algorithm',
|
||||
'sa_lifetime_seconds', 'sa_lifetime_data', 'comments', 'tags', 'custom_fields', 'created', 'last_updated',
|
||||
)
|
||||
brief_fields = ('id', 'url', 'display', 'name')
|
||||
brief_fields = ('id', 'url', 'display', 'name', 'description')
|
||||
|
||||
|
||||
class IPSecPolicySerializer(NetBoxModelSerializer):
|
||||
@@ -205,7 +205,7 @@ class IPSecPolicySerializer(NetBoxModelSerializer):
|
||||
'id', 'url', 'display', 'name', 'description', 'proposals', 'pfs_group', 'comments', 'tags',
|
||||
'custom_fields', 'created', 'last_updated',
|
||||
)
|
||||
brief_fields = ('id', 'url', 'display', 'name')
|
||||
brief_fields = ('id', 'url', 'display', 'name', 'description')
|
||||
|
||||
|
||||
class IPSecProfileSerializer(NetBoxModelSerializer):
|
||||
@@ -224,7 +224,7 @@ class IPSecProfileSerializer(NetBoxModelSerializer):
|
||||
'id', 'url', 'display', 'name', 'description', 'mode', 'ike_policy', 'ipsec_policy', 'comments', 'tags',
|
||||
'custom_fields', 'created', 'last_updated',
|
||||
)
|
||||
brief_fields = ('id', 'url', 'display', 'name')
|
||||
brief_fields = ('id', 'url', 'display', 'name', 'description')
|
||||
|
||||
|
||||
#
|
||||
@@ -254,7 +254,7 @@ class L2VPNSerializer(NetBoxModelSerializer):
|
||||
'id', 'url', 'display', 'identifier', 'name', 'slug', 'type', 'import_targets', 'export_targets',
|
||||
'description', 'comments', 'tenant', 'tags', 'custom_fields', 'created', 'last_updated'
|
||||
]
|
||||
brief_fields = ('id', 'url', 'display', 'identifier', 'name', 'slug', 'type')
|
||||
brief_fields = ('id', 'url', 'display', 'identifier', 'name', 'slug', 'type', 'description')
|
||||
|
||||
|
||||
class L2VPNTerminationSerializer(NetBoxModelSerializer):
|
||||
|
||||
@@ -19,7 +19,7 @@ class AppTest(APITestCase):
|
||||
|
||||
class TunnelGroupTest(APIViewTestCases.APIViewTestCase):
|
||||
model = TunnelGroup
|
||||
brief_fields = ['display', 'id', 'name', 'slug', 'tunnel_count', 'url']
|
||||
brief_fields = ['description', 'display', 'id', 'name', 'slug', 'tunnel_count', 'url']
|
||||
create_data = (
|
||||
{
|
||||
'name': 'Tunnel Group 4',
|
||||
@@ -51,7 +51,7 @@ class TunnelGroupTest(APIViewTestCases.APIViewTestCase):
|
||||
|
||||
class TunnelTest(APIViewTestCases.APIViewTestCase):
|
||||
model = Tunnel
|
||||
brief_fields = ['display', 'id', 'name', 'url']
|
||||
brief_fields = ['description', 'display', 'id', 'name', 'url']
|
||||
bulk_update_data = {
|
||||
'status': TunnelStatusChoices.STATUS_PLANNED,
|
||||
'encapsulation': TunnelEncapsulationChoices.ENCAP_GRE,
|
||||
@@ -179,7 +179,7 @@ class TunnelTerminationTest(APIViewTestCases.APIViewTestCase):
|
||||
|
||||
class IKEProposalTest(APIViewTestCases.APIViewTestCase):
|
||||
model = IKEProposal
|
||||
brief_fields = ['display', 'id', 'name', 'url']
|
||||
brief_fields = ['description', 'display', 'id', 'name', 'url']
|
||||
bulk_update_data = {
|
||||
'authentication_method': AuthenticationMethodChoices.CERTIFICATES,
|
||||
'encryption_algorithm': EncryptionAlgorithmChoices.ENCRYPTION_AES192_CBC,
|
||||
@@ -243,7 +243,7 @@ class IKEProposalTest(APIViewTestCases.APIViewTestCase):
|
||||
|
||||
class IKEPolicyTest(APIViewTestCases.APIViewTestCase):
|
||||
model = IKEPolicy
|
||||
brief_fields = ['display', 'id', 'name', 'url']
|
||||
brief_fields = ['description', 'display', 'id', 'name', 'url']
|
||||
bulk_update_data = {
|
||||
'version': IKEVersionChoices.VERSION_1,
|
||||
'mode': IKEModeChoices.AGGRESSIVE,
|
||||
@@ -317,7 +317,7 @@ class IKEPolicyTest(APIViewTestCases.APIViewTestCase):
|
||||
|
||||
class IPSecProposalTest(APIViewTestCases.APIViewTestCase):
|
||||
model = IPSecProposal
|
||||
brief_fields = ['display', 'id', 'name', 'url']
|
||||
brief_fields = ['description', 'display', 'id', 'name', 'url']
|
||||
bulk_update_data = {
|
||||
'encryption_algorithm': EncryptionAlgorithmChoices.ENCRYPTION_AES192_CBC,
|
||||
'authentication_algorithm': AuthenticationAlgorithmChoices.AUTH_HMAC_MD5,
|
||||
@@ -367,7 +367,7 @@ class IPSecProposalTest(APIViewTestCases.APIViewTestCase):
|
||||
|
||||
class IPSecPolicyTest(APIViewTestCases.APIViewTestCase):
|
||||
model = IPSecPolicy
|
||||
brief_fields = ['display', 'id', 'name', 'url']
|
||||
brief_fields = ['description', 'display', 'id', 'name', 'url']
|
||||
bulk_update_data = {
|
||||
'pfs_group': DHGroupChoices.GROUP_5,
|
||||
'description': 'New description',
|
||||
@@ -429,7 +429,7 @@ class IPSecPolicyTest(APIViewTestCases.APIViewTestCase):
|
||||
|
||||
class IPSecProfileTest(APIViewTestCases.APIViewTestCase):
|
||||
model = IPSecProfile
|
||||
brief_fields = ['display', 'id', 'name', 'url']
|
||||
brief_fields = ['description', 'display', 'id', 'name', 'url']
|
||||
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
@@ -519,7 +519,7 @@ class IPSecProfileTest(APIViewTestCases.APIViewTestCase):
|
||||
|
||||
class L2VPNTest(APIViewTestCases.APIViewTestCase):
|
||||
model = L2VPN
|
||||
brief_fields = ['display', 'id', 'identifier', 'name', 'slug', 'type', 'url']
|
||||
brief_fields = ['description', 'display', 'id', 'identifier', 'name', 'slug', 'type', 'url']
|
||||
create_data = [
|
||||
{
|
||||
'name': 'L2VPN 4',
|
||||
|
||||
Reference in New Issue
Block a user