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

Fix Cloudvision naming conflict #292

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# Default owners for all files in this repository
* @glennmatthews @jvanderaa @smk4664 @whitej6
* @glennmatthews @jvanderaa @smk4664 @whitej6 @romanukes
/nautobot_chatops/integrations/aci/ @pato23arg
/nautobot_chatops/integrations/ansible/ @smk4664
/nautobot_chatops/integrations/aristacv/ @qduk
/nautobot_chatops/integrations/grafana/ @davidban77
/nautobot_chatops/integrations/meraki/ @jeffkala
/nautobot_chatops/integrations/ipfabric/ @alhogan @pke11y
/nautobot_chatops/integrations/panorama/ @jdrew82
5 changes: 0 additions & 5 deletions development/grafana/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ scrape_configs:
static_configs:
- targets: ["nautobot:8080"]

- job_name: "nautobot_rq"
metrics_path: "/api/plugins/capacity-metrics/rq-metrics"
static_configs:
- targets: ["nautobot:8080"]

- job_name: "worker"
dns_sd_configs:
- names:
Expand Down
8 changes: 4 additions & 4 deletions docs/admin/install/aristacv_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ Before configuring the integration, please ensure the following:

## Command Setup

Create a top-level command named `aristacv` in your enabled chat platform. For detailed instructions related to your specific chat platform, refer to the [platform specific set up](./index.md#chat-platforms-configuration).
Create a top-level command named `cloudvision` in your enabled chat platform. For detailed instructions related to your specific chat platform, refer to the [platform specific set up](./index.md#chat-platforms-configuration).

## Configuration

You must define the following values in your `nautobot_config.py` file:

| Configuration Setting | Mandatory? | Default | Available on Admin Config |
| ---------------------- | ---------- | --------------------- | ------------------------- |
| `enable_aristacv` | **Yes** | False | Yes |
| `enable_cloudvision` | **Yes** | False | Yes |
| `aristacv_cvaas_url` | No | "www.arista.io:443" | No |
| `aristacv_cvaas_token` | No | None | No |
| `aristacv_cvp_host` | No | None | No |
Expand All @@ -39,7 +39,7 @@ PLUGINS = ["nautobot_chatops"]
PLUGINS_CONFIG = {
"nautobot_chatops": {
...
"enable_aristacv": True,
"enable_cloudvision": True,
"aristacv_cvaas_url": os.environ.get("ARISTACV_CVAAS_URL"),
"aristacv_cvaas_token": os.environ.get("ARISTACV_CVAAS_TOKEN"),
"aristacv_cvp_host": os.environ.get("ARISTACV_CVP_HOST"),
Expand Down Expand Up @@ -98,7 +98,7 @@ Once you have updated your environment file, restart both nautobot and nautobot-
# }
"nautobot_chatops": {
# Enable Arista CloudVision integration
"enable_aristacv": True,
"enable_cloudvision": True,
"aristacv_cvaas_url": os.environ.get("ARISTACV_CVAAS_URL"),
"aristacv_cvaas_token": os.environ.get("ARISTACV_CVAAS_TOKEN"),
"aristacv_cvp_host": os.environ.get("ARISTACV_CVP_HOST"),
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The design goal of this plugin is to be able to write chatbot commands once and
|-- User input ->| |
| |-- HTTP POST ->|
| | | nautobot_chatops/views/*
| | |-- Enqueue job,dispatcher to RQ --> <queue>
| | |-- Enqueue job,dispatcher to Celery --> <queue>
| |<---- 200 OK --|
|<- "Received" --|
```
Expand Down
4 changes: 2 additions & 2 deletions docs/dev/dev_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ This project provides the ability to develop and manage the Nautobot server loca
The upside to having the Nautobot service handled by Docker rather than locally is that you do not have to manage the Nautobot server. The [Docker logs](#docker-logs) provide the majority of the information you will need to help troubleshoot, while getting started quickly and not requiring you to perform several manual steps and remembering to have the Nautobot server running in a separate terminal while you develop.

!!! note
The local environment still uses Docker containers for the supporting services (Postgres, Redis, and RQ Worker), but the Nautobot server is handled locally by you, the developer.
The local environment still uses Docker containers for the supporting services (Postgres, Redis, and Celery Worker), but the Nautobot server is handled locally by you, the developer.

Follow the directions below for the specific development environment that you choose.

Expand Down Expand Up @@ -218,7 +218,7 @@ This will start all of the Docker containers used for hosting Nautobot. You shou
```bash
➜ docker ps
****CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ee90fbfabd77 nautobot-chatops/nautobot:2.0.0-py3.11 "nautobot-server rqw…" 16 seconds ago Up 13 seconds nautobot_chatops_worker_1
ee90fbfabd77 nautobot-chatops/nautobot:2.0.0-py3.11 "nautobot-server cel…" 16 seconds ago Up 13 seconds nautobot_chatops_worker_1
b8adb781d013 nautobot-chatops/nautobot:2.0.0-py3.11 "/docker-entrypoint.…" 20 seconds ago Up 15 seconds 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp nautobot_chatops_nautobot_1
d64ebd60675d nautobot-chatops/nautobot:2.0.0-py3.11 "mkdocs serve -v -a …" 25 seconds ago Up 18 seconds 0.0.0.0:8001->8080/tcp, :::8001->8080/tcp nautobot_chatops_docs_1
e72d63129b36 postgres:13-alpine "docker-entrypoint.s…" 25 seconds ago Up 19 seconds 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp nautobot_chatops_postgres_1
Expand Down
2 changes: 1 addition & 1 deletion nautobot_chatops/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class NautobotChatOpsConfig(NautobotAppConfig):
"enable_webex": ConstanceConfigItem(default=False, help_text="Enable Webex Chat Platform.", field_type=bool),
"enable_aci": ConstanceConfigItem(default=False, help_text="Enable Cisco ACI Integration.", field_type=bool),
"enable_ansible": ConstanceConfigItem(default=False, help_text="Enable Ansible Integration.", field_type=bool),
"enable_aristacv": ConstanceConfigItem(
"enable_cloudvision": ConstanceConfigItem(
default=False, help_text="Enable Arista CloudVision Integration.", field_type=bool
),
"enable_grafana": ConstanceConfigItem(default=False, help_text="Enable Grafana Integration.", field_type=bool),
Expand Down
2 changes: 1 addition & 1 deletion nautobot_chatops/integrations/ansible/tower.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django.conf import settings
import requests

logger = logging.getLogger("rq.worker")
logger = logging.getLogger(__name__)

_CONFIG = settings.PLUGINS_CONFIG["nautobot_chatops"]

Expand Down
2 changes: 1 addition & 1 deletion nautobot_chatops/integrations/aristacv/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
)


logger = logging.getLogger("rq.worker")
logger = logging.getLogger(__name__)
dir_path = os.path.dirname(os.path.realpath(__file__))
CLOUDVISION_LOGO_PATH = "nautobot_cloudvision/cloudvision_logo.png"
CLOUDVISION_LOGO_ALT = "CloudVision Logo"
Expand Down
2 changes: 1 addition & 1 deletion nautobot_chatops/integrations/panorama/worker.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Example rq worker to handle /panorama chat commands with 1 subcommand addition."""
"""Example worker to handle /panorama chat commands with 1 subcommand addition."""
import logging
import os
import re
Expand Down