Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias identifier ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Num Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Num Assign NameStore Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr CompareIn Call AttributeLoad Str attr Call AttributeLoad Str attr NameLoad NameLoad Assign AttributeStore NameLoad attr ListLoad FunctionDef arguments args NameParam NameParam defaults Num body Assign NameStore NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr decorator_list With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr CompareIn SubscriptLoad NameLoad Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr Dict Str Str ListLoad Str Num body Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Num Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Num Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Num Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad TupleLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr Num Num Num Num TupleLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr Num Num Num Num TupleLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr Num Num Num Num Assign NameStore ListLoad TupleLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr Num Num Num TupleLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr Num Num Num TupleLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr Num Num Num decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Lambda arguments args defaults Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Num Assign NameStore Call AttributeLoad NameLoad attr Str keyword Call NameLoad keyword Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num For NameStore Call NameLoad Num body Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr BinOpAdd Num BinOpMult NameLoad Num Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr BinOpMult Num BinOpAdd NameLoad Num Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr BinOpAdd Num BinOpMult Num NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num For NameStore Call NameLoad Num body Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr BinOpAdd Num BinOpMult NameLoad Num Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr BinOpMult Num BinOpAdd NameLoad Num Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr BinOpMult Num BinOpAdd NameLoad Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad BinOpMult Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad NameLoad attr Str keyword Call NameLoad keyword Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad NameLoad attr Str keyword Call NameLoad keyword Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad NameLoad attr Str keyword Call NameLoad keyword Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign NameStore SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Num decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad
N/A N/A Tests client actions related to administrating the client. N/A os N/A StringIO N/A psutil grr.client comms grr.lib config_lib grr.lib flags grr.lib rdfvalue grr.lib stats grr.lib test_lib grr.lib utils grr.lib.rdfvalues client rdf_client grr.lib.rdfvalues protodict rdf_protodict ConfigActionTest N/A N/A test_lib EmptyActionTest N/A N/A Tests the client actions UpdateConfiguration and GetConfiguration. setUp N/A N/A self N/A N/A N/A N/A N/A N/A super ConfigActionTest self setUp N/A N/A self config_stubber N/A N/A test_lib PreserveConfig N/A N/A N/A N/A self config_stubber Start N/A tearDown N/A N/A self N/A N/A N/A N/A N/A N/A super ConfigActionTest self tearDown N/A N/A N/A N/A self config_stubber Stop N/A testUpdateConfiguration N/A N/A self N/A N/A N/A Test that we can update the config. N/A N/A self config_file N/A N/A N/A os path join N/A self temp_dir ConfigActionTest.yaml N/A N/A N/A N/A config_lib CONFIG SetWriteBack N/A self config_file N/A N/A N/A self assertRaises IOError open N/A self config_file N/A location N/A http://www.example1.com/ http://www.example2.com/ N/A request N/A N/A rdf_protodict Dict N/A N/A request N/A Client.server_urls location N/A N/A request N/A Client.foreman_check_frequency 3600 N/A result N/A N/A self RunAction UpdateConfiguration request N/A N/A N/A self assertEqual result N/A N/A N/A N/A self assertEqual N/A N/A config_lib CONFIG N/A Client.foreman_check_frequency 3600 N/A data N/A N/A N/A open N/A self config_file read N/A N/A N/A self assertTrue N/A N/A N/A server_urls: {0} format N/A N/A , join location data N/A N/A self urls N/A FakeUrlOpen N/A N/A req timeout N/A 10 N/A N/A _ timeout N/A N/A N/A N/A self urls append N/A N/A req get_full_url N/A N/A N/A StringIO StringIO N/A N/A N/A N/A utils Stubber N/A comms urllib2 urlopen FakeUrlOpen N/A N/A client_context N/A N/A comms GRRHTTPClient worker MockClientWorker N/A N/A N/A client_context MakeRequest N/A N/A N/A self assertTrue N/A N/A location N/A 0 N/A N/A self urls N/A 0 N/A testUpdateConfigBlacklist N/A N/A self N/A N/A N/A Tests that disallowed fields are not getting updated. N/A N/A N/A test_lib ConfigOverrider N/A Client.server_urls Client.server_serial_number N/A http://something.com/ 1 N/A N/A location N/A http://www.example.com N/A request N/A N/A rdf_protodict Dict N/A N/A request N/A Client.server_urls location N/A N/A request N/A Client.server_serial_number 10 N/A N/A N/A self RunAction UpdateConfiguration request N/A N/A N/A self assertEqual N/A N/A config_lib CONFIG N/A Client.server_urls location N/A N/A N/A self assertEqual N/A N/A config_lib CONFIG N/A Client.server_serial_number 1 N/A testGetConfig N/A N/A self N/A N/A N/A Check GetConfig client action works. N/A location N/A http://example.com N/A request N/A N/A rdf_protodict Dict N/A N/A request N/A Client.server_urls location N/A N/A request N/A Client.foreman_check_frequency 3600 N/A N/A N/A self RunAction UpdateConfiguration request N/A N/A N/A self RunAction GetConfiguration N/A N/A N/A self assertEqual N/A N/A config_lib CONFIG N/A Client.foreman_check_frequency 3600 N/A N/A N/A self assertEqual N/A N/A config_lib CONFIG N/A Client.server_urls location N/A N/A MockStatsCollector N/A object N/A N/A Mock stats collector for GetClientStatsActionTest. N/A cpu_samples N/A N/A N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch 100 0.1 0.1 10.0 N/A N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch 110 0.1 0.2 15.0 N/A N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch 120 0.1 0.3 20.0 N/A io_samples N/A N/A N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch 100 100 100 N/A N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch 110 200 200 N/A N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch 120 300 300 N/A MockClientWorker N/A object N/A N/A Mock client worker for GetClientStatsActionTest. __init__ N/A N/A self N/A N/A N/A N/A self stats_collector N/A MockStatsCollector N/A N/A GetClientStatsActionTest N/A N/A test_lib EmptyActionTest N/A N/A Test GetClientStats client action. setUp N/A N/A self N/A N/A N/A N/A N/A N/A super GetClientStatsActionTest self setUp N/A N/A self old_boot_time N/A psutil boot_time N/A N/A psutil boot_time N/A N/A N/A N/A 100 N/A tearDown N/A N/A self N/A N/A N/A N/A N/A N/A super GetClientStatsActionTest self tearDown N/A N/A psutil boot_time N/A self old_boot_time N/A testReturnsAllDataByDefault N/A N/A self N/A N/A N/A Checks that stats collection works. N/A N/A N/A N/A stats STATS RegisterCounterMetric grr_client_received_bytes N/A N/A N/A N/A stats STATS IncrementCounter grr_client_received_bytes 1566 N/A N/A N/A N/A stats STATS RegisterCounterMetric grr_client_sent_bytes N/A N/A N/A N/A stats STATS IncrementCounter grr_client_sent_bytes 2000 N/A results N/A N/A self RunAction GetClientStats grr_worker N/A MockClientWorker arg N/A N/A rdf_client GetClientStatsRequest N/A response N/A results N/A 0 N/A N/A N/A self assertEqual N/A response bytes_received 1566 N/A N/A N/A self assertEqual N/A response bytes_sent 2000 N/A N/A N/A self assertEqual N/A len N/A response cpu_samples 3 N/A i N/A range 3 N/A N/A N/A N/A self assertEqual N/A N/A N/A response cpu_samples N/A i timestamp N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch N/A 100 N/A i 10 N/A N/A N/A self assertAlmostEqual N/A N/A N/A response cpu_samples N/A i user_cpu_time 0.1 N/A N/A N/A self assertAlmostEqual N/A N/A N/A response cpu_samples N/A i system_cpu_time N/A 0.1 N/A i 1 N/A N/A N/A self assertAlmostEqual N/A N/A N/A response cpu_samples N/A i cpu_percent N/A 10.0 N/A 5 i N/A N/A N/A self assertEqual N/A len N/A response io_samples 3 N/A i N/A range 3 N/A N/A N/A N/A self assertEqual N/A N/A N/A response io_samples N/A i timestamp N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch N/A 100 N/A i 10 N/A N/A N/A self assertEqual N/A N/A N/A response io_samples N/A i read_bytes N/A 100 N/A i 1 N/A N/A N/A self assertEqual N/A N/A N/A response io_samples N/A i write_bytes N/A 100 N/A i 1 N/A N/A N/A self assertEqual N/A response boot_time N/A long N/A 100 1000000.0 N/A testFiltersDataPointsByStartTime N/A N/A self N/A N/A N/A start_time N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch 117 N/A results N/A N/A self RunAction GetClientStats grr_worker N/A MockClientWorker arg N/A N/A rdf_client GetClientStatsRequest start_time start_time N/A response N/A results N/A 0 N/A N/A N/A self assertEqual N/A len N/A response cpu_samples 1 N/A N/A N/A self assertEqual N/A N/A N/A response cpu_samples N/A 0 timestamp N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch 120 N/A N/A N/A self assertEqual N/A len N/A response io_samples 1 N/A N/A N/A self assertEqual N/A N/A N/A response io_samples N/A 0 timestamp N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch 120 N/A testFiltersDataPointsByEndTime N/A N/A self N/A N/A N/A end_time N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch 102 N/A results N/A N/A self RunAction GetClientStats grr_worker N/A MockClientWorker arg N/A N/A rdf_client GetClientStatsRequest end_time end_time N/A response N/A results N/A 0 N/A N/A N/A self assertEqual N/A len N/A response cpu_samples 1 N/A N/A N/A self assertEqual N/A N/A N/A response cpu_samples N/A 0 timestamp N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch 100 N/A N/A N/A self assertEqual N/A len N/A response io_samples 1 N/A N/A N/A self assertEqual N/A N/A N/A response io_samples N/A 0 timestamp N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch 100 N/A testFiltersDataPointsByStartAndEndTimes N/A N/A self N/A N/A N/A start_time N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch 109 N/A end_time N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch 113 N/A results N/A N/A self RunAction GetClientStats grr_worker N/A MockClientWorker arg N/A N/A rdf_client GetClientStatsRequest start_time start_time end_time end_time N/A response N/A results N/A 0 N/A N/A N/A self assertEqual N/A len N/A response cpu_samples 1 N/A N/A N/A self assertEqual N/A N/A N/A response cpu_samples N/A 0 timestamp N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch 110 N/A N/A N/A self assertEqual N/A len N/A response io_samples 1 N/A N/A N/A self assertEqual N/A N/A N/A response io_samples N/A 0 timestamp N/A N/A N/A N/A rdfvalue RDFDatetime FromSecondsFromEpoch 110 N/A N/A main N/A N/A argv N/A N/A N/A N/A N/A test_lib main argv N/A N/A N/A __name__ __main__ N/A N/A N/A N/A flags StartMain main