Code Monkey home page Code Monkey logo

nautobot-plugin-chatops-arista-cloudvision's Issues

Error when the `ON_PREM` is not set in the config

Environment

  • Python version: 3.6.13
  • Nautobot version: 1.1.2
  • nautobot-chatops-extension-arista version: 1.0.1

Expected Behavior

Documentation says that the default value is False.

ON_PREM: By default this is set to False, this must be changed to True if using an on-prem instance of CloudVision.

Observed Behavior

The following config is used:

    "nautobot_chatops_arista_cloudvision": {
        "cvaas_token": os.environ.get("ARISTA_CV_TOKEN"),
    }

The following error is displayed:

celery_1    | Traceback (most recent call last):
celery_1    |   File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 450, in trace_task
celery_1    |     R = retval = fun(*args, **kwargs)
celery_1    |   File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 731, in __protected_call__
celery_1    |     return self.run(*args, **kwargs)
celery_1    |   File "/usr/local/lib/python3.6/site-packages/nautobot_chatops/utils.py", line 40, in celery_worker_task
celery_1    |     return function(subcommand, params=params, dispatcher_class=dispatcher_class, context=context)
celery_1    |   File "/usr/local/lib/python3.6/site-packages/nautobot_chatops_arista_cloudvision/worker.py", line 73, in cloudvision_chatbot
celery_1    |     return handle_subcommands("cloudvision", subcommand, **kwargs)
celery_1    |   File "<decorator-gen-1>", line 2, in handle_subcommands
celery_1    |   File "/usr/local/lib/python3.6/site-packages/prometheus_client/context_managers.py", line 66, in wrapped
celery_1    |     return func(*args, **kwargs)
celery_1    |   File "/usr/local/lib/python3.6/site-packages/nautobot_chatops/workers/__init__.py", line 298, in handle_subcommands
celery_1    |     result = registry[command]["subcommands"][subcommand]["worker"](dispatcher, *params)
celery_1    |   File "/usr/local/lib/python3.6/site-packages/nautobot_chatops/workers/__init__.py", line 187, in wrapper
celery_1    |     return func(*args, **kwargs)
celery_1    |   File "/usr/local/lib/python3.6/site-packages/nautobot_chatops_arista_cloudvision/worker.py", line 83, in get_devices_in_container
celery_1    |     container_list = get_cloudvision_containers()
celery_1    |   File "/usr/local/lib/python3.6/site-packages/nautobot_chatops_arista_cloudvision/utils.py", line 81, in get_cloudvision_containers
celery_1    |     clnt = connect_cvp()
celery_1    |   File "/usr/local/lib/python3.6/site-packages/nautobot_chatops_arista_cloudvision/utils.py", line 63, in connect_cvp
celery_1    |     if ON_PREM.lower() == "true":
celery_1    | AttributeError: 'NoneType' object has no attribute 'lower'

Steps to Reproduce

  1. Run the Nautobot with the plugin. Use the provided config.
  2. Run the command from Slack.
  3. Check the error in the debug output.

The `/cloudvision` command does not work correctly

Environment

  • Python version: 3.6.13
  • Nautobot version: 1.1.2
  • nautobot-chatops-extension-arista version: 1.0.1

Expected Behavior

I want to run the command /cloudvision get-device-configuration in Slack to see the device configuration.

Observed Behavior

When I select the device from the dropdown menu, I get an error.

Screenshot 2021-09-23 at 12 54 58

Using the whole command /cloudvision get-device-configuration nyc-spine-02 works.

Steps to Reproduce

  1. Deploy the plugin and run Nautobot.
  2. Execute the command /cloudvision get-device-configuration in Slack

The plugin is not compatible with the nautobot-ssot-aristacv plugin version 1.2.0

Environment

  • Python version: any
  • Nautobot version: 1.4.1
  • nautobot-chatops-extension-arista version: 1.0.2

Expected Behavior

I want to run the nautobot-ssot-aristacv plugin and nautobot-chatops-arista-cloudvision plugin on the same Nautobot instance.
I am using the latest version of nautobot-ssot-aristacv (1.2.0), which is not compatible with the latest version of nautobot-chatops-arista-cloudvision plugin.

Observed Behavior

This is seen when adding both plugins:

Because nautobot-ssot-aristacv (1.2.0) depends on cloudvision (1.4.4)
   and nautobot-chatops-arista-cloudvision (1.0.2) depends on cloudvision (1.1.0), nautobot-ssot-aristacv (1.2.0) is incompatible with nautobot-chatops-arista-cloudvision (1.0.2).
  So, because nautobot-gizmo depends on both nautobot-chatops-arista-cloudvision (1.0.2) and nautobot-ssot-aristacv (1.2.0), version solving failed.

  at ~/.local/lib/python3.10/site-packages/poetry/puzzle/solver.py:241 in _solve
      237│             packages = result.packages
      238│         except OverrideNeeded as e:
      239│             return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
      240│         except SolveFailure as e:
    → 241│             raise SolverProblemError(e)
      242│ 
      243│         results = dict(
      244│             depth_first_search(
      245│                 PackageNode(self._package, packages), aggregate_package_nodes

Steps to Reproduce

  1. Deploy the Nautobot instance
  2. Add the nautobot-chatops-arista-cloudvision plugin version 1.0.2 using poetry
  3. Add the nautobot-ssot-aristacv plugin version 1.2.0 using poetry

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.