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
AIG-public
Cobalt
Commits
07c60412
Commit
07c60412
authored
Jul 31, 2017
by
Paul Rich
Browse files
Fixing an issue where the test environment didn't match reality.
parent
5c1ac88b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/Components/system/AlpsBridge.py
View file @
07c60412
...
...
@@ -190,12 +190,13 @@ def extract_system_node_data(node_data):
return
ret_nodeinfo
def
fetch_ssd_static_data
(
nid_list
=
None
,
by_cname
=
False
):
def
fetch_ssd_static_data
(
nid_list
=
None
,
raw
=
False
):
'''Get static SSD information from CAPMC.
Args:
nid_list - optional list of nodes as a comma-delimited, hyphenated string (default None).
by_cname - if True, returns the nodes keyed by Cray cname (default False
raw - If True returns raw json dict. If False, adds nid indexing (default False)
Returns:
A dictionary with call status, Consult CAPMC documentation for details
...
...
@@ -207,17 +208,16 @@ def fetch_ssd_static_data(nid_list=None, by_cname=False):
if
nid_list
is
not
None
:
args
.
extend
([
'-n'
,
nid_list
])
ret_info
=
_call_sys_forker_capmc
(
CAPMC_PATH
,
args
)
if
not
by_cname
:
if
not
raw
:
# Because everything else in this system works on nids.
fixed_ret_info
=
{}
fixed_ret_info
=
{
'e'
:
ret_info
[
'e'
],
'err_msg'
:
ret_info
[
'err_msg'
]}
fixed_ret_info
[
'nids'
]
=
[]
for
key
,
val
in
ret_info
.
items
():
if
key
not
in
[
'e'
,
'err_msg'
]:
fixed_val
=
val
val
[
'cname'
]
=
key
fixed_ret_info
[
'nids'
].
append
(
fixed_val
)
else
:
fixed_ret_info
[
key
]
=
val
for
ssd_info
in
val
:
# This is a list of SSDs potentially
fixed_ret_info
[
'nids'
].
append
(
ssd_info
)
ret_info
=
fixed_ret_info
return
ret_info
...
...
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