Revision 3fb1e1c5 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
2472 | 2472 |
_CheckOutputFields(static=["name", "os", "pnode", "snodes", |
2473 | 2473 |
"admin_state", "admin_ram", |
2474 | 2474 |
"disk_template", "ip", "mac", "bridge", |
2475 |
"sda_size", "sdb_size", "vcpus", "tags"], |
|
2475 |
"sda_size", "sdb_size", "vcpus", "tags", |
|
2476 |
"auto_balance", |
|
2477 |
"network_port", "kernel_path", "initrd_path", |
|
2478 |
"hvm_boot_order", "hvm_acpi", "hvm_pae", |
|
2479 |
"hvm_cdrom_image_path", "hvm_nic_type", |
|
2480 |
"hvm_disk_type", "vnc_bind_address"], |
|
2476 | 2481 |
dynamic=self.dynamic_fields, |
2477 | 2482 |
selected=self.op.output_fields) |
2478 | 2483 |
|
... | ... | |
2593 | 2598 |
val = instance.vcpus |
2594 | 2599 |
elif field == "tags": |
2595 | 2600 |
val = list(instance.GetTags()) |
2601 |
elif field in ("network_port", "kernel_path", "initrd_path", |
|
2602 |
"hvm_boot_order", "hvm_acpi", "hvm_pae", |
|
2603 |
"hvm_cdrom_image_path", "hvm_nic_type", |
|
2604 |
"hvm_disk_type", "vnc_bind_address"): |
|
2605 |
val = getattr(instance, field, None) |
|
2606 |
if val is not None: |
|
2607 |
pass |
|
2608 |
elif field in ("hvm_nic_type", "hvm_disk_type", |
|
2609 |
"kernel_path", "initrd_path"): |
|
2610 |
val = "default" |
|
2611 |
else: |
|
2612 |
val = "-" |
|
2596 | 2613 |
else: |
2597 | 2614 |
raise errors.ParameterError(field) |
2598 | 2615 |
iout.append(val) |
Also available in: Unified diff