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

Update location to use .natural_slug and bump up to NB rc.3 #110

Merged
merged 2 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
fail-fast: true
matrix:
python-version: ["3.11"]
nautobot-version: ["2.0.0-rc.2"]
nautobot-version: ["2.0.0-rc.3"]
env:
INVOKE_NAUTOBOT_PLUGIN_NORNIR_PYTHON_VER: "${{ matrix.python-version }}"
INVOKE_NAUTOBOT_PLUGIN_NORNIR_NAUTOBOT_VER: "${{ matrix.nautobot-version }}"
Expand Down Expand Up @@ -122,20 +122,20 @@ jobs:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
db-backend: ["postgresql"]
nautobot-version: ["2.0.0-rc.2"]
nautobot-version: ["2.0.0-rc.3"]
# The include is a method to limit the amount of jobs ran. This essentially
# means that in addition to standard postgres and stable, also the lowest
# supported version and with mysql
include:
- python-version: "3.11"
db-backend: "postgresql"
nautobot-version: "2.0.0-rc.2"
nautobot-version: "2.0.0-rc.3"
- python-version: "3.8"
db-backend: "mysql"
nautobot-version: "2.0.0-rc.2"
- python-version: "3.11"
db-backend: "mysql"
nautobot-version: "latest"
nautobot-version: "2.0.0-rc.3"
# - python-version: "3.11" # TODO pin to 2.0-latest when available
# db-backend: "mysql"
# nautobot-version: "latest"
runs-on: "ubuntu-20.04"
env:
INVOKE_NAUTOBOT_PLUGIN_NORNIR_PYTHON_VER: "${{ matrix.python-version }}"
Expand Down
2 changes: 1 addition & 1 deletion development/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# !!! USE CAUTION WHEN MODIFYING LINES BELOW

# Accepts a desired Nautobot version as build argument, default to 2.0.0-rc.2
ARG NAUTOBOT_VER="2.0.0-rc.2"
ARG NAUTOBOT_VER="2.0.0-rc.3"

# Accepts a desired Python version as build argument, default to 3.8
ARG PYTHON_VER="3.8"
Expand Down
2 changes: 1 addition & 1 deletion nautobot_plugin_nornir/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class NornirConfig(PluginConfig):
)
base_url = "plugin-nornir"
required_settings = []
min_version = "2.0.0-rc.1"
min_version = "2.0.0-rc.3"
max_version = "2.9999"
default_settings = {}
caching_config = {}
Expand Down
4 changes: 2 additions & 2 deletions nautobot_plugin_nornir/plugins/inventory/nautobot_orm.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def create_host(self, device, cred, params: Dict):
host["platform"] = device.platform.network_driver
host["data"]["id"] = device.id
host["data"]["type"] = device.device_type.model
host["data"]["location"] = device.location.name
host["data"]["location"] = device.location.natural_slug
itdependsnetworks marked this conversation as resolved.
Show resolved Hide resolved
host["data"]["role"] = device.role.name
host["data"]["config_context"] = dict(device.get_config_context())
host["data"]["custom_field_data"] = device.custom_field_data
Expand Down Expand Up @@ -241,7 +241,7 @@ def get_host_groups(device):
"""
groups = [
"global",
f"location__{device.location.name}",
f"location__{device.location.natural_slug}",
f"role__{device.role.name}",
f"type__{device.device_type.model}",
f"manufacturer__{device.device_type.manufacturer.name}",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ python = ">=3.8,<3.12"
# Required for Python 3.7 for now. See: https://stackoverflow.com/a/73932581/194311
importlib-metadata = "4.13.0"
# Used for local development
nautobot = { version = "2.0.0-rc.2", optional = true }
nautobot = { version = "2.0.0-rc.3", optional = true }
nornir-nautobot = { git = "https://github.com/nautobot/nornir-nautobot.git", branch = "next-2.0" } # TODO: Point to 2.x version
netutils = ">=1.0.0"

Expand Down
2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def is_truthy(arg):
namespace.configure(
{
"nautobot_plugin_nornir": {
"nautobot_ver": "2.0.0-rc.2",
"nautobot_ver": "2.0.0-rc.3",
"project_name": "nautobot_plugin_nornir",
"python_ver": "3.11",
"local": False,
Expand Down