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
ed5fe4c3
Commit
ed5fe4c3
authored
May 20, 2018
by
Lucas Nussbaum
Browse files
Add list of network equipments
parent
9e597963
Changes
1
Show whitespace changes
Inline
Side-by-side
generators/wiki/lib/generators/site_network.rb
View file @
ed5fe4c3
...
...
@@ -24,10 +24,16 @@ class SiteNetworkGenerator < WikiGenerator
]
end
def
generate_equipments
h
=
G5K
::
get_global_hash
[
'sites'
][
@site
]
return
h
[
'networks'
].
to_a
.
map
{
|
e
|
"*
#{
e
[
0
]
}
:
#{
e
[
1
][
'model'
]
}
"
}.
sort
.
join
(
"
\n
"
)
end
def
generate_content
@generated_content
=
"__NOTOC__
\n
__NOEDITSECTION__
\n
"
@generated_content
+=
"FIXME
\n
"
@generated_content
+=
MW
.
italic
(
MW
.
small
(
generated_date_string
))
@generated_content
+=
"= Network devices models =
\n
"
@generated_content
+=
generate_equipments
+
"
\n
"
@generated_content
+=
"More details (including address ranges are available from the [[Grid5000:Network]] page.
\n
"
@generated_content
+=
MW
::
LINE_FEED
# this will generate dot and png network maps in the current directory
...
...
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