Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grid5000
reference-repository
Commits
9900c45e
Commit
9900c45e
authored
May 10, 2016
by
Jérémie Gaidamour
Browse files
[dev] oar-properties: Bug fix concerning the selection of the main network adapter
parent
734b2785
Changes
1
Hide whitespace changes
Inline
Side-by-side
generators/oar-properties/lib/lib-oar-properties.rb
View file @
9900c45e
...
...
@@ -25,7 +25,7 @@ def get_node_properties(cluster_uid, cluster, node_uid, node)
end
main_network_adapter
=
node
[
'network_adapters'
].
values
.
find
{
|
na
|
na
[
'enabled'
]
&&
na
[
'mounted'
]
&&
na
[
'interface'
]
=~
/ethernet/i
&&
!
na
[
'management'
]
}
main_network_adapter
=
node
[
'network_adapters'
].
values
.
find
{
|
na
|
na
[
'enabled'
]
&&
na
[
'mounted'
]
}
#
main_network_adapter = node['network_adapters'].values.find{ |na| na['enabled'] && na['mounted'] }
raise
MissingProperty
,
"Node
#{
node_uid
}
does not have a main network_adapter"
unless
main_network_adapter
# h['host'] = main_network_adapter['network_address']
...
...
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