Module Expr Str ImportFrom alias Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias alias Expr Call NameLoad Str ImportFrom alias Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign NameStore Dict Str Str Str Str Assign NameStore Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword ListLoad Dict Str Str Str Str Str Str Num Num Dict Str Str Str Str Str Str Num Num With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword ListLoad Str Str Str Str Assign NameStore Call NameLoad keyword Call NameLoad ListComp Call AttributeLoad NameLoad attr Str Str comprehension NameStore NameLoad Assign NameStore Call NameLoad keyword Lambda arguments args NameParam NameParam defaults CompareNotEq NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad keyword Lambda arguments args NameParam defaults CompareEq NameLoad Str 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 NameLoad Str NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword ListLoad Str Str Str Str Assign NameStore Call NameLoad keyword Call NameLoad ListComp Call AttributeLoad NameLoad attr Str Str comprehension NameStore NameLoad Assign NameStore Call NameLoad keyword Lambda arguments args NameParam NameParam defaults CompareNotEq NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad keyword Lambda arguments args NameParam defaults CompareEq NameLoad Str 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 NameLoad Str NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword ListLoad ListLoad Str Str Str ListLoad Str Str Str ListLoad Str Str Str ListLoad Str Str Str Assign NameStore Call NameLoad keyword Lambda arguments args NameParam NameParam defaults CompareNotEq NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad Str Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index NameLoad 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 decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index NameLoad 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 decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore 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 Dict Str Str Str Str Str Str Dict Str Str Str Str ListLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword ListLoad Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Assign NameStore Call NameLoad keyword Dict Str Dict Str 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 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 N/A os salt.exceptions CommandExecutionError salttesting TestCase skipIf salttesting.helpers ensure_in_syspath salttesting.mock MagicMock patch NO_MOCK NO_MOCK_REASON N/A N/A ensure_in_syspath ../../ salt.modules systemd N/A N/A systemd __salt__ N/A N/A N/A systemd __context__ N/A N/A _SYSTEMCTL_STATUS N/A sshd.service foo.service * sshd.service - OpenSSH Daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor preset: disabled)
   Active: inactive (dead) * foo.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead) N/A _LIST_UNIT_FILES service1.service                           enabled
