Revision 90224407
b/lib/cmdlib.py | ||
---|---|---|
5151 | 5151 |
r"(nic)\.(bridge)/([0-9]+)", |
5152 | 5152 |
r"(nic)\.(macs|ips|modes|links|bridges)", |
5153 | 5153 |
r"(disk|nic)\.(count)", |
5154 |
"hvparams", |
|
5154 |
"hvparams", "custom_hvparams", |
|
5155 |
"custom_beparams", "custom_nicparams", |
|
5155 | 5156 |
] + _SIMPLE_FIELDS + |
5156 | 5157 |
["hv/%s" % name |
5157 | 5158 |
for name in constants.HVS_PARAMETERS |
... | ... | |
5329 | 5330 |
val = instance.nics[0].mac |
5330 | 5331 |
else: |
5331 | 5332 |
val = None |
5333 |
elif field == "custom_nicparams": |
|
5334 |
val = [nic.nicparams for nic in instance.nics] |
|
5332 | 5335 |
elif field == "sda_size" or field == "sdb_size": |
5333 | 5336 |
idx = ord(field[2]) - ord('a') |
5334 | 5337 |
try: |
... | ... | |
5340 | 5343 |
val = _ComputeDiskSize(instance.disk_template, disk_sizes) |
5341 | 5344 |
elif field == "tags": |
5342 | 5345 |
val = list(instance.GetTags()) |
5346 |
elif field == "custom_hvparams": |
|
5347 |
val = instance.hvparams # not filled! |
|
5343 | 5348 |
elif field == "hvparams": |
5344 | 5349 |
val = i_hv |
5345 | 5350 |
elif (field.startswith(HVPREFIX) and |
5346 | 5351 |
field[len(HVPREFIX):] in constants.HVS_PARAMETERS and |
5347 | 5352 |
field[len(HVPREFIX):] not in constants.HVC_GLOBALS): |
5348 | 5353 |
val = i_hv.get(field[len(HVPREFIX):], None) |
5354 |
elif field == "custom_beparams": |
|
5355 |
val = instance.beparams |
|
5349 | 5356 |
elif field == "beparams": |
5350 | 5357 |
val = i_be |
5351 | 5358 |
elif (field.startswith(BEPREFIX) and |
b/lib/rapi/rlib2.py | ||
---|---|---|
59 | 59 |
"disk.sizes", "disk_usage", |
60 | 60 |
"beparams", "hvparams", |
61 | 61 |
"oper_state", "oper_ram", "oper_vcpus", "status", |
62 |
"custom_hvparams", "custom_beparams", "custom_nicparams", |
|
62 | 63 |
] + _COMMON_FIELDS |
63 | 64 |
|
64 | 65 |
N_FIELDS = ["name", "offline", "master_candidate", "drained", |
Also available in: Unified diff