From 760e2962c6848be9d67923853710713b893551ac Mon Sep 17 00:00:00 2001 From: Justin Drew <2396364+jdrew82@users.noreply.github.com> Date: Thu, 17 Oct 2024 11:03:03 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Ensure=20that=20URL=20sch?= =?UTF-8?q?eme=20is=20included=20in=20requests=20POST=20call.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changes/571.fixed | 1 + nautobot_ssot/integrations/aristacv/utils/cloudvision.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changes/571.fixed diff --git a/changes/571.fixed b/changes/571.fixed new file mode 100644 index 00000000..67cf61e5 --- /dev/null +++ b/changes/571.fixed @@ -0,0 +1 @@ +Fixed requests call that was missing URL scheme. \ No newline at end of file diff --git a/nautobot_ssot/integrations/aristacv/utils/cloudvision.py b/nautobot_ssot/integrations/aristacv/utils/cloudvision.py index 2e242e50..49eaebd3 100644 --- a/nautobot_ssot/integrations/aristacv/utils/cloudvision.py +++ b/nautobot_ssot/integrations/aristacv/utils/cloudvision.py @@ -56,7 +56,7 @@ def __init__(self, config: CloudVisionAppConfig): call_creds = grpc.access_token_call_credentials(token) elif config.cvp_user != "" and config.cvp_password != "": response = requests.post( - f"{parsed_url.hostname}:{parsed_url.port}/cvpservice/login/authenticate.do", + f"{parsed_url.scheme}://{parsed_url.hostname}:{parsed_url.port}/cvpservice/login/authenticate.do", auth=(config.cvp_user, config.cvp_password), timeout=60, verify=config.verify_ssl,