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
2b609a44
Commit
2b609a44
authored
3 years ago
by
Samir Noir
Browse files
Options
Downloads
Patches
Plain Diff
[lib] handle new memory_devices in nodes' description
parent
41853108
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/refrepo/gen/reference-api.rb
+8
-0
8 additions, 0 deletions
lib/refrepo/gen/reference-api.rb
lib/refrepo/valid/input/schemas/schema-node.yaml
+5
-0
5 additions, 0 deletions
lib/refrepo/valid/input/schemas/schema-node.yaml
with
13 additions
and
0 deletions
lib/refrepo/gen/reference-api.rb
+
8
−
0
View file @
2b609a44
...
@@ -136,6 +136,14 @@ def generate_reference_api
...
@@ -136,6 +136,14 @@ def generate_reference_api
node
[
"network_adapters"
].
each
{
|
key
,
hash
|
node
[
"network_adapters"
][
key
][
"device"
]
=
key
;
}
# Add "device: ethX" within the hash
node
[
"network_adapters"
].
each
{
|
key
,
hash
|
node
[
"network_adapters"
][
key
][
"device"
]
=
key
;
}
# Add "device: ethX" within the hash
node
[
"network_adapters"
]
=
node
[
"network_adapters"
].
sort_by_array
([
"eth0"
,
"eth1"
,
"eth2"
,
"eth3"
,
"eth4"
,
"eth5"
,
"eth6"
,
"ib0.8100"
,
"ib0"
,
"ib1"
,
"ib2"
,
"ib3"
,
"ibs1"
,
"bmc"
,
"eno1"
,
"eno2"
,
"eno1np0"
,
"eno2np1"
,
"ens4f0"
,
"ens4f1"
,
"ens5f0"
,
"ens5f1"
]).
values
node
[
"network_adapters"
]
=
node
[
"network_adapters"
].
sort_by_array
([
"eth0"
,
"eth1"
,
"eth2"
,
"eth3"
,
"eth4"
,
"eth5"
,
"eth6"
,
"ib0.8100"
,
"ib0"
,
"ib1"
,
"ib2"
,
"ib3"
,
"ibs1"
,
"bmc"
,
"eno1"
,
"eno2"
,
"eno1np0"
,
"eno2np1"
,
"ens4f0"
,
"ens4f1"
,
"ens5f0"
,
"ens5f1"
]).
values
node
[
"memory_devices"
].
each
{
|
key
,
hash
|
node
[
"memory_devices"
][
key
][
"device"
]
=
key
;
}
# Add "device: dimm_a1" within the hash
node
[
"memory_devices"
]
=
node
[
"memory_devices"
].
sort_by
{
|
d
,
_
|
[
d
.
gsub
(
/dimm_(\d+)/
,
'\1'
).
to_i
,
d
.
gsub
(
/^dimm_([A-z]+)(\d+)$/
,
'\1'
),
d
.
gsub
(
/^dimm_([A-z]+)(\d+)$/
,
'\2'
).
to_i
]
}.
to_h
node
[
"memory_devices"
]
=
node
[
"memory_devices"
].
values
write_json
(
cluster_path
.
join
(
"nodes"
,
"
#{
node_uid
}
.json"
),
node
)
write_json
(
cluster_path
.
join
(
"nodes"
,
"
#{
node_uid
}
.json"
),
node
)
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
lib/refrepo/valid/input/schemas/schema-node.yaml
+
5
−
0
View file @
2b609a44
...
@@ -33,6 +33,11 @@ kavlan6:
...
@@ -33,6 +33,11 @@ kavlan6:
main_memory
:
main_memory
:
ram_size
:
integer
ram_size
:
integer
pmem_size
:
optional_integer
pmem_size
:
optional_integer
memory_devices
:
<multi>
:
size
:
integer
technology
:
string
firmware
:
optional_string
mic
:
optional_hash
mic
:
optional_hash
network_adapters
:
network_adapters
:
<multi>
:
<multi>
:
...
...
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