[PR #15742] [MERGED] 15427 Use endpoint_url in S3Backend #14663

Closed
opened 2025-12-29 23:25:49 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15742
Author: @javierdelapuente
Created: 4/17/2024
Status: Merged
Merged: 4/17/2024
Merged by: @jeremystretch

Base: developHead: develop


📝 Commits (1)

  • e093365 Use endpoint_url in S3Backend

📊 Changes

1 file changed (+7 additions, -1 deletions)

View changed files

📝 netbox/core/data_backends.py (+7 -1)

📄 Description

Closes: #15427

This PR includes the endpoint_url parameter to the call to boto3.resource for the S3Backend. This allows to use external S3 servers.

I have tested the code against AWS S3 and and also against a local server using Minio. These url formats work correctly:
https://s3.amazonaws.com/<bucket-name>
https://s3.<region-name>.amazonaws.com/<bucket-name>
https://<your-s3-server>/<bucket-name>

Virtual-host-style and s3 protocol (s3://) do not work, but they were not working before this PR.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/15742 **Author:** [@javierdelapuente](https://github.com/javierdelapuente) **Created:** 4/17/2024 **Status:** ✅ Merged **Merged:** 4/17/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `develop` --- ### 📝 Commits (1) - [`e093365`](https://github.com/netbox-community/netbox/commit/e0933659ca0ee576cbbef971e8d092aa1bee1986) Use endpoint_url in S3Backend ### 📊 Changes **1 file changed** (+7 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/core/data_backends.py` (+7 -1) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Closes: #15427 <!-- Please include a summary of the proposed changes below. --> This PR includes the `endpoint_url` parameter to the call to `boto3.resource` for the `S3Backend`. This allows to use external S3 servers. I have tested the code against AWS S3 and and also against a local server using Minio. These url formats work correctly: `https://s3.amazonaws.com/<bucket-name>` `https://s3.<region-name>.amazonaws.com/<bucket-name>` `https://<your-s3-server>/<bucket-name>` [Virtual-host-style](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#virtual-hosted-style-access) and s3 protocol (s3://<bucket-name>) do not work, but they were not working before this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:25:49 +01:00
adam closed this issue 2025-12-29 23:25:49 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14663