-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtopic: GraphQLtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Milestone
Description
Deployment Type
Self-hosted
NetBox Version
v4.0.5
Python Version
3.11
Linked Issue
Steps to Reproduce
NetBox v4.0.x - Observed Behavior
- Setup a fresh NetBox v4.0.x installation
- Import new Site
--- name: Test Site slug: test_site status: active facility: Facility 1
- Import Manufacturer
--- name: Test Manufacturer slug: test_manufacturer
- Import Device Type
--- manufacturer: Test Manufacturer model: Test Model slug: test_model u_height: 0 interfaces: - name: eth0 type: 1000base-t - name: eth1 type: 1000base-t
- Import Device Role
--- name: Test Role slug: test_role color: ffff00
- Import Devices
--- - name: Test Device 1 role: Test Role manufacturer: Test Manufacturer device_type: Test Model slug: test_device_1 site: Test Site status: active - name: Test Device 2 role: Test Role manufacturer: Test Manufacturer device_type: Test Model slug: test_device_1 site: Test Site status: active
- Import Interfaces
--- - id: 1 mac_address: DE:AD:BE:EF:00:69 - id: 2 mac_address: 00:00:00:00:00:00 - id: 3 mac_address: DE:AD:BE:EF:00:42 - id: 4 mac_address: 00:00:00:00:00:01
- Use GraphQL Webgui Query
Query:
query vendor_query($mac_vendor: [String!], $facility_name: String!, $device_role: [String!]) { site_list(filters: {facility: {exact: $facility_name}}) { name devices(filters: {role: $device_role}) { name interfaces(filters: {mac_address: {i_contains: $mac_vendor}}) { name mac_address } } } }
Query Variables
{ "mac_vendor": "DE:AD", "facility_name": "Facility 1", "device_role": "test_role" } - Query Result
{ "data": null, "errors": [ { "message": "String cannot represent a non string value: {i_contains: $mac_vendor}", "locations": [ { "line": 6, "column": 41 } ] } ] }
NetBox v3.7.6 - Expected Behavior
- Setup a fresh NetBox v3.7.6 installation
- Import new Site
--- name: Test Site slug: test_site status: active facility: Facility 1
- Import Manufacturer
--- name: Test Manufacturer slug: test_manufacturer
- Import Device Type
--- manufacturer: Test Manufacturer model: Test Model slug: test_model u_height: 0 interfaces: - name: eth0 type: 1000base-t - name: eth1 type: 1000base-t
- Import Device Role
--- name: Test Role slug: test_role color: ffff00
- Import Devices
--- - name: Test Device 1 role: Test Role manufacturer: Test Manufacturer device_type: Test Model slug: test_device_1 site: Test Site status: active - name: Test Device 2 role: Test Role manufacturer: Test Manufacturer device_type: Test Model slug: test_device_1 site: Test Site status: active
- Import Interfaces
--- - id: 1 mac_address: DE:AD:BE:EF:00:69 - id: 2 mac_address: 00:00:00:00:00:00 - id: 3 mac_address: DE:AD:BE:EF:00:42 - id: 4 mac_address: 00:00:00:00:00:01
- Use GraphQL Webgui Query
Query:
query vendor_query($mac_vendor: [String!], $facility_name: [String!], $device_role: [String!]) { site_list(facility: $facility_name) { name devices(role: $device_role) { name interfaces(mac_address__ic: $mac_vendor) { name mac_address } } } }
Query Variables
{ "mac_vendor": "DE:AD", "facility_name": "Facility 1", "device_role": "test_role" } - Query Result
{ "data": { "site_list": [ { "name": "Test Site", "devices": [ { "name": "Test Device 1", "interfaces": [ { "name": "eth0", "mac_address": "DE:AD:BE:EF:00:69" } ] }, { "name": "Test Device 2", "interfaces": [ { "name": "eth0", "mac_address": "DE:AD:BE:EF:00:42" } ] } ] } ] } }
sebastianreloaded
Metadata
Metadata
Assignees
Labels
netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtopic: GraphQLtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application