Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ class Migration(migrations.Migration):
('netjsonconfig.OpenWrt', 'OpenWRT'),
('netjsonconfig.OpenWisp', 'OpenWISP Firmware 1.x'),
],
help_text='Select <a href="http://netjsonconfig.openwisp.org/en/stable/" target="_blank">netjsonconfig</a> backend',
help_text=(
'Select <a href="http://netjsonconfig.openwisp.org'
'/en/stable/" target="_blank">netjsonconfig</a> '
'backend'
),
max_length=128,
verbose_name='backend',
),
Expand Down Expand Up @@ -90,7 +94,11 @@ class Migration(migrations.Migration):
('error', 'error'),
],
default='modified',
help_text='modified means the configuration is not applied yet; running means applied and running; error means the configuration caused issues and it was rolledback',
help_text=(
'modified means the configuration is not applied '
'yet; running means applied and running; error means the '
'configuration caused issues and it was rolledback'
),
max_length=100,
no_check_for_status=True,
),
Expand All @@ -100,7 +108,9 @@ class Migration(migrations.Migration):
models.CharField(
db_index=True,
default=openwisp_utils.utils.get_random_key,
help_text='unique key that can be used to download the configuration',
help_text=(
'unique key that can be used to download the configuration'
),
max_length=64,
unique=True,
validators=[
Expand Down Expand Up @@ -133,7 +143,11 @@ class Migration(migrations.Migration):
'last_ip',
models.GenericIPAddressField(
blank=True,
help_text='indicates the last ip from which the configuration was downloaded from (except downloads from this page)',
help_text=(
'indicates the last ip from which the '
'configuration was downloaded from (except '
'downloads from this page)'
),
null=True,
),
),
Expand Down Expand Up @@ -168,7 +182,10 @@ class Migration(migrations.Migration):
'registration_enabled',
models.BooleanField(
default=True,
help_text='Whether automatic registration of devices is enabled or not',
help_text=(
'Whether automatic registration of devices is '
'enabled or not'
),
verbose_name='auto-registration enabled',
),
),
Expand All @@ -184,7 +201,10 @@ class Migration(migrations.Migration):
django.core.validators.RegexValidator(
re.compile('^[^\\s/\\.]+$'),
code='invalid',
message='This value must not contain spaces, dots or slashes.',
message=(
'This value must not contain spaces, dots '
'or slashes.'
),
)
],
verbose_name='shared secret',
Expand Down Expand Up @@ -225,7 +245,10 @@ class Migration(migrations.Migration):
('netjsonconfig.OpenWrt', 'OpenWRT'),
('netjsonconfig.OpenWisp', 'OpenWISP Firmware 1.x'),
],
help_text='Select <a href="http://netjsonconfig.openwisp.org/en/stable/" target="_blank">netjsonconfig</a> backend',
help_text=(
'Select <a href="http://netjsonconfig.openwisp.org'
'/en/stable/" target="_blank">netjsonconfig</a> backend'
),
max_length=128,
verbose_name='backend',
),
Expand Down Expand Up @@ -263,7 +286,9 @@ class Migration(migrations.Migration):
choices=[('generic', 'Generic'), ('vpn', 'VPN-client')],
db_index=True,
default='generic',
help_text='template type, determines which features are available',
help_text=(
'template type, determines which features are available'
),
max_length=16,
verbose_name='type',
),
Expand All @@ -273,16 +298,25 @@ class Migration(migrations.Migration):
models.BooleanField(
db_index=True,
default=False,
help_text='whether new configurations will have this template enabled by default',
help_text=(
'whether new configurations will have this '
'template enabled by default'
),
verbose_name='enabled by default',
),
),
(
'auto_cert',
models.BooleanField(
db_index=True,
default=openwisp_controller.config.base.template.default_auto_cert,
help_text='whether x509 client certificates should be automatically managed behind the scenes for each configuration using this template, valid only for the VPN type',
default=(
openwisp_controller.config.base.template.default_auto_cert
),
help_text=(
'whether x509 client certificates should be automatically '
'managed behind the scenes for each configuration '
'using this template, valid only for the VPN type'
),
verbose_name='auto certificate',
),
),
Expand Down
6 changes: 5 additions & 1 deletion openwisp_controller/config/migrations/0003_template_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ class Migration(migrations.Migration):
name='tags',
field=taggit.managers.TaggableManager(
blank=True,
help_text='A comma-separated list of template tags, may be used to ease auto configuration with specific settings (eg: 4G, mesh, WDS, VPN, ecc.)',
help_text=(
'A comma-separated list of template tags, may '
'be used to ease auto configuration with specific '
'settings (eg: 4G, mesh, WDS, VPN, ecc.)'
),
through='config.TaggedTemplate',
to='config.TemplateTag',
verbose_name='Tags',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ class Migration(migrations.Migration):
django.core.validators.RegexValidator(
re.compile('^[^\\s/\\.]+$'),
code='invalid',
message='This value must not contain spaces, dots or slashes.',
message=(
'This value must not contain spaces, dots or '
'slashes.'
),
)
],
),
Expand Down Expand Up @@ -111,7 +114,7 @@ class Migration(migrations.Migration):
),
),
],
options={'abstract': False,},
options={'abstract': False},
),
migrations.AddField(
model_name='config',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from django.db import migrations, models
from django.db import migrations


def forward(apps, schema_editor):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ class Migration(migrations.Migration):
name='last_ip',
field=models.GenericIPAddressField(
blank=True,
help_text='indicates the IP address logged from the last request coming from the device',
help_text=(
'indicates the IP address logged from the last '
'request coming from the device'
),
null=True,
),
),
Expand All @@ -73,7 +76,12 @@ class Migration(migrations.Migration):
field=model_utils.fields.StatusField(
choices=[(0, 'dummy')],
default='modified',
help_text='"modified" means the configuration is not applied yet; \n"applied" means the configuration is applied successfully; \n"error" means the configuration caused issues and it was rolled back;',
help_text=(
'"modified" means the configuration is not applied yet; '
'\n"applied" means the configuration is applied successfully; '
'\n"error" means the configuration caused issues and it '
'was rolled back;'
),
max_length=100,
no_check_for_status=True,
verbose_name='configuration status',
Expand Down
6 changes: 5 additions & 1 deletion openwisp_controller/config/migrations/0018_config_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ class Migration(migrations.Migration):
field=jsonfield.fields.JSONField(
blank=True,
dump_kwargs={'indent': 4},
help_text='Additional <a href="http://netjsonconfig.openwisp.org/en/stable/general/basics.html#context" target="_blank">context (configuration variables)</a> in JSON format',
help_text=(
'Additional <a href="http://netjsonconfig.openwisp.org'
'/en/stable/general/basics.html#context" target="_blank">context '
'(configuration variables)</a> in JSON format'
),
load_kwargs={'object_pairs_hook': collections.OrderedDict},
null=True,
),
Expand Down
6 changes: 5 additions & 1 deletion openwisp_controller/config/migrations/0023_update_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ class Migration(migrations.Migration):
blank=True,
default=dict,
dump_kwargs={'ensure_ascii': False, 'indent': 4},
help_text='Additional <a href="http://netjsonconfig.openwisp.org/en/stable/general/basics.html#context" target="_blank">context (configuration variables)</a> in JSON format',
help_text=(
'Additional <a href="http://netjsonconfig.openwisp.org'
'/en/stable/general/basics.html#context" target="_blank">'
'context (configuration variables)</a> in JSON format'
),
load_kwargs={'object_pairs_hook': collections.OrderedDict},
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ class Migration(migrations.Migration):
field=models.GenericIPAddressField(
blank=True,
db_index=True,
help_text='indicates the IP address logged from the last request coming from the device',
help_text=(
'indicates the IP address logged from the '
'last request coming from the device'
),
null=True,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ class Migration(migrations.Migration):
blank=True,
default=dict,
dump_kwargs={'ensure_ascii': False, 'indent': 4},
help_text='A dictionary containing the default values for the variables used by this template; these default variables will be used during schema validation.',
help_text=(
'A dictionary containing the default values for '
'the variables used by this template; these default '
'variables will be used during schema validation.'
),
load_kwargs={'object_pairs_hook': collections.OrderedDict},
verbose_name='Default Values',
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ class Migration(migrations.Migration):
validators=[
django.core.validators.RegexValidator(
re.compile(
'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])(\\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9]))*$|^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$'
'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])'
'(\\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}'
'[a-zA-Z0-9]))*$|^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$'
),
code='invalid',
message='Must be either a valid hostname or mac address.',
Expand Down
5 changes: 4 additions & 1 deletion openwisp_controller/config/migrations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ def update_vpn_dhparam_length(apps, schema_editor):
for vpn in vpn_model.objects.all().iterator():
if len(vpn.dh) < 424:
print(
f'\n Generating a new 2048 bit DH key for {vpn.name}, this may take a while...',
(
'\n Generating a new 2048 bit DH key for '
f'{vpn.name}, this may take a while...'
),
end='',
)
vpn.dh = subprocess.check_output(
Expand Down
12 changes: 8 additions & 4 deletions openwisp_controller/connection/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import jsonfield.fields
import model_utils.fields
import swapper
from django.conf import settings
from django.db import migrations, models

import openwisp_users.mixins
Expand All @@ -20,7 +19,6 @@ class Migration(migrations.Migration):

dependencies = [
('openwisp_users', '0001_initial'),
migrations.swappable_dependency(settings.CONFIG_DEVICE_MODEL),
swapper.dependency('config', 'Device'),
]

Expand Down Expand Up @@ -126,7 +124,10 @@ class Migration(migrations.Migration):
blank=True,
choices=[
(
'openwisp_controller.connection.connectors.openwrt.ssh.OpenWrt',
(
'openwisp_controller.connection.connectors'
'.openwrt.ssh.OpenWrt'
),
'OpenWRT SSH',
)
],
Expand All @@ -143,7 +144,10 @@ class Migration(migrations.Migration):
blank=True,
default=dict,
dump_kwargs={'indent': 4},
help_text='local connection parameters (will override the global parameters if specified)',
help_text=(
'local connection parameters (will override '
'the global parameters if specified)'
),
load_kwargs={'object_pairs_hook': collections.OrderedDict},
verbose_name='parameters',
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ class Migration(migrations.Migration):
name='auto_add',
field=models.BooleanField(
default=False,
help_text='automatically add these credentials to the devices of this organization; if no organization is specified will be added to all the new devices',
help_text=(
'automatically add these credentials to the '
'devices of this organization; if no organization is '
'specified will be added to all the new devices'
),
verbose_name='auto add',
),
),
Expand Down
Loading