Skip to content

Commit

Permalink
Merge pull request #344 from nautobot/release/v3.1.1
Browse files Browse the repository at this point in the history
Release/v3.1.1
  • Loading branch information
gsnider2195 authored Nov 19, 2024
2 parents 310a6a1 + 6a8d442 commit 2a7e923
Show file tree
Hide file tree
Showing 39 changed files with 1,077 additions and 754 deletions.
11 changes: 6 additions & 5 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,23 @@
"max_nautobot_version": "2.9999",
"camel_name": "NautobotChatOpsApp",
"project_short_description": "Nautobot ChatOps App",
"model_class_name": "None",
"model_class_name": "CommandLog",
"open_source_license": "Apache-2.0",
"docs_base_url": "https://docs.nautobot.com",
"docs_app_url": "https://docs.nautobot.com/projects/chatops/en/latest",
"_drift_manager": {
"template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
"template_dir": "nautobot-app",
"template_ref": "refs/tags/nautobot-app-v2.3.2",
"template_ref": "refs/tags/nautobot-app-v2.4.0",
"cookie_dir": "",
"branch_prefix": "drift-manager",
"pull_request_strategy": "create",
"post_actions": [
"black"
"ruff",
"poetry"
],
"draft": true,
"baked_commit_ref": "81d2070deb685f72fb02bf7f73be007d37ce3376"
"draft": false,
"baked_commit_ref": "8b2952d1ee1fdae0ae408ac26a8d09c9485da662"
}
}
}
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
- name: "Linting: ruff"
run: "poetry run invoke ruff"
run: "poetry run invoke ruff --action lint"
check-docs-build:
runs-on: "ubuntu-22.04"
env:
Expand Down Expand Up @@ -176,9 +176,9 @@ jobs:
- name: "Run Tests"
run: "poetry run invoke unittest"
changelog:
if: |
if: >
contains(fromJson('["develop","ltm-1.6"]'), github.base_ref) &&
(github.head_ref != 'main')
(github.head_ref != 'main') && (!startsWith(github.head_ref, 'release'))
runs-on: "ubuntu-22.04"
steps:
- name: "Check out repository code"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/upstream_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ name: "Nautobot Upstream Monitor"
on: # yamllint disable-line rule:truthy rule:comments
schedule:
- cron: "0 4 */2 * *" # every other day at midnight
workflow_dispatch:

jobs:
upstream-test:
uses: "nautobot/nautobot/.github/workflows/plugin_upstream_testing_base.yml@develop"
with: # Below could potentially be collapsed into a single argument if a concrete relationship between both is enforced
invoke_context_name: "NAUTOBOT_CHATOPS"
plugin_name: "nautobot-app-chatops"
plugin_name: "nautobot-chatops"
6 changes: 4 additions & 2 deletions development/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@ WORKDIR /source
COPY . /source

# Build args must be declared in each stage
ARG NAUTOBOT_VER
ARG PYTHON_VER

# Constrain the Nautobot version to NAUTOBOT_VER
# Constrain the Nautobot version to NAUTOBOT_VER, fall back to installing from git branch if not available on PyPi
# In CI, this should be done outside of the Dockerfile to prevent cross-compile build failures
ARG CI
RUN if [ -z "${CI+x}" ]; then \
INSTALLED_NAUTOBOT_VER=$(pip show nautobot | grep "^Version" | sed "s/Version: //"); \
poetry add --lock nautobot@${INSTALLED_NAUTOBOT_VER} --python ${PYTHON_VER}; fi
poetry add --lock nautobot@${INSTALLED_NAUTOBOT_VER} --python ${PYTHON_VER} || \
poetry add --lock git+https://github.com/nautobot/nautobot.git#${NAUTOBOT_VER} --python ${PYTHON_VER}; fi

# Install the app
RUN poetry install --extras all --with dev
Expand Down
1 change: 1 addition & 0 deletions development/development.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ NAUTOBOT_BANNER_TOP="Local"
NAUTOBOT_CHANGELOG_RETENTION=0

