Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Carlos Ramos Carreño
erp5
Commits
c583ca7e
Commit
c583ca7e
authored
Jan 05, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support network interface.
This may be used by the kvm for example to get the tap interface name.
parent
0719e285
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
slapos/recipe/softwaretype.py
slapos/recipe/softwaretype.py
+11
-0
No files found.
slapos/recipe/softwaretype.py
View file @
c583ca7e
...
...
@@ -63,6 +63,15 @@ class Recipe:
# XXX: Lack checking for globality of address
return
self
.
_getIpAddress
(
netaddr
.
valid_ipv6
)
def
getNetworkInterface
(
self
):
"""Returns the network interface available on partition"""
if
not
'ip_list'
in
self
.
parameter_dict
:
raise
AttributeError
for
name
,
ip
in
self
.
parameter_dict
[
'ip_list'
]:
if
name
:
return
name
raise
AttributeError
,
"Not network interface found"
def
install
(
self
):
slap
=
slapos
.
slap
.
slap
()
slap_connection
=
self
.
buildout
[
'slap_connection'
]
...
...
@@ -107,6 +116,8 @@ class Recipe:
self
.
getLocalIPv4Address
())
buildout
.
set
(
'slap-network-information'
,
'global-ipv6'
,
self
.
getGlobalIPv6Address
())
buildout
.
set
(
'slap-network-information'
,
'network-interface'
,
self
.
getNetworkInterface
())
# Copy/paste slap_connection
buildout
.
add_section
(
'slap-connection'
)
...
...
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