mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Merge branch 'develop' into feature
This commit is contained in:
@ -21,9 +21,6 @@ This section entails the installation and configuration of a local PostgreSQL da
|
|||||||
sudo postgresql-setup --initdb
|
sudo postgresql-setup --initdb
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! info
|
|
||||||
PostgreSQL 10 and later are available natively on CentOS 8.2. If using an earlier CentOS release, you may need to [install it from an RPM](https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/).
|
|
||||||
|
|
||||||
CentOS configures ident host-based authentication for PostgreSQL by default. Because NetBox will need to authenticate using a username and password, modify `/var/lib/pgsql/data/pg_hba.conf` to support MD5 authentication by changing `ident` to `md5` for the lines below:
|
CentOS configures ident host-based authentication for PostgreSQL by default. Because NetBox will need to authenticate using a username and password, modify `/var/lib/pgsql/data/pg_hba.conf` to support MD5 authentication by changing `ident` to `md5` for the lines below:
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
|
@ -17,8 +17,13 @@ Begin by installing all system packages required by NetBox and its dependencies.
|
|||||||
|
|
||||||
=== "CentOS"
|
=== "CentOS"
|
||||||
|
|
||||||
|
!!! warning
|
||||||
|
CentOS 8 does not provide Python 3.7 or later via its native package manager. You will need to install it via some other means. [Here is an example](https://tecadmin.net/install-python-3-7-on-centos-8/) of installing Python 3.7 from source.
|
||||||
|
|
||||||
|
Once you have Python 3.7 or later installed, install the remaining system packages:
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
sudo yum install -y gcc python36 python36-devel python3-pip libxml2-devel libxslt-devel libffi-devel libpq-devel openssl-devel redhat-rpm-config
|
sudo yum install -y gcc libxml2-devel libxslt-devel libffi-devel libpq-devel openssl-devel redhat-rpm-config
|
||||||
```
|
```
|
||||||
|
|
||||||
Before continuing, check that your installed Python version is at least 3.7:
|
Before continuing, check that your installed Python version is at least 3.7:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
The installation instructions provided here have been tested to work on Ubuntu 20.04 and CentOS 8.2. The particular commands needed to install dependencies on other distributions may vary significantly. Unfortunately, this is outside the control of the NetBox maintainers. Please consult your distribution's documentation for assistance with any errors.
|
The installation instructions provided here have been tested to work on Ubuntu 20.04 and CentOS 8.3. The particular commands needed to install dependencies on other distributions may vary significantly. Unfortunately, this is outside the control of the NetBox maintainers. Please consult your distribution's documentation for assistance with any errors.
|
||||||
|
|
||||||
The following sections detail how to set up a new instance of NetBox:
|
The following sections detail how to set up a new instance of NetBox:
|
||||||
|
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
## v3.0.10 (FUTURE)
|
## v3.0.10 (FUTURE)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* [#7752](https://github.com/netbox-community/netbox/issues/7752) - Fix minimum version check under Python v3.10
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## v3.0.9 (2021-11-03)
|
## v3.0.9 (2021-11-03)
|
||||||
|
@ -4,6 +4,7 @@ import os
|
|||||||
import platform
|
import platform
|
||||||
import re
|
import re
|
||||||
import socket
|
import socket
|
||||||
|
import sys
|
||||||
import warnings
|
import warnings
|
||||||
from urllib.parse import urlsplit
|
from urllib.parse import urlsplit
|
||||||
|
|
||||||
@ -27,11 +28,11 @@ HOSTNAME = platform.node()
|
|||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
# Validate Python version
|
# Validate Python version
|
||||||
if platform.python_version_tuple() < ('3', '7'):
|
if sys.version_info < (3, 7):
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
f"NetBox requires Python 3.7 or higher (current: Python {platform.python_version()})"
|
f"NetBox requires Python 3.7 or later. (Currently installed: Python {platform.python_version()})"
|
||||||
)
|
)
|
||||||
if platform.python_version_tuple() < ('3', '8'):
|
if sys.version_info < (3, 8):
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
f"NetBox v3.2 will require Python 3.8 or later. (Currently installed: Python {platform.python_version()})"
|
f"NetBox v3.2 will require Python 3.8 or later. (Currently installed: Python {platform.python_version()})"
|
||||||
)
|
)
|
||||||
|
@ -345,7 +345,7 @@ class APIViewTestCases:
|
|||||||
obj_perm.users.add(self.user)
|
obj_perm.users.add(self.user)
|
||||||
obj_perm.object_types.add(ContentType.objects.get_for_model(self.model))
|
obj_perm.object_types.add(ContentType.objects.get_for_model(self.model))
|
||||||
|
|
||||||
id_list = self._get_queryset().values_list('id', flat=True)[:3]
|
id_list = list(self._get_queryset().values_list('id', flat=True)[:3])
|
||||||
self.assertEqual(len(id_list), 3, "Insufficient number of objects to test bulk update")
|
self.assertEqual(len(id_list), 3, "Insufficient number of objects to test bulk update")
|
||||||
data = [
|
data = [
|
||||||
{'id': id, **self.bulk_update_data} for id in id_list
|
{'id': id, **self.bulk_update_data} for id in id_list
|
||||||
@ -416,7 +416,7 @@ class APIViewTestCases:
|
|||||||
|
|
||||||
# Target the three most recently created objects to avoid triggering recursive deletions
|
# Target the three most recently created objects to avoid triggering recursive deletions
|
||||||
# (e.g. with MPTT objects)
|
# (e.g. with MPTT objects)
|
||||||
id_list = self._get_queryset().order_by('-id').values_list('id', flat=True)[:3]
|
id_list = list(self._get_queryset().order_by('-id').values_list('id', flat=True)[:3])
|
||||||
self.assertEqual(len(id_list), 3, "Insufficient number of objects to test bulk deletion")
|
self.assertEqual(len(id_list), 3, "Insufficient number of objects to test bulk deletion")
|
||||||
data = [{"id": id} for id in id_list]
|
data = [{"id": id} for id in id_list]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user