nautobot / nautobot-app-device-onboarding

Device Onboarding Plugin for Nautobot
https://docs.nautobot.com/projects/device-onboarding/en/latest/
Other
44 stars 31 forks source link

Need additional validation of selectable syncing options #232

Open jeffkala opened 2 months ago

jeffkala commented 2 months ago

https://github.com/nautobot/nautobot-app-device-onboarding/blob/8647c2b592ccbc6070e90c40e2980cfb072ac20a/nautobot_device_onboarding/nornir_plays/command_getter.py#L119

We're attempting to check job inputs and make sure the commands are in the command files above. However, we do additional json schema validation that doesn't take that into account. Need to solve this while we have features (e.g cables) that are supported across all platform

Below is a juniper devices run with cables still checked even though they're not supported yet.

Aug 29 05:16:31 v02d-nautobot01 nautobot-server[3034786]: Failed validating 'type' in schema['properties']['cables']['items']['properties']['remote_interface']:
Aug 29 05:16:31 v02d-nautobot01 nautobot-server[3034786]:     {'description': 'Interface Name of the remote device', 'type': 'string'}
Aug 29 05:16:31 v02d-nautobot01 nautobot-server[3034786]: On instance['cables'][0]['remote_interface']:
Aug 29 05:16:31 v02d-nautobot01 nautobot-server[3034786]:     None
Aug 29 05:16:31 v02d-nautobot01 nautobot-server[3034786]: [2024-08-29 10:16:31,267: DEBUG/ForkPoolWorker-1] Schema validation failed for AUSLAB-SW01 Error: None is not of type 'string'
Aug 29 05:16:31 v02d-nautobot01 nautobot-server[3034786]: Failed validating 'type' in schema['properties']['cables']['items']['properties']['remote_interface']:
Aug 29 05:16:31 v02d-nautobot01 nautobot-server[3034786]:     {'description': 'Interface Name of the remote device', 'type': 'string'}
Aug 29 05:16:31 v02d-nautobot01 nautobot-server[3034786]: On instance['cables'][0]['remote_interface']:
Aug 29 05:16:31 v02d-nautobot01 nautobot-server[3034786]:     None