Module Expr Str ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias alias alias Expr Call NameLoad Str ImportFrom alias Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Pass decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Pass decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return TupleLoad NameLoad NameLoad decorator_list NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args defaults body Expr Str Return Call NameLoad decorator_list NameLoad decorator_list decorator_list decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Dict NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Assign NameStore Call NameLoad keyword Dict Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Dict Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Dict decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Num Str Num Num Num Str Str Str Str Str Str Str Str Str Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Assign NameStore Call NameLoad keyword Dict Str Str Str Str Str Num Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Assign NameStore Call NameLoad keyword Dict Str Str Num Num With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Assign NameStore Call NameLoad keyword Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Dict Str Str Str Str Str Num With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Assign NameStore Call NameLoad keyword ListLoad NameLoad Dict Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad keyword Dict Str Str Str Str Str Num With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword ListLoad NameLoad ListLoad Str Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str ListLoad Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Assign NameStore Call NameLoad keyword ListLoad NameLoad ListLoad Str Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Dict decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Assign NameStore Call NameLoad keyword ListLoad NameLoad ListLoad Str Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword NameLoad body Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Assign NameStore Call NameLoad keyword ListLoad NameLoad ListLoad Str Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword NameLoad body Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Assign NameStore Call NameLoad keyword ListLoad NameLoad ListLoad Str Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword NameLoad body Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Dict Str Num With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Dict Str Num With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Assign NameStore Call NameLoad keyword Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Dict Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Assign NameStore Call NameLoad keyword ListLoad NameLoad ListLoad Str Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword NameLoad body Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Assign NameStore Call NameLoad keyword ListLoad NameLoad ListLoad Str Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword NameLoad body Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Assign NameStore Call NameLoad keyword ListLoad NameLoad ListLoad Str Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword NameLoad body Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Assign NameStore Call NameLoad keyword ListLoad NameLoad ListLoad Str Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword NameLoad body Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Assign NameStore Call NameLoad keyword ListLoad NameLoad ListLoad Str Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword NameLoad body Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Assign NameStore Call NameLoad keyword ListLoad NameLoad ListLoad Str Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword NameLoad body Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Assign NameStore Call NameLoad keyword ListLoad NameLoad ListLoad Str Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword NameLoad body Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body With Call NameLoad Str Call NameLoad keyword Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr With Call NameLoad Str Call NameLoad NameStore body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr With Call NameLoad Str Call NameLoad keyword Str body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Assign NameStore Call NameLoad keyword Dict Str Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Dict Str Str Num Num With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Assign NameStore Call NameLoad keyword Dict Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Assign NameStore Call NameLoad keyword Dict Str Str Str Dict Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad keyword Dict With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Dict decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Dict decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Dict decorator_list decorator_list Call NameLoad NameLoad NameLoad If CompareEq NameLoad Str body ImportFrom alias Expr Call NameLoad NameLoad keyword NameLoad
N/A N/A 
    :codeauthor: :email:`Rahul Handay <rahulha@saltstack.com>`
 __future__ absolute_import salttesting TestCase skipIf salttesting.helpers ensure_in_syspath salttesting.mock mock_open MagicMock patch NO_MOCK NO_MOCK_REASON N/A N/A ensure_in_syspath ../../ salt.modules xapi N/A N/A xapi __grains__ N/A N/A N/A xapi __salt__ N/A Mockxapi N/A object N/A N/A 
        Mock xapi class
     __init__ N/A N/A self N/A N/A N/A N/A Session N/A object N/A N/A 
            Mock Session class
         __init__ N/A N/A self xapi_uri N/A N/A N/A N/A xenapi N/A object N/A N/A 
                Mock xenapi class
             __init__ N/A N/A self N/A N/A N/A N/A login_with_password N/A N/A xapi_login xapi_password N/A N/A N/A 
                    Mock login_with_password method
                 N/A N/A xapi_login xapi_password N/A staticmethod session N/A object N/A N/A 
                    Mock session class
                 __init__ N/A N/A self N/A N/A N/A N/A logout N/A N/A N/A N/A N/A 
                        Mock logout method
                     N/A N/A Mockxapi N/A staticmethod N/A N/A N/A N/A XapiTestCase N/A TestCase N/A N/A 
        Test cases for salt.modules.xapi
     test_list_vms N/A N/A self N/A N/A N/A 
            Test to return a list of virtual machine names on the minion
         N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A N/A N/A self assertListEqual N/A N/A xapi list_domains N/A N/A test_vm_info N/A N/A self N/A N/A N/A 
            Test to return detailed information about the vms
         N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A mock N/A MagicMock return_value False N/A N/A N/A patch object xapi _get_record_by_label mock N/A N/A N/A N/A self assertDictEqual N/A N/A xapi vm_info True N/A True False N/A test_vm_state N/A N/A self N/A N/A N/A 
            Test to return list of all the vms and their state.
         N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A mock N/A MagicMock return_value N/A power_state 1 N/A N/A N/A patch object xapi _get_record_by_label mock N/A N/A N/A N/A self assertDictEqual N/A N/A xapi vm_state salt N/A salt 1 N/A N/A N/A self assertDictEqual N/A N/A xapi vm_state N/A N/A test_node_info N/A N/A self N/A N/A N/A 
            Test to return a dict with information about this node
         N/A ret N/A cc_compile_by cc_compile_date cc_compile_domain cc_compiler cores_per_sockets cpuarch cpucores cpufeatures cpumhz cputhreads free_cpus free_memory phymemory platform_params xen_caps xen_changeset xen_commandline xen_extra xen_major xen_minor xen_pagesize xen_scheduler xend_config_format stack stack stack stack stack stack stack salt 5 stack 0 0 0 stack s t a c k stack stack stack stack stack stack stack stack N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A mock N/A MagicMock return_value N/A features speed host_CPUs cpu_pool salt 5 salt salt N/A N/A N/A patch object xapi _get_record mock N/A N/A mock N/A MagicMock return_value N/A memory_free memory_total 1024 1024 N/A N/A N/A patch object xapi _get_metrics_record mock N/A N/A mock N/A MagicMock return_value stack N/A N/A N/A patch object xapi _get_val mock N/A N/A N/A N/A self assertDictEqual N/A N/A xapi node_info ret N/A test_get_nics N/A N/A self N/A N/A N/A 
            Test to return info about the network interfaces of a named vm
         N/A ret N/A Stack N/A device mac mtu ETH0 Stack 1 N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A mock N/A MagicMock side_effect N/A False N/A VIFs salt N/A N/A N/A patch object xapi _get_record_by_label mock N/A N/A N/A N/A self assertFalse N/A N/A xapi get_nics salt N/A mock N/A MagicMock return_value N/A MAC device MTU Stack ETH0 1 N/A N/A N/A patch object xapi _get_record mock N/A N/A N/A N/A self assertDictEqual N/A N/A xapi get_nics salt ret N/A test_get_macs N/A N/A self N/A N/A N/A 
            Test to return a list off MAC addresses from the named vm
         N/A mock N/A MagicMock side_effect N/A None N/A a b c N/A N/A N/A patch object xapi get_nics mock N/A N/A N/A N/A self assertIsNone N/A N/A xapi get_macs salt N/A N/A N/A self assertListEqual N/A N/A xapi get_macs salt N/A a b c N/A test_get_disks N/A N/A self N/A N/A N/A 
            Test to return the disks of a named vm
         N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A mock N/A MagicMock side_effect N/A False N/A a b c N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi get_disks salt N/A N/A N/A self assertDictEqual N/A N/A xapi get_disks salt N/A N/A test_setmem N/A N/A self N/A N/A N/A 
            Test to changes the amount of memory allocated to VM.
         N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A mock N/A MagicMock side_effect N/A False N/A a b c N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi setmem salt 1 N/A N/A N/A self assertTrue N/A N/A xapi setmem salt 1 N/A N/A N/A patch object xapi _check_xenapi N/A MagicMock return_value Mockxapi N/A N/A mock N/A MagicMock return_value True N/A N/A N/A patch dict N/A xapi __salt__ N/A config.option mock N/A N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi setmem salt 1 N/A test_setvcpus N/A N/A self N/A N/A N/A 
            Test to changes the amount of vcpus allocated to VM.
         N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A mock N/A MagicMock side_effect N/A False N/A a b c N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi setvcpus salt 1 N/A N/A N/A self assertTrue N/A N/A xapi setvcpus salt 1 N/A N/A N/A patch object xapi _check_xenapi N/A MagicMock return_value Mockxapi N/A N/A mock N/A MagicMock return_value True N/A N/A N/A patch dict N/A xapi __salt__ N/A config.option mock N/A N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi setvcpus salt 1 N/A test_vcpu_pin N/A N/A self N/A N/A N/A 
            Test to Set which CPUs a VCPU can use.
         N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A mock N/A MagicMock side_effect N/A False N/A a b c N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi vcpu_pin salt 1 2 N/A N/A N/A self assertTrue N/A N/A xapi vcpu_pin salt 1 2 N/A N/A N/A patch object xapi _check_xenapi N/A MagicMock return_value Mockxapi N/A N/A mock N/A MagicMock return_value True N/A N/A N/A patch dict N/A xapi __salt__ N/A config.option mock N/A N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A patch dict N/A xapi __salt__ N/A cmd.run mock N/A N/A N/A N/A self assertTrue N/A N/A xapi vcpu_pin salt 1 2 N/A test_freemem N/A N/A self N/A N/A N/A 
            Test to return an int representing the amount of memory
            that has not been given to virtual machines on this node
         N/A mock N/A MagicMock return_value N/A free_memory 1024 N/A N/A N/A patch object xapi node_info mock N/A N/A N/A N/A self assertEqual N/A N/A xapi freemem 1024 N/A test_freecpu N/A N/A self N/A N/A N/A 
            Test to return an int representing the number
            of unallocated cpus on this hypervisor
         N/A mock N/A MagicMock return_value N/A free_cpus 1024 N/A N/A N/A patch object xapi node_info mock N/A N/A N/A N/A self assertEqual N/A N/A xapi freecpu 1024 N/A test_full_info N/A N/A self N/A N/A N/A 
            Test to return the node_info, vm_info and freemem
         N/A mock N/A MagicMock return_value salt N/A N/A N/A patch object xapi node_info mock N/A N/A mock N/A MagicMock return_value stack N/A N/A N/A patch object xapi vm_info mock N/A N/A N/A N/A self assertDictEqual N/A N/A xapi full_info N/A node_info vm_info salt stack N/A test_shutdown N/A N/A self N/A N/A N/A 
            Test to send a soft shutdown signal to the named vm
         N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A mock N/A MagicMock side_effect N/A False N/A a b c N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi shutdown salt N/A N/A N/A self assertTrue N/A N/A xapi shutdown salt N/A N/A N/A patch object xapi _check_xenapi N/A MagicMock return_value Mockxapi N/A N/A mock N/A MagicMock return_value True N/A N/A N/A patch dict N/A xapi __salt__ N/A config.option mock N/A N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi shutdown salt N/A test_pause N/A N/A self N/A N/A N/A 
            Test to pause the named vm
         N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A mock N/A MagicMock side_effect N/A False N/A a b c N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi pause salt N/A N/A N/A self assertTrue N/A N/A xapi pause salt N/A N/A N/A patch object xapi _check_xenapi N/A MagicMock return_value Mockxapi N/A N/A mock N/A MagicMock return_value True N/A N/A N/A patch dict N/A xapi __salt__ N/A config.option mock N/A N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi pause salt N/A test_resume N/A N/A self N/A N/A N/A 
            Test to resume the named vm
         N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A mock N/A MagicMock side_effect N/A False N/A a b c N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi resume salt N/A N/A N/A self assertTrue N/A N/A xapi resume salt N/A N/A N/A patch object xapi _check_xenapi N/A MagicMock return_value Mockxapi N/A N/A mock N/A MagicMock return_value True N/A N/A N/A patch dict N/A xapi __salt__ N/A config.option mock N/A N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi resume salt N/A test_create N/A N/A self N/A N/A N/A 
            Test to start a defined domain
         N/A mock N/A MagicMock return_value True N/A N/A N/A patch dict N/A xapi __salt__ N/A cmd.run mock N/A N/A N/A N/A self assertTrue N/A N/A xapi start salt N/A test_start N/A N/A self N/A N/A N/A 
            Test to reboot a domain via ACPI request
         N/A mock N/A MagicMock return_value True N/A N/A N/A patch object xapi start mock N/A N/A N/A N/A self assertTrue N/A N/A xapi start salt N/A test_reboot N/A N/A self N/A N/A N/A 
            Test to reboot a domain via ACPI request
         N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A mock N/A MagicMock side_effect N/A False N/A a b c N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi reboot salt N/A N/A N/A self assertTrue N/A N/A xapi reboot salt N/A N/A N/A patch object xapi _check_xenapi N/A MagicMock return_value Mockxapi N/A N/A mock N/A MagicMock return_value True N/A N/A N/A patch dict N/A xapi __salt__ N/A config.option mock N/A N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi reboot salt N/A test_reset N/A N/A self N/A N/A N/A 
            Test to reset a VM by emulating the
            reset button on a physical machine
         N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A mock N/A MagicMock side_effect N/A False N/A a b c N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi reset salt N/A N/A N/A self assertTrue N/A N/A xapi reset salt N/A N/A N/A patch object xapi _check_xenapi N/A MagicMock return_value Mockxapi N/A N/A mock N/A MagicMock return_value True N/A N/A N/A patch dict N/A xapi __salt__ N/A config.option mock N/A N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi reset salt N/A test_migrate N/A N/A self N/A N/A N/A 
            Test to migrates the virtual machine to another hypervisor
         N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A mock N/A MagicMock side_effect N/A False N/A a b c N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi migrate salt stack N/A N/A N/A self assertTrue N/A N/A xapi migrate salt stack N/A N/A N/A patch object xapi _check_xenapi N/A MagicMock return_value Mockxapi N/A N/A mock N/A MagicMock return_value True N/A N/A N/A patch dict N/A xapi __salt__ N/A config.option mock N/A N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi migrate salt stack N/A test_destroy N/A N/A self N/A N/A N/A 
            Test to Hard power down the virtual machine,
            this is equivalent to pulling the power
         N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A mock N/A MagicMock side_effect N/A False N/A a b c N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi stop salt N/A N/A N/A self assertTrue N/A N/A xapi stop salt N/A N/A N/A patch object xapi _check_xenapi N/A MagicMock return_value Mockxapi N/A N/A mock N/A MagicMock return_value True N/A N/A N/A patch dict N/A xapi __salt__ N/A config.option mock N/A N/A N/A N/A patch object xapi _get_label_uuid mock N/A N/A N/A N/A self assertFalse N/A N/A xapi stop salt N/A test_is_hyper N/A N/A self N/A N/A N/A 
            Test to returns a bool whether or not
            this node is a hypervisor of any kind
         N/A N/A N/A patch dict N/A xapi __grains__ N/A virtual_subtype Dom0 N/A N/A N/A N/A self assertFalse N/A N/A xapi is_hyper N/A N/A N/A patch dict N/A xapi __grains__ N/A virtual Xen Dom0 N/A N/A N/A N/A self assertFalse N/A N/A xapi is_hyper N/A N/A N/A patch dict N/A xapi __grains__ N/A virtual_subtype Xen Dom0 N/A N/A N/A patch salt.utils.fopen N/A mock_open read_data salt N/A N/A N/A N/A self assertFalse N/A N/A xapi is_hyper N/A N/A patch salt.utils.fopen N/A mock_open mock_read N/A N/A N/A mock_read side_effect IOError N/A N/A N/A self assertFalse N/A N/A xapi is_hyper N/A N/A patch salt.utils.fopen N/A mock_open read_data xen_ N/A N/A N/A N/A patch dict N/A xapi __grains__ N/A ps salt N/A N/A mock N/A MagicMock return_value N/A xenstore salt N/A N/A N/A patch dict N/A xapi __salt__ N/A cmd.run mock N/A N/A N/A N/A self assertTrue N/A N/A xapi is_hyper N/A test_vm_cputime N/A N/A self N/A N/A N/A 
            Test to Return cputime used by the vms
         N/A ret N/A 1 N/A cputime_percent cputime 0 1 N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A mock N/A MagicMock return_value N/A host_CPUs 1 N/A N/A N/A patch object xapi _get_record_by_label mock N/A N/A mock N/A MagicMock return_value N/A VCPUs_number VCPUs_utilisation 1 N/A 0 1 N/A N/A N/A patch object xapi _get_metrics_record mock N/A N/A N/A N/A self assertDictEqual N/A N/A xapi vm_cputime 1 ret N/A mock N/A MagicMock return_value N/A N/A N/A N/A patch object xapi list_domains mock N/A N/A N/A N/A self assertDictEqual N/A N/A xapi vm_cputime N/A N/A test_vm_netstats N/A N/A self N/A N/A N/A 
            Test to return combined network counters used by the vms
         N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A N/A N/A self assertDictEqual N/A N/A xapi vm_netstats N/A N/A test_vm_diskstats N/A N/A self N/A N/A N/A 
            Test to return disk usage counters used by the vms
         N/A N/A N/A patch object xapi _get_xapi_session N/A MagicMock N/A N/A N/A N/A self assertDictEqual N/A N/A xapi vm_diskstats N/A N/A N/A N/A skipIf NO_MOCK NO_MOCK_REASON N/A N/A __name__ __main__ N/A integration run_tests N/A N/A run_tests XapiTestCase needs_daemon False