Module Expr Str ImportFrom alias ImportFrom alias alias ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias Import 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 Expr Str Assign NameStore Str Assign NameStore ListLoad Str Str Str Assign NameStore ListLoad Dict Str Str ListLoad Dict Str Str Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad Dict Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call NameLoad keyword ListLoad Dict Str Str NameLoad NameLoad Dict Str Str NameLoad NameLoad Dict Str Str NameLoad NameLoad Dict Str Str NameLoad NameLoad Dict Str Str NameLoad NameLoad Dict Str Str NameLoad NameLoad Dict Str Str NameLoad NameLoad Assign NameStore Call NameLoad keyword ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Dict Str Str Assign NameStore Call NameLoad keyword Dict Str NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad 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 NameLoad Assign NameStore Call NameLoad keyword Dict Str ListLoad Dict Str Str Str Str With Call AttributeLoad NameLoad attr NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad NameLoad With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword Dict Str Dict body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad keyword 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 NameLoad Assign NameStore Call NameLoad keyword Dict Str ListLoad Dict Str Str Str Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body With Call AttributeLoad NameLoad attr NameLoad 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 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 Dict Str Assign NameStore Call NameLoad keyword ListLoad Dict Str Str NameLoad NameLoad Dict Str Str NameLoad NameLoad Dict Str Str NameLoad NameLoad Assign NameStore Call NameLoad keyword ListLoad NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr 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 Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad 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 salt.exceptions SaltInvocationError N/A json N/A N/A ensure_in_syspath ../../ salt.states grafana N/A N/A grafana __opts__ N/A N/A N/A grafana __salt__ N/A GrafanaTestCase N/A TestCase N/A N/A 
    Test cases for salt.states.grafana
     test_dashboard_present N/A N/A self N/A N/A N/A 
        Test to ensure the grafana dashboard exists and is managed.
         N/A name myservice N/A rows N/A systemhealth requests title N/A row N/A N/A panels title N/A N/A id a systemhealth N/A ret N/A name result changes comment name None N/A N/A comt1 Dashboard myservice is set to be updated. The following rows set to be updated: ['systemhealth'] N/A N/A N/A self assertRaises SaltInvocationError N/A grafana dashboard_present name profile False N/A N/A N/A self assertRaises SaltInvocationError N/A grafana dashboard_present name True True N/A mock N/A MagicMock side_effect N/A N/A hosts index True False N/A hosts index True True N/A hosts index True True N/A hosts index True True N/A hosts index True True N/A hosts index True True N/A hosts index True True N/A mock_f N/A MagicMock side_effect N/A False False True True True True N/A mock_t N/A MagicMock return_value N/A mock_i N/A MagicMock return_value False N/A source N/A dashboard ["rows", {"rows":["baz", null, 1.0, 2]}] N/A mock_dict N/A MagicMock return_value N/A _source source N/A N/A N/A patch dict N/A grafana __salt__ N/A config.option elasticsearch.exists pillar.get elasticsearch.get elasticsearch.index mock mock_f mock_t mock_dict mock_i N/A N/A N/A N/A self assertRaises SaltInvocationError N/A grafana dashboard_present name N/A N/A N/A patch dict N/A grafana __opts__ N/A test True N/A N/A N/A N/A self assertRaises SaltInvocationError N/A grafana dashboard_present name N/A comt N/A N/A Dashboard {0} is set to be created. 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 grafana dashboard_present name True ret N/A mock N/A MagicMock return_value N/A rows N/A N/A panels title b systemhealth N/A N/A N/A patch object json loads mock N/A N/A N/A N/A ret update N/A comment result comt1 None N/A N/A N/A self assertDictEqual N/A N/A grafana dashboard_present name True rows row ret N/A N/A N/A patch object json loads N/A MagicMock return_value N/A rows N/A N/A N/A N/A N/A self assertRaises SaltInvocationError N/A grafana dashboard_present name rows_from_pillar rows N/A comt Dashboard myservice is up to date 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 grafana dashboard_present name True ret N/A mock N/A MagicMock return_value N/A rows N/A N/A panels title b systemhealth N/A N/A N/A patch dict N/A grafana __opts__ N/A test False N/A N/A N/A N/A patch object json loads mock N/A N/A comt Failed to update dashboard myservice. N/A N/A N/A ret update N/A comment result comt False N/A N/A N/A self assertDictEqual N/A N/A grafana dashboard_present name True rows row ret N/A test_dashboard_absent N/A N/A self N/A N/A N/A 
        Test to ensure the named grafana dashboard is deleted.
         N/A name myservice N/A ret N/A name result changes comment name None N/A N/A mock N/A MagicMock side_effect N/A N/A hosts index True False N/A hosts index True True N/A hosts index True True N/A mock_f N/A MagicMock side_effect N/A True False N/A N/A N/A patch dict N/A grafana __salt__ N/A config.option elasticsearch.exists mock mock_f N/A N/A N/A N/A self assertRaises SaltInvocationError N/A grafana dashboard_absent name N/A N/A N/A patch dict N/A grafana __opts__ N/A test True N/A N/A comt Dashboard myservice is set to be removed. 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 grafana dashboard_absent name ret N/A comt Dashboard myservice does not exist. 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 grafana dashboard_absent name ret 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 GrafanaTestCase needs_daemon False