Skip to content

Commit

Permalink
Replace SecretAccessType HTTP(S) with HTTP in _get_secret_value (#163)
Browse files Browse the repository at this point in the history
* Replace SecretAccessType HTTP(S) with HTTP

* Remove VScode settings file

* Update nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py

Co-authored-by: Jeff Kala <48843785+jeffkala@users.noreply.github.com>

* add changelog

---------

Co-authored-by: Jeff Kala <48843785+jeffkala@users.noreply.github.com>
Co-authored-by: Jeff Kala <jeff.l.kala@gmail.com>
  • Loading branch information
3 people authored Sep 13, 2024
1 parent a34220d commit 853a41d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/162.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Augment SecretAccessType to support both HTTP(S) with HTTP in _get_secret_value
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,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 in ["HTTP(S)", "HTTP"]:
access_type_str = "HTTP"
access_type = getattr(SecretsGroupAccessTypeChoices, f"TYPE_{access_type_str}")
else:
access_type = SecretsGroupAccessTypeChoices.TYPE_GENERIC
Expand Down

0 comments on commit 853a41d

Please sign in to comment.