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 diff --git a/nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py b/nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py index 36d6f2e..99b481a 100644 --- a/nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py +++ b/nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py @@ -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