From 6fe37bca2da5c569abf9ea7a3c4efaecff676c23 Mon Sep 17 00:00:00 2001 From: nniehoff Date: Wed, 18 May 2022 07:54:17 -0600 Subject: [PATCH 1/8] Fixing No ssidis returned --- nautobot_chatops_ipfabric/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nautobot_chatops_ipfabric/worker.py b/nautobot_chatops_ipfabric/worker.py index 47dc8b4..f5c331c 100644 --- a/nautobot_chatops_ipfabric/worker.py +++ b/nautobot_chatops_ipfabric/worker.py @@ -689,7 +689,7 @@ def wireless(dispatcher, option=None, ssid=None): """Get wireless information by client or ssid.""" snapshot_id = get_user_snapshot(dispatcher) logger.debug("Getting SSIDs") - ssids = [(ssidi["wlanSsid"].lower()) for ssidi in ipfabric_api.get_wireless_ssids(snapshot_id)] + ssids = [(ssidi["wlanSsid"].lower()) for ssidi in ipfabric_api.get_wireless_ssids(snapshot_id) if ssidi] if not ssids: dispatcher.send_blocks( From 425b502f6e9f8d11349972c65f9e7978ce3d3704 Mon Sep 17 00:00:00 2001 From: Stephen Corry Date: Wed, 18 May 2022 10:05:45 -0400 Subject: [PATCH 2/8] check if ssids are present in ipfabric check if ssids are returned before returning them. --- nautobot_chatops_ipfabric/worker.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nautobot_chatops_ipfabric/worker.py b/nautobot_chatops_ipfabric/worker.py index f5c331c..349d30c 100644 --- a/nautobot_chatops_ipfabric/worker.py +++ b/nautobot_chatops_ipfabric/worker.py @@ -689,9 +689,10 @@ def wireless(dispatcher, option=None, ssid=None): """Get wireless information by client or ssid.""" snapshot_id = get_user_snapshot(dispatcher) logger.debug("Getting SSIDs") - ssids = [(ssidi["wlanSsid"].lower()) for ssidi in ipfabric_api.get_wireless_ssids(snapshot_id) if ssidi] - - if not ssids: + + ssids_raw = ipfabric_api.get_wireless_ssids(snapshot_id) + + if not ssids_raw: dispatcher.send_blocks( [ *dispatcher.command_response_header( @@ -705,6 +706,8 @@ def wireless(dispatcher, option=None, ssid=None): ] ) return True + + ssids = [(ssidi["wlanSsid"].lower()) for ssidi in ssids_raw] if not option: dispatcher.prompt_from_menu( From dafe03d3f4b497dfc7693c72a72971ee9a906ffa Mon Sep 17 00:00:00 2001 From: nniehoff Date: Wed, 18 May 2022 08:17:01 -0600 Subject: [PATCH 3/8] Black --- nautobot_chatops_ipfabric/worker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nautobot_chatops_ipfabric/worker.py b/nautobot_chatops_ipfabric/worker.py index 349d30c..25a1d92 100644 --- a/nautobot_chatops_ipfabric/worker.py +++ b/nautobot_chatops_ipfabric/worker.py @@ -689,9 +689,9 @@ def wireless(dispatcher, option=None, ssid=None): """Get wireless information by client or ssid.""" snapshot_id = get_user_snapshot(dispatcher) logger.debug("Getting SSIDs") - + ssids_raw = ipfabric_api.get_wireless_ssids(snapshot_id) - + if not ssids_raw: dispatcher.send_blocks( [ @@ -706,7 +706,7 @@ def wireless(dispatcher, option=None, ssid=None): ] ) return True - + ssids = [(ssidi["wlanSsid"].lower()) for ssidi in ssids_raw] if not option: From 8bfe409d84db5a0fd34c74c72a4ce10a41929c20 Mon Sep 17 00:00:00 2001 From: nniehoff Date: Wed, 18 May 2022 08:26:11 -0600 Subject: [PATCH 4/8] Removing lower conversion --- nautobot_chatops_ipfabric/worker.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nautobot_chatops_ipfabric/worker.py b/nautobot_chatops_ipfabric/worker.py index 25a1d92..1170de9 100644 --- a/nautobot_chatops_ipfabric/worker.py +++ b/nautobot_chatops_ipfabric/worker.py @@ -689,10 +689,9 @@ def wireless(dispatcher, option=None, ssid=None): """Get wireless information by client or ssid.""" snapshot_id = get_user_snapshot(dispatcher) logger.debug("Getting SSIDs") + ssids = ipfabric_api.get_wireless_ssids(snapshot_id) - ssids_raw = ipfabric_api.get_wireless_ssids(snapshot_id) - - if not ssids_raw: + if not ssids: dispatcher.send_blocks( [ *dispatcher.command_response_header( @@ -707,8 +706,6 @@ def wireless(dispatcher, option=None, ssid=None): ) return True - ssids = [(ssidi["wlanSsid"].lower()) for ssidi in ssids_raw] - if not option: dispatcher.prompt_from_menu( f"{BASE_CMD} wireless", From 4077bf5b44d377cad9c5ae3ea333b6ff39cc8e60 Mon Sep 17 00:00:00 2001 From: Uros Bajzelj Date: Thu, 19 May 2022 09:29:22 +0200 Subject: [PATCH 5/8] Fixing empty wlanSsid returned --- nautobot_chatops_ipfabric/worker.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nautobot_chatops_ipfabric/worker.py b/nautobot_chatops_ipfabric/worker.py index 1170de9..266b1f4 100644 --- a/nautobot_chatops_ipfabric/worker.py +++ b/nautobot_chatops_ipfabric/worker.py @@ -722,7 +722,7 @@ def wireless(dispatcher, option=None, ssid=None): def get_wireless_ssids(dispatcher, ssid=None, snapshot_id=None): """Get All Wireless SSID Information.""" - ssids = [(ssid_["wlanSsid"].lower()) for ssid_ in ipfabric_api.get_wireless_ssids(snapshot_id)] + ssids = ipfabric_api.get_wireless_ssids(snapshot_id) if not ssids: dispatcher.send_blocks( [ @@ -738,8 +738,6 @@ def get_wireless_ssids(dispatcher, ssid=None, snapshot_id=None): ) return True - ssids = ipfabric_api.get_wireless_ssids(snapshot_id) - dispatcher.send_blocks( [ *dispatcher.command_response_header( @@ -781,6 +779,7 @@ def get_wireless_clients(dispatcher, ssid=None, snapshot_id=None): ssids = [ (f"{ssid_['wlanSsid']}-{ssid_['radioDscr']}", ssid_["wlanSsid"]) for ssid_ in ipfabric_api.get_wireless_ssids(snapshot_id) + if ssid_["wlanSsid"] ] if not ssids: dispatcher.send_blocks( From 66961d593a826b4921e86eb29aa7de6480c518a0 Mon Sep 17 00:00:00 2001 From: Christian Adell Date: Mon, 23 May 2022 09:32:05 +0200 Subject: [PATCH 6/8] Update plugin description --- nautobot_chatops_ipfabric/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nautobot_chatops_ipfabric/__init__.py b/nautobot_chatops_ipfabric/__init__.py index c272596..45efd8f 100644 --- a/nautobot_chatops_ipfabric/__init__.py +++ b/nautobot_chatops_ipfabric/__init__.py @@ -17,8 +17,8 @@ class IPFabricConfig(PluginConfig): verbose_name = "IPFabric" version = __version__ author = "Network to Code, LLC" - description = "IPFabric." - base_url = "ipfabric.io" + description = "Nautobot Chatops IPFabric" + base_url = "nautobot-chatops-ipfabric" required_settings = [] min_version = "1.0.0" max_version = "1.9999" From ab09412312e60b9b43a7876c108adff20339a9d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 May 2022 07:22:28 +0000 Subject: [PATCH 7/8] Bump pyjwt from 2.3.0 to 2.4.0 Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.3.0 to 2.4.0. - [Release notes](https://github.com/jpadilla/pyjwt/releases) - [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst) - [Commits](https://github.com/jpadilla/pyjwt/compare/2.3.0...2.4.0) --- updated-dependencies: - dependency-name: pyjwt dependency-type: indirect ... Signed-off-by: dependabot[bot] --- poetry.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 231e18b..72d561e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1202,12 +1202,12 @@ social-auth-app-django = ">=5.0.0,<5.1.0" svgwrite = ">=1.4.1,<1.5.0" [package.extras] -all = ["django-auth-ldap (>=4.0.0,<4.1.0)", "django-storages (>=1.12.3,<1.13.0)", "mysqlclient (>=2.1.0,<2.2.0)", "napalm (>=3.3.1,<3.4.0)", "social-auth-core[openidconnect,saml] (>=4.2.0,<4.3.0)"] +all = ["django-auth-ldap (>=4.0.0,<4.1.0)", "django-storages (>=1.12.3,<1.13.0)", "mysqlclient (>=2.1.0,<2.2.0)", "napalm (>=3.3.1,<3.4.0)", "social-auth-core[saml,openidconnect] (>=4.2.0,<4.3.0)"] ldap = ["django-auth-ldap (>=4.0.0,<4.1.0)"] remote_storage = ["django-storages (>=1.12.3,<1.13.0)"] mysql = ["mysqlclient (>=2.1.0,<2.2.0)"] napalm = ["napalm (>=3.3.1,<3.4.0)"] -sso = ["social-auth-core[openidconnect,saml] (>=4.2.0,<4.3.0)"] +sso = ["social-auth-core[saml,openidconnect] (>=4.2.0,<4.3.0)"] [[package]] name = "nautobot-capacity-metrics" @@ -1420,7 +1420,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pyjwt" -version = "2.3.0" +version = "2.4.0" description = "JSON Web Token implementation in Python" category = "main" optional = false @@ -2729,8 +2729,8 @@ pyflakes = [ {file = "pyflakes-2.3.1.tar.gz", hash = "sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db"}, ] pyjwt = [ - {file = "PyJWT-2.3.0-py3-none-any.whl", hash = "sha256:e0c4bb8d9f0af0c7f5b1ec4c5036309617d03d56932877f2f7a0beeb5318322f"}, - {file = "PyJWT-2.3.0.tar.gz", hash = "sha256:b888b4d56f06f6dcd777210c334e69c737be74755d3e5e9ee3fe67dc18a0ee41"}, + {file = "PyJWT-2.4.0-py3-none-any.whl", hash = "sha256:72d1d253f32dbd4f5c88eaf1fdc62f3a19f676ccbadb9dbc5d07e951b2b26daf"}, + {file = "PyJWT-2.4.0.tar.gz", hash = "sha256:d42908208c699b3b973cbeb01a969ba6a96c821eefb1c5bfe4c390c01d67abba"}, ] pylint = [ {file = "pylint-2.13.8-py3-none-any.whl", hash = "sha256:f87e863a0b08f64b5230e7e779bcb75276346995737b2c0dc2793070487b1ff6"}, From 7f34d0f0217eb5862273aae909363890ec4c5b16 Mon Sep 17 00:00:00 2001 From: pke11y Date: Wed, 25 May 2022 13:50:47 +0100 Subject: [PATCH 8/8] Release v1.1.3 --- CHANGELOG.md | 11 +++++++++++ pyproject.toml | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db5711a..981177f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## v1.1.3 - 2022-05-25 + +### Fixed + +- #93 - Bump pyjwt dependency. +- #92 - Update plugin description. +- #91 - Fix for null WLAN SSIDs. + +### Fixed + + ## v1.1.2 - 2022-05-11 ### Added diff --git a/pyproject.toml b/pyproject.toml index 61c8119..89fbf83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "nautobot-chatops-ipfabric" -version = "1.1.2" +version = "1.1.3" description = "Nautobot Plugin Chatops IPFabric" authors = ["Network to Code, LLC "]