Revision d22dfef7 lib/rapi/rlib2.py
b/lib/rapi/rlib2.py | ||
---|---|---|
148 | 148 |
|
149 | 149 |
""" |
150 | 150 |
cl = baserlib.GetClient() |
151 |
op = opcodes.OpDiagnoseOS(output_fields=["name", "valid", "variants"], |
|
152 |
names=[]) |
|
151 |
op = opcodes.OpDiagnoseOS(output_fields=["name", "variants"], names=[]) |
|
153 | 152 |
job_id = baserlib.SubmitJob([op], cl) |
154 | 153 |
# we use custom feedback function, instead of print we log the status |
155 | 154 |
result = cli.PollJob(job_id, cl, feedback_fn=baserlib.FeedbackFn) |
... | ... | |
159 | 158 |
raise http.HttpBadGateway(message="Can't get OS list") |
160 | 159 |
|
161 | 160 |
os_names = [] |
162 |
for (name, valid, variants) in diagnose_data: |
|
163 |
if valid: |
|
164 |
os_names.extend(cli.CalculateOSNames(name, variants)) |
|
161 |
for (name, variants) in diagnose_data: |
|
162 |
os_names.extend(cli.CalculateOSNames(name, variants)) |
|
165 | 163 |
|
166 | 164 |
return os_names |
167 | 165 |
|
Also available in: Unified diff