service2.service                           disabled
service3.service                           static
timer1.timer                               enabled
timer2.timer                               disabled
timer3.timer                               static SystemdTestCase N/A TestCase N/A N/A 
    Test case for salt.modules.systemd
     test_systemctl_reload N/A N/A self N/A N/A N/A 
            Test to Reloads systemctl
         N/A mock N/A MagicMock side_effect N/A N/A stdout stderr retcode pid Who knows why? 1 12345 N/A stdout stderr retcode pid 0 54321 N/A N/A N/A patch dict N/A systemd __salt__ N/A cmd.run_all mock N/A N/A N/A N/A self assertRaisesRegexp CommandExecutionError Problem performing systemctl daemon-reload: Who knows why? N/A systemd systemctl_reload N/A N/A N/A self assertTrue N/A N/A systemd systemctl_reload N/A test_get_enabled N/A N/A self N/A N/A N/A 
        Test to return a list of all enabled services
         N/A cmd_mock N/A MagicMock return_value _LIST_UNIT_FILES N/A listdir_mock N/A MagicMock return_value N/A foo bar baz README N/A sd_mock N/A MagicMock return_value N/A set N/A N/A N/A x replace .service N/A x _SYSTEMCTL_STATUS N/A access_mock N/A MagicMock side_effect N/A N/A N/A x y N/A N/A x N/A N/A N/A os path join N/A systemd INITSCRIPT_PATH README N/A sysv_enabled_mock N/A MagicMock side_effect N/A N/A N/A x N/A N/A x baz N/A N/A N/A patch dict N/A systemd __salt__ N/A cmd.run cmd_mock N/A N/A N/A N/A patch object os listdir listdir_mock N/A N/A N/A N/A patch object systemd _get_systemd_services sd_mock N/A N/A N/A N/A patch object os access side_effect access_mock N/A N/A N/A N/A patch object systemd _sysv_enabled sysv_enabled_mock N/A N/A N/A N/A self assertListEqual N/A N/A systemd get_enabled N/A baz service1 timer1.timer N/A test_get_disabled N/A N/A self N/A N/A N/A 
        Test to return a list of all disabled services
         N/A cmd_mock N/A MagicMock return_value _LIST_UNIT_FILES N/A listdir_mock N/A MagicMock return_value N/A foo bar baz README N/A sd_mock N/A MagicMock return_value N/A set N/A N/A N/A x replace .service N/A x _SYSTEMCTL_STATUS N/A access_mock N/A MagicMock side_effect N/A N/A N/A x y N/A N/A x N/A N/A N/A os path join N/A systemd INITSCRIPT_PATH README N/A sysv_enabled_mock N/A MagicMock side_effect N/A N/A N/A x N/A N/A x baz N/A N/A N/A patch dict N/A systemd __salt__ N/A cmd.run cmd_mock N/A N/A N/A N/A patch object os listdir listdir_mock N/A N/A N/A N/A patch object systemd _get_systemd_services sd_mock N/A N/A N/A N/A patch object os access side_effect access_mock N/A N/A N/A N/A patch object systemd _sysv_enabled sysv_enabled_mock N/A N/A N/A N/A self assertListEqual N/A N/A systemd get_disabled N/A bar service2 timer2.timer N/A test_get_all N/A N/A self N/A N/A N/A 
        Test to return a list of all available services
         N/A listdir_mock N/A MagicMock side_effect N/A N/A foo.service multi-user.target.wants mytimer.timer N/A foo.service multi-user.target.wants bar.service N/A mysql nginx README N/A mysql nginx README N/A access_mock N/A MagicMock side_effect N/A N/A N/A x y N/A N/A x N/A N/A N/A os path join N/A systemd INITSCRIPT_PATH README N/A N/A N/A patch object os listdir listdir_mock N/A N/A N/A N/A patch object os access side_effect access_mock N/A N/A N/A N/A self assertListEqual N/A N/A systemd get_all N/A bar foo mysql mytimer.timer nginx N/A test_available N/A N/A self N/A N/A N/A 
        Test to check that the given service is available
         N/A mock N/A MagicMock side_effect N/A N/A N/A x N/A N/A _SYSTEMCTL_STATUS N/A x N/A N/A N/A patch object systemd _systemctl_status mock N/A N/A N/A N/A self assertTrue N/A N/A systemd available sshd.service N/A N/A N/A self assertFalse N/A N/A systemd available foo.service N/A test_missing N/A N/A self N/A N/A N/A 
            Test to the inverse of service.available.
         N/A mock N/A MagicMock side_effect N/A N/A N/A x N/A N/A _SYSTEMCTL_STATUS N/A x N/A N/A N/A patch object systemd _systemctl_status mock N/A N/A N/A N/A self assertFalse N/A N/A systemd missing sshd.service N/A N/A N/A self assertTrue N/A N/A systemd missing foo.service N/A test_show N/A N/A self N/A N/A N/A 
        Test to show properties of one or more units/jobs or the manager
         N/A show_output a=b
c=d
e={ f=g ; h=i }
Wants=foo.service bar.service
 N/A mock N/A MagicMock return_value show_output N/A N/A N/A patch dict N/A systemd __salt__ N/A cmd.run mock N/A N/A N/A N/A self assertDictEqual N/A N/A systemd show sshd N/A a c e Wants b d N/A f h g i N/A foo.service bar.service N/A test_execs N/A N/A self N/A N/A N/A 
        Test to return a list of all files specified as ``ExecStart`` for all
        services
         N/A mock N/A MagicMock return_value N/A a b N/A N/A N/A patch object systemd get_all mock N/A N/A mock N/A MagicMock return_value N/A ExecStart N/A path c N/A N/A N/A patch object systemd show mock N/A N/A N/A N/A self assertDictEqual N/A N/A systemd execs N/A a b c c 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 SystemdTestCase needs_daemon False