We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add support for an OS Model to define target OS image per device
### Proposed Functionality
Support a model to define OSs that should be used by each device and ensure there is also a relationship between vendor and platform.

### Use Case
As a user, I should be able to define the intended OS or list of supported OSs per device. I should preferably be able to run search queries within the UI using greater than and less than (<>) operators to verify if my devices.

### Database Changes
Yes, will require a new database model(s), as well as updates to Vendor and Platform models

### External Dependencies
Maybe - need to explore external library(ies) for parsing idiosyncratic vendor OS version strings.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `nautobot/dcim/api/urls.py`
Content:
```
1 from nautobot.core.api.routers import OrderedDefaultRouter
2 
3 from . import views
4 
5 router = OrderedDefaultRouter()
6 router.APIRootView = views.DCIMRootView
7 
8 # Locations
9 router.register("location-types", views.LocationTypeViewSet)
10 router.register("locations", views.LocationViewSet)
11 
12 # Racks
13 router.register("rack-groups", views.RackGroupViewSet)
14 router.register("racks", views.RackViewSet)
15 router.register("rack-reservations", views.RackReservationViewSet)
16 
17 # Device types
18 router.register("hardware-families", views.HardwareFamilyViewSet)
19 router.register("manufacturers", views.ManufacturerViewSet)
20 router.register("device-types", views.DeviceTypeViewSet)
21 
22 # Device type components
23 router.register("console-port-templates", views.ConsolePortTemplateViewSet)
24 router.register("console-server-port-templates", views.ConsoleServerPortTemplateViewSet)
25 router.register("power-port-templates", views.PowerPortTemplateViewSet)
26 router.register("power-outlet-templates", views.PowerOutletTemplateViewSet)
27 router.register("interface-templates", views.InterfaceTemplateViewSet)
28 router.register("front-port-templates", views.FrontPortTemplateViewSet)
29 router.register("rear-port-templates", views.RearPortTemplateViewSet)
30 router.register("device-bay-templates", views.DeviceBayTemplateViewSet)
31 
32 # Devices
33 router.register("platforms", views.PlatformViewSet)
34 router.register("devices", views.DeviceViewSet)
35 
36 # Device components
37 router.register("console-ports", views.ConsolePortViewSet)
38 router.register("console-server-ports", views.ConsoleServerPortViewSet)
39 router.register("power-ports", views.PowerPortViewSet)
40 router.register("power-outlets", views.PowerOutletViewSet)
41 router.register("interfaces", views.InterfaceViewSet)
42 router.register("front-ports", views.FrontPortViewSet)
43 router.register("rear-ports", views.RearPortViewSet)
44 router.register("device-bays", views.DeviceBayViewSet)
45 router.register("inventory-items", views.InventoryItemViewSet)
46 
47 # Connections
48 router.register("console-connections", views.ConsoleConnectionViewSet, basename="consoleconnections")
49 router.register("power-connections", views.PowerConnectionViewSet, basename="powerconnections")
50 router.register(
51     "interface-connections",
52     views.InterfaceConnectionViewSet,
53     basename="interfaceconnections",
54 )
55 
56 # Cables
57 router.register("cables", views.CableViewSet)
58 
59 # Interface Redundancy Group
60 router.register("interface-redundancy-groups", views.InterfaceRedundancyGroupViewSet)
61 router.register("interface-redundancy-group-associations", views.InterfaceRedundancyGroupAssociationViewSet)
62 
63 # Virtual chassis
64 router.register("virtual-chassis", views.VirtualChassisViewSet)
65 
66 # Power
67 router.register("power-panels", views.PowerPanelViewSet)
68 router.register("power-feeds", views.PowerFeedViewSet)
69 
70 # Device Redundancy Group
71 router.register("device-redundancy-groups", views.DeviceRedundancyGroupViewSet)
72 
73 # Software images
74 router.register("software-images", views.SoftwareImageViewSet)
75 router.register("software-versions", views.SoftwareVersionViewSet)
76 router.register("device-type-to-software-image", views.DeviceTypeToSoftwareImageViewSet)
77 
78 # Miscellaneous
79 router.register("connected-device", views.ConnectedDeviceViewSet, basename="connected-device")
80 
81 app_name = "dcim-api"
82 urlpatterns = router.urls
83
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/nautobot/dcim/api/urls.py b/nautobot/dcim/api/urls.py
--- a/nautobot/dcim/api/urls.py
+++ b/nautobot/dcim/api/urls.py
@@ -73,7 +73,7 @@
 # Software images
 router.register("software-images", views.SoftwareImageViewSet)
 router.register("software-versions", views.SoftwareVersionViewSet)
-router.register("device-type-to-software-image", views.DeviceTypeToSoftwareImageViewSet)
+router.register("device-types-to-software-images", views.DeviceTypeToSoftwareImageViewSet)
 
 # Miscellaneous
 router.register("connected-device", views.ConnectedDeviceViewSet, basename="connected-device")

{"golden_diff": "diff --git a/nautobot/dcim/api/urls.py b/nautobot/dcim/api/urls.py\n--- a/nautobot/dcim/api/urls.py\n+++ b/nautobot/dcim/api/urls.py\n@@ -73,7 +73,7 @@\n # Software images\n router.register(\"software-images\", views.SoftwareImageViewSet)\n router.register(\"software-versions\", views.SoftwareVersionViewSet)\n-router.register(\"device-type-to-software-image\", views.DeviceTypeToSoftwareImageViewSet)\n+router.register(\"device-types-to-software-images\", views.DeviceTypeToSoftwareImageViewSet)\n \n # Miscellaneous\n router.register(\"connected-device\", views.ConnectedDeviceViewSet, basename=\"connected-device\")\n", "issue": "Add support for an OS Model to define target OS image per device\n### Proposed Functionality\r\nSupport a model to define OSs that should be used by each device and ensure there is also a relationship between vendor and platform.\r\n\r\n### Use Case\r\nAs a user, I should be able to define the intended OS or list of supported OSs per device. I should preferably be able to run search queries within the UI using greater than and less than (<>) operators to verify if my devices.\r\n\r\n### Database Changes\r\nYes, will require a new database model(s), as well as updates to Vendor and Platform models\r\n\r\n### External Dependencies\r\nMaybe - need to explore external library(ies) for parsing idiosyncratic vendor OS version strings.\r\n\n", "before_files": [{"content": "from nautobot.core.api.routers import OrderedDefaultRouter\n\nfrom . import views\n\nrouter = OrderedDefaultRouter()\nrouter.APIRootView = views.DCIMRootView\n\n# Locations\nrouter.register(\"location-types\", views.LocationTypeViewSet)\nrouter.register(\"locations\", views.LocationViewSet)\n\n# Racks\nrouter.register(\"rack-groups\", views.RackGroupViewSet)\nrouter.register(\"racks\", views.RackViewSet)\nrouter.register(\"rack-reservations\", views.RackReservationViewSet)\n\n# Device types\nrouter.register(\"hardware-families\", views.HardwareFamilyViewSet)\nrouter.register(\"manufacturers\", views.ManufacturerViewSet)\nrouter.register(\"device-types\", views.DeviceTypeViewSet)\n\n# Device type components\nrouter.register(\"console-port-templates\", views.ConsolePortTemplateViewSet)\nrouter.register(\"console-server-port-templates\", views.ConsoleServerPortTemplateViewSet)\nrouter.register(\"power-port-templates\", views.PowerPortTemplateViewSet)\nrouter.register(\"power-outlet-templates\", views.PowerOutletTemplateViewSet)\nrouter.register(\"interface-templates\", views.InterfaceTemplateViewSet)\nrouter.register(\"front-port-templates\", views.FrontPortTemplateViewSet)\nrouter.register(\"rear-port-templates\", views.RearPortTemplateViewSet)\nrouter.register(\"device-bay-templates\", views.DeviceBayTemplateViewSet)\n\n# Devices\nrouter.register(\"platforms\", views.PlatformViewSet)\nrouter.register(\"devices\", views.DeviceViewSet)\n\n# Device components\nrouter.register(\"console-ports\", views.ConsolePortViewSet)\nrouter.register(\"console-server-ports\", views.ConsoleServerPortViewSet)\nrouter.register(\"power-ports\", views.PowerPortViewSet)\nrouter.register(\"power-outlets\", views.PowerOutletViewSet)\nrouter.register(\"interfaces\", views.InterfaceViewSet)\nrouter.register(\"front-ports\", views.FrontPortViewSet)\nrouter.register(\"rear-ports\", views.RearPortViewSet)\nrouter.register(\"device-bays\", views.DeviceBayViewSet)\nrouter.register(\"inventory-items\", views.InventoryItemViewSet)\n\n# Connections\nrouter.register(\"console-connections\", views.ConsoleConnectionViewSet, basename=\"consoleconnections\")\nrouter.register(\"power-connections\", views.PowerConnectionViewSet, basename=\"powerconnections\")\nrouter.register(\n    \"interface-connections\",\n    views.InterfaceConnectionViewSet,\n    basename=\"interfaceconnections\",\n)\n\n# Cables\nrouter.register(\"cables\", views.CableViewSet)\n\n# Interface Redundancy Group\nrouter.register(\"interface-redundancy-groups\", views.InterfaceRedundancyGroupViewSet)\nrouter.register(\"interface-redundancy-group-associations\", views.InterfaceRedundancyGroupAssociationViewSet)\n\n# Virtual chassis\nrouter.register(\"virtual-chassis\", views.VirtualChassisViewSet)\n\n# Power\nrouter.register(\"power-panels\", views.PowerPanelViewSet)\nrouter.register(\"power-feeds\", views.PowerFeedViewSet)\n\n# Device Redundancy Group\nrouter.register(\"device-redundancy-groups\", views.DeviceRedundancyGroupViewSet)\n\n# Software images\nrouter.register(\"software-images\", views.SoftwareImageViewSet)\nrouter.register(\"software-versions\", views.SoftwareVersionViewSet)\nrouter.register(\"device-type-to-software-image\", views.DeviceTypeToSoftwareImageViewSet)\n\n# Miscellaneous\nrouter.register(\"connected-device\", views.ConnectedDeviceViewSet, basename=\"connected-device\")\n\napp_name = \"dcim-api\"\nurlpatterns = router.urls\n", "path": "nautobot/dcim/api/urls.py"}], "after_files": [{"content": "from nautobot.core.api.routers import OrderedDefaultRouter\n\nfrom . import views\n\nrouter = OrderedDefaultRouter()\nrouter.APIRootView = views.DCIMRootView\n\n# Locations\nrouter.register(\"location-types\", views.LocationTypeViewSet)\nrouter.register(\"locations\", views.LocationViewSet)\n\n# Racks\nrouter.register(\"rack-groups\", views.RackGroupViewSet)\nrouter.register(\"racks\", views.RackViewSet)\nrouter.register(\"rack-reservations\", views.RackReservationViewSet)\n\n# Device types\nrouter.register(\"hardware-families\", views.HardwareFamilyViewSet)\nrouter.register(\"manufacturers\", views.ManufacturerViewSet)\nrouter.register(\"device-types\", views.DeviceTypeViewSet)\n\n# Device type components\nrouter.register(\"console-port-templates\", views.ConsolePortTemplateViewSet)\nrouter.register(\"console-server-port-templates\", views.ConsoleServerPortTemplateViewSet)\nrouter.register(\"power-port-templates\", views.PowerPortTemplateViewSet)\nrouter.register(\"power-outlet-templates\", views.PowerOutletTemplateViewSet)\nrouter.register(\"interface-templates\", views.InterfaceTemplateViewSet)\nrouter.register(\"front-port-templates\", views.FrontPortTemplateViewSet)\nrouter.register(\"rear-port-templates\", views.RearPortTemplateViewSet)\nrouter.register(\"device-bay-templates\", views.DeviceBayTemplateViewSet)\n\n# Devices\nrouter.register(\"platforms\", views.PlatformViewSet)\nrouter.register(\"devices\", views.DeviceViewSet)\n\n# Device components\nrouter.register(\"console-ports\", views.ConsolePortViewSet)\nrouter.register(\"console-server-ports\", views.ConsoleServerPortViewSet)\nrouter.register(\"power-ports\", views.PowerPortViewSet)\nrouter.register(\"power-outlets\", views.PowerOutletViewSet)\nrouter.register(\"interfaces\", views.InterfaceViewSet)\nrouter.register(\"front-ports\", views.FrontPortViewSet)\nrouter.register(\"rear-ports\", views.RearPortViewSet)\nrouter.register(\"device-bays\", views.DeviceBayViewSet)\nrouter.register(\"inventory-items\", views.InventoryItemViewSet)\n\n# Connections\nrouter.register(\"console-connections\", views.ConsoleConnectionViewSet, basename=\"consoleconnections\")\nrouter.register(\"power-connections\", views.PowerConnectionViewSet, basename=\"powerconnections\")\nrouter.register(\n    \"interface-connections\",\n    views.InterfaceConnectionViewSet,\n    basename=\"interfaceconnections\",\n)\n\n# Cables\nrouter.register(\"cables\", views.CableViewSet)\n\n# Interface Redundancy Group\nrouter.register(\"interface-redundancy-groups\", views.InterfaceRedundancyGroupViewSet)\nrouter.register(\"interface-redundancy-group-associations\", views.InterfaceRedundancyGroupAssociationViewSet)\n\n# Virtual chassis\nrouter.register(\"virtual-chassis\", views.VirtualChassisViewSet)\n\n# Power\nrouter.register(\"power-panels\", views.PowerPanelViewSet)\nrouter.register(\"power-feeds\", views.PowerFeedViewSet)\n\n# Device Redundancy Group\nrouter.register(\"device-redundancy-groups\", views.DeviceRedundancyGroupViewSet)\n\n# Software images\nrouter.register(\"software-images\", views.SoftwareImageViewSet)\nrouter.register(\"software-versions\", views.SoftwareVersionViewSet)\nrouter.register(\"device-types-to-software-images\", views.DeviceTypeToSoftwareImageViewSet)\n\n# Miscellaneous\nrouter.register(\"connected-device\", views.ConnectedDeviceViewSet, basename=\"connected-device\")\n\napp_name = \"dcim-api\"\nurlpatterns = router.urls\n", "path": "nautobot/dcim/api/urls.py"}]}