Revision 9ca8a7c5 test/ganeti.query_unittest.py
b/test/ganeti.query_unittest.py | ||
---|---|---|
644 | 644 |
objects.Instance(name="inst1", hvparams={}, beparams={}, nics=[], |
645 | 645 |
uuid="f90eccb3-e227-4e3c-bf2a-94a21ca8f9cd", |
646 | 646 |
ctime=1291244000, mtime=1291244400, serial_no=30, |
647 |
admin_up=True, hypervisor=constants.HT_XEN_PVM, os="linux1",
|
|
647 |
admin_state=True, hypervisor=constants.HT_XEN_PVM, os="linux1",
|
|
648 | 648 |
primary_node="node1", |
649 | 649 |
disk_template=constants.DT_PLAIN, |
650 | 650 |
disks=[], |
... | ... | |
652 | 652 |
objects.Instance(name="inst2", hvparams={}, nics=[], |
653 | 653 |
uuid="73a0f8a7-068c-4630-ada2-c3440015ab1a", |
654 | 654 |
ctime=1291211000, mtime=1291211077, serial_no=1, |
655 |
admin_up=True, hypervisor=constants.HT_XEN_HVM, os="deb99",
|
|
655 |
admin_state=True, hypervisor=constants.HT_XEN_HVM, os="deb99",
|
|
656 | 656 |
primary_node="node5", |
657 | 657 |
disk_template=constants.DT_DISKLESS, |
658 | 658 |
disks=[], |
... | ... | |
663 | 663 |
objects.Instance(name="inst3", hvparams={}, beparams={}, |
664 | 664 |
uuid="11ec8dff-fb61-4850-bfe0-baa1803ff280", |
665 | 665 |
ctime=1291011000, mtime=1291013000, serial_no=1923, |
666 |
admin_up=False, hypervisor=constants.HT_KVM, os="busybox",
|
|
666 |
admin_state=False, hypervisor=constants.HT_KVM, os="busybox",
|
|
667 | 667 |
primary_node="node6", |
668 | 668 |
disk_template=constants.DT_DRBD8, |
669 | 669 |
disks=[], |
... | ... | |
678 | 678 |
objects.Instance(name="inst4", hvparams={}, beparams={}, |
679 | 679 |
uuid="68dab168-3ef5-4c9d-b4d3-801e0672068c", |
680 | 680 |
ctime=1291244390, mtime=1291244395, serial_no=25, |
681 |
admin_up=False, hypervisor=constants.HT_XEN_PVM, os="linux1",
|
|
681 |
admin_state=False, hypervisor=constants.HT_XEN_PVM, os="linux1",
|
|
682 | 682 |
primary_node="nodeoff2", |
683 | 683 |
disk_template=constants.DT_DRBD8, |
684 | 684 |
disks=[], |
... | ... | |
702 | 702 |
objects.Instance(name="inst5", hvparams={}, nics=[], |
703 | 703 |
uuid="0e3dca12-5b42-4e24-98a2-415267545bd0", |
704 | 704 |
ctime=1231211000, mtime=1261200000, serial_no=3, |
705 |
admin_up=True, hypervisor=constants.HT_XEN_HVM, os="deb99",
|
|
705 |
admin_state=True, hypervisor=constants.HT_XEN_HVM, os="deb99",
|
|
706 | 706 |
primary_node="nodebad2", |
707 | 707 |
disk_template=constants.DT_DISKLESS, |
708 | 708 |
disks=[], |
... | ... | |
713 | 713 |
objects.Instance(name="inst6", hvparams={}, nics=[], |
714 | 714 |
uuid="72de6580-c8d5-4661-b902-38b5785bb8b3", |
715 | 715 |
ctime=7513, mtime=11501, serial_no=13390, |
716 |
admin_up=False, hypervisor=constants.HT_XEN_HVM, os="deb99",
|
|
716 |
admin_state=False, hypervisor=constants.HT_XEN_HVM, os="deb99",
|
|
717 | 717 |
primary_node="node7", |
718 | 718 |
disk_template=constants.DT_DISKLESS, |
719 | 719 |
disks=[], |
... | ... | |
726 | 726 |
objects.Instance(name="inst7", hvparams={}, nics=[], |
727 | 727 |
uuid="ceec5dc4-b729-4f42-ae28-69b3cd24920e", |
728 | 728 |
ctime=None, mtime=None, serial_no=1947, |
729 |
admin_up=False, hypervisor=constants.HT_XEN_HVM, os="deb99",
|
|
729 |
admin_state=False, hypervisor=constants.HT_XEN_HVM, os="deb99",
|
|
730 | 730 |
primary_node="node6", |
731 | 731 |
disk_template=constants.DT_DISKLESS, |
732 | 732 |
disks=[], |
... | ... | |
799 | 799 |
elif inst.name in live_data: |
800 | 800 |
if inst.name in wrongnode_inst: |
801 | 801 |
exp_status = constants.INSTST_WRONGNODE |
802 |
elif inst.admin_up:
|
|
802 |
elif inst.admin_state:
|
|
803 | 803 |
exp_status = constants.INSTST_RUNNING |
804 | 804 |
else: |
805 | 805 |
exp_status = constants.INSTST_ERRORUP |
806 |
elif inst.admin_up:
|
|
806 |
elif inst.admin_state:
|
|
807 | 807 |
exp_status = constants.INSTST_ERRORDOWN |
808 | 808 |
else: |
809 | 809 |
exp_status = constants.INSTST_ADMINDOWN |
Also available in: Unified diff