Commit Graph

2834 Commits

Author SHA1 Message Date
Jeremy Stretch
6d0026b2d3 Move queryset_to_csv() utility into ObjectListView to allow overriding by individual views 2018-12-05 16:35:59 -05:00
Jeremy Stretch
8cc582b360 Closes #2495: Enable deep-merging of config context data 2018-12-05 14:34:49 -05:00
Jeremy Stretch
8b6884033d Additional API change notes 2018-12-05 11:13:29 -05:00
Jeremy Stretch
c2bd0a7b84 Fixes #2634: Enforce consistent representation of unnamed devices in rack view 2018-12-04 15:29:58 -05:00
Jeremy Stretch
174dfab2b2 Add reminder to update static field choices 2018-12-04 15:19:38 -05:00
Jeremy Stretch
db5b069a56 Add missing choices for new cable and rack fields 2018-12-04 15:15:40 -05:00
Jeremy Stretch
d97a205350 Closes #2632: Change representation of null values from 0 to 'null' 2018-12-04 15:09:07 -05:00
Jeremy Stretch
f707b24e1e Don't force the docs to open in a new window 2018-12-04 09:44:25 -05:00
Jeremy Stretch
72f6e14c74 Closes #2641: Restored link to NetBox shell documentation 2018-12-04 09:19:32 -05:00
John Anderson
fc3f2f3b2b CHANGELOG.md 2018-12-04 00:46:36 -05:00
John Anderson
12df37b155 fixes #2623 - model class being passed to rqworker 2018-12-04 00:40:54 -05:00
Jeremy Stretch
7f5627754b Fixes #2639: Fix preservation of length/dimensions unit for racks and cables 2018-12-03 11:13:37 -05:00
mmahacek
3093b5fbb8 #2635 - Update documentation for python3 update (#2636)
Add reference to reinstalling the django-rq module
2018-12-03 09:56:43 -05:00
Jeremy Stretch
4846b11083 Fixes #2616: Convert Rack outer_unit and Cable length_unit to integer-based choice fields 2018-11-30 12:26:28 -05:00
Jeremy Stretch
7154952c6f Closes #2594: upgrade.sh no longer invokes sudo 2018-11-30 11:12:10 -05:00
Jeremy Stretch
039e19b8bf Closes #2089: Add SONET interface form factors 2018-11-30 09:28:56 -05:00
Jeremy Stretch
ff7d44da99 Closes #2560: Add slug to DeviceType UI view 2018-11-28 16:19:05 -05:00
Jeremy Stretch
47ea8df446 Fixes #2622: Enable filtering cables by multiple types/colors 2018-11-28 14:22:55 -05:00
Jeremy Stretch
ec4a0cd452 Fixes #2624: Delete associated content type and permissions when removing InterfaceConnection model 2018-11-28 13:45:02 -05:00
Jeremy Stretch
403e5e896f Closes #2597: Add FibreChannel SFP28 (32GFC) interface form factor 2018-11-28 09:56:48 -05:00
Jeremy Stretch
a19943d6c7 Closes #2617: Explicitly mention that test service runs on port 8000 2018-11-28 09:35:33 -05:00
Jeremy Stretch
9a9c72d0aa Fixes #2576: Correct type for count_* fields in site API representation 2018-11-27 16:27:47 -05:00
Jeremy Stretch
2c73acd75d Updated changelog for #2400 2018-11-27 16:18:57 -05:00
Tatsushi Demachi
51ecc03d46 Fix type mismatches in API view (#2429)
* Fix tags field to be shown as array in API view

`tags` field in serializers is defineded as `TagListSerializerField`.
It should be shown as an array value in API view but actually, it is a
simple string value.

This fixes it by introducing a new `FieldInspector` to handle
`TagListSerializerField` type field as an array. It doesn't affects any
other type fields.

* Fix SerializedPKRelatedField type API expression

A field definded as `SerializedPKRelatedField` should be shown as an
array of child serializer objects in a response value definition in API
view but it is shown as an array of primary key values (usually
`integer` type) of a child serializer.

This fixes it by introducing a new `FieldInspector` to handle the field.
It doesn't affect any other type fields.

* Fix request parameter representation in API view

In API view, representation of a parameter defined as a sub class of
`WritableNestedSerializer` should be vary between a request and a
response. For example, `tenant` field in `IPAddressSerializer` should be
shown like following as a request body:

```
tenant: integer ...
```

while it should be shown like following as a response body:

```
tenant: {
    id: integer ...,
    url: string ...,
    name: string ...,
    slug: string ...
}
```

But in both cases, it is shown as a response body type expression. This
causes an error at sending an API request with that type value.

It is only an API view issue, API can handle a request if a request
parameter is structured as an expected request body by ignoring the
wrong expression.

This fixes the issue by replacing an implicitly used default auto schema
generator class by its sub class and returning a pseudo serializer with
'Writable' prefix at generating a request body. The reason to introduce
a new generator class is that there is no other point which can
distinguish a request and a response. It is not enough to distinguish
POST, PUT, PATCH methods from GET because former cases may return a JSON
object as a response but it is also represented as same as a request
body, causes another mismatch.

This also fixes `SerializedPKRelatedField` type field representation. It
should be shown as an array of primary keys in a request body.

Fixed #2400
2018-11-27 16:14:45 -05:00
Jeremy Stretch
627bcda5bd Fixes #2615: Tweak live search widget to use brief format for API requests 2018-11-27 12:41:00 -05:00
Jeremy Stretch
5156de92b9 Fixes #2613: Decrease live search minimum characters to three 2018-11-27 12:20:52 -05:00
Jeremy Stretch
f1a2a724b4 Formatting cleanup 2018-11-27 11:57:29 -05:00
Jeremy Stretch
6b1abd6a65 Closes #2614: Simplify calls of super() for Python 3 2018-11-27 10:52:24 -05:00
Jeremy Stretch
5d7f316f4f Add developer guidance for the introduction of new dependencies 2018-11-27 10:45:10 -05:00
Jeremy Stretch
1157b7f776 Added a description and repo URL for each dependency 2018-11-27 09:51:48 -05:00
Jeremy Stretch
b442722238 Release v2.5-beta2 2018-11-26 16:27:57 -05:00
Jeremy Stretch
0ffc441295 Changelog for #2606 2018-11-26 14:41:09 -05:00
Daniel Sheppard
7e0ab90ee4 Fixes #2606 - Added MultipleChoiceFilter for form_factor (#2610)
* Fixes #2606 - Added MultipleChoiceFilter for form_factor

* Fixes #2606 - Add MultipleChoiceField for form_factor
Fixes error with too many lines.
2018-11-26 14:19:05 -05:00
Tyler Bigler
c98de8e348 Refactor Extras Migration Version Check (#2604)
* Add constant for DB_MINIMUM_VERSION

* Refactor verify_postgresql_version to use Django connection pg_version method for comparing versions.

* Remove StrictVersion import

* Remove DB_MINIMUM_VERSION as not necessary in constants.

* Define DB_MINIMUM_VERSION locally to freeze to migration.

* Refactor database version verification to use django builtin methods.
2018-11-26 14:16:37 -05:00
Jeremy Stretch
73a6583722 Fixes #2609: Fixed exception when ChoiceField integer value is passed as a string 2018-11-26 14:05:57 -05:00
Jeremy Stretch
9d8b36bf91 Enforce consistent ordering of value/label keys for ChoiceField 2018-11-26 14:02:38 -05:00
Jeremy Stretch
c31c2fd04b Fixes #2608: Fixed null outer_unit error on rack import 2018-11-26 13:41:35 -05:00
Jeremy Stretch
a0b8e05653 Closes #2601: Added a description field to pass-through ports 2018-11-20 21:28:19 -05:00
Jeremy Stretch
89d90b5548 Strip annotations from queryset when retrieving object count for API pagination 2018-11-20 21:02:06 -05:00
Jeremy Stretch
1891329c77 Changelog for #2602 2018-11-20 13:21:38 -05:00
Jeremy Stretch
a45e774f71 Fixes #2602: Return HTTP 204 when no new IPs/prefixes are available for provisioning 2018-11-20 13:03:59 -05:00
Jeremy Stretch
b5ef607224 Merge v2.4.8 2018-11-20 12:28:24 -05:00
Jeremy Stretch
280ee97d91 Post-release version bump 2018-11-20 11:58:19 -05:00
Jeremy Stretch
674ca55769 Release v2.4.8 2018-11-20 11:56:14 -05:00
Jeremy Stretch
b18c0055e5 Added missing import buttons to cables list 2018-11-20 09:41:38 -05:00
Jeremy Stretch
ee3ec467e5 Fixed toggling of connection status for cable path endpoints 2018-11-20 09:23:30 -05:00
Jeremy Stretch
8ce3a4b1f8 Standardized behavior and display of connection_status 2018-11-19 15:26:06 -05:00
Jeremy Stretch
657080fac1 Updated migrations 2018-11-19 13:44:18 -05:00
Jeremy Stretch
cad0925c7a Improved logic for recording cable path connection status 2018-11-19 12:37:53 -05:00
Jeremy Stretch
83cac4c90c Closes #2557: Added object view for tags 2018-11-15 16:47:41 -05:00