From 7a655bd36871cbc7ddf2d6a74c5d31b96f6180d3 Mon Sep 17 00:00:00 2001 From: Stephen Kiely Date: Mon, 18 Sep 2023 15:58:19 -0500 Subject: [PATCH 1/2] Prepping for RC --- .github/workflows/ci.yml | 2 +- poetry.lock | 52 +++++++++++++++++++++++++++++++++------- pyproject.toml | 4 ++-- tasks.py | 2 +- 4 files changed, 48 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bdac54e..7e692499 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,7 +104,7 @@ jobs: fail-fast: true matrix: python-version: ["3.10"] - nautobot-version: ["2.0.0-rc.2"] + nautobot-version: ["2.0.0-rc.3"] runs-on: "ubuntu-20.04" env: INVOKE_NAUTOBOT_CHATOPS_PYTHON_VER: "${{ matrix.python-version }}" diff --git a/poetry.lock b/poetry.lock index 4cf7b014..c78d357a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1308,6 +1308,20 @@ files = [ [package.dependencies] Django = ">=2.2" +[[package]] +name = "emoji" +version = "2.8.0" +description = "Emoji for Python" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "emoji-2.8.0-py2.py3-none-any.whl", hash = "sha256:a8468fd836b7ecb6d1eac054c9a591701ce0ccd6c6f7779ad71b66f76664df90"}, + {file = "emoji-2.8.0.tar.gz", hash = "sha256:8d8b5dec3c507444b58890e598fc895fcec022b3f5acb49497c6ccc5208b8b00"}, +] + +[package.extras] +dev = ["coverage", "coveralls", "pytest"] + [[package]] name = "exceptiongroup" version = "1.1.2" @@ -1462,18 +1476,21 @@ smmap = ">=3.0.1,<6" [[package]] name = "gitpython" -version = "3.1.32" +version = "3.1.36" description = "GitPython is a Python library used to interact with Git repositories" optional = false python-versions = ">=3.7" files = [ - {file = "GitPython-3.1.32-py3-none-any.whl", hash = "sha256:e3d59b1c2c6ebb9dfa7a184daf3b6dd4914237e7488a1730a6d8f6f5d0b4187f"}, - {file = "GitPython-3.1.32.tar.gz", hash = "sha256:8d9b8cb1e80b9735e8717c9362079d3ce4c6e5ddeebedd0361b228c3a67a62f6"}, + {file = "GitPython-3.1.36-py3-none-any.whl", hash = "sha256:8d22b5cfefd17c79914226982bb7851d6ade47545b1735a9d010a2a4c26d8388"}, + {file = "GitPython-3.1.36.tar.gz", hash = "sha256:4bb0c2a6995e85064140d31a33289aa5dce80133a23d36fcd372d716c54d3ebf"}, ] [package.dependencies] gitdb = ">=4.0.1,<5" +[package.extras] +test = ["black", "coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mypy", "pre-commit", "pytest", "pytest-cov", "pytest-sugar", "virtualenv"] + [[package]] name = "graphene" version = "2.1.9" @@ -2513,13 +2530,13 @@ files = [ [[package]] name = "nautobot" -version = "2.0.0rc2" +version = "2.0.0rc3" description = "Source of truth and network automation platform." optional = false python-versions = ">=3.8,<3.12" files = [ - {file = "nautobot-2.0.0rc2-py3-none-any.whl", hash = "sha256:0012663d52d4c12ae1327f8e8fef150654f67483ccc3c9c4fc7e3b039a05afb9"}, - {file = "nautobot-2.0.0rc2.tar.gz", hash = "sha256:404a14977ba8e1097c3f6aaf34d21880ea66770e26ac2dc794a5310d8174a552"}, + {file = "nautobot-2.0.0rc3-py3-none-any.whl", hash = "sha256:0fd9f843cba7920aa6fdb5533318b621b312d83565e2964592b80ac84c53ce63"}, + {file = "nautobot-2.0.0rc3.tar.gz", hash = "sha256:9388c55318df0e58418810a56d50c5cdecb78fccb6971ec830e04563e5e3edb5"}, ] [package.dependencies] @@ -2545,7 +2562,8 @@ django-webserver = ">=1.2.0,<1.3.0" djangorestframework = ">=3.14.0,<3.15.0" drf-react-template-framework = ">=0.0.17,<0.0.18" drf-spectacular = {version = "0.26.3", extras = ["sidecar"]} -GitPython = ">=3.1.32,<3.2.0" +emoji = ">=2.8.0,<2.9.0" +GitPython = ">=3.1.36,<3.2.0" graphene-django = ">=2.16.0,<2.17.0" graphene-django-optimizer = ">=0.8.0,<0.9.0" Jinja2 = ">=3.1.2,<3.2.0" @@ -2558,6 +2576,7 @@ packaging = ">=23.1,<23.2" Pillow = ">=10.0.0,<10.1.0" prometheus-client = ">=0.17.1,<0.18.0" psycopg2-binary = ">=2.9.6,<2.10.0" +python-slugify = ">=8.0.1,<8.1.0" pyuwsgi = ">=2.0.21,<2.1.0" PyYAML = ">=6.0,<6.1" social-auth-app-django = ">=5.2.0,<5.3.0" @@ -3452,6 +3471,23 @@ files = [ [package.extras] cli = ["click (>=5.0)"] +[[package]] +name = "python-slugify" +version = "8.0.1" +description = "A Python slugify application that also handles Unicode" +optional = false +python-versions = ">=3.7" +files = [ + {file = "python-slugify-8.0.1.tar.gz", hash = "sha256:ce0d46ddb668b3be82f4ed5e503dbc33dd815d83e2eb6824211310d3fb172a27"}, + {file = "python_slugify-8.0.1-py2.py3-none-any.whl", hash = "sha256:70ca6ea68fe63ecc8fa4fcf00ae651fc8a5d02d93dcd12ae6d4fc7ca46c4d395"}, +] + +[package.dependencies] +text-unidecode = ">=1.3" + +[package.extras] +unidecode = ["Unidecode (>=1.1.1)"] + [[package]] name = "python3-openid" version = "3.2.0" @@ -4584,4 +4620,4 @@ panorama = ["defusedxml", "ipaddr", "netmiko", "netutils", "pan-os-python"] [metadata] lock-version = "2.0" python-versions = ">=3.8,<3.11" -content-hash = "06a23d38741f182e70524328599eda06df17027c3eae267bd58ec709a9ea087a" +content-hash = "09db4e22c35d3023ad37f466737b9033beac38f46095f4f6d71c174c138740a5" diff --git a/pyproject.toml b/pyproject.toml index 4d6e3a87..f6b23c68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "nautobot-chatops" -version = "3.0.0" +version = "3.0.0rc1" description = "A plugin providing chatbot capabilities for Nautobot" authors = ["Network to Code, LLC "] readme = "README.md" @@ -43,7 +43,7 @@ ipfabric = { version = "~6.0.9", optional = true } ipfabric-diagrams = { version = "~6.0.2", optional = true } isodate = { version = "^0.6.1", optional = true } meraki = { version = "^1.7.2", optional = true } -nautobot = "2.0.0rc2" +nautobot = "2.0.0rc3" nautobot-capacity-metrics = "^3.0.0rc3" netmiko = { version = "^3.4.0", optional = true } netutils = { version = "^1.1.0", optional = true } diff --git a/tasks.py b/tasks.py index abb4513c..a4241f7a 100644 --- a/tasks.py +++ b/tasks.py @@ -45,7 +45,7 @@ def is_truthy(arg): namespace.configure( { "nautobot_chatops": { - "nautobot_ver": "2.0.0-rc.2", + "nautobot_ver": "2.0.0-rc.3", "project_name": "nautobot-chatops", "python_ver": "3.10", "local": False, From f6afed89dc49c10e332d0ff7ba841482736f2da5 Mon Sep 17 00:00:00 2001 From: Stephen Kiely Date: Mon, 18 Sep 2023 23:42:14 -0500 Subject: [PATCH 2/2] Compatibility with Nautobot 2.0.0rc3 --- nautobot_chatops/api/serializers.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/nautobot_chatops/api/serializers.py b/nautobot_chatops/api/serializers.py index 2b16058e..583095ee 100644 --- a/nautobot_chatops/api/serializers.py +++ b/nautobot_chatops/api/serializers.py @@ -16,7 +16,7 @@ class Meta: """Meta for CommandToken Serializer.""" model = CommandToken - fields = ("id", "comment", "platform", "token", "url") + fields = "__all__" class AccessGrantSerializer(NautobotModelSerializer): @@ -28,7 +28,7 @@ class Meta: """Meta for AccessGrant Serializer.""" model = AccessGrant - fields = ("id", "command", "subcommand", "grant_type", "name", "value", "url") + fields = "__all__" class CommandLogSerializer(NautobotModelSerializer): @@ -38,15 +38,4 @@ class Meta: """Meta for CommandLog Serializer.""" model = CommandLog - fields = ( - "id", - "start_time", - "user_name", - "user_id", - "platform", - "command", - "subcommand", - "params", - "status", - "details", - ) + fields = "__all__"