NAUTOBOT_DEBUG=True
NAUTOBOT_LOG_DEPRECATION_WARNINGS=True
NAUTOBOT_LOG_LEVEL=DEBUG
NAUTOBOT_METRICS_ENABLED=True
NAUTOBOT_NAPALM_TIMEOUT=5
Expand Down
38 changes: 26 additions & 12 deletions development/nautobot_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,36 +146,29 @@
# | `session_cache_timeout` | Controls session cache | No | `86400` |
# = Chat Platforms ===================
# - Mattermost -----------------------
"enable_mattermost": is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_MATTERMOST")),
"mattermost_api_token": os.environ.get("MATTERMOST_API_TOKEN"),
"mattermost_url": os.environ.get("MATTERMOST_URL"),
# - Microsoft Teams ------------------
"enable_ms_teams": is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_MS_TEAMS")),
"microsoft_app_id": os.environ.get("MICROSOFT_APP_ID"),
"microsoft_app_password": os.environ.get("MICROSOFT_APP_PASSWORD"),
# - Slack ----------------------------
"enable_slack": is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_SLACK")),
"slack_api_token": os.environ.get("SLACK_API_TOKEN"),
"slack_app_token": os.environ.get("SLACK_APP_TOKEN"),
"slack_signing_secret": os.environ.get("SLACK_SIGNING_SECRET"),
"slack_slash_command_prefix": os.environ.get("SLACK_SLASH_COMMAND_PREFIX", "/"),
# - Cisco Webex ----------------------
"enable_webex": is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_WEBEX")),
"webex_msg_char_limit": int(os.getenv("WEBEX_MSG_CHAR_LIMIT", "7439")),
"webex_signing_secret": os.environ.get("WEBEX_SIGNING_SECRET"),
"webex_token": os.environ.get("WEBEX_ACCESS_TOKEN"),
# = Integrations =====================
# - Cisco ACI ------------------------
"enable_aci": is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_ACI")),
"aci_creds": {x: os.environ[x] for x in os.environ if "APIC" in x},
# - AWX / Ansible Tower --------------
"enable_ansible": is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_ANSIBLE")),
"tower_password": os.getenv("NAUTOBOT_TOWER_PASSWORD"),
"tower_uri": os.getenv("NAUTOBOT_TOWER_URI"),
"tower_username": os.getenv("NAUTOBOT_TOWER_USERNAME"),
"tower_verify_ssl": is_truthy(os.getenv("NAUTOBOT_TOWER_VERIFY_SSL", "true")),
# - Arista CloudVision ---------------
"enable_aristacv": is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_ARISTACV")),
"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 All @@ -184,7 +177,6 @@
"aristacv_cvp_username": os.environ.get("ARISTACV_CVP_USERNAME"),
"aristacv_on_prem": is_truthy(os.environ.get("ARISTACV_ON_PREM")),
# - Grafana --------------------------
"enable_grafana": is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_GRAFANA")),
"grafana_url": os.environ.get("GRAFANA_URL", ""),
"grafana_api_key": os.environ.get("GRAFANA_API_KEY", ""),
"grafana_default_width": 0,
Expand All @@ -194,26 +186,48 @@
"grafana_org_id": 1,
"grafana_default_tz": "America/Denver",
# - IPFabric --------------------------
"enable_ipfabric": is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_IPFABRIC")),
"ipfabric_api_token": os.environ.get("IPFABRIC_API_TOKEN"),
"ipfabric_host": os.environ.get("IPFABRIC_HOST"),
"ipfabric_timeout": os.environ.get("IPFABRIC_TIMEOUT", 15),
"ipfabric_verify": is_truthy(os.environ.get("IPFABRIC_VERIFY", True)),
# - Cisco Meraki ---------------------
"enable_meraki": is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_MERAKI")),
"meraki_dashboard_api_key": os.environ.get("MERAKI_API_KEY"),
# - Palo Alto Panorama ---------------
"enable_panorama": is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_PANORAMA")),
"panorama_host": os.environ.get("PANORAMA_HOST"),
"panorama_password": os.environ.get("PANORAMA_PASSWORD"),
"panorama_user": os.environ.get("PANORAMA_USER"),
# - Cisco NSO ------------------------
"enable_nso": is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_NSO")),
"nso_url": os.environ.get("NSO_URL"),
"nso_username": os.environ.get("NSO_USERNAME"),
"nso_password": os.environ.get("NSO_PASSWORD"),
"nso_request_timeout": os.environ.get("NSO_REQUEST_TIMEOUT", 60),
},
}
if os.getenv("NAUTOBOT_CHATOPS_ENABLE_MATTERMOST", "") != "":
PLUGINS_CONFIG["nautobot_chatops"]["enable_mattermost"] = (
is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_MATTERMOST")),
)
if os.getenv("NAUTOBOT_CHATOPS_ENABLE_MS_TEAMS", "") != "":
PLUGINS_CONFIG["nautobot_chatops"]["enable_ms_teams"] = is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_MS_TEAMS"))
if os.getenv("NAUTOBOT_CHATOPS_ENABLE_SLACK", "") != "":
PLUGINS_CONFIG["nautobot_chatops"]["enable_slack"] = is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_SLACK"))
if os.getenv("NAUTOBOT_CHATOPS_ENABLE_WEBEX", "") != "":
PLUGINS_CONFIG["nautobot_chatops"]["enable_webex"] = is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_WEBEX"))
if os.getenv("NAUTOBOT_CHATOPS_ENABLE_ACI", "") != "":
PLUGINS_CONFIG["nautobot_chatops"]["enable_aci"] = is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_ACI"))
if os.getenv("NAUTOBOT_CHATOPS_ENABLE_ANSIBLE", "") != "":
PLUGINS_CONFIG["nautobot_chatops"]["enable_ansible"] = is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_ANSIBLE"))
if os.getenv("NAUTOBOT_CHATOPS_ENABLE_ARISTACV", "") != "":
PLUGINS_CONFIG["nautobot_chatops"]["enable_aristacv"] = is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_ARISTACV"))
if os.getenv("NAUTOBOT_CHATOPS_ENABLE_GRAFANA", "") != "":
PLUGINS_CONFIG["nautobot_chatops"]["enable_grafana"] = is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_GRAFANA"))
if os.getenv("NAUTOBOT_CHATOPS_ENABLE_IPFABRIC", "") != "":
PLUGINS_CONFIG["nautobot_chatops"]["enable_ipfabric"] = is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_IPFABRIC"))
if os.getenv("NAUTOBOT_CHATOPS_ENABLE_MERAKI", "") != "":
PLUGINS_CONFIG["nautobot_chatops"]["enable_meraki"] = is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_MERAKI"))
if os.getenv("NAUTOBOT_CHATOPS_ENABLE_PANORAMA", "") != "":
PLUGINS_CONFIG["nautobot_chatops"]["enable_panorama"] = is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_PANORAMA"))
if os.getenv("NAUTOBOT_CHATOPS_ENABLE_NSO", "") != "":
PLUGINS_CONFIG["nautobot_chatops"]["enable_nso"] = is_truthy(os.getenv("NAUTOBOT_CHATOPS_ENABLE_NSO"))

