Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin Status doesn't match Parser status #199

Open
nniehoff opened this issue Aug 16, 2022 · 0 comments
Open

Plugin Status doesn't match Parser status #199

nniehoff opened this issue Aug 16, 2022 · 0 comments
Labels
enhancement New feature or request status: accepted This issue has been accepted by the maintainers team for implementation .6 release

Comments

@nniehoff
Copy link
Contributor

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

  1. Generate sandbox demo data using the gizmo plugin, as it chooses a random status, this error happens randomly
@scetron scetron added .6 release enhancement New feature or request status: accepted This issue has been accepted by the maintainers team for implementation labels Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request status: accepted This issue has been accepted by the maintainers team for implementation .6 release
Projects
None yet
Development

No branches or pull requests

2 participants