From 63d0eca81d563816ee8da437b71507f4f23fefd8 Mon Sep 17 00:00:00 2001 From: Vincent Simonin <vincent.simonin@ext.ec.europa.eu> Date: Mon, 26 Jun 2023 17:57:23 +0200 Subject: [PATCH] Add HTTP Headers API integration for mapping Update doc and bump version --- docs/openapi.yaml | 2992 ++++++++++------- setup.py | 2 +- src/netbox_rps_plugin/__init__.py | 2 +- src/netbox_rps_plugin/api/serializers.py | 42 +- src/netbox_rps_plugin/api/urls.py | 1 + src/netbox_rps_plugin/api/views.py | 12 +- .../migrations/0002_http_header.py | 33 + src/netbox_rps_plugin/models.py | 7 +- 8 files changed, 1915 insertions(+), 1176 deletions(-) create mode 100644 src/netbox_rps_plugin/migrations/0002_http_header.py diff --git a/docs/openapi.yaml b/docs/openapi.yaml index ee67409..f7b0894 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.3 info: title: NetBox REST API - version: 3.5.1 (3.5) + version: 3.5.4-dev (3.5) license: name: Apache v2 License paths: @@ -116,11 +116,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -542,11 +538,7 @@ paths: - in: query name: xconnect_id__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: xconnect_id__ic schema: @@ -939,11 +931,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -1141,11 +1129,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -1246,11 +1230,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -1582,11 +1562,7 @@ paths: - in: query name: cid__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: cid__ic schema: @@ -1837,11 +1813,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -2732,11 +2704,7 @@ paths: - in: query name: account__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: account__ic schema: @@ -2879,11 +2847,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -3081,11 +3045,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -3529,11 +3489,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -3731,11 +3687,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -3872,11 +3824,7 @@ paths: - in: query name: service_id__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: service_id__ic schema: @@ -4453,11 +4401,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -4666,11 +4610,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -5061,11 +5001,7 @@ paths: - in: query name: hash__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: hash__ic schema: @@ -5275,11 +5211,7 @@ paths: - in: query name: path__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: path__ic schema: @@ -5679,11 +5611,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -6248,11 +6176,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -7054,11 +6978,7 @@ paths: - in: query name: label__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: label__ic schema: @@ -7774,7 +7694,7 @@ paths: description: No response body /api/dcim/connected-device/: get: - operationId: dcim_connected_device_retrieve + operationId: dcim_connected_device_list description: |- This endpoint allows a user to determine what device (if any) is connected to a given peer device and peer interface. This is useful in a situation where a device boots with no configuration, but can detect its neighbors @@ -7782,6 +7702,19 @@ paths: * `peer_device`: The name of the peer device * `peer_interface`: The name of the peer interface + parameters: + - in: query + name: peer_device + schema: + type: string + description: The name of the peer device + required: true + - in: query + name: peer_interface + schema: + type: string + description: The name of the peer interface + required: true tags: - dcim security: @@ -7792,8 +7725,9 @@ paths: content: application/json: schema: - type: object - additionalProperties: {} + type: array + items: + $ref: '#/components/schemas/Device' description: '' /api/dcim/console-port-templates/: get: @@ -8024,11 +7958,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -8482,11 +8412,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -8597,6 +8523,78 @@ paths: description: Device (ID) explode: true style: form + - in: query + name: device_role + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role__n + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role_id + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_role_id__n + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_type + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type__n + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type_id + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form + - in: query + name: device_type_id__n + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form - in: query name: id schema: @@ -8662,11 +8660,7 @@ paths: - in: query name: label__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: label__ic schema: @@ -8866,11 +8860,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -9658,11 +9648,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -10116,11 +10102,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -10231,6 +10213,78 @@ paths: description: Device (ID) explode: true style: form + - in: query + name: device_role + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role__n + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role_id + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_role_id__n + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_type + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type__n + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type_id + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form + - in: query + name: device_type_id__n + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form - in: query name: id schema: @@ -10296,11 +10350,7 @@ paths: - in: query name: label__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: label__ic schema: @@ -10500,11 +10550,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -11270,11 +11316,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -11666,11 +11708,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -11781,6 +11819,78 @@ paths: description: Device (ID) explode: true style: form + - in: query + name: device_role + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role__n + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role_id + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_role_id__n + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_type + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type__n + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type_id + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form + - in: query + name: device_type_id__n + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form - in: query name: id schema: @@ -11846,11 +11956,7 @@ paths: - in: query name: label__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: label__ic schema: @@ -12030,11 +12136,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -12563,11 +12665,7 @@ paths: - in: query name: color__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: color__ic schema: @@ -12730,11 +12828,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -12932,11 +13026,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -13037,11 +13127,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -13687,11 +13773,7 @@ paths: - in: query name: model__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: model__ic schema: @@ -13792,11 +13874,7 @@ paths: - in: query name: part_number__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: part_number__ic schema: @@ -13900,11 +13978,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -14400,11 +14474,7 @@ paths: - in: query name: asset_tag__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: asset_tag__ic schema: @@ -14999,11 +15069,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -15355,11 +15421,7 @@ paths: - in: query name: serial__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: serial__ic schema: @@ -16042,11 +16104,7 @@ paths: - in: query name: color__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: color__ic schema: @@ -16343,11 +16401,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -16471,6 +16525,10 @@ paths: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -16523,6 +16581,10 @@ paths: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -16802,11 +16864,7 @@ paths: - in: query name: color__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: color__ic schema: @@ -16949,11 +17007,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -17064,6 +17118,78 @@ paths: description: Device (ID) explode: true style: form + - in: query + name: device_role + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role__n + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role_id + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_role_id__n + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_type + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type__n + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type_id + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form + - in: query + name: device_type_id__n + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form - in: query name: id schema: @@ -17129,11 +17255,7 @@ paths: - in: query name: label__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: label__ic schema: @@ -17333,11 +17455,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -17625,6 +17743,10 @@ paths: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -17677,6 +17799,10 @@ paths: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -18234,11 +18360,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -18417,11 +18539,15 @@ paths: * `100gbase-x-cfp2` - CFP2 (100GE) * `200gbase-x-cfp2` - CFP2 (200GE) * `100gbase-x-cfp4` - CFP4 (100GE) + * `100gbase-x-cxp` - CXP (100GE) * `100gbase-x-cpak` - Cisco CPAK (100GE) * `100gbase-x-qsfp28` - QSFP28 (100GE) * `200gbase-x-qsfp56` - QSFP56 (200GE) + * `200gbase-x-qsfpdd` - QSFP-DD (200GE) * `400gbase-x-qsfpdd` - QSFP-DD (400GE) * `400gbase-x-osfp` - OSFP (400GE) + * `400gbase-x-cdfp` - CDFP (400GE) + * `400gbase-x-cfp8` - CPF8 (400GE) * `800gbase-x-qsfpdd` - QSFP-DD (800GE) * `800gbase-x-osfp` - OSFP (800GE) * `1000base-kx` - 1000BASE-KX (1GE) @@ -18531,11 +18657,15 @@ paths: * `100gbase-x-cfp2` - CFP2 (100GE) * `200gbase-x-cfp2` - CFP2 (200GE) * `100gbase-x-cfp4` - CFP4 (100GE) + * `100gbase-x-cxp` - CXP (100GE) * `100gbase-x-cpak` - Cisco CPAK (100GE) * `100gbase-x-qsfp28` - QSFP28 (100GE) * `200gbase-x-qsfp56` - QSFP56 (200GE) + * `200gbase-x-qsfpdd` - QSFP-DD (200GE) * `400gbase-x-qsfpdd` - QSFP-DD (400GE) * `400gbase-x-osfp` - OSFP (400GE) + * `400gbase-x-cdfp` - CDFP (400GE) + * `400gbase-x-cfp8` - CPF8 (400GE) * `800gbase-x-qsfpdd` - QSFP-DD (800GE) * `800gbase-x-osfp` - OSFP (800GE) * `1000base-kx` - 1000BASE-KX (1GE) @@ -18954,11 +19084,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -19048,6 +19174,78 @@ paths: format: int32 explode: true style: form + - in: query + name: device_role + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role__n + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role_id + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_role_id__n + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_type + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type__n + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type_id + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form + - in: query + name: device_type_id__n + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form - in: query name: duplex schema: @@ -19192,11 +19390,7 @@ paths: - in: query name: label__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: label__ic schema: @@ -19562,11 +19756,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -20581,11 +20771,15 @@ paths: * `100gbase-x-cfp2` - CFP2 (100GE) * `200gbase-x-cfp2` - CFP2 (200GE) * `100gbase-x-cfp4` - CFP4 (100GE) + * `100gbase-x-cxp` - CXP (100GE) * `100gbase-x-cpak` - Cisco CPAK (100GE) * `100gbase-x-qsfp28` - QSFP28 (100GE) * `200gbase-x-qsfp56` - QSFP56 (200GE) + * `200gbase-x-qsfpdd` - QSFP-DD (200GE) * `400gbase-x-qsfpdd` - QSFP-DD (400GE) * `400gbase-x-osfp` - OSFP (400GE) + * `400gbase-x-cdfp` - CDFP (400GE) + * `400gbase-x-cfp8` - CPF8 (400GE) * `800gbase-x-qsfpdd` - QSFP-DD (800GE) * `800gbase-x-osfp` - OSFP (800GE) * `1000base-kx` - 1000BASE-KX (1GE) @@ -20695,11 +20889,15 @@ paths: * `100gbase-x-cfp2` - CFP2 (100GE) * `200gbase-x-cfp2` - CFP2 (200GE) * `100gbase-x-cfp4` - CFP4 (100GE) + * `100gbase-x-cxp` - CXP (100GE) * `100gbase-x-cpak` - Cisco CPAK (100GE) * `100gbase-x-qsfp28` - QSFP28 (100GE) * `200gbase-x-qsfp56` - QSFP56 (200GE) + * `200gbase-x-qsfpdd` - QSFP-DD (200GE) * `400gbase-x-qsfpdd` - QSFP-DD (400GE) * `400gbase-x-osfp` - OSFP (400GE) + * `400gbase-x-cdfp` - CDFP (400GE) + * `400gbase-x-cfp8` - CPF8 (400GE) * `800gbase-x-qsfpdd` - QSFP-DD (800GE) * `800gbase-x-osfp` - OSFP (800GE) * `1000base-kx` - 1000BASE-KX (1GE) @@ -21269,11 +21467,7 @@ paths: - in: query name: color__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: color__ic schema: @@ -21530,11 +21724,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -21635,11 +21825,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -22164,11 +22350,7 @@ paths: - in: query name: label__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: label__ic schema: @@ -22350,11 +22532,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -22470,11 +22648,7 @@ paths: - in: query name: part_id__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: part_id__ic schema: @@ -22833,11 +23007,7 @@ paths: - in: query name: asset_tag__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: asset_tag__ic schema: @@ -23069,6 +23239,78 @@ paths: description: Device (ID) explode: true style: form + - in: query + name: device_role + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role__n + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role_id + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_role_id__n + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_type + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type__n + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type_id + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form + - in: query + name: device_type_id__n + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form - in: query name: discovered schema: @@ -23138,11 +23380,7 @@ paths: - in: query name: label__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: label__ic schema: @@ -23360,11 +23598,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -23480,11 +23714,7 @@ paths: - in: query name: part_id__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: part_id__ic schema: @@ -23683,11 +23913,7 @@ paths: - in: query name: serial__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: serial__ic schema: @@ -24240,11 +24466,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -24442,11 +24664,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -24691,11 +24909,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -25242,11 +25456,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -25444,11 +25654,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -25549,11 +25755,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -26076,11 +26278,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -26472,11 +26670,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -26587,6 +26781,78 @@ paths: description: Device (ID) explode: true style: form + - in: query + name: device_role + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role__n + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role_id + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_role_id__n + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_type + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type__n + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type_id + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form + - in: query + name: device_type_id__n + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form - in: query name: id schema: @@ -26652,11 +26918,7 @@ paths: - in: query name: label__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: label__ic schema: @@ -26836,11 +27098,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -27593,11 +27851,7 @@ paths: - in: query name: model__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: model__ic schema: @@ -27693,11 +27947,7 @@ paths: - in: query name: part_number__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: part_number__ic schema: @@ -28121,11 +28371,7 @@ paths: - in: query name: asset_tag__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: asset_tag__ic schema: @@ -28507,11 +28753,7 @@ paths: - in: query name: serial__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: serial__ic schema: @@ -28952,11 +29194,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -29190,11 +29428,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -29278,11 +29512,7 @@ paths: - in: query name: napalm_driver__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: napalm_driver__ic schema: @@ -29383,11 +29613,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -30022,11 +30248,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -30900,11 +31122,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -31508,11 +31726,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -31623,6 +31837,78 @@ paths: description: Device (ID) explode: true style: form + - in: query + name: device_role + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role__n + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role_id + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_role_id__n + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_type + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type__n + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type_id + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form + - in: query + name: device_type_id__n + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form - in: query name: feed_leg schema: @@ -31706,11 +31992,7 @@ paths: - in: query name: label__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: label__ic schema: @@ -31910,11 +32192,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -32734,11 +33012,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -33516,11 +33790,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -34192,11 +34462,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -34307,6 +34573,78 @@ paths: description: Device (ID) explode: true style: form + - in: query + name: device_role + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role__n + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role_id + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_role_id__n + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_type + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type__n + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type_id + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form + - in: query + name: device_type_id__n + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form - in: query name: id schema: @@ -34372,11 +34710,7 @@ paths: - in: query name: label__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: label__ic schema: @@ -34630,11 +34964,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -35268,11 +35598,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -36007,11 +36333,7 @@ paths: - in: query name: color__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: color__ic schema: @@ -36154,11 +36476,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -36356,11 +36674,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -36461,11 +36775,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -36797,11 +37107,7 @@ paths: - in: query name: asset_tag__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: asset_tag__ic schema: @@ -37002,11 +37308,7 @@ paths: - in: query name: facility_id__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: facility_id__ic schema: @@ -37348,11 +37650,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -37649,11 +37947,7 @@ paths: - in: query name: serial__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: serial__ic schema: @@ -38359,11 +38653,7 @@ paths: - in: query name: color__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: color__ic schema: @@ -38660,11 +38950,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -38842,6 +39128,10 @@ paths: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -38894,6 +39184,10 @@ paths: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -39173,11 +39467,7 @@ paths: - in: query name: color__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: color__ic schema: @@ -39320,11 +39610,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -39435,6 +39721,78 @@ paths: description: Device (ID) explode: true style: form + - in: query + name: device_role + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role__n + schema: + type: array + items: + type: string + description: Device role (slug) + explode: true + style: form + - in: query + name: device_role_id + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_role_id__n + schema: + type: array + items: + type: integer + description: Device role (ID) + explode: true + style: form + - in: query + name: device_type + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type__n + schema: + type: array + items: + type: string + description: Device type (model) + explode: true + style: form + - in: query + name: device_type_id + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form + - in: query + name: device_type_id__n + schema: + type: array + items: + type: integer + description: Device type (ID) + explode: true + style: form - in: query name: id schema: @@ -39500,11 +39858,7 @@ paths: - in: query name: label__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: label__ic schema: @@ -39704,11 +40058,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -40050,6 +40400,10 @@ paths: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -40102,6 +40456,10 @@ paths: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -40535,11 +40893,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -40737,11 +41091,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -40880,11 +41230,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -41329,11 +41675,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -41531,11 +41873,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -41674,11 +42012,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -42165,11 +42499,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -42253,11 +42583,7 @@ paths: - in: query name: facility__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: facility__ic schema: @@ -42599,11 +42925,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -42740,11 +43062,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -43237,11 +43555,7 @@ paths: - in: query name: domain__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: domain__ic schema: @@ -43479,11 +43793,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -44190,11 +44500,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -45056,11 +45362,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -45808,11 +46110,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -45956,11 +46254,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -46552,11 +46846,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -46652,11 +46942,7 @@ paths: - in: query name: group_name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: group_name__ic schema: @@ -46804,11 +47090,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -47374,11 +47656,7 @@ paths: - in: query name: group_name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: group_name__ic schema: @@ -47602,11 +47880,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -48253,11 +48527,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -48401,11 +48671,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -48847,11 +49113,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -49923,11 +50185,7 @@ paths: - in: query name: object_repr__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: object_repr__ic schema: @@ -50081,11 +50339,7 @@ paths: - in: query name: user_name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: user_name__ic schema: @@ -50303,11 +50557,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -50455,11 +50705,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -50564,11 +50810,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -50975,11 +51217,7 @@ paths: - in: query name: color__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: color__ic schema: @@ -51139,11 +51377,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -51341,11 +51575,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -51446,11 +51676,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -51766,11 +51992,7 @@ paths: - in: query name: ca_file_path__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: ca_file_path__ic schema: @@ -51952,11 +52174,7 @@ paths: - in: query name: http_content_type__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: http_content_type__ic schema: @@ -52128,11 +52346,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -52228,11 +52442,7 @@ paths: - in: query name: payload_url__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: payload_url__ic schema: @@ -52321,11 +52531,7 @@ paths: - in: query name: secret__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: secret__ic schema: @@ -52773,11 +52979,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -53418,11 +53620,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -53674,11 +53872,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -54360,11 +54554,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -55558,11 +55748,7 @@ paths: - in: query name: auth_key__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: auth_key__ic schema: @@ -55897,11 +56083,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -56362,11 +56544,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -56467,11 +56645,7 @@ paths: - in: query name: dns_name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: dns_name__ic schema: @@ -57284,11 +57458,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -58798,11 +58968,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -59126,11 +59292,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -59231,11 +59393,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -59855,11 +60013,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -60882,11 +61036,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -61088,11 +61238,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -61193,11 +61339,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -61588,11 +61730,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -61790,11 +61928,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -61895,11 +62029,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -62290,11 +62420,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -62572,11 +62698,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -63172,11 +63294,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -63604,11 +63722,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -63882,11 +63996,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -64360,11 +64470,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -64674,11 +64780,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -64857,11 +64959,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -65316,11 +65414,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -65600,11 +65694,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -66306,11 +66396,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -66584,11 +66670,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -66689,11 +66771,7 @@ paths: - in: query name: rd__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: rd__ic schema: @@ -67083,6 +67161,190 @@ paths: responses: '204': description: No response body + /api/plugins/rps/http_header/: + get: + operationId: plugins_rps_http_header_list + description: Get a list of http header objects. + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + tags: + - plugins + security: + - cookieAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedHttpHeaderList' + description: '' + post: + operationId: plugins_rps_http_header_create + description: Post a list of http header objects. + tags: + - plugins + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WritableHttpHeaderRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/WritableHttpHeaderRequest' + required: true + security: + - cookieAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/HttpHeader' + description: '' + patch: + operationId: plugins_rps_http_header_bulk_partial_update + description: Patch a list of http header objects. + tags: + - plugins + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/HttpHeaderRequest' + multipart/form-data: + schema: + type: array + items: + $ref: '#/components/schemas/HttpHeaderRequest' + required: true + security: + - cookieAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/HttpHeader' + description: '' + delete: + operationId: plugins_rps_http_header_bulk_destroy + description: Delete a list of http header objects. + tags: + - plugins + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/HttpHeaderRequest' + multipart/form-data: + schema: + type: array + items: + $ref: '#/components/schemas/HttpHeaderRequest' + required: true + security: + - cookieAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body + /api/plugins/rps/http_header/{id}/: + get: + operationId: plugins_rps_http_header_retrieve + description: Get a http header object. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this http header. + required: true + tags: + - plugins + security: + - cookieAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/HttpHeader' + description: '' + patch: + operationId: plugins_rps_http_header_partial_update + description: Patch a http header object. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this http header. + required: true + tags: + - plugins + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedWritableHttpHeaderRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedWritableHttpHeaderRequest' + security: + - cookieAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/HttpHeader' + description: '' + delete: + operationId: plugins_rps_http_header_destroy + description: Delete a http header object. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this http header. + required: true + tags: + - plugins + security: + - cookieAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body /api/plugins/rps/mapping/: get: operationId: plugins_rps_mapping_list @@ -67099,11 +67361,7 @@ paths: - in: query name: Comment__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: Comment__ic schema: @@ -67395,11 +67653,7 @@ paths: - in: query name: source__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: source__ic schema: @@ -67499,11 +67753,7 @@ paths: - in: query name: target__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: target__ic schema: @@ -67647,6 +67897,30 @@ paths: items: $ref: '#/components/schemas/Mapping' description: '' + delete: + operationId: plugins_rps_mapping_bulk_destroy + description: Delete a list of mapping objects. + tags: + - plugins + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MappingRequest' + multipart/form-data: + schema: + type: array + items: + $ref: '#/components/schemas/MappingRequest' + required: true + security: + - cookieAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body /api/plugins/rps/mapping/{id}/: get: operationId: plugins_rps_mapping_retrieve @@ -67700,6 +67974,24 @@ paths: schema: $ref: '#/components/schemas/Mapping' description: '' + delete: + operationId: plugins_rps_mapping_destroy + description: Delete a mapping object. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this mapping. + required: true + tags: + - plugins + security: + - cookieAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body /api/schema/: get: operationId: schema_retrieve @@ -68399,11 +68691,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -68601,11 +68889,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -68744,11 +69028,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -69139,11 +69419,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -69341,11 +69617,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -69446,11 +69718,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -69782,11 +70050,7 @@ paths: - in: query name: address__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: address__ic schema: @@ -69929,11 +70193,7 @@ paths: - in: query name: email__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: email__ic schema: @@ -70167,11 +70427,7 @@ paths: - in: query name: link__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: link__ic schema: @@ -70255,11 +70511,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -70355,11 +70607,7 @@ paths: - in: query name: phone__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: phone__ic schema: @@ -70464,11 +70712,7 @@ paths: - in: query name: title__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: title__ic schema: @@ -70843,11 +71087,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -71045,11 +71285,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -71188,11 +71424,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -71637,11 +71869,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -71875,11 +72103,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -71980,11 +72204,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -72394,11 +72614,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -72726,11 +72942,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -72914,11 +73126,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -73313,11 +73521,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -73470,11 +73674,7 @@ paths: - in: query name: key__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: key__ic schema: @@ -73874,11 +74074,7 @@ paths: - in: query name: email__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: email__ic schema: @@ -73962,11 +74158,7 @@ paths: - in: query name: first_name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: first_name__ic schema: @@ -74148,11 +74340,7 @@ paths: - in: query name: last_name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: last_name__ic schema: @@ -74259,11 +74447,7 @@ paths: - in: query name: username__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: username__ic schema: @@ -74687,11 +74871,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -74889,11 +75069,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -74994,11 +75170,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -75389,11 +75561,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -75591,11 +75759,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -75696,11 +75860,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -76297,11 +76457,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -77011,11 +77167,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -77395,11 +77547,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -78427,11 +78575,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -79183,11 +79327,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -79385,11 +79525,7 @@ paths: - in: query name: name__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: name__ic schema: @@ -79524,11 +79660,7 @@ paths: - in: query name: slug__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: slug__ic schema: @@ -79884,11 +80016,7 @@ paths: - in: query name: auth_psk__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: auth_psk__ic schema: @@ -80057,11 +80185,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -80308,11 +80432,7 @@ paths: - in: query name: ssid__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: ssid__ic schema: @@ -80786,11 +80906,7 @@ paths: - in: query name: auth_psk__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: auth_psk__ic schema: @@ -80959,11 +81075,7 @@ paths: - in: query name: description__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: description__ic schema: @@ -81286,11 +81398,7 @@ paths: - in: query name: ssid__empty schema: - type: array - items: - type: string - explode: true - style: form + type: boolean - in: query name: ssid__ic schema: @@ -84825,11 +84933,13 @@ components: - read-write - read-only - hidden + - hidden-ifunset type: string description: |- * `read-write` - Read/Write * `read-only` - Read-only * `hidden` - Hidden + * `hidden-ifunset` - Hidden (if unset) is_cloneable: type: boolean title: Cloneable @@ -85227,6 +85337,163 @@ components: - name - source_url - type + Device: + type: object + description: Adds support for custom fields and tags. + properties: + id: + type: integer + readOnly: true + url: + type: string + format: uri + readOnly: true + display: + type: string + readOnly: true + name: + type: string + nullable: true + maxLength: 64 + device_type: + $ref: '#/components/schemas/NestedDeviceType' + device_role: + $ref: '#/components/schemas/NestedDeviceRole' + tenant: + allOf: + - $ref: '#/components/schemas/NestedTenant' + nullable: true + platform: + allOf: + - $ref: '#/components/schemas/NestedPlatform' + nullable: true + serial: + type: string + title: Serial number + description: Chassis serial number, assigned by the manufacturer + maxLength: 50 + asset_tag: + type: string + nullable: true + description: A unique tag used to identify this device + maxLength: 50 + site: + $ref: '#/components/schemas/NestedSite' + location: + allOf: + - $ref: '#/components/schemas/NestedLocation' + nullable: true + rack: + allOf: + - $ref: '#/components/schemas/NestedRack' + nullable: true + position: + type: number + format: double + maximum: 1000 + minimum: 0.5 + exclusiveMaximum: true + nullable: true + title: Position (U) + face: + type: object + properties: + value: + type: string + label: + type: string + parent_device: + allOf: + - $ref: '#/components/schemas/NestedDevice' + readOnly: true + status: + type: object + properties: + value: + type: string + label: + type: string + airflow: + type: object + properties: + value: + type: string + label: + type: string + primary_ip: + allOf: + - $ref: '#/components/schemas/NestedIPAddress' + readOnly: true + primary_ip4: + allOf: + - $ref: '#/components/schemas/NestedIPAddress' + nullable: true + primary_ip6: + allOf: + - $ref: '#/components/schemas/NestedIPAddress' + nullable: true + cluster: + allOf: + - $ref: '#/components/schemas/NestedCluster' + nullable: true + virtual_chassis: + allOf: + - $ref: '#/components/schemas/NestedVirtualChassis' + nullable: true + vc_position: + type: integer + maximum: 255 + minimum: 0 + nullable: true + vc_priority: + type: integer + maximum: 255 + minimum: 0 + nullable: true + description: Virtual chassis master election priority + description: + type: string + maxLength: 200 + comments: + type: string + config_template: + allOf: + - $ref: '#/components/schemas/NestedConfigTemplate' + nullable: true + local_context_data: + type: object + additionalProperties: {} + nullable: true + description: Local config context data takes precedence over source contexts + in the final rendered config context + tags: + type: array + items: + $ref: '#/components/schemas/NestedTag' + custom_fields: + type: object + additionalProperties: {} + created: + type: string + format: date-time + readOnly: true + nullable: true + last_updated: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created + - device_role + - device_type + - display + - id + - last_updated + - parent_device + - primary_ip + - site + - url DeviceBay: type: object description: Adds support for custom fields and tags. @@ -86556,6 +86823,10 @@ components: - lsh-pc - lsh-upc - lsh-apc + - lx5 + - lx5-pc + - lx5-upc + - lx5-apc - mpo - mtrj - sc @@ -86601,6 +86872,10 @@ components: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -86771,6 +87046,10 @@ components: - lsh-pc - lsh-upc - lsh-apc + - lx5 + - lx5-pc + - lx5-upc + - lx5-apc - mpo - mtrj - sc @@ -86816,6 +87095,10 @@ components: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -86919,6 +87202,92 @@ components: maxLength: 150 required: - name + HttpHeader: + type: object + description: Adds support for custom fields and tags. + properties: + id: + type: integer + readOnly: true + url: + type: string + format: uri + readOnly: true + name: + type: string + title: Header name + maxLength: 120 + value: + type: string + title: Header value + maxLength: 120 + apply_to: + enum: + - request + - response + type: string + description: |- + * `request` - Request + * `response` - Response + mapping: + $ref: '#/components/schemas/NestedMapping' + custom_fields: + type: object + additionalProperties: {} + created: + type: string + format: date-time + readOnly: true + nullable: true + last_updated: + type: string + format: date-time + readOnly: true + nullable: true + tags: + type: array + items: + $ref: '#/components/schemas/NestedTag' + required: + - created + - id + - last_updated + - mapping + - name + - url + - value + HttpHeaderRequest: + type: object + description: Adds support for custom fields and tags. + properties: + name: + type: string + minLength: 1 + title: Header name + maxLength: 120 + value: + type: string + minLength: 1 + title: Header value + maxLength: 120 + apply_to: + enum: + - request + - response + type: string + description: |- + * `request` - Request + * `response` - Response + custom_fields: + type: object + additionalProperties: {} + tags: + type: array + items: + $ref: '#/components/schemas/NestedTagRequest' + required: + - name + - value IPAddress: type: object description: Adds support for custom fields and tags. @@ -87639,11 +88008,15 @@ components: - 100gbase-x-cfp2 - 200gbase-x-cfp2 - 100gbase-x-cfp4 + - 100gbase-x-cxp - 100gbase-x-cpak - 100gbase-x-qsfp28 - 200gbase-x-qsfp56 + - 200gbase-x-qsfpdd - 400gbase-x-qsfpdd - 400gbase-x-osfp + - 400gbase-x-cdfp + - 400gbase-x-cfp8 - 800gbase-x-qsfpdd - 800gbase-x-osfp - 1000base-kx @@ -87746,11 +88119,15 @@ components: * `100gbase-x-cfp2` - CFP2 (100GE) * `200gbase-x-cfp2` - CFP2 (200GE) * `100gbase-x-cfp4` - CFP4 (100GE) + * `100gbase-x-cxp` - CXP (100GE) * `100gbase-x-cpak` - Cisco CPAK (100GE) * `100gbase-x-qsfp28` - QSFP28 (100GE) * `200gbase-x-qsfp56` - QSFP56 (200GE) + * `200gbase-x-qsfpdd` - QSFP-DD (200GE) * `400gbase-x-qsfpdd` - QSFP-DD (400GE) * `400gbase-x-osfp` - OSFP (400GE) + * `400gbase-x-cdfp` - CDFP (400GE) + * `400gbase-x-cfp8` - CPF8 (400GE) * `800gbase-x-qsfpdd` - QSFP-DD (800GE) * `800gbase-x-osfp` - OSFP (800GE) * `1000base-kx` - 1000BASE-KX (1GE) @@ -88530,11 +88907,15 @@ components: - 100gbase-x-cfp2 - 200gbase-x-cfp2 - 100gbase-x-cfp4 + - 100gbase-x-cxp - 100gbase-x-cpak - 100gbase-x-qsfp28 - 200gbase-x-qsfp56 + - 200gbase-x-qsfpdd - 400gbase-x-qsfpdd - 400gbase-x-osfp + - 400gbase-x-cdfp + - 400gbase-x-cfp8 - 800gbase-x-qsfpdd - 800gbase-x-osfp - 1000base-kx @@ -88637,11 +89018,15 @@ components: * `100gbase-x-cfp2` - CFP2 (100GE) * `200gbase-x-cfp2` - CFP2 (200GE) * `100gbase-x-cfp4` - CFP4 (100GE) + * `100gbase-x-cxp` - CXP (100GE) * `100gbase-x-cpak` - Cisco CPAK (100GE) * `100gbase-x-qsfp28` - QSFP28 (100GE) * `200gbase-x-qsfp56` - QSFP56 (200GE) + * `200gbase-x-qsfpdd` - QSFP-DD (200GE) * `400gbase-x-qsfpdd` - QSFP-DD (400GE) * `400gbase-x-osfp` - OSFP (400GE) + * `400gbase-x-cdfp` - CDFP (400GE) + * `400gbase-x-cfp8` - CPF8 (400GE) * `800gbase-x-qsfpdd` - QSFP-DD (800GE) * `800gbase-x-osfp` - OSFP (800GE) * `1000base-kx` - 1000BASE-KX (1GE) @@ -89789,12 +90174,10 @@ components: readOnly: true source: type: string - title: Name format: uri maxLength: 120 target: type: string - title: Identifier format: uri maxLength: 120 authentication: @@ -89830,9 +90213,19 @@ components: format: date-time readOnly: true nullable: true + tags: + type: array + items: + $ref: '#/components/schemas/NestedTag' + http_headers: + type: array + items: + $ref: '#/components/schemas/NestedHttpHeader' + readOnly: true required: - created - display + - http_headers - id - last_updated - source @@ -89846,13 +90239,11 @@ components: source: type: string minLength: 1 - title: Name format: uri maxLength: 120 target: type: string minLength: 1 - title: Identifier format: uri maxLength: 120 authentication: @@ -89879,6 +90270,10 @@ components: custom_fields: type: object additionalProperties: {} + tags: + type: array + items: + $ref: '#/components/schemas/NestedTagRequest' required: - source - target @@ -91090,6 +91485,69 @@ components: required: - group_id - protocol + NestedHttpHeader: + type: object + description: |- + Represents an object related through a ForeignKey field. On write, it accepts a primary key (PK) value or a + dictionary of attributes which can be used to uniquely identify the related object. This class should be + subclassed to return a full representation of the related object on read. + properties: + id: + type: integer + readOnly: true + url: + type: string + format: uri + readOnly: true + name: + type: string + title: Header name + maxLength: 120 + value: + type: string + title: Header value + maxLength: 120 + apply_to: + enum: + - request + - response + type: string + description: |- + * `request` - Request + * `response` - Response + required: + - id + - name + - url + - value + NestedHttpHeaderRequest: + type: object + description: |- + Represents an object related through a ForeignKey field. On write, it accepts a primary key (PK) value or a + dictionary of attributes which can be used to uniquely identify the related object. This class should be + subclassed to return a full representation of the related object on read. + properties: + name: + type: string + minLength: 1 + title: Header name + maxLength: 120 + value: + type: string + minLength: 1 + title: Header value + maxLength: 120 + apply_to: + enum: + - request + - response + type: string + description: |- + * `request` - Request + * `response` - Response + required: + - name + - value NestedIPAddress: type: object description: |- @@ -91532,6 +91990,27 @@ components: required: - name - slug + NestedMapping: + type: object + description: |- + Represents an object related through a ForeignKey field. On write, it accepts a primary key (PK) value or a + dictionary of attributes which can be used to uniquely identify the related object. This class should be + subclassed to return a full representation of the related object on read. + properties: + id: + type: integer + readOnly: true + url: + type: string + format: uri + readOnly: true + display: + type: string + readOnly: true + required: + - display + - id + - url NestedModule: type: object description: |- @@ -93840,6 +94319,26 @@ components: type: array items: $ref: '#/components/schemas/Group' + PaginatedHttpHeaderList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/HttpHeader' PaginatedIPAddressList: type: object properties: @@ -95424,13 +95923,11 @@ components: source: type: string minLength: 1 - title: Name format: uri maxLength: 120 target: type: string minLength: 1 - title: Identifier format: uri maxLength: 120 authentication: @@ -95457,6 +95954,10 @@ components: custom_fields: type: object additionalProperties: {} + tags: + type: array + items: + $ref: '#/components/schemas/NestedTagRequest' PatchedRIRRequest: type: object description: Adds support for custom fields and tags. @@ -96713,6 +97214,7 @@ components: - read-write - read-only - hidden + - hidden-ifunset type: string description: |- Specifies the visibility of custom field in the UI @@ -96720,6 +97222,7 @@ components: * `read-write` - Read/Write * `read-only` - Read-only * `hidden` - Hidden + * `hidden-ifunset` - Hidden (if unset) is_cloneable: type: boolean title: Cloneable @@ -97221,6 +97724,10 @@ components: - lsh-pc - lsh-upc - lsh-apc + - lx5 + - lx5-pc + - lx5-upc + - lx5-apc - mpo - mtrj - sc @@ -97266,6 +97773,10 @@ components: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -97357,6 +97868,10 @@ components: - lsh-pc - lsh-upc - lsh-apc + - lx5 + - lx5-pc + - lx5-upc + - lx5-apc - mpo - mtrj - sc @@ -97402,6 +97917,10 @@ components: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -97431,6 +97950,37 @@ components: description: type: string maxLength: 200 + PatchedWritableHttpHeaderRequest: + type: object + description: Adds support for custom fields and tags. + properties: + name: + type: string + minLength: 1 + title: Header name + maxLength: 120 + value: + type: string + minLength: 1 + title: Header value + maxLength: 120 + apply_to: + enum: + - request + - response + type: string + description: |- + * `request` - Request + * `response` - Response + mapping: + type: integer + custom_fields: + type: object + additionalProperties: {} + tags: + type: array + items: + $ref: '#/components/schemas/NestedTagRequest' PatchedWritableIPAddressRequest: type: object description: Adds support for custom fields and tags. @@ -97610,11 +98160,15 @@ components: - 100gbase-x-cfp2 - 200gbase-x-cfp2 - 100gbase-x-cfp4 + - 100gbase-x-cxp - 100gbase-x-cpak - 100gbase-x-qsfp28 - 200gbase-x-qsfp56 + - 200gbase-x-qsfpdd - 400gbase-x-qsfpdd - 400gbase-x-osfp + - 400gbase-x-cdfp + - 400gbase-x-cfp8 - 800gbase-x-qsfpdd - 800gbase-x-osfp - 1000base-kx @@ -97717,11 +98271,15 @@ components: * `100gbase-x-cfp2` - CFP2 (100GE) * `200gbase-x-cfp2` - CFP2 (200GE) * `100gbase-x-cfp4` - CFP4 (100GE) + * `100gbase-x-cxp` - CXP (100GE) * `100gbase-x-cpak` - Cisco CPAK (100GE) * `100gbase-x-qsfp28` - QSFP28 (100GE) * `200gbase-x-qsfp56` - QSFP56 (200GE) + * `200gbase-x-qsfpdd` - QSFP-DD (200GE) * `400gbase-x-qsfpdd` - QSFP-DD (400GE) * `400gbase-x-osfp` - OSFP (400GE) + * `400gbase-x-cdfp` - CDFP (400GE) + * `400gbase-x-cfp8` - CPF8 (400GE) * `800gbase-x-qsfpdd` - QSFP-DD (800GE) * `800gbase-x-osfp` - OSFP (800GE) * `1000base-kx` - 1000BASE-KX (1GE) @@ -98403,11 +98961,15 @@ components: - 100gbase-x-cfp2 - 200gbase-x-cfp2 - 100gbase-x-cfp4 + - 100gbase-x-cxp - 100gbase-x-cpak - 100gbase-x-qsfp28 - 200gbase-x-qsfp56 + - 200gbase-x-qsfpdd - 400gbase-x-qsfpdd - 400gbase-x-osfp + - 400gbase-x-cdfp + - 400gbase-x-cfp8 - 800gbase-x-qsfpdd - 800gbase-x-osfp - 1000base-kx @@ -98510,11 +99072,15 @@ components: * `100gbase-x-cfp2` - CFP2 (100GE) * `200gbase-x-cfp2` - CFP2 (200GE) * `100gbase-x-cfp4` - CFP4 (100GE) + * `100gbase-x-cxp` - CXP (100GE) * `100gbase-x-cpak` - Cisco CPAK (100GE) * `100gbase-x-qsfp28` - QSFP28 (100GE) * `200gbase-x-qsfp56` - QSFP56 (200GE) + * `200gbase-x-qsfpdd` - QSFP-DD (200GE) * `400gbase-x-qsfpdd` - QSFP-DD (400GE) * `400gbase-x-osfp` - OSFP (400GE) + * `400gbase-x-cdfp` - CDFP (400GE) + * `400gbase-x-cfp8` - CPF8 (400GE) * `800gbase-x-qsfpdd` - QSFP-DD (800GE) * `800gbase-x-osfp` - OSFP (800GE) * `1000base-kx` - 1000BASE-KX (1GE) @@ -99915,13 +100481,13 @@ components: * `other` - Other maximum_draw: type: integer - maximum: 32767 + maximum: 2147483647 minimum: 1 nullable: true description: Maximum power draw (watts) allocated_draw: type: integer - maximum: 32767 + maximum: 2147483647 minimum: 1 nullable: true description: Allocated power draw (watts) @@ -100161,13 +100727,13 @@ components: * `other` - Other maximum_draw: type: integer - maximum: 32767 + maximum: 2147483647 minimum: 1 nullable: true description: Maximum power draw (watts) allocated_draw: type: integer - maximum: 32767 + maximum: 2147483647 minimum: 1 nullable: true description: Allocated power draw (watts) @@ -100550,6 +101116,10 @@ components: - lsh-pc - lsh-upc - lsh-apc + - lx5 + - lx5-pc + - lx5-upc + - lx5-apc - mpo - mtrj - sc @@ -100595,6 +101165,10 @@ components: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -100684,6 +101258,10 @@ components: - lsh-pc - lsh-upc - lsh-apc + - lx5 + - lx5-pc + - lx5-upc + - lx5-apc - mpo - mtrj - sc @@ -100729,6 +101307,10 @@ components: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -101078,6 +101660,7 @@ components: nullable: true key: type: string + writeOnly: true maxLength: 40 minLength: 40 write_enabled: @@ -102734,13 +103317,13 @@ components: nullable: true maximum_draw: type: integer - maximum: 32767 + maximum: 2147483647 minimum: 1 nullable: true description: Maximum power draw (watts) allocated_draw: type: integer - maximum: 32767 + maximum: 2147483647 minimum: 1 nullable: true description: Allocated power draw (watts) @@ -103034,13 +103617,13 @@ components: nullable: true maximum_draw: type: integer - maximum: 32767 + maximum: 2147483647 minimum: 1 nullable: true description: Maximum power draw (watts) allocated_draw: type: integer - maximum: 32767 + maximum: 2147483647 minimum: 1 nullable: true description: Allocated power draw (watts) @@ -103103,13 +103686,13 @@ components: nullable: true maximum_draw: type: integer - maximum: 32767 + maximum: 2147483647 minimum: 1 nullable: true description: Maximum power draw (watts) allocated_draw: type: integer - maximum: 32767 + maximum: 2147483647 minimum: 1 nullable: true description: Allocated power draw (watts) @@ -103360,13 +103943,13 @@ components: nullable: true maximum_draw: type: integer - maximum: 32767 + maximum: 2147483647 minimum: 1 nullable: true description: Maximum power draw (watts) allocated_draw: type: integer - maximum: 32767 + maximum: 2147483647 minimum: 1 nullable: true description: Allocated power draw (watts) @@ -104549,6 +105132,10 @@ components: - lsh-pc - lsh-upc - lsh-apc + - lx5 + - lx5-pc + - lx5-upc + - lx5-apc - mpo - mtrj - sc @@ -104594,6 +105181,10 @@ components: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -104758,6 +105349,10 @@ components: - lsh-pc - lsh-upc - lsh-apc + - lx5 + - lx5-pc + - lx5-upc + - lx5-apc - mpo - mtrj - sc @@ -104803,6 +105398,10 @@ components: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -106068,10 +106667,6 @@ components: type: string format: date-time nullable: true - key: - type: string - maxLength: 40 - minLength: 40 write_enabled: type: boolean description: Permit create/update/delete operations using this key @@ -106102,6 +106697,7 @@ components: nullable: true key: type: string + writeOnly: true maxLength: 40 minLength: 40 write_enabled: @@ -108845,6 +109441,7 @@ components: - read-write - read-only - hidden + - hidden-ifunset type: string description: |- Specifies the visibility of custom field in the UI @@ -108852,6 +109449,7 @@ components: * `read-write` - Read/Write * `read-only` - Read-only * `hidden` - Hidden + * `hidden-ifunset` - Hidden (if unset) is_cloneable: type: boolean title: Cloneable @@ -109385,6 +109983,10 @@ components: - lsh-pc - lsh-upc - lsh-apc + - lx5 + - lx5-pc + - lx5-upc + - lx5-apc - mpo - mtrj - sc @@ -109430,6 +110032,10 @@ components: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -109526,6 +110132,10 @@ components: - lsh-pc - lsh-upc - lsh-apc + - lx5 + - lx5-pc + - lx5-upc + - lx5-apc - mpo - mtrj - sc @@ -109571,6 +110181,10 @@ components: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -109604,6 +110218,41 @@ components: - name - rear_port - type + WritableHttpHeaderRequest: + type: object + description: Adds support for custom fields and tags. + properties: + name: + type: string + minLength: 1 + title: Header name + maxLength: 120 + value: + type: string + minLength: 1 + title: Header value + maxLength: 120 + apply_to: + enum: + - request + - response + type: string + description: |- + * `request` - Request + * `response` - Response + mapping: + type: integer + custom_fields: + type: object + additionalProperties: {} + tags: + type: array + items: + $ref: '#/components/schemas/NestedTagRequest' + required: + - mapping + - name + - value WritableIPAddressRequest: type: object description: Adds support for custom fields and tags. @@ -109788,11 +110437,15 @@ components: - 100gbase-x-cfp2 - 200gbase-x-cfp2 - 100gbase-x-cfp4 + - 100gbase-x-cxp - 100gbase-x-cpak - 100gbase-x-qsfp28 - 200gbase-x-qsfp56 + - 200gbase-x-qsfpdd - 400gbase-x-qsfpdd - 400gbase-x-osfp + - 400gbase-x-cdfp + - 400gbase-x-cfp8 - 800gbase-x-qsfpdd - 800gbase-x-osfp - 1000base-kx @@ -109895,11 +110548,15 @@ components: * `100gbase-x-cfp2` - CFP2 (100GE) * `200gbase-x-cfp2` - CFP2 (200GE) * `100gbase-x-cfp4` - CFP4 (100GE) + * `100gbase-x-cxp` - CXP (100GE) * `100gbase-x-cpak` - Cisco CPAK (100GE) * `100gbase-x-qsfp28` - QSFP28 (100GE) * `200gbase-x-qsfp56` - QSFP56 (200GE) + * `200gbase-x-qsfpdd` - QSFP-DD (200GE) * `400gbase-x-qsfpdd` - QSFP-DD (400GE) * `400gbase-x-osfp` - OSFP (400GE) + * `400gbase-x-cdfp` - CDFP (400GE) + * `400gbase-x-cfp8` - CPF8 (400GE) * `800gbase-x-qsfpdd` - QSFP-DD (800GE) * `800gbase-x-osfp` - OSFP (800GE) * `1000base-kx` - 1000BASE-KX (1GE) @@ -110586,11 +111243,15 @@ components: - 100gbase-x-cfp2 - 200gbase-x-cfp2 - 100gbase-x-cfp4 + - 100gbase-x-cxp - 100gbase-x-cpak - 100gbase-x-qsfp28 - 200gbase-x-qsfp56 + - 200gbase-x-qsfpdd - 400gbase-x-qsfpdd - 400gbase-x-osfp + - 400gbase-x-cdfp + - 400gbase-x-cfp8 - 800gbase-x-qsfpdd - 800gbase-x-osfp - 1000base-kx @@ -110693,11 +111354,15 @@ components: * `100gbase-x-cfp2` - CFP2 (100GE) * `200gbase-x-cfp2` - CFP2 (200GE) * `100gbase-x-cfp4` - CFP4 (100GE) + * `100gbase-x-cxp` - CXP (100GE) * `100gbase-x-cpak` - Cisco CPAK (100GE) * `100gbase-x-qsfp28` - QSFP28 (100GE) * `200gbase-x-qsfp56` - QSFP56 (200GE) + * `200gbase-x-qsfpdd` - QSFP-DD (200GE) * `400gbase-x-qsfpdd` - QSFP-DD (400GE) * `400gbase-x-osfp` - OSFP (400GE) + * `400gbase-x-cdfp` - CDFP (400GE) + * `400gbase-x-cfp8` - CPF8 (400GE) * `800gbase-x-qsfpdd` - QSFP-DD (800GE) * `800gbase-x-osfp` - OSFP (800GE) * `1000base-kx` - 1000BASE-KX (1GE) @@ -112155,13 +112820,13 @@ components: * `other` - Other maximum_draw: type: integer - maximum: 32767 + maximum: 2147483647 minimum: 1 nullable: true description: Maximum power draw (watts) allocated_draw: type: integer - maximum: 32767 + maximum: 2147483647 minimum: 1 nullable: true description: Allocated power draw (watts) @@ -112404,13 +113069,13 @@ components: * `other` - Other maximum_draw: type: integer - maximum: 32767 + maximum: 2147483647 minimum: 1 nullable: true description: Maximum power draw (watts) allocated_draw: type: integer - maximum: 32767 + maximum: 2147483647 minimum: 1 nullable: true description: Allocated power draw (watts) @@ -112815,6 +113480,10 @@ components: - lsh-pc - lsh-upc - lsh-apc + - lx5 + - lx5-pc + - lx5-upc + - lx5-apc - mpo - mtrj - sc @@ -112860,6 +113529,10 @@ components: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -112953,6 +113626,10 @@ components: - lsh-pc - lsh-upc - lsh-apc + - lx5 + - lx5-pc + - lx5-upc + - lx5-apc - mpo - mtrj - sc @@ -112998,6 +113675,10 @@ components: * `lsh-pc` - LSH/PC * `lsh-upc` - LSH/UPC * `lsh-apc` - LSH/APC + * `lx5` - LX.5 + * `lx5-pc` - LX.5/PC + * `lx5-upc` - LX.5/UPC + * `lx5-apc` - LX.5/APC * `mpo` - MPO * `mtrj` - MTRJ * `sc` - SC @@ -113375,6 +114056,7 @@ components: nullable: true key: type: string + writeOnly: true maxLength: 40 minLength: 40 write_enabled: diff --git a/setup.py b/setup.py index fdf9545..37801a3 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import find_packages, setup setup( name='netbox-rps-plugin', - version='0.6.0', + version='0.7.0', description='A Netbox plugin to add RPS resources', install_requires=[], packages=find_packages('./src'), diff --git a/src/netbox_rps_plugin/__init__.py b/src/netbox_rps_plugin/__init__.py index 0dbb407..979d093 100644 --- a/src/netbox_rps_plugin/__init__.py +++ b/src/netbox_rps_plugin/__init__.py @@ -5,7 +5,7 @@ class NetBoxRpsConfig(PluginConfig): name = 'netbox_rps_plugin' verbose_name = 'NetBox RPS' description = 'A Netbox plugin to add RPS resources' - version = '0.6.0' + version = '0.7.0' author = "Vincent Simonin" author_email = "vincent.simonin@ext.ec.europa.eu" base_url = 'rps' diff --git a/src/netbox_rps_plugin/api/serializers.py b/src/netbox_rps_plugin/api/serializers.py index b2ec82d..404b71c 100644 --- a/src/netbox_rps_plugin/api/serializers.py +++ b/src/netbox_rps_plugin/api/serializers.py @@ -2,44 +2,60 @@ from rest_framework import serializers from ..models import Mapping, HttpHeader from netbox.api.serializers import NetBoxModelSerializer, WritableNestedSerializer -class HttpHeaderSerializer(NetBoxModelSerializer): + +class NestedMappingSerializer(WritableNestedSerializer): url = serializers.HyperlinkedIdentityField( - view_name='plugins-api:netbox_rps_plugin-api:httpheader-detail' + view_name='plugins-api:netbox_rps_plugin-api:mapping-detail' ) class Meta: - model = HttpHeader - fields = ('id', 'name', 'value', 'apply_to') + model = Mapping + fields = ('id', 'url', 'display') -class NestedHttpHeaderSerializer(WritableNestedSerializer): +class HttpHeaderSerializer(NetBoxModelSerializer): url = serializers.HyperlinkedIdentityField( view_name='plugins-api:netbox_rps_plugin-api:httpheader-detail' ) + mapping = NestedMappingSerializer() + class Meta: model = HttpHeader - fields = ('id', 'name', 'value', 'apply_to') + fields = ('id', 'url', 'name', 'value', 'apply_to', 'mapping', 'custom_fields', 'created', 'last_updated', 'tags') -class NestedMappingSerializer(WritableNestedSerializer): + +class NestedHttpHeaderSerializer(WritableNestedSerializer): url = serializers.HyperlinkedIdentityField( - view_name='plugins-api:netbox_rps_plugin-api:mapping-detail' + view_name='plugins-api:netbox_rps_plugin-api:httpheader-detail' ) class Meta: - model = Mapping - fields = ('id', 'url', 'display') + model = HttpHeader + fields = ('id', 'url', 'name', 'value', 'apply_to') class MappingSerializer(NetBoxModelSerializer): url = serializers.HyperlinkedIdentityField( view_name='plugins-api:netbox_rps_plugin-api:mapping-detail' ) - #http_headers = NestedHttpHeaderSerializer() + http_headers = NestedHttpHeaderSerializer(many=True, read_only=True) class Meta: model = Mapping fields = ( - 'id', 'url', 'display', 'source', 'target', 'authentication', 'testingpage', 'webdav', 'Comment', 'custom_fields', 'created', - 'last_updated', 'tags' + 'id', + 'url', + 'display', + 'source', + 'target', + 'authentication', + 'testingpage', + 'webdav', + 'Comment', + 'custom_fields', + 'created', + 'last_updated', + 'tags', + 'http_headers' ) diff --git a/src/netbox_rps_plugin/api/urls.py b/src/netbox_rps_plugin/api/urls.py index 54eee97..de785ed 100644 --- a/src/netbox_rps_plugin/api/urls.py +++ b/src/netbox_rps_plugin/api/urls.py @@ -5,5 +5,6 @@ app_name = 'netbox_rps_plugin' router = NetBoxRouter() router.register('mapping', views.MappingViewSet) +router.register('http_header', views.HttpHeaderViewSet) urlpatterns = router.urls diff --git a/src/netbox_rps_plugin/api/views.py b/src/netbox_rps_plugin/api/views.py index 087798e..6f24c7d 100644 --- a/src/netbox_rps_plugin/api/views.py +++ b/src/netbox_rps_plugin/api/views.py @@ -1,10 +1,18 @@ from netbox.api.viewsets import NetBoxModelViewSet from .. import filtersets, models -from .serializers import MappingSerializer +from utilities.utils import count_related +from .serializers import MappingSerializer, HttpHeaderSerializer +from django.db.models import Count, OuterRef, Subquery class MappingViewSet(NetBoxModelViewSet): - queryset = models.Mapping.objects.all() + queryset = models.Mapping.objects.prefetch_related('http_headers', 'tags').all() serializer_class = MappingSerializer filterset_class = filtersets.MappingFilterSet http_method_names = ['get', 'post', 'patch', 'delete'] + + +class HttpHeaderViewSet(NetBoxModelViewSet): + queryset = models.HttpHeader.objects.prefetch_related('mapping','tags').all() + serializer_class = HttpHeaderSerializer + http_method_names = ['get', 'post', 'patch', 'delete'] diff --git a/src/netbox_rps_plugin/migrations/0002_http_header.py b/src/netbox_rps_plugin/migrations/0002_http_header.py new file mode 100644 index 0000000..16da86e --- /dev/null +++ b/src/netbox_rps_plugin/migrations/0002_http_header.py @@ -0,0 +1,33 @@ +import django.contrib.postgres.fields +from django.db import migrations, models +import django.db.models.deletion +import taggit.managers +import utilities.json + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('netbox_rps_plugin', '0001_initial') + ] + + operations = [ + migrations.CreateModel( + name='HttpHeader', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)), + ('created', models.DateTimeField(auto_now_add=True, null=True)), + ('last_updated', models.DateTimeField(auto_now=True, null=True)), + ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)), + ('name', models.CharField(blank=True, max_length=120)), + ('value', models.CharField(blank=True, max_length=120)), + ('apply_to', models.CharField(max_length=30)), + ('mapping', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='http_headers', to='netbox_rps_plugin.mapping')), + ('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')), + ], + options={ + 'ordering': ('name'), + }, + ), + ] diff --git a/src/netbox_rps_plugin/models.py b/src/netbox_rps_plugin/models.py index c303552..be5a2cb 100644 --- a/src/netbox_rps_plugin/models.py +++ b/src/netbox_rps_plugin/models.py @@ -19,7 +19,7 @@ class AuthenticationChoices(ChoiceSet): class ApplyToChoices(ChoiceSet): - key = 'HHttpHeader.applyTo' + key = 'HttpHeader.applyTo' DEFAULT_VALUE = 'request' @@ -59,7 +59,6 @@ class Mapping(NetBoxModel): webdav = models.BooleanField( default=False, ) - Comment = models.CharField( max_length=500, blank=True @@ -78,8 +77,8 @@ class Mapping(NetBoxModel): return AuthenticationChoices.colors.get(self.authentication) -class HttpHeader(models.Model): - mapping = models.ForeignKey(Mapping, on_delete=models.CASCADE) +class HttpHeader(NetBoxModel): + mapping = models.ForeignKey(Mapping, on_delete=models.CASCADE, related_name='http_headers') name = models.CharField( max_length=120, blank=False, -- GitLab