METRICS_ENABLED = is_truthy(os.getenv("NAUTOBOT_METRICS_ENABLED"))
15 changes: 15 additions & 0 deletions development/towncrier_template.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@

# v{{ versiondata.version.split(".")[:2] | join(".") }} Release Notes

This document describes all new features and changes in the release. The format is based on [Keep a
Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic
Versioning](https://semver.org/spec/v2.0.0.html).

## Release Overview

- Major features or milestones
- Changes to compatibility with Nautobot and/or other apps, libraries etc.

{% if render_title %}
## [v{{ versiondata.version }} ({{ versiondata.date }})](https://github.com/nautobot/nautobot-app-chatops/releases/tag/v{{ versiondata.version}})

Expand All @@ -12,7 +23,11 @@
{% if definitions[category]['showcontent'] %}
{% for text, values in sections[section][category].items() %}
{% for item in text.split('\n') %}
{% if values %}
- {{ values|join(', ') }} - {{ item.strip() }}
{% else %}
- {{ item.strip() }}
{% endif %}
{% endfor %}
{% endfor %}

Expand Down
2 changes: 1 addition & 1 deletion docs/admin/platforms/mattermost.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- Copy the displayed url matching the Server you want to add the chatbot to.
- Make sure to include the `http://` or `https://`.
- If shown, make sure to include the port. Ex. `https://example.com:8065`
6. Proceed to the [Install Guide](../install.md#Install-Guide) section.
6. Proceed to the [Install Guide](../install.md#install-guide) section.

**Note:** For every Slash Command created for Mattermost, a separate token will be generated.

Expand Down
2 changes: 1 addition & 1 deletion docs/admin/platforms/microsoft_teams.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
4. Open your MS Teams client and select **Apps** at the bottom of the left-side menu.
5. Select **Built for your org** to see the new Nautobot app.
6. Select the new app and click the blue **Add** button.
7. Proceed to the [Install Guide](../install.md#Install-Guide) section.
7. Proceed to the [Install Guide](../install.md#install-guide) section.

## Nautobot Config

Expand Down
2 changes: 1 addition & 1 deletion docs/admin/platforms/slack.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ PLUGINS_CONFIG = {
![slack integration invite](../../images/add_nautobot.png)

Once these steps are completed, you can proceed to the [Install Guide](../install.md#Install-Guide) section.
Once these steps are completed, you can proceed to the [Install Guide](../install.md#install-guide) section.

## Configuring Multiple Chatbots in a Workspace

Expand Down
2 changes: 1 addition & 1 deletion docs/admin/platforms/webex.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
- secret: (enter a secret string that you don't mind having passed around as plaintext)
- Change the `resource` to "attachmentActions" and run the API call again to create a second webhook.
4. Configure the `webex_signing_secret` in your `.creds.env` to match the Webhook secret string that you selected above.
5. Proceed to the [Installation Guide](../install.md#Install-Guide) section.
5. Proceed to the [Installation Guide](../install.md#install-guide) section.

## Deprecation Warning

Expand Down
31 changes: 31 additions & 0 deletions docs/admin/release_notes/version_3.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@
# v3.1 Release Notes

<!-- towncrier release notes start -->
## [v3.1.1 (2024-11-18)](https://github.com/nautobot/nautobot-app-chatops/releases/tag/v3.1.1)

### Added

- [#341](https://github.com/nautobot/nautobot-app-chatops/issues/341) - Added a "grafana disabled" view in case a user clicks on a grafana nav menu item when the grafana integration is disabled.

### Removed

- [#341](https://github.com/nautobot/nautobot-app-chatops/issues/341) - Removed all grafana integration API files since there are no API views provided by grafana integration.

### Fixed

- [#341](https://github.com/nautobot/nautobot-app-chatops/issues/341) - Fixed django-constance not being upgradable due to this app accessing the database before migrations could run.
- [#341](https://github.com/nautobot/nautobot-app-chatops/issues/341) - Removed conditional logic for adding grafana navigation menu items.
- [#341](https://github.com/nautobot/nautobot-app-chatops/issues/341) - Fixed Nautobot v2.3 incompatibility caused by saved views not being able to determine the models' table classes.
- [#341](https://github.com/nautobot/nautobot-app-chatops/issues/341) - Added exception handling for cases where diffsync is not installed, since it's marked as optional.

### Dependencies

- [#333](https://github.com/nautobot/nautobot-app-chatops/issues/333) - Fixed slack-sdk to version ^3.19.0 for `files_upload_v2`.

### Documentation

- [#331](https://github.com/nautobot/nautobot-app-chatops/issues/331) - Fix unrecognized relative link and anchors.

### Housekeeping

- [#0](https://github.com/nautobot/nautobot-app-chatops/issues/0) - Rebaked from the cookie `nautobot-app-v2.4.0`.
- [#339](https://github.com/nautobot/nautobot-app-chatops/issues/339) - Changed model_class_name in .cookiecutter.json to a valid model to help with drift management.
- [#341](https://github.com/nautobot/nautobot-app-chatops/issues/341) - Fixed dev environment nautobot_config.py to fall back to constance if environment variable is not used.

## [v3.1.0 (2024-09-30)](https://github.com/nautobot/nautobot-app-chatops/releases/tag/v3.1.0)

### Added
Expand Down
24 changes: 7 additions & 17 deletions docs/dev/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,24 +187,14 @@ The branching policy includes the following tenets:

Nautobot ChatOps App will observe semantic versioning, as of 1.0. This may result in a quick turnaround in minor versions to keep pace with an ever-growing feature set.

### Backporting to Older Releases

If you are backporting any fixes to a prior major or minor version of this app, please open an issue, comment on an existing issue, or post in the [Network to Code Slack](https://networktocode.slack.com/) (channel `#nautobot`).

We will create a `release-X.Y` branch for you to open your PR against and cut a new release once the PR is successfully merged.

## Release Policy

Nautobot ChatOps App has currently no intended scheduled release schedule, and will release new features in minor versions.

When a new release, from `develop` to `main`, is created the following should happen.

- A release PR is created from `develop` with:
- Update the release notes in `docs/admin/release_notes/version_<major>.<minor>.md` file to reflect the changes.
- Change the version from `<major>.<minor>.<patch>-beta` to `<major>.<minor>.<patch>` in `pyproject.toml`.
- Set the PR to the `main` branch.
- Ensure the tests for the PR pass.
- Merge the PR.
- Create a new tag:
- The tag should be in the form of `v<major>.<minor>.<patch>`.
- The title should be in the form of `v<major>.<minor>.<patch>`.
- The description should be the changes that were added to the `version_<major>.<minor>.md` document.
- If merged into `main`, then push from `main` to `develop`, in order to retain the merge commit created when the PR was merged
- A post release PR is created with:
- Change the version from `<major>.<minor>.<patch>` to `<major>.<minor>.<patch + 1>-beta` in both `pyproject.toml` and `nautobot.__init__.__version__`.
- Set the PR to the proper branch, `develop`.
- Once tests pass, merge.
The steps taken by maintainers when creating a new release are documented in the [release checklist](./release_checklist.md).
2 changes: 1 addition & 1 deletion docs/dev/dev_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ This option is limited to testing an Azure bot, but allows you to test the bot's

There are a few requirements to get this up and running, the steps are provided below to help a user get started.

1. Follow the instructions on setting up the [Azure bot](../../admin/platforms/microsoft_teams/#azure).
1. Follow the instructions on setting up the [Azure bot](../admin/platforms/microsoft_teams.md#create-azure-bot).

!!! note
You can skip the `messaging endpoint` definition while testing in the Bot Emulator.
Expand Down
Loading

0 comments on commit 2a7e923

Please sign in to comment.