Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reference-repository
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
grid5000
reference-repository
Commits
d65c856c
Commit
d65c856c
authored
1 year ago
by
JACQUOT Pierre
Browse files
Options
Downloads
Patches
Plain Diff
[network_monitoring] Do not generate config for interface not monitored
parent
4fd0a820
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/refrepo/gen/puppet/network_monitoring.rb
+2
-2
2 additions, 2 deletions
lib/refrepo/gen/puppet/network_monitoring.rb
with
2 additions
and
2 deletions
lib/refrepo/gen/puppet/network_monitoring.rb
+
2
−
2
View file @
d65c856c
...
@@ -67,7 +67,7 @@ def generate_puppet_network_monitoring(options)
...
@@ -67,7 +67,7 @@ def generate_puppet_network_monitoring(options)
next
if
p
==
{}
next
if
p
==
{}
next
unless
%w[other switch router server channel backbone]
.
include?
(
p
[
'kind'
])
next
unless
%w[other switch router server channel backbone]
.
include?
(
p
[
'kind'
])
next
if
!
p
[
'monitoring_enabled'
].
nil?
and
p
[
'monitoring_enabled'
]
==
false
port_name
=
p
[
'snmp_name'
]
port_name
=
p
[
'snmp_name'
]
next
if
net_hosts_eq
[
'interfaces'
].
find
{
|
i
|
i
[
'name'
]
==
port_name
}
next
if
net_hosts_eq
[
'interfaces'
].
find
{
|
i
|
i
[
'name'
]
==
port_name
}
...
@@ -83,7 +83,7 @@ def generate_puppet_network_monitoring(options)
...
@@ -83,7 +83,7 @@ def generate_puppet_network_monitoring(options)
next
unless
eq_v
[
'channels'
]
next
unless
eq_v
[
'channels'
]
eq_v
[
'channels'
].
each
do
|
c_name
,
c_v
|
eq_v
[
'channels'
].
each
do
|
c_name
,
c_v
|
next
if
net_hosts_eq
[
'interfaces'
].
find
{
|
i
|
i
[
'name'
]
==
c_name
}
next
if
net_hosts_eq
[
'interfaces'
].
find
{
|
i
|
i
[
'name'
]
==
c_name
}
next
if
!
c_v
[
'monitoring_enabled'
].
nil?
and
c_v
[
'monitoring_enabled'
]
==
false
net_hosts_eq
[
'interfaces'
]
<<
{
net_hosts_eq
[
'interfaces'
]
<<
{
'name'
=>
c_name
,
'name'
=>
c_name
,
'description'
=>
"LACP
#{
c_v
[
'uid'
]
}
"
'description'
=>
"LACP
#{
c_v
[
'uid'
]
}
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment