Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Thompson
slapos.core
Commits
a24927cc
Commit
a24927cc
authored
Nov 02, 2022
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapformat: WIP: separate partition and tap range checks
parent
288c6dc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
slapos/format.py
slapos/format.py
+9
-5
No files found.
slapos/format.py
View file @
a24927cc
...
...
@@ -259,10 +259,10 @@ class Computer(object):
interface
=
self
.
interface
partitions
=
self
.
partitions
# Big enough IPv6 network
i
pv6_range
=
any
(
p
.
ipv6_range
for
p
in
partitions
)
tap_ipv6
=
any
(
p
.
tap
and
p
.
tap
.
ipv6_gateway
for
p
in
partitions
)
if
ipv6_range
or
tap_ipv6
:
interface
.
checkIPv6Ranges
()
i
f
any
(
p
.
ipv6_range
for
p
in
partitions
):
interface
.
checkPartitionIPv6Ranges
(
)
if
any
(
p
.
tap
and
p
.
tap
.
ipv6_gateway
for
p
in
partitions
)
:
interface
.
check
Tap
IPv6Ranges
()
# Warn about IP address/ranges overlaps
self
.
checkAddressOverlaps
()
...
...
@@ -582,10 +582,14 @@ class Interface(object):
ipv4_network
,
tap_network
)
def
checkIPv6Ranges
(
self
):
def
check
Partition
IPv6Ranges
(
self
):
if
self
.
ipv6_network
.
prefixlen
>
128
-
16
:
self
.
conf
.
abort
(
"IPv6 network %s is too small for IPv6 ranges"
,
network
)
def
checkTapIPv6Ranges
(
self
):
if
self
.
ipv6_network
.
prefixlen
>
128
-
16
-
1
:
self
.
conf
.
abort
(
"IPv6 network %s is too small for TAP ranges"
,
network
)
def
getIPv4Network
(
self
,
cidr
):
if
cidr
:
# XXX allow ipv4_local_network to be None ?
...
...
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