Revision a59c31ca
b/lib/server/noded.py | ||
---|---|---|
724 | 724 |
"""Query node information. |
725 | 725 |
|
726 | 726 |
""" |
727 |
# FIXME: remove the fallback to excl_stor once all callers are |
|
728 |
# adjusted |
|
729 |
if (len(params) == 3): |
|
730 |
(legacy_storage_units, hv_specs, excl_stor) = params |
|
731 |
storage_units = NodeRequestHandler._ConvertExclStorage( |
|
732 |
legacy_storage_units, excl_stor) |
|
733 |
else: |
|
734 |
(storage_units, hv_specs) = params |
|
727 |
(storage_units, hv_specs) = params |
|
735 | 728 |
return backend.GetNodeInfo(storage_units, hv_specs) |
736 | 729 |
|
737 | 730 |
@staticmethod |
738 |
def _ConvertExclStorage(storage_units, excl_stor): |
|
739 |
result_units = [] |
|
740 |
for (storage_type, storage_key) in storage_units: |
|
741 |
if storage_type in [constants.ST_LVM_VG, constants.ST_LVM_PV]: |
|
742 |
result_units.append((storage_type, storage_key, [excl_stor])) |
|
743 |
else: |
|
744 |
result_units.append((storage_type, storage_key, [])) |
|
745 |
return result_units |
|
746 |
|
|
747 |
@staticmethod |
|
748 | 731 |
def perspective_etc_hosts_modify(params): |
749 | 732 |
"""Modify a node entry in /etc/hosts. |
750 | 733 |
|
Also available in: Unified diff