Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
59af5705
authored
Apr 07, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall: remove hardcoded prefix
parent
eb9047bb
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletions
+8
-1
circle/firewall/migrations/0050_auto__add_field_vlan_host_ipv6_prefixlen.py
+0
-0
circle/firewall/models.py
+7
-1
circle/network/forms.py
+1
-0
No files found.
circle/firewall/migrations/0050_auto__add_field_vlan_host_ipv6_prefixlen.py
0 → 100644
View file @
59af5705
This diff is collapsed.
Click to expand it.
circle/firewall/models.py
View file @
59af5705
...
...
@@ -278,6 +278,12 @@ class Vlan(AclBase, models.Model):
'valid address of the subnet, '
'for example '
'10.4.255.254/16 for 10.4.0.0/16.'
))
host_ipv6_prefixlen
=
models
.
IntegerField
(
verbose_name
=
_
(
'IPv6 prefixlen/host'
),
help_text
=
_
(
'The prefix length of the subnet assigned to a host. '
'For example /112 = 65536 addresses/host.'
),
default
=
112
,
validators
=
[
MinValueValidator
(
1
),
MaxValueValidator
(
128
)])
network6
=
IPNetworkField
(
unique
=
False
,
version
=
6
,
null
=
True
,
...
...
@@ -511,7 +517,7 @@ class Host(models.Model):
def
ipv6_with_prefixlen
(
self
):
try
:
net
=
IPNetwork
(
self
.
ipv6
)
net
.
prefixlen
=
112
net
.
prefixlen
=
self
.
vlan
.
host_ipv6_prefixlen
return
net
except
TypeError
:
return
None
...
...
circle/network/forms.py
View file @
59af5705
...
...
@@ -234,6 +234,7 @@ class VlanForm(ModelForm):
'IPv6'
,
'network6'
,
'ipv6_template'
,
'host_ipv6_prefixlen'
,
),
Fieldset
(
'Domain name service'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment