nautobot-app-circuit-maintenance
nautobot-app-circuit-maintenance copied to clipboard
Plugin Status doesn't match Parser status
Environment
- Python version: 3.7
- Nautobot version: 1.4
- nautobot-circuit-maintenance version: latest
Expected Behavior
The Nautobot plugin status choices should match the choices from the parser or you end up with issues.
https://github.com/nautobot/nautobot-plugin-circuit-maintenance/blob/develop/nautobot_circuit_maintenance/choices.py#L23 should match https://github.com/networktocode/circuit-maintenance-parser/blob/39a5dcb3087d980e549629b5e0ebcdde9ad10c99/circuit_maintenance_parser/output.py#L33
Observed Behavior
Create a circuit maintenance with Status Unknown using the ORM... Honestly I'm not really sure how I got here but here's the traceback:
Traceback (most recent call last):
File "/usr/local/bin/nautobot-server", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/nautobot/core/cli.py", line 61, in main
initializer=_configure_settings, # Called after defaults
File "/usr/local/lib/python3.7/site-packages/nautobot/core/runner/runner.py", line 266, in run_app
management.execute_from_command_line([runner_name, command] + command_args)
File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/source/plugins/gizmo_plugin/nautobot_gizmo_plugin/management/commands/generate_circuit_maintenance_data.py", line 92, in handle
parsed_notification = provider_parser.get_maintenances(data_to_process)[0]
File "/usr/local/lib/python3.7/site-packages/circuit_maintenance_parser/provider.py", line 138, in get_maintenances
related_exceptions=related_exceptions,
circuit_maintenance_parser.errors.ProviderError: Failed creating Maintenance notification for NTT.
Details:
- Processor SimpleProcessor from NTT failed due to: vText('b'UNKNOWN'') is not a valid Status
Steps to Reproduce
- Generate sandbox demo data using the gizmo plugin, as it chooses a random status, this error happens randomly