Commit Graph

760 Commits

Author SHA1 Message Date
Sander Steffann
2dc001b416 Update versions.py 2020-02-27 18:26:15 +01:00
Sander Steffann
0f855b448c Automatically check for new versions 2020-02-27 18:26:15 +01:00
Jeremy Stretch
228d1f2d23 Fixes #4282: Fix label on export button for device types 2020-02-26 16:49:39 -05:00
John Anderson
cc22228cdd Merge branch 'develop' into 4121-filter-lookup-expressions 2020-02-26 12:05:27 -05:00
John Anderson
9a49d23317 refactor lookup map logic 2020-02-25 15:16:27 -05:00
Saria Hajjar
20d32de425 Fixes #4227: Omit internal fields from the change log data 2020-02-25 14:48:11 +00:00
John Anderson
33f6bd828e added docs and more tests 2020-02-24 15:03:07 -05:00
Jeremy Stretch
ce26a2e27f Fixes #4222: Escape double quotes on encapsulated values during CSV export 2020-02-24 13:29:00 -05:00
Jeremy Stretch
36215656d3 Extend ViewTestCases for create/edit/delete/import views to also check non-data-bound GET requests 2020-02-24 11:23:42 -05:00
Jeremy Stretch
ec79f97bf4 Call prepare_value() to avoid passing model instances directly to the filterset 2020-02-24 09:31:31 -05:00
Jeremy Stretch
25d4c3156b Fixes #4240: Fix exception when filtering foreign keys by NULL 2020-02-21 21:38:25 -05:00
Jeremy Stretch
05f8487081 Fixes #4239: Fix exception when selecting all filtered objects during bulk edit 2020-02-21 20:44:53 -05:00
Jeremy Stretch
c26aca4d20 Closes #4173: Return graceful error message when webhook queuing fails 2020-02-21 17:21:04 -05:00
Jeremy Stretch
2a0c9a1cae Fixes #4211: Include trailing text when naturalizing interface names 2020-02-20 09:49:15 -05:00
Jeremy Stretch
8d79c79907 Closes #3810: Preserve slug value when editing existing objects 2020-02-19 13:53:11 -05:00
Jeremy Stretch
11f6faefc1 Fixes #4204: Fix assignment of mask length when bulk editing prefixes 2020-02-19 13:28:07 -05:00
Jeremy Stretch
ada2a886b7 Merge pull request #4181 from hSaria/2511-change-diff
Fixes #2511: Compare object change to the previous change
2020-02-19 12:41:24 -05:00
Jeremy Stretch
71d5f2ad2b Fixes #4183: Fix representation of NaturalOrderingField values in change log 2020-02-18 10:50:14 -05:00
John Anderson
12c193ea1a merge develop 2020-02-18 00:39:30 -05:00
John Anderson
43f43c66e2 #4121 - dynamic filter lookup expressions 2020-02-18 00:32:58 -05:00
Saria Hajjar
a5f4b197b3 Fixes #2511: Compare object change to the previous change 2020-02-15 22:39:08 +00:00
Jeremy Stretch
3612057fc1 Fixes #4175: Fix potential exception when bulk editing objects from a filtered list 2020-02-14 14:27:47 -05:00
Jeremy Stretch
b90eb8945a Merge branch 'develop' into 4164-object-list-template 2020-02-14 13:11:30 -05:00
Jeremy Stretch
4c6e113eb1 Merge pull request #3925 from hSaria/3840-limit-vlan-choices
Fixes #3840: Only show valid interface VLAN choices
2020-02-14 11:48:29 -05:00
Jeremy Stretch
99d29de4da Merge pull request #3726 from eSentire/fix-2519
Fix race condition in available-prefix/ip APIs
2020-02-14 09:32:51 -05:00
Jeremy Stretch
5cd25b2721 Fixes #4166: Fix schema migrations to enforce maximum character length for naturalized fields 2020-02-13 21:41:00 -05:00
John Anderson
f79c48e314 merge develop 2020-02-13 16:00:07 -05:00
Jeremy Stretch
3cee7307ad Add tests for naturalization functions 2020-02-13 15:13:43 -05:00
Jeremy Stretch
b586f81e57 Migrate DCIM views to use common object list template 2020-02-13 14:07:15 -05:00
Jeremy Stretch
843b52145c Introduce a common template for object list views 2020-02-13 13:29:50 -05:00
Jeremy Stretch
a4801f7438 Merge pull request #4155 from hSaria/4150-yaml-nested-tags
Fixes #4150: Replace OrderedDict with Dict when rendering YAML
2020-02-12 16:13:32 -05:00
Saria Hajjar
c9e68bce71 Fixes #4150: Replace OrderedDict with Dict when rendering YAML 2020-02-12 19:59:04 +00:00
Jeremy Stretch
2f9599a946 Merge pull request #4151 from netbox-community/4146-secretrole-enforcement
Fixes #4146: Fix SecretRole permissions enforcement
2020-02-12 13:51:44 -05:00
Jeremy Stretch
417acdb666 Establish standard test cases for all models 2020-02-12 13:25:56 -05:00
Jeremy Stretch
2c73ede367 Fixes #4146: Fix SecretRole permissions enforcement 2020-02-12 11:13:32 -05:00
Matt Olenik
7acda4fa37 Fix race condition in available-prefix/ip APIs
Implement advisory lock to prevent duplicate records being inserted
when making simultaneous calls. Fixes #2519
2020-02-11 13:36:52 -08:00
Jeremy Stretch
023735cf10 Use DynamicModelChoiceField for all fields using APISelect 2020-02-11 12:25:40 -05:00
Jeremy Stretch
ae9767dba9 Account for initial data when binding a DynamicModelChoiceField 2020-02-11 10:21:44 -05:00
Jeremy Stretch
7acb77c06f Replace FilterChoiceField with DynamicModelMultipleChoiceField 2020-02-11 09:33:41 -05:00
Jeremy Stretch
690bff68ed Replace ChainedModelChoiceField with DynamicModelChoiceField 2020-02-10 17:23:52 -05:00
Jeremy Stretch
9e119f56d9 Fixes #4083: Permit nullifying applicable choice fields via API requests 2020-02-10 15:10:33 -05:00
Jeremy Stretch
a5b4931334 Changelog for #4108 2020-02-10 10:20:06 -05:00
Jeremy Stretch
d3ab17b4e1 Set a default self.to_field_name for FilterChoiceField 2020-02-10 10:08:20 -05:00
Jeremy Stretch
c44d52756f Remove custom template for APISelect widget 2020-02-10 10:02:42 -05:00
Jeremy Stretch
252d3595ac Standardize usage of FilterChoiceField 2020-02-10 09:58:33 -05:00
Jeremy Stretch
e859074820 Clean up unneeded code relevant to FilterChoiceField 2020-02-10 09:44:19 -05:00
John Anderson
b7aff902bd py3.5 compatibility 2020-02-09 21:32:45 -05:00
John Anderson
f08ac5c4fd functional dynamic filter lookups 2020-02-09 17:46:21 -05:00
John Anderson
0b44d8f3e7 initial work on dynamic lookup expressions 2020-02-09 03:20:59 -05:00
Saria Hajjar
d4047309f3 Merge branch 'develop' into 3840-limit-vlan-choices 2020-02-08 16:14:10 +00:00
Jeremy Stretch
f3367c98c0 Override get_bound_field() on FilterChoiceFieldMixin to restrict the queryset of bound fields 2020-02-07 18:04:40 -05:00
Jeremy Stretch
14b3d74903 Convert interface models to use NaturalOrderingField 2020-02-07 15:58:03 -05:00
Jeremy Stretch
15747d4b49 Store empty names as null 2020-02-07 12:24:38 -05:00
Jeremy Stretch
59e0463320 Remove NaturalOrderingManager 2020-02-07 11:59:32 -05:00
Jeremy Stretch
d3596932f6 Convert remaining DCIM models to use NaturalOrderingField 2020-02-07 11:59:16 -05:00
Jeremy Stretch
af1e198aae Introduce NaturalOrderingField 2020-02-07 11:36:22 -05:00
Jeremy Stretch
28aa3736ae Fix up bulk editing forms 2020-02-06 15:51:51 -05:00
Jeremy Stretch
3202cbb248 Overhaul device component template creation views/URLs 2020-02-06 13:13:40 -05:00
Jeremy Stretch
12eea1e097 Simplify help_text for ExpandableNameField 2020-02-06 11:44:29 -05:00
Jeremy Stretch
d087c0e13b Remove obsolete ComponentForm 2020-02-06 11:36:25 -05:00
Jeremy Stretch
2f8e1c49b4 Move model_to_dict() into assertInstanceEqual(); clean up test data 2020-02-05 15:47:50 -05:00
Jeremy Stretch
219d609485 Enable bulk creation tests for device components 2020-02-05 15:22:57 -05:00
Jeremy Stretch
4ee713c54f Move component bulk creation views to new URLs 2020-02-05 12:36:38 -05:00
Jeremy Stretch
e243a72526 Enable tests for component bulk edit views 2020-02-05 11:14:07 -05:00
Jeremy Stretch
7e10bdb2cd Tweak BulkEditView to improve handling of initial PK values 2020-02-05 09:56:49 -05:00
Jeremy Stretch
0987680d0c Adapt BulkEditView to not require a parent object for device components 2020-02-04 18:08:40 -05:00
Jeremy Stretch
4c4c707daf Add InterfaceTestCase for virtual machines 2020-02-04 16:40:18 -05:00
Jeremy Stretch
c1e02af946 Move component bulk delete views to new URLs 2020-02-04 16:06:55 -05:00
Jeremy Stretch
f9fdb08c27 Fixes #4084: Fix exception when creating an interface with tagged VLANs 2020-02-04 11:47:14 -05:00
Jeremy Stretch
aab5bb31de #3894 follow-up 2020-02-04 10:09:22 -05:00
Jeremy Stretch
1e42fc2ed5 Merge branch 'develop' into 2921-tags-select2 2020-02-04 09:37:31 -05:00
Jeremy Stretch
415efc4bfc Merge branch 'develop' into 3313-config-context-gui 2020-02-03 16:07:15 -05:00
Jeremy Stretch
5e1a14c314 Add bulk edit view tests 2020-02-03 13:53:19 -05:00
Jeremy Stretch
405f00154c Skip non-model fields when applying bulk changes 2020-02-03 13:07:46 -05:00
Jeremy Stretch
acdbb126f1 Add bulk delete view tests 2020-02-03 10:04:09 -05:00
Jeremy Stretch
3c0870664e Extend standard view test case to validate built-in CSV export 2020-01-31 17:09:50 -05:00
Jeremy Stretch
0420826ac8 Merge pull request #4072 from netbox-community/4000-view-tests
Closes #4000: Add tests for the create, edit, and delete views of all models
2020-01-31 16:07:32 -05:00
Jeremy Stretch
8224b891ab Extend and correct evaluation of view permissions 2020-01-31 14:13:30 -05:00
Jeremy Stretch
cc9deb1220 Refactor model_to_dict() to better handle tags 2020-01-31 14:12:48 -05:00
Jeremy Stretch
acda39814b model_to_dict(): Convert object lists to PK lists 2020-01-31 13:44:34 -05:00
Jeremy Stretch
8d41faebf4 model_to_dict(): Remove fields that start with an underscore 2020-01-31 12:14:51 -05:00
Jeremy Stretch
bae3c83a5b post_data(): Ignore iterables 2020-01-31 11:50:12 -05:00
Jeremy Stretch
4691e70ddf Add _get_url() for View test case 2020-01-31 10:30:13 -05:00
Jeremy Stretch
da1ca77c34 Move form/CSV data declaration under setUpTestData 2020-01-31 09:27:41 -05:00
Jeremy Stretch
8aa6a9bf99 Reorganize test classes to prevent unittest from running the base TestCases 2020-01-31 09:00:01 -05:00
Jeremy Stretch
b1a38fe0da Added ViewTestCase (WIP) 2020-01-30 21:57:20 -05:00
Jeremy Stretch
bc590633b4 Introduced a custom model_to_dict() 2020-01-30 20:48:26 -05:00
Jeremy Stretch
eb69ea52f9 Refactor APITestCase to subclass TestCase 2020-01-30 17:57:34 -05:00
Jeremy Stretch
d23b234d4f Merge branch 'develop' into 4051-disable-makemigrations 2020-01-30 16:49:15 -05:00
Jeremy Stretch
a9a622449f Introduced a custom TestCase 2020-01-30 16:19:51 -05:00
Jeremy Stretch
3846416492 Fixes #4030: Fix exception when bulk editing interfaces (revised) 2020-01-30 15:12:10 -05:00
Saria Hajjar
c2c4a8b075 Merge branch 'develop' into 2921-tags-select2 2020-01-30 17:51:55 +00:00
Saria Hajjar
8a8a8dbc3c Avoid overriding private attribute in super 2020-01-30 17:49:42 +00:00
Jeremy Stretch
1fbf137ccf Closes #4051: Disable the makemigrations management command 2020-01-30 10:12:53 -05:00
Jeremy Stretch
447240c801 Enable CSV import for custom fields 2020-01-29 14:29:47 -05:00
Jeremy Stretch
098f47462c Rename and simplify CustomFieldChoiceField 2020-01-29 11:00:03 -05:00
Jeremy Stretch
36df544f09 Merge pull request #3885 from hSaria/568-csv-import-cf
Fixes #568: CSV import/export of custom fields
2020-01-29 10:11:40 -05:00
Jeremy Stretch
d841c8c2d8 Remove obsolete constants 2020-01-27 12:34:52 -05:00
Saria Hajjar
f7f141c69e Fixes #3313: YAML-format the config context in the GUI 2020-01-25 15:56:24 +00:00
hSaria
ad1953a7b7 Merge branch 'develop' into 2921-tags-select2 2020-01-24 20:56:36 +00:00
hSaria
0e1f7fe23f Merge branch 'develop' into 3840-limit-vlan-choices 2020-01-24 20:54:56 +00:00
Jeremy Stretch
7784435aa9 #3880: Define constants for arbitrary values 2020-01-24 14:42:57 -05:00
Jeremy Stretch
debe6fc1d8 Add tests for ChoiceSet 2020-01-23 16:19:34 -05:00
Jeremy Stretch
5da8b4dfd8 Handle grouped choices when returning ChoiceSet values 2020-01-23 16:16:52 -05:00
hSaria
4c31311dfc Merge branch 'develop' into 568-csv-import-cf 2020-01-23 20:27:07 +00:00
Saria Hajjar
39e0c1f8f9 Use model's get_custom_fields 2020-01-23 20:26:21 +00:00
Saria Hajjar
16f72769b7 Cleaned the CustomField choice field 2020-01-23 18:54:37 +00:00
Saria Hajjar
017c92aae9 Explicitly use the value of the choice, instead of relying on __str__ 2020-01-23 17:37:51 +00:00
Saria Hajjar
a802846cb7 Moved the header join logic after the custom fields are added 2020-01-23 17:18:58 +00:00
Jeremy Stretch
dc567799ed Move min/max prefix length validators to ipam.validators 2020-01-22 16:26:06 -05:00
hSaria
28c1da9b30 Merge branch 'develop' into 568-csv-import-cf 2020-01-21 21:30:38 +00:00
hSaria
29975ae2de Merge branch 'develop' into 2921-tags-select2 2020-01-21 21:29:21 +00:00
hSaria
df4655ee52 Merge branch 'develop' into 3840-limit-vlan-choices 2020-01-21 21:27:42 +00:00
Jeremy Stretch
defe87b4b0 Fixes #3937: Suppress warning messages in tests for requests expected to yield a 4XX response 2020-01-17 14:53:33 -05:00
hSaria
8f9fe8b937 Merge branch 'develop' into 568-csv-import-cf 2020-01-16 22:47:10 +00:00
hSaria
94b1a37eb6 Merge branch 'develop' into 3840-limit-vlan-choices 2020-01-16 22:45:23 +00:00
hSaria
a4f460ddbd Merge branch 'develop' into 2921-tags-select2 2020-01-16 21:52:14 +00:00
Saria Hajjar
ccb0c753ed Merge branch 'develop' into 568-csv-import-cf 2020-01-16 16:05:01 +00:00
Jeremy Stretch
2c498e5516 Use assertHttpStatus() when evaluating HTTP response status 2020-01-16 10:47:45 -05:00
Saria Hajjar
79c943c5ea Merge branch 'develop' into 2921-tags-select2 2020-01-16 15:33:42 +00:00
Saria Hajjar
bf3ca9cc48 Merge branch 'develop' into 3840-limit-vlan-choices 2020-01-16 15:09:39 +00:00
Jeremy Stretch
e1eb8a86df Remove obsolete utility function model_names_to_filter_dict() 2020-01-15 16:21:41 -05:00
Jeremy Stretch
c19ad86328 Refactor FieldChoicesViewSet; add Interface.type to virtualization _choices endpoint 2020-01-15 09:59:44 -05:00
Jeremy Stretch
f7bdd7529d Move unpack_grouped_choices() to utilities.choices 2020-01-15 09:36:39 -05:00
Saria Hajjar
7ed023a8fb Fixes #3840: Only show valid interface VLAN choices 2020-01-15 12:23:34 +00:00
Jeremy Stretch
a1f62f63f7 Add _choices endpoint tests for all apps 2020-01-14 16:13:11 -05:00
Jeremy Stretch
dfac1a044f Define __all__ for models.py within each app 2020-01-14 12:01:23 -05:00
Saria Hajjar
8541d6a031 Fetch choices during form initialization 2020-01-14 08:22:27 +00:00
hSaria
b547c9ddad Merge branch 'develop' into 568-csv-import-cf 2020-01-13 21:17:29 +00:00
Saria Hajjar
7f2a810621 Tag filter field for filter forms 2020-01-13 20:16:13 +00:00
Jeremy Stretch
a3bb57f130 Change DeviceType export from CSV to YAML 2020-01-13 15:10:16 -05:00
Saria Hajjar
763ec7c498 Removed tags filter field from view 2020-01-13 19:06:05 +00:00
Saria Hajjar
5c80b1961f Fixes #2921: Replace tags filter with Select2 widget 2020-01-11 15:18:27 +00:00
Jeremy Stretch
abc10ed488 Merge branch 'develop' into develop-2.7 2020-01-10 13:33:51 -05:00
Saria Hajjar
7b6b4f6e74 Fixed import choice name 2020-01-10 14:58:15 +00:00
Saria Hajjar
1a8a16c32c CSV import/export custom fields 2020-01-10 14:26:39 +00:00
Saria Hajjar
86433215a4 Added tests for alphanumeric 2020-01-10 11:54:43 +00:00
Saria Hajjar
c31309a013 Negative tests for expand_ipaddress_pattern 2020-01-10 11:21:37 +00:00
Saria Hajjar
260a26e1b0 Added tests for IPv6 2020-01-10 11:06:01 +00:00
Saria Hajjar
14d0b741d5 Removed redundant list call 2020-01-10 10:26:46 +00:00
Jeremy Stretch
765ff6a126 Rename filter variables for utility views 2020-01-09 20:57:13 -05:00
Jeremy Stretch
f14400b7a7 Use ChoiceSet.values() for access to raw values 2020-01-09 14:56:33 -05:00
Jeremy Stretch
414c10af53 Fixes #3868: Fix creation of interfaces for virtual machines 2020-01-09 14:54:25 -05:00
Saria Hajjar
7e37ffab80 Added tests for IPv4 2020-01-09 18:26:10 +00:00
Saria Hajjar
d751c853b8 Added example and handled invalid ranges gracefully 2020-01-08 17:28:31 +00:00
Saria Hajjar
b514d7c087 Fixes #3623: Word expansion for interfaces 2020-01-08 17:23:09 +00:00
Jeremy Stretch
ff25363a12 Merge branch 'develop' into develop-2.7 2020-01-03 14:21:53 -05:00
Jeremy Stretch
e28379ecdd Fixes #3831: Fix API-driven filter field rendering (#3812 regression) 2020-01-03 11:25:22 -05:00
Jeremy Stretch
ab7bb5c374 Merge branch 'develop' into develop-2.7 2020-01-02 17:21:15 -05:00
Saria Hajjar
cc9aa2083f Comment clarification 2020-01-01 16:04:08 +00:00