Module Expr Str ImportFrom alias ImportFrom alias alias ImportFrom alias alias alias alias ImportFrom alias Expr Call NameLoad Str ImportFrom alias Import alias Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad Str Dict Assign NameStore Call NameLoad keyword ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad keyword ListLoad NameLoad NameLoad Str Str Str Str Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad Str Dict Assign NameStore Call NameLoad keyword ListLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad keyword Dict Str NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str Str NameLoad NameLoad Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad Str Dict Assign NameStore Call NameLoad keyword Dict Str Dict Str Str Assign NameStore Call NameLoad keyword ListLoad NameLoad Str Str Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str Str NameLoad NameLoad Dict Str Dict Str Str Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad Str Dict Assign NameStore Call NameLoad keyword Dict Str Dict Str Str Assign NameStore Call NameLoad keyword ListLoad Str Str Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str Str NameLoad NameLoad Dict Str Dict Str Str Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad Str Dict Assign NameStore Call NameLoad keyword Dict Str Dict Str Str Assign NameStore Call NameLoad keyword ListLoad NameLoad Str Str Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str Str NameLoad NameLoad Dict Str Dict Str Str Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad Str Dict Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Call NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad Str Dict Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Call NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad Str Dict Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Call NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Dict Str Str Str Str Str NameLoad NameLoad Dict Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Dict Str Str Str Str NameLoad NameLoad NameLoad Dict With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Call NameLoad body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Call NameLoad keyword Dict With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Dict Str Str 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:`Jayesh Kariya <jayeshk@saltstack.com>`
 __future__ absolute_import salttesting skipIf TestCase salttesting.mock NO_MOCK NO_MOCK_REASON MagicMock patch salttesting.helpers ensure_in_syspath N/A N/A ensure_in_syspath ../../ salt.states lxc N/A salt.utils N/A N/A lxc __salt__ N/A N/A N/A lxc __opts__ N/A LxcTestCase N/A TestCase N/A N/A 
    Test cases for salt.states.lxc
     test_present N/A N/A self N/A N/A N/A 
        Test to verify the named container if it exist.
         N/A name web01 N/A ret N/A name result comment changes name False N/A N/A mock N/A MagicMock side_effect N/A False True True True True True True N/A mock_t N/A MagicMock side_effect N/A None True frozen frozen stopped running running N/A N/A N/A patch dict N/A lxc __salt__ N/A lxc.exists lxc.state mock mock_t N/A N/A comt Clone source 'True' does not exist N/A N/A N/A ret update N/A comment comt N/A N/A N/A self assertDictEqual N/A N/A lxc present name clone_from True ret N/A N/A N/A patch dict N/A lxc __opts__ N/A test True N/A N/A comt Container 'web01' will be cloned from True N/A N/A N/A ret update N/A comment result comt None N/A N/A N/A self assertDictEqual N/A N/A lxc present name clone_from True ret N/A comt Container 'web01' already exists N/A N/A N/A ret update N/A comment result comt True N/A N/A N/A self assertDictEqual N/A N/A lxc present name clone_from True ret N/A comt Container 'web01' would be unfrozen N/A N/A N/A ret update N/A comment result comt None N/A N/A N/A self assertDictEqual N/A N/A lxc present name running True clone_from True ret N/A comt N/A N/A Container '{0}' would be stopped format name N/A N/A N/A ret update N/A comment result comt None N/A N/A N/A self assertDictEqual N/A N/A lxc present name running False clone_from True ret N/A comt Container 'web01' already exists and is stopped N/A N/A N/A ret update N/A comment result comt True N/A N/A N/A self assertDictEqual N/A N/A lxc present name running False clone_from True ret N/A N/A N/A patch dict N/A lxc __opts__ N/A test False N/A N/A comt Container 'web01' already exists N/A N/A N/A ret update N/A comment result comt True N/A N/A N/A self assertDictEqual N/A N/A lxc present name clone_from True ret N/A test_absent N/A N/A self N/A N/A N/A 
        Test to ensure a container is not present, destroying it if present.
         N/A name web01 N/A ret N/A name result comment changes name True N/A N/A mock N/A MagicMock side_effect N/A False True True N/A mock_des N/A MagicMock return_value N/A state True N/A N/A N/A patch dict N/A lxc __salt__ N/A lxc.exists lxc.destroy mock mock_des N/A N/A comt N/A N/A Container '{0}' does not exist format name N/A N/A N/A ret update N/A comment comt N/A N/A N/A self assertDictEqual N/A N/A lxc absent name ret N/A N/A N/A patch dict N/A lxc __opts__ N/A test True N/A N/A comt N/A N/A Container '{0}' would be destroyed format name N/A N/A N/A ret update N/A comment result comt None N/A N/A N/A self assertDictEqual N/A N/A lxc absent name ret N/A N/A N/A patch dict N/A lxc __opts__ N/A test False N/A N/A comt N/A N/A Container '{0}' was destroyed format name N/A N/A N/A ret update N/A comment result changes comt True N/A state True N/A N/A N/A self assertDictEqual N/A N/A lxc absent name ret N/A test_running N/A N/A self N/A N/A N/A 
        Test to ensure that a container is running.
         N/A name web01 N/A ret N/A name result comment changes name False N/A N/A mock N/A MagicMock return_value N/A state N/A new stop N/A mock_t N/A MagicMock side_effect N/A None running stopped start N/A N/A N/A patch dict N/A lxc __salt__ N/A lxc.exists lxc.state lxc.start mock mock_t mock N/A N/A comt N/A N/A Container '{0}' does not exist format name N/A N/A N/A ret update N/A comment comt N/A N/A N/A self assertDictEqual N/A N/A lxc running name ret N/A comt Container 'web01' is already running N/A N/A N/A ret update N/A comment result comt True N/A N/A N/A self assertDictEqual N/A N/A lxc running name ret N/A N/A N/A patch dict N/A lxc __opts__ N/A test True N/A N/A comt Container 'web01' would be started N/A N/A N/A ret update N/A comment result comt None N/A N/A N/A self assertDictEqual N/A N/A lxc running name ret N/A N/A N/A patch dict N/A lxc __opts__ N/A test False N/A N/A comt Unable to start container 'web01' N/A N/A N/A ret update N/A comment result changes comt False N/A state N/A new old stop start N/A N/A N/A self assertDictEqual N/A N/A lxc running name ret N/A test_frozen N/A N/A self N/A N/A N/A 
        Test to ensure that a container is frozen.
         N/A name web01 N/A ret N/A name result comment changes name True N/A N/A mock N/A MagicMock return_value N/A state N/A new stop N/A mock_t N/A MagicMock side_effect N/A frozen stopped stopped N/A N/A N/A patch dict N/A lxc __salt__ N/A lxc.freeze lxc.state mock mock_t N/A N/A comt N/A N/A Container '{0}' is already frozen format name N/A N/A N/A ret update N/A comment comt N/A N/A N/A self assertDictEqual N/A N/A lxc frozen name ret N/A N/A N/A patch dict N/A lxc __opts__ N/A test True N/A N/A comt Container 'web01' would be started and frozen N/A N/A N/A ret update N/A comment result comt None N/A N/A N/A self assertDictEqual N/A N/A lxc frozen name ret N/A N/A N/A patch dict N/A lxc __opts__ N/A test False N/A N/A comt Unable to start and freeze container 'web01' N/A N/A N/A ret update N/A comment result changes comt False N/A state N/A new old stop stopped N/A N/A N/A self assertDictEqual N/A N/A lxc frozen name ret N/A test_stopped N/A N/A self N/A N/A N/A 
        Test to ensure that a container is stopped.
         N/A name web01 N/A ret N/A name result comment changes name False N/A N/A mock N/A MagicMock return_value N/A state N/A new stop N/A mock_t N/A MagicMock side_effect N/A None stopped frozen frozen N/A N/A N/A patch dict N/A lxc __salt__ N/A lxc.stop lxc.state mock mock_t N/A N/A comt N/A N/A Container '{0}' does not exist format name N/A N/A N/A ret update N/A comment comt N/A N/A N/A self assertDictEqual N/A N/A lxc stopped name ret N/A comt N/A N/A Container '{0}' is already stopped format name N/A N/A N/A ret update N/A comment result comt True N/A N/A N/A self assertDictEqual N/A N/A lxc stopped name ret N/A N/A N/A patch dict N/A lxc __opts__ N/A test True N/A N/A comt Container 'web01' would be stopped N/A N/A N/A ret update N/A comment result comt None N/A N/A N/A self assertDictEqual N/A N/A lxc stopped name ret N/A N/A N/A patch dict N/A lxc __opts__ N/A test False N/A N/A comt Unable to stop container 'web01' N/A N/A N/A ret update N/A comment result changes comt False N/A state N/A new old stop frozen N/A N/A N/A self assertDictEqual N/A N/A lxc stopped name ret N/A test_created N/A N/A self N/A N/A N/A 
        Test to execute create func.
         N/A name web01 N/A ret N/A name result comment changes name False N/A N/A mock N/A MagicMock return_value False N/A N/A N/A patch dict N/A lxc __salt__ N/A lxc.exists mock N/A N/A N/A N/A patch object N/A salt utils warn_until N/A MagicMock N/A N/A comt Clone source 'True' does not exist N/A N/A N/A ret update N/A comment comt N/A N/A N/A self assertDictEqual N/A N/A lxc created name clone_from True ret N/A test_started N/A N/A self N/A N/A N/A 
        Test to execute started func.
         N/A name web01 N/A ret N/A name result comment changes name False N/A N/A mock N/A MagicMock return_value None N/A N/A N/A patch dict N/A lxc __salt__ N/A lxc.state mock N/A N/A N/A N/A patch object N/A salt utils warn_until N/A MagicMock N/A N/A comt Container 'web01' does not exist N/A N/A N/A ret update N/A comment comt N/A N/A N/A self assertDictEqual N/A N/A lxc started name ret N/A test_cloned N/A N/A self N/A N/A N/A 
        Test to execute cloned func.
         N/A name web01 N/A ret N/A name result comment changes name False N/A N/A mock N/A MagicMock return_value False N/A N/A N/A patch dict N/A lxc __salt__ N/A lxc.exists mock N/A N/A N/A N/A patch object N/A salt utils warn_until N/A MagicMock N/A N/A comt Clone source 'True' does not exist N/A N/A N/A ret update N/A comment comt N/A N/A N/A self assertDictEqual N/A N/A lxc cloned name True ret N/A test_set_pass N/A N/A self N/A N/A N/A 
        Test to execute set_pass func.
         N/A comment The lxc.set_pass state is no longer supported. Please see the LXC states documentation for further information. N/A ret N/A name comment result changes web01 comment False N/A N/A N/A N/A self assertDictEqual N/A N/A lxc set_pass web01 ret N/A test_edited_conf N/A N/A self N/A N/A N/A 
        Test to edit LXC configuration options
         N/A name web01 N/A comment N/A N/A {0} lxc.conf will be edited format name N/A ret N/A name result comment changes name True comment N/A N/A N/A N/A patch object N/A salt utils warn_until N/A MagicMock N/A N/A N/A N/A patch dict N/A lxc __opts__ N/A test True N/A N/A N/A N/A self assertDictEqual N/A N/A lxc edited_conf name ret N/A N/A N/A patch dict N/A lxc __opts__ N/A test False N/A N/A mock N/A MagicMock return_value N/A N/A N/A N/A patch dict N/A lxc __salt__ N/A lxc.update_lxc_conf mock N/A N/A N/A N/A self assertDictEqual N/A N/A lxc edited_conf name N/A name web01 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 LxcTestCase needs_daemon False