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
934cce2c
Commit
934cce2c
authored
2 years ago
by
IMBERT Matthieu
Browse files
Options
Downloads
Patches
Plain Diff
[kavlanng] generator: fixes for rubocop
parent
7b93ad4c
No related branches found
No related tags found
No related merge requests found
Pipeline
#834294
passed
2 years ago
Stage: lint
Stage: validate
Stage: generate
Stage: deploy
Stage: .post
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/refrepo/gen/puppet/kavlanngg5k.rb
+6
-6
6 additions, 6 deletions
lib/refrepo/gen/puppet/kavlanngg5k.rb
with
6 additions
and
6 deletions
lib/refrepo/gen/puppet/kavlanngg5k.rb
+
6
−
6
View file @
934cce2c
...
...
@@ -17,8 +17,8 @@ def gen_kavlanapi_g5k_desc(output_path)
refapi
[
'sites'
].
each
do
|
site_id
,
site_h
|
# puts " #{site_id}"
site_h
.
delete_if
{
|
k
|
!
[
'clusters'
,
'network_equipments'
,
'servers'
].
include?
k
}
site_h
[
'clusters'
].
each
do
|
cluster_id
,
cluster_h
|
# puts " #{cluster_id}"
site_h
[
'clusters'
].
each
do
|
_
cluster_id
,
cluster_h
|
# puts " #{
_
cluster_id}"
cluster_h
.
delete_if
{
|
k
|
k
!=
'nodes'
}
cluster_h
[
'nodes'
].
each
do
|
_node_id
,
node_h
|
node_h
.
delete_if
{
|
k
|
k
!=
'network_adapters'
}
...
...
@@ -68,19 +68,19 @@ def get_port_name(port_index, port, linecard_index, linecard)
pattern
=
nil
if
linecard
.
has_key?
(
'kavlan_pattern'
)
pattern
=
linecard
[
'kavlan_pattern'
]
pattern_source
=
"linecard kavlan pattern"
#
pattern_source = "linecard kavlan pattern"
end
if
port
.
has_key?
(
'kavlan_pattern'
)
pattern
=
port
[
'kavlan_pattern'
]
pattern_source
=
"port kavlan pattern"
#
pattern_source = "port kavlan pattern"
end
if
port
.
has_key?
(
'snmp_pattern'
)
pattern
=
port
[
'snmp_pattern'
]
pattern_source
=
"port snmp pattern"
#
pattern_source = "port snmp pattern"
end
if
port
.
has_key?
(
'snmp_name'
)
pattern
=
port
[
'snmp_name'
]
pattern_source
=
"port snmp name"
#
pattern_source = "port snmp name"
end
if
pattern
port_name
=
pattern
.
sub
(
"%LINECARD%"
,
linecard_index
.
to_s
).
sub
(
"%PORT%"
,
port_index
.
to_s
)
...
...
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