From d974cecda38ff9d614b168b0c211e44ed5babd21 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 5 Jul 2016 18:15:24 -0400 Subject: [PATCH 1/2] Fixes #199: Moved prefix_validator from BaseIPField to IPNetworkField --- netbox/ipam/fields.py | 2 +- netbox/netbox/settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/ipam/fields.py b/netbox/ipam/fields.py index 098f753c9..00aeb514b 100644 --- a/netbox/ipam/fields.py +++ b/netbox/ipam/fields.py @@ -16,7 +16,6 @@ def prefix_validator(prefix): class BaseIPField(models.Field): - default_validators = [prefix_validator] def python_type(self): return IPNetwork @@ -51,6 +50,7 @@ class IPNetworkField(BaseIPField): IP prefix (network and mask) """ description = "PostgreSQL CIDR field" + default_validators = [prefix_validator] def db_type(self, connection): return 'cidr' diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 7e4a22378..e9928b850 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -11,7 +11,7 @@ except ImportError: "the documentation.") -VERSION = '1.0.7' +VERSION = '1.0.7-r1' # Import local configuration for setting in ['ALLOWED_HOSTS', 'DATABASE', 'SECRET_KEY']: From 33d755d51a289200b3858c2702df700cc19d158b Mon Sep 17 00:00:00 2001 From: ryanmerolle Date: Wed, 6 Jul 2016 10:10:57 -0400 Subject: [PATCH 2/2] Updated Upgrade Instructions Streamlined update process for newer users like myself. Now includes exact instructions for downloading latest release or using git. --- docs/getting-started.md | 47 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 08eb07e04..d3215ab51 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -438,7 +438,52 @@ You should now have netbox running on a SSL protected connection. # Upgrading -As with the initial installation, you can upgrade NetBox by either downloading the latest release package or by cloning the `master` branch of the git repository. Once the new code is in place, run the upgrade script (which may need to be run as root depending on how your environment is configured). +## Installation of Upgrade + +As with the initial installation, you can upgrade NetBox by either downloading the latest release package or by cloning the `master` branch of the git repository. + +### Option A: Download a Release + +Download the [latest stable release](https://github.com/digitalocean/netbox/releases) from GitHub as a tarball or ZIP archive. Extract it to your desired path. In this example, we'll use `/opt/netbox`. For this guide we are using 1.0.4 as the old version and 1.0.7 as the new version. + +Download & extract latest version: +``` +# wget https://github.com/digitalocean/netbox/archive/vX.Y.Z.tar.gz +# tar -xzf vX.Y.Z.tar.gz -C /opt +# cd /opt/ +# ln -sf netbox-1.0.7/ netbox +``` + +Copy the 'configuration.py' you created when first installing to the new version: +``` +# cp /opt/netbox-1.0.4/configuration.py /opt/netbox/configuration.py +``` + +### Option B: Clone the Git Repository (latest master release) + +For this guide, we'll use `/opt/netbox`. + +Check that your git branch is up to date & is set to master: +``` +# cd /opt/netbox +# git status +``` + +If not on branch master, set it and verify status: +``` +# git checkout master +# git status +``` + +Pull down the set branch from git status above: +``` +# git pull +``` + + +## Upgrade Script & Netbox Restart + +Once the new code is in place, run the upgrade script (which may need to be run as root depending on how your environment is configured). ``` # ./upgrade.sh