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
Paul Graydon
slapos.core
Commits
febaab8c
Commit
febaab8c
authored
Nov 21, 2022
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapformat: Refactor IPv6 existence check
parent
a9f102f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
slapos/format.py
slapos/format.py
+2
-3
No files found.
slapos/format.py
View file @
febaab8c
...
@@ -1006,6 +1006,8 @@ class Interface(object):
...
@@ -1006,6 +1006,8 @@ class Interface(object):
except
KeyError
:
except
KeyError
:
raise
ValueError
(
"%s must have at least one IPv6 address assigned"
%
raise
ValueError
(
"%s must have at least one IPv6 address assigned"
%
interface_name
)
interface_name
)
if
not
address_list
:
raise
NoAddressOnInterface
(
interface_name
)
if
tap
:
if
tap
:
try
:
try
:
...
@@ -1152,9 +1154,6 @@ class Interface(object):
...
@@ -1152,9 +1154,6 @@ class Interface(object):
# Getting one address of the interface as base of the next addresses
# Getting one address of the interface as base of the next addresses
interface_addr_list
=
self
.
getGlobalScopeAddressList
()
interface_addr_list
=
self
.
getGlobalScopeAddressList
()
# No address found
if
len
(
interface_addr_list
)
==
0
:
raise
NoAddressOnInterface
(
interface_name
)
address_dict
=
interface_addr_list
[
0
]
address_dict
=
interface_addr_list
[
0
]
if
addr
is
not
None
:
if
addr
is
not
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