Commit Graph

62 Commits

Author SHA1 Message Date
Jeremy Stretch
8cc582b360 Closes #2495: Enable deep-merging of config context data 2018-12-05 14:34:49 -05:00
Jeremy Stretch
c2bd0a7b84 Fixes #2634: Enforce consistent representation of unnamed devices in rack view 2018-12-04 15:29:58 -05:00
John Anderson
fc3f2f3b2b CHANGELOG.md 2018-12-04 00:46:36 -05:00
Jeremy Stretch
039e19b8bf Closes #2089: Add SONET interface form factors 2018-11-30 09:28:56 -05:00
Jeremy Stretch
403e5e896f Closes #2597: Add FibreChannel SFP28 (32GFC) interface form factor 2018-11-28 09:56:48 -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
0ffc441295 Changelog for #2606 2018-11-26 14:41:09 -05:00
Jeremy Stretch
674ca55769 Release v2.4.8 2018-11-20 11:56:14 -05:00
Jeremy Stretch
83cac4c90c Closes #2557: Added object view for tags 2018-11-15 16:47:41 -05:00
Jeremy Stretch
be0690c77c Fixes #2589: Virtual machine API serializer should require cluster assignment 2018-11-14 10:38:53 -05:00
Jeremy Stretch
d813e374e8 Fixes #2588: Catch all exceptions from failed NAPALM API Calls 2018-11-14 10:12:35 -05:00
Jeremy Stretch
fb37af673b Closes #2490: Added bulk editing for config contexts 2018-11-13 15:08:55 -05:00
Jeremy Stretch
1fecfc46ca Fixes #2565: Improved rendering of Markdown tables 2018-11-13 11:02:48 -05:00
Jeremy Stretch
574ddedc22 Fixes #2558: Filter on all tags when multiple are passed 2018-11-12 15:48:58 -05:00
Jeremy Stretch
cd5b57863e Fixes #2575: Correct model specified for rack roles table 2018-11-09 09:46:30 -05:00
Jeremy Stretch
875dcb5638 Fixes #2473: Fix encoding of long (>127 character) secrets 2018-11-07 13:44:16 -05:00
Jeremy Stretch
04eebe07a5 Release v2.4.7 2018-11-06 10:49:44 -05:00
Jeremy Stretch
54af8aa5f2 Closes #2388: Enable filtering of devices/VMs by region 2018-11-06 10:31:56 -05:00
Jeremy Stretch
a5b8ba43f8 Closes #2512: Add device field to inventory item filter form 2018-11-06 09:24:05 -05:00
John Anderson
de69e224c3 changelog for #2549 2018-11-06 00:57:09 -05:00
Jeremy Stretch
2d92f9a799 Fixed changelog for #2528 2018-11-05 16:10:33 -05:00
Jeremy Stretch
3d780fca01 Fixes #2528: Enable creating circuit terminations with interface assignment via API 2018-11-05 16:10:01 -05:00
Jeremy Stretch
703b2e2abe Changelog for #2427 2018-11-05 15:40:48 -05:00
Jeremy Stretch
9e5e17ebbf Changelog for #2501 2018-11-05 15:34:39 -05:00
Jeremy Stretch
bee7dfe9f3 Fixes #2514: Prevent new connections to already connected interfaces 2018-10-16 16:42:23 -04:00
Jeremy Stretch
d3d8471948 Changelog for #2515 2018-10-16 09:42:19 -04:00
Jeremy Stretch
7aaca196d2 Release v2.4.6 2018-10-05 15:43:43 -04:00
Jeremy Stretch
55e25f225e Changelog entry for #2492 2018-10-05 15:39:30 -04:00
Jeremy Stretch
1dd2dae9c5 Fixes #2393: Fix Unicode support for CSV import under Python 2 2018-10-05 15:33:29 -04:00
Jeremy Stretch
927cc43af1 Fixes #2491: Fix exception when importing devices with invalid device type 2018-10-05 12:22:46 -04:00
Jeremy Stretch
e70840a88d Closes #2479: Add user permissions for creating/modifying API tokens 2018-10-05 11:06:59 -04:00
Jeremy Stretch
f46595f9c5 Fixes #2485: Fix cancel button when assigning a service to a device/VM 2018-10-05 10:30:13 -04:00
Jeremy Stretch
a297b01ffa Changelog entry for #2487 2018-10-04 16:24:09 -04:00
John Anderson
b16dbc8ae4 fixes #2484 - Local config context not available on the Virtual Machine Edit Form 2018-10-03 17:16:01 -04:00
Jeremy Stretch
6559c607a3 Fixes #2483: Set max item count of API-populated form fields to MAX_PAGE_SIZE 2018-10-03 16:17:17 -04:00
Jeremy Stretch
aaf0e705c2 Release v2.4.5 2018-10-02 15:24:42 -04:00
Jeremy Stretch
c48c3c9292 Closes #2438: API optimizations for tagged objects 2018-09-28 16:44:05 -04:00
Jeremy Stretch
8311394e4c Fixes #2414: Tags field missing from device/VM component creation forms 2018-09-28 16:26:08 -04:00
Jeremy Stretch
6daac8b2ee Fixes #2470: Log the creation of device/VM components as object changes 2018-09-28 16:04:51 -04:00
Jeremy Stretch
939149f2f4 Changelog and misc cleanup 2018-09-28 14:21:49 -04:00
Jeremy Stretch
42455ff450 Fixes #2455: Ignore unique address enforcement for IPs with a shared/virtual role 2018-09-24 16:59:33 -04:00
Jeremy Stretch
6bbc819055 Fixes #2442: Nullify "next" link in API when limit=0 is passed 2018-09-18 13:59:50 -04:00
Jeremy Stretch
4f01903ba4 Fixes #2444: Improve validation of interface MAC addresses 2018-09-18 12:02:59 -04:00
Jeremy Stretch
af3d452675 Fixes #2443: Enforce JSON object format when creating config contexts 2018-09-18 11:46:22 -04:00
John Anderson
4ecc0f5619 changelog for #2432 2018-09-15 17:25:50 -04:00
Jeremy Stretch
e35bb17253 Closes #2402: Order and format JSON data in form fields 2018-09-13 11:31:34 -04:00