Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #124 from nautobot/release-v3.0.0
Browse files Browse the repository at this point in the history
Release v3.0.0
  • Loading branch information
pke11y authored Jan 23, 2023
2 parents c6d3a15 + c224901 commit 86a8b67
Show file tree
Hide file tree
Showing 10 changed files with 372 additions and 234 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Default owner(s) of all files in this repository
* @pke11y @chadell @scetron @h4ndzdatm0ld @whitej6
* @pke11y @chadell @scetron @whitej6 @alhogan

11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## v3.0.0 - 2023-01-23

## Added

- #122 - Updated to support `python-ipfabric` v6 and Nautobot 1.5.
- #123 - New command `get-loaded-snapshots` for greater snapshot details.

## Changed

- New codeowner added - @alhogan.

## v2.0.0 - 2022-09-22

## Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Here is a compatibility matrix and the minimum versions required to run this plu
|-----------|--------|----------|---------|------------------|------------------------------------------------------------------------|------------------------------------------------------------------------------------------|
| 4.4 | 3.7.1 | 1.1.0 | 1.1.0 | 1.2.0 | 0.11.0 | 1.2.7 |
| 5.0.1 | 3.7.1 | 1.1.0 | 1.1.0 | 1.3.0 | 5.0.4 | 5.0.2 |

| 6.0 | 3.7.1 | 1.4.0 | 1.1.0 | 3.0.0 | 6.0.9 | 6.0.2
## Screenshots

![image](https://user-images.githubusercontent.com/29293048/138304572-46d2fa11-8dd2-4722-9ab0-450e20a657a5.png)
Expand Down
1 change: 1 addition & 0 deletions development/dev.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ POSTGRES_HOST=postgres
POSTGRES_USER=nautbot
REDIS_HOST=redis
NAUTOBOT_REDIS_HOST=redis
NAUTOBOT_LOG_LEVEL=DEBUG
REDIS_PORT=6379
# REDIS_SSL=True
# Uncomment REDIS_SSL if using SSL
Expand Down
14 changes: 5 additions & 9 deletions development/docker-compose.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ x-nautobot-base: &nautobot-base
- "creds.env"
tty: true

version: "3.4"
version: "3.8"
services:
nautobot:
ports:
Expand All @@ -24,14 +24,10 @@ services:
<<: *nautobot-build
<<: *nautobot-base
worker:
entrypoint: "nautobot-server rqworker"
depends_on:
- "nautobot"
healthcheck:
disable: true
<<: *nautobot-base
celery:
entrypoint: "nautobot-server celery worker" ## $$ because of docker-compose
entrypoint:
- "sh"
- "-c" # this is to evaluate the $NAUTOBOT_LOG_LEVEL from the env
- "watchmedo auto-restart --directory './' --pattern '*.py' --recursive -- nautobot-server celery worker -l $$NAUTOBOT_LOG_LEVEL --events" ## $$ because of docker-compose
depends_on:
- "nautobot"
healthcheck:
Expand Down
5 changes: 0 additions & 5 deletions development/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,10 @@ version: "3.4"
services:
nautobot:
command: "nautobot-server runserver 0.0.0.0:8080"
# command: "nautobot-server start"
volumes:
- "./nautobot_config.py:/opt/nautobot/nautobot_config.py"
- "../:/source"
worker:
volumes:
- "./nautobot_config.py:/opt/nautobot/nautobot_config.py"
- "../:/source"
celery:
volumes:
- "./nautobot_config.py:/opt/nautobot/nautobot_config.py"
- "../:/source"
21 changes: 7 additions & 14 deletions development/nautobot_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from distutils.util import strtobool
from django.core.exceptions import ImproperlyConfigured
from nautobot.core import settings
from nautobot.core.settings_funcs import parse_redis_connection

# Enforce required configuration parameters
for key in [
Expand Down Expand Up @@ -106,16 +107,9 @@ def is_truthy(arg):
}
}

# Redis variables
REDIS_HOST = os.getenv("REDIS_HOST", "localhost")
REDIS_PORT = os.getenv("REDIS_PORT", 6379)
REDIS_PASSWORD = os.getenv("REDIS_PASSWORD", "")

# Check for Redis SSL
REDIS_SCHEME = "redis"
REDIS_SSL = is_truthy(os.environ.get("REDIS_SSL", False))
if REDIS_SSL:
REDIS_SCHEME = "rediss"
#
# Redis
#

# The django-redis cache is used to establish concurrent locks using Redis. The
# django-rq settings will use the same instance/database by default.
Expand All @@ -125,20 +119,19 @@ def is_truthy(arg):
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": f"{REDIS_SCHEME}://{REDIS_HOST}:{REDIS_PORT}/0",
"LOCATION": parse_redis_connection(redis_database=0),
"TIMEOUT": 300,
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"PASSWORD": REDIS_PASSWORD,
},
}
}

# RQ_QUEUES is not set here because it just uses the default that gets imported
# up top via `from nautobot.core.settings import *`.

# REDIS CACHEOPS
CACHEOPS_REDIS = f"{REDIS_SCHEME}://:{REDIS_PASSWORD}@{REDIS_HOST}:{REDIS_PORT}/1"
# Redis Cacheops
CACHEOPS_REDIS = parse_redis_connection(redis_database=1)

# This key is used for secure generation of random numbers and strings. It must never be exposed outside of this file.
# For optimal security, SECRET_KEY should be at least 50 characters in length and contain a mix of letters, numbers, and
Expand Down
9 changes: 3 additions & 6 deletions nautobot_chatops_ipfabric/ipfabric_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ def get_formatted_snapshots(self):
formatted_snapshots = {}
snapshot_refs = []
for snapshot_ref, snapshot in self.client.snapshots.items():
if snapshot.state != "loaded":
continue
description = "🔒 " if snapshot.locked else ""
if snapshot_ref in [self.LAST, self.PREV, self.LAST_LOCKED]:
description += f"{snapshot_ref}: "
Expand Down Expand Up @@ -149,12 +147,11 @@ def get_snapshots_table(self, formatted_snapshots=None):
self.client.snapshots[snap_id].name or self.EMPTY,
self.client.snapshots[snap_id].start.strftime("%d-%b-%y %H:%M:%S"),
self.client.snapshots[snap_id].end.strftime("%d-%b-%y %H:%M:%S"),
self.client.snapshots[snap_id].count,
self.client.snapshots[snap_id].licensed_count,
self.client.snapshots[snap_id].total_dev_count,
self.client.snapshots[snap_id].licensed_dev_count or self.EMPTY,
str(self.client.snapshots[snap_id].locked),
self.client.snapshots[snap_id].version or self.EMPTY,
getattr(self.client.snapshots[snap_id], "note", None)
or self.EMPTY, # TODO: Note being added to ipf v5.0
getattr(self.client.snapshots[snap_id], "note", None) or self.EMPTY,
)
for snap_id in formatted_snapshots
]
Expand Down
Loading

0 comments on commit 86a8b67

Please sign in to comment.