From 68519b165e69910b98c46a97ec83bf1dbcb927ba Mon Sep 17 00:00:00 2001 From: Nikos Kallergis Date: Tue, 4 Jun 2024 21:12:19 +0300 Subject: [PATCH 1/4] Replace SecretAccessType HTTP(S) with HTTP --- .vscode/settings.json | 5 +++++ .../plugins/credentials/nautobot_secrets.py | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c48c9b9 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "githubPullRequests.ignoredPullRequestBranches": [ + "develop" + ] +} \ No newline at end of file diff --git a/nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py b/nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py index 3eaf568..eb41b4f 100644 --- a/nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py +++ b/nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py @@ -40,6 +40,8 @@ def _get_access_type_value(device_obj): """ if PLUGIN_CFG.get("use_config_context", {}).get("secrets"): access_type_str = device_obj.get_config_context()["nautobot_plugin_nornir"]["secret_access_type"].upper() + if access_type_str == "HTTP(S)": + access_type_str = "HTTP" access_type = getattr(SecretsGroupAccessTypeChoices, f"TYPE_{access_type_str}") else: access_type = SecretsGroupAccessTypeChoices.TYPE_GENERIC From 08d0aa16b96262023eaddc25561431624aebb857 Mon Sep 17 00:00:00 2001 From: Nikos Kallergis Date: Tue, 4 Jun 2024 21:17:15 +0300 Subject: [PATCH 2/4] Remove VScode settings file --- .vscode/settings.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index c48c9b9..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "githubPullRequests.ignoredPullRequestBranches": [ - "develop" - ] -} \ No newline at end of file From d7c54d175da9953aa6bf4f2818eb289104f554cf Mon Sep 17 00:00:00 2001 From: Nikos Kallergis Date: Thu, 1 Aug 2024 19:24:04 +0300 Subject: [PATCH 3/4] Update nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py Co-authored-by: Jeff Kala <48843785+jeffkala@users.noreply.github.com> --- nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py b/nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py index eb41b4f..fc00fe8 100644 --- a/nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py +++ b/nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py @@ -40,7 +40,7 @@ def _get_access_type_value(device_obj): """ if PLUGIN_CFG.get("use_config_context", {}).get("secrets"): access_type_str = device_obj.get_config_context()["nautobot_plugin_nornir"]["secret_access_type"].upper() - if access_type_str == "HTTP(S)": + if access_type_str in ["HTTP(S)", "HTTP"]: access_type_str = "HTTP" access_type = getattr(SecretsGroupAccessTypeChoices, f"TYPE_{access_type_str}") else: From 843de3b30cc4a3035c5d8b9d2b105cc9ea254cbc Mon Sep 17 00:00:00 2001 From: Jeff Kala Date: Fri, 13 Sep 2024 12:49:03 -0500 Subject: [PATCH 4/4] add changelog --- changes/162.fixed | 1 + 1 file changed, 1 insertion(+) create mode 100755 changes/162.fixed diff --git a/changes/162.fixed b/changes/162.fixed new file mode 100755 index 0000000..5b77425 --- /dev/null +++ b/changes/162.fixed @@ -0,0 +1 @@ +Augment SecretAccessType to support both HTTP(S) with HTTP in _get_secret_value