aliyun-log-python-sdk 0.9.35__tar.gz → 0.9.36__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. {aliyun_log_python_sdk-0.9.35/aliyun_log_python_sdk.egg-info → aliyun_log_python_sdk-0.9.36}/PKG-INFO +1 -1
  2. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/logitem.py +4 -1
  3. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/version.py +1 -1
  4. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36/aliyun_log_python_sdk.egg-info}/PKG-INFO +1 -1
  5. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun_log_python_sdk.egg-info/SOURCES.txt +0 -1
  6. aliyun_log_python_sdk-0.9.35/tests/test_logtail_pipeline_config.py +0 -389
  7. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/LICENSE +0 -0
  8. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/README.md +0 -0
  9. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/__init__.py +0 -0
  10. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/__init__.py +0 -0
  11. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/_proto_py2/__init__.py +0 -0
  12. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/_proto_py2/log_logs_pb2.py +0 -0
  13. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/_proto_py2/log_logs_raw_pb2.py +0 -0
  14. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/acl_config.py +0 -0
  15. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/acl_response.py +0 -0
  16. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/async_sql_pb2.py +0 -0
  17. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/async_sql_response.py +0 -0
  18. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/auth.py +0 -0
  19. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/common_response.py +0 -0
  20. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/compress.py +0 -0
  21. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/consumer/__init__.py +0 -0
  22. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/consumer/checkpoint_tracker.py +0 -0
  23. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/consumer/config.py +0 -0
  24. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/consumer/consumer_client.py +0 -0
  25. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/consumer/exceptions.py +0 -0
  26. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/consumer/fetched_log_group.py +0 -0
  27. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/consumer/heart_beat.py +0 -0
  28. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/consumer/preprocessor.py +0 -0
  29. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/consumer/shard_worker.py +0 -0
  30. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/consumer/tasks.py +0 -0
  31. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/consumer/worker.py +0 -0
  32. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/consumer_group_request.py +0 -0
  33. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/consumer_group_response.py +0 -0
  34. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/credentials.py +0 -0
  35. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/cursor_response.py +0 -0
  36. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/cursor_time_response.py +0 -0
  37. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/delete_async_sql_request.py +0 -0
  38. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/deletelogsrequest.py +0 -0
  39. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/deletelogssresponse.py +0 -0
  40. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/es_migration/__init__.py +0 -0
  41. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/es_migration/doc_logitem_converter.py +0 -0
  42. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/es_migration/index_logstore_mappings.py +0 -0
  43. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/es_migration/mapping_index_converter.py +0 -0
  44. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/es_migration/migration_log.py +0 -0
  45. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/es_migration/migration_manager.py +0 -0
  46. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/es_migration/migration_response.py +0 -0
  47. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/es_migration/migration_task.py +0 -0
  48. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/es_migration/util.py +0 -0
  49. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_config_response.py +0 -0
  50. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/__init__.py +0 -0
  51. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/config_parser.py +0 -0
  52. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/etl_util.py +0 -0
  53. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/exceptions.py +0 -0
  54. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/restrict_config_parser.py +0 -0
  55. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/runner.py +0 -0
  56. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/settings.py +0 -0
  57. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/trans_comp/__init__.py +0 -0
  58. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/trans_comp/trans_base.py +0 -0
  59. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/trans_comp/trans_csv.py +0 -0
  60. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/trans_comp/trans_json.py +0 -0
  61. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/trans_comp/trans_kv.py +0 -0
  62. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/trans_comp/trans_lookup.py +0 -0
  63. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/trans_comp/trans_mv.py +0 -0
  64. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/trans_comp/trans_regex.py +0 -0
  65. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/trans_comp/trans_set_field.py +0 -0
  66. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/transform/__init__.py +0 -0
  67. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/transform/condition_list.py +0 -0
  68. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/transform/condition_transform.py +0 -0
  69. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/transform/condition_util.py +0 -0
  70. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/transform/transform_base.py +0 -0
  71. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/transform/transform_list.py +0 -0
  72. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/etl_core/transform/transform_meta.py +0 -0
  73. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/export_response.py +0 -0
  74. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/ext/__init__.py +0 -0
  75. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/ext/jupyter_magic.py +0 -0
  76. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/ext/syslogclient.py +0 -0
  77. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/external_store_config.py +0 -0
  78. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/external_store_config_response.py +0 -0
  79. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/get_async_sql_request.py +0 -0
  80. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/getcontextlogsresponse.py +0 -0
  81. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/getdeletelogsstatusrequest.py +0 -0
  82. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/getdeletelogsstatusresponse.py +0 -0
  83. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/gethistogramsrequest.py +0 -0
  84. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/gethistogramsresponse.py +0 -0
  85. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/getlogsrequest.py +0 -0
  86. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/getlogsresponse.py +0 -0
  87. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/histogram.py +0 -0
  88. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/index_config.py +0 -0
  89. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/index_config_response.py +0 -0
  90. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/ingestion_response.py +0 -0
  91. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/job.py +0 -0
  92. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/listdeletelogsstasksrequest.py +0 -0
  93. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/listdeletelogsstasksresponse.py +0 -0
  94. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/listlogstoresrequest.py +0 -0
  95. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/listlogstoresresponse.py +0 -0
  96. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/listtopicsrequest.py +0 -0
  97. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/listtopicsresponse.py +0 -0
  98. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/log_logs_pb2.py +0 -0
  99. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/log_logs_raw_pb2.py +0 -0
  100. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/logclient.py +0 -0
  101. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/logclient_core.py +0 -0
  102. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/logclient_operator.py +0 -0
  103. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/logexception.py +0 -0
  104. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/logger_hanlder.py +0 -0
  105. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/logrequest.py +0 -0
  106. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/logresponse.py +0 -0
  107. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/logstore_config_response.py +0 -0
  108. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/logtail_config_detail.py +0 -0
  109. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/logtail_config_response.py +0 -0
  110. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/logtail_pipeline_config_detail.py +0 -0
  111. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/logtail_pipeline_config_response.py +0 -0
  112. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/machine_group_detail.py +0 -0
  113. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/machinegroup_response.py +0 -0
  114. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/metering_mode_response.py +0 -0
  115. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/odps_sink.py +0 -0
  116. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/oss_sink.py +0 -0
  117. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/pluralize.py +0 -0
  118. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/project_response.py +0 -0
  119. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/proto.py +0 -0
  120. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/pulllog_response.py +0 -0
  121. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/putlogsrequest.py +0 -0
  122. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/putlogsresponse.py +0 -0
  123. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/queriedlog.py +0 -0
  124. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/rebuild_index_response.py +0 -0
  125. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/resource_params.py +0 -0
  126. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/resource_response.py +0 -0
  127. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/scheduled_sql.py +0 -0
  128. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/scheduled_sql_response.py +0 -0
  129. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/shard_response.py +0 -0
  130. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/shipper_config.py +0 -0
  131. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/shipper_response.py +0 -0
  132. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/sink.py +0 -0
  133. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/sql_instance_response.py +0 -0
  134. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/store_view.py +0 -0
  135. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/store_view_response.py +0 -0
  136. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/submit_async_sql_request.py +0 -0
  137. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/substore_config_response.py +0 -0
  138. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/tag_response.py +0 -0
  139. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/topostore_params.py +0 -0
  140. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/topostore_response.py +0 -0
  141. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun/log/util.py +0 -0
  142. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun_log_python_sdk.egg-info/dependency_links.txt +0 -0
  143. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun_log_python_sdk.egg-info/requires.txt +0 -0
  144. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/aliyun_log_python_sdk.egg-info/top_level.txt +0 -0
  145. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/setup.cfg +0 -0
  146. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/setup.py +0 -0
  147. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/tests/test_alert.py +0 -0
  148. {aliyun_log_python_sdk-0.9.35 → aliyun_log_python_sdk-0.9.36}/tests/test_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aliyun-log-python-sdk
3
- Version: 0.9.35
3
+ Version: 0.9.36
4
4
  Summary: Aliyun log service Python client SDK
5
5
  Home-page: https://github.com/aliyun/aliyun-log-python-sdk
6
6
  Author: Aliyun
@@ -17,9 +17,12 @@ class LogItem(object):
17
17
 
18
18
  :type contents: tuple(key-value) list
19
19
  :param contents: the data of the log item, including many (key,value) pairs.
20
+
21
+ :type time_nano_part: int
22
+ :param time_nano_part: time nano part of the log item, ranges from 0 to 999999999.
20
23
  """
21
24
 
22
- def __init__(self, timestamp=None, time_nano_part=None, contents=None):
25
+ def __init__(self, timestamp=None, contents=None, time_nano_part=None):
23
26
  nano_time = int(time.time() * 10**9)
24
27
  self.timestamp = int(timestamp) if timestamp else int(nano_time / 1000000000)
25
28
  # milliseconds
@@ -1,4 +1,4 @@
1
- __version__ = '0.9.35'
1
+ __version__ = '0.9.36'
2
2
 
3
3
  import sys
4
4
  OS_VERSION = str(sys.platform)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aliyun-log-python-sdk
3
- Version: 0.9.35
3
+ Version: 0.9.36
4
4
  Summary: Aliyun log service Python client SDK
5
5
  Home-page: https://github.com/aliyun/aliyun-log-python-sdk
6
6
  Author: Aliyun
@@ -142,5 +142,4 @@ aliyun_log_python_sdk.egg-info/dependency_links.txt
142
142
  aliyun_log_python_sdk.egg-info/requires.txt
143
143
  aliyun_log_python_sdk.egg-info/top_level.txt
144
144
  tests/test_alert.py
145
- tests/test_logtail_pipeline_config.py
146
145
  tests/test_util.py
@@ -1,389 +0,0 @@
1
- #!/usr/bin/env python
2
- # encoding: utf-8
3
-
4
- # Copyright (C) Alibaba Cloud Computing
5
- # All rights reserved.
6
-
7
- """
8
- Unit tests for Logtail Pipeline Config API
9
-
10
- This test file validates the LogtailPipelineConfigDetail class
11
- and its JSON serialization/deserialization.
12
- """
13
-
14
- from __future__ import print_function
15
- import unittest
16
- import json
17
- import sys
18
- import os
19
-
20
- # Add parent directory to path for imports
21
- sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
22
-
23
- from aliyun.log.logtail_pipeline_config_detail import LogtailPipelineConfigDetail
24
-
25
-
26
- class TestLogtailPipelineConfigDetail(unittest.TestCase):
27
- """Test cases for LogtailPipelineConfigDetail"""
28
-
29
- def setUp(self):
30
- """Set up test fixtures"""
31
- self.config_name = "test-pipeline-config"
32
- self.inputs = [
33
- {
34
- "Type": "input_file",
35
- "FilePaths": ["/var/log/*.log"]
36
- }
37
- ]
38
- self.flushers = [
39
- {
40
- "Type": "flusher_sls",
41
- "Logstore": "test-logstore"
42
- }
43
- ]
44
- self.processors = [
45
- {
46
- "Type": "processor_parse_json_native",
47
- "SourceKey": "content"
48
- }
49
- ]
50
- self.log_sample = '{"level": "INFO", "message": "test"}'
51
-
52
- def test_basic_init(self):
53
- """Test basic initialization with required fields only"""
54
- config = LogtailPipelineConfigDetail(
55
- config_name=self.config_name,
56
- inputs=self.inputs,
57
- flushers=self.flushers
58
- )
59
-
60
- self.assertEqual(config.config_name, self.config_name)
61
- self.assertEqual(config.inputs, self.inputs)
62
- self.assertEqual(config.flushers, self.flushers)
63
- self.assertIsNone(config.log_sample)
64
- self.assertEqual(config.global_config, {})
65
- self.assertEqual(config.processors, [])
66
- self.assertEqual(config.aggregators, [])
67
-
68
- def test_full_init(self):
69
- """Test initialization with all fields"""
70
- global_config = {"TopicType": "filepath"}
71
- aggregators = [{"Type": "aggregator_context"}]
72
-
73
- config = LogtailPipelineConfigDetail(
74
- config_name=self.config_name,
75
- inputs=self.inputs,
76
- flushers=self.flushers,
77
- log_sample=self.log_sample,
78
- global_config=global_config,
79
- processors=self.processors,
80
- aggregators=aggregators
81
- )
82
-
83
- self.assertEqual(config.config_name, self.config_name)
84
- self.assertEqual(config.log_sample, self.log_sample)
85
- self.assertEqual(config.global_config, global_config)
86
- self.assertEqual(config.processors, self.processors)
87
- self.assertEqual(config.aggregators, aggregators)
88
-
89
- def test_to_json_basic(self):
90
- """Test to_json with basic configuration"""
91
- config = LogtailPipelineConfigDetail(
92
- config_name=self.config_name,
93
- inputs=self.inputs,
94
- flushers=self.flushers
95
- )
96
-
97
- json_dict = config.to_json()
98
-
99
- self.assertIn("configName", json_dict)
100
- self.assertIn("inputs", json_dict)
101
- self.assertIn("flushers", json_dict)
102
- self.assertEqual(json_dict["configName"], self.config_name)
103
- self.assertEqual(json_dict["inputs"], self.inputs)
104
- self.assertEqual(json_dict["flushers"], self.flushers)
105
- # Optional fields should not be present if not set
106
- self.assertNotIn("logSample", json_dict)
107
-
108
- def test_to_json_full(self):
109
- """Test to_json with all fields"""
110
- global_config = {"TopicType": "filepath"}
111
- aggregators = [{"Type": "aggregator_context"}]
112
-
113
- config = LogtailPipelineConfigDetail(
114
- config_name=self.config_name,
115
- inputs=self.inputs,
116
- flushers=self.flushers,
117
- log_sample=self.log_sample,
118
- global_config=global_config,
119
- processors=self.processors,
120
- aggregators=aggregators
121
- )
122
-
123
- json_dict = config.to_json()
124
-
125
- self.assertIn("configName", json_dict)
126
- self.assertIn("logSample", json_dict)
127
- self.assertIn("global", json_dict)
128
- self.assertIn("inputs", json_dict)
129
- self.assertIn("processors", json_dict)
130
- self.assertIn("aggregators", json_dict)
131
- self.assertIn("flushers", json_dict)
132
-
133
- self.assertEqual(json_dict["configName"], self.config_name)
134
- self.assertEqual(json_dict["logSample"], self.log_sample)
135
- self.assertEqual(json_dict["global"], global_config)
136
- self.assertEqual(json_dict["processors"], self.processors)
137
- self.assertEqual(json_dict["aggregators"], aggregators)
138
-
139
- def test_from_json_basic(self):
140
- """Test from_json with basic configuration"""
141
- json_dict = {
142
- "configName": self.config_name,
143
- "inputs": self.inputs,
144
- "flushers": self.flushers
145
- }
146
-
147
- config = LogtailPipelineConfigDetail.from_json(json_dict)
148
-
149
- self.assertEqual(config.config_name, self.config_name)
150
- self.assertEqual(config.inputs, self.inputs)
151
- self.assertEqual(config.flushers, self.flushers)
152
- self.assertIsNone(config.log_sample)
153
- self.assertIsNone(config.global_config)
154
- self.assertEqual(config.processors, [])
155
-
156
- def test_from_json_full(self):
157
- """Test from_json with all fields"""
158
- global_config = {"TopicType": "filepath"}
159
- aggregators = [{"Type": "aggregator_context"}]
160
-
161
- json_dict = {
162
- "configName": self.config_name,
163
- "logSample": self.log_sample,
164
- "global": global_config,
165
- "inputs": self.inputs,
166
- "processors": self.processors,
167
- "aggregators": aggregators,
168
- "flushers": self.flushers
169
- }
170
-
171
- config = LogtailPipelineConfigDetail.from_json(json_dict)
172
-
173
- self.assertEqual(config.config_name, self.config_name)
174
- self.assertEqual(config.log_sample, self.log_sample)
175
- self.assertEqual(config.global_config, global_config)
176
- self.assertEqual(config.inputs, self.inputs)
177
- self.assertEqual(config.processors, self.processors)
178
- self.assertEqual(config.aggregators, aggregators)
179
- self.assertEqual(config.flushers, self.flushers)
180
-
181
- def test_json_roundtrip(self):
182
- """Test JSON serialization and deserialization roundtrip"""
183
- global_config = {"TopicType": "filepath", "EnableRawLog": True}
184
- aggregators = [{"Type": "aggregator_context", "MaxLogGroupCount": 100}]
185
-
186
- original = LogtailPipelineConfigDetail(
187
- config_name=self.config_name,
188
- inputs=self.inputs,
189
- flushers=self.flushers,
190
- log_sample=self.log_sample,
191
- global_config=global_config,
192
- processors=self.processors,
193
- aggregators=aggregators
194
- )
195
-
196
- # Serialize to JSON
197
- json_dict = original.to_json()
198
- json_str = json.dumps(json_dict)
199
-
200
- # Deserialize from JSON
201
- parsed_dict = json.loads(json_str)
202
- restored = LogtailPipelineConfigDetail.from_json(parsed_dict)
203
-
204
- # Verify roundtrip
205
- self.assertEqual(restored.config_name, original.config_name)
206
- self.assertEqual(restored.log_sample, original.log_sample)
207
- self.assertEqual(restored.global_config, original.global_config)
208
- self.assertEqual(restored.inputs, original.inputs)
209
- self.assertEqual(restored.processors, original.processors)
210
- self.assertEqual(restored.aggregators, original.aggregators)
211
- self.assertEqual(restored.flushers, original.flushers)
212
-
213
- def test_str_representation(self):
214
- """Test __str__ method"""
215
- config = LogtailPipelineConfigDetail(
216
- config_name=self.config_name,
217
- inputs=self.inputs,
218
- flushers=self.flushers
219
- )
220
-
221
- str_repr = str(config)
222
- self.assertIsInstance(str_repr, str)
223
- # Should be valid JSON
224
- parsed = json.loads(str_repr)
225
- self.assertEqual(parsed["configName"], self.config_name)
226
-
227
- def test_repr_representation(self):
228
- """Test __repr__ method"""
229
- config = LogtailPipelineConfigDetail(
230
- config_name=self.config_name,
231
- inputs=self.inputs,
232
- flushers=self.flushers
233
- )
234
-
235
- repr_str = repr(config)
236
- self.assertIn("LogtailPipelineConfigDetail", repr_str)
237
- self.assertIn(self.config_name, repr_str)
238
-
239
- def test_multiple_processors(self):
240
- """Test configuration with multiple processors"""
241
- processors = [
242
- {
243
- "Type": "processor_parse_json_native",
244
- "SourceKey": "content"
245
- },
246
- {
247
- "Type": "processor_filter_regex",
248
- "Include": {
249
- "level": "ERROR|WARN"
250
- }
251
- },
252
- {
253
- "Type": "processor_desensitize",
254
- "SourceKey": "message",
255
- "Method": "const",
256
- "Match": r"\d{11}",
257
- "ReplaceString": "***"
258
- }
259
- ]
260
-
261
- config = LogtailPipelineConfigDetail(
262
- config_name=self.config_name,
263
- inputs=self.inputs,
264
- flushers=self.flushers,
265
- processors=processors
266
- )
267
-
268
- json_dict = config.to_json()
269
- self.assertEqual(len(json_dict["processors"]), 3)
270
-
271
- # Test roundtrip
272
- restored = LogtailPipelineConfigDetail.from_json(json_dict)
273
- self.assertEqual(len(restored.processors), 3)
274
- self.assertEqual(restored.processors[0]["Type"], "processor_parse_json_native")
275
- self.assertEqual(restored.processors[1]["Type"], "processor_filter_regex")
276
- self.assertEqual(restored.processors[2]["Type"], "processor_desensitize")
277
-
278
-
279
- class TestLogtailPipelineConfigResponse(unittest.TestCase):
280
- """Test cases for response classes"""
281
-
282
- def test_import_response_classes(self):
283
- """Test that response classes can be imported"""
284
- try:
285
- from aliyun.log.logtail_pipeline_config_response import (
286
- CreateLogtailPipelineConfigResponse,
287
- UpdateLogtailPipelineConfigResponse,
288
- DeleteLogtailPipelineConfigResponse,
289
- GetLogtailPipelineConfigResponse,
290
- ListLogtailPipelineConfigResponse
291
- )
292
- # If we get here, imports are successful
293
- self.assertTrue(True)
294
- except ImportError as e:
295
- self.fail("Failed to import response classes: %s" % str(e))
296
-
297
- def test_get_response_with_config(self):
298
- """Test GetLogtailPipelineConfigResponse with config detail"""
299
- from aliyun.log.logtail_pipeline_config_response import GetLogtailPipelineConfigResponse
300
-
301
- resp_body = {
302
- "configName": "test-config",
303
- "inputs": [{"Type": "input_file"}],
304
- "flushers": [{"Type": "flusher_sls", "Logstore": "test"}]
305
- }
306
-
307
- headers = {"x-log-requestid": "test-request-id"}
308
-
309
- response = GetLogtailPipelineConfigResponse(resp_body, headers)
310
- config = response.get_pipeline_config()
311
-
312
- self.assertIsNotNone(config)
313
- self.assertEqual(config.config_name, "test-config")
314
-
315
- def test_list_response_properties(self):
316
- """Test ListLogtailPipelineConfigResponse properties
317
-
318
- Note: List API returns config names (strings) only, not full config objects
319
- """
320
- from aliyun.log.logtail_pipeline_config_response import ListLogtailPipelineConfigResponse
321
-
322
- resp_body = {
323
- "count": 2,
324
- "total": 10,
325
- "configs": ["config1", "config2"] # Config names only, not full objects
326
- }
327
-
328
- headers = {"x-log-requestid": "test-request-id"}
329
-
330
- response = ListLogtailPipelineConfigResponse(resp_body, headers)
331
-
332
- self.assertEqual(response.get_count(), 2)
333
- self.assertEqual(response.get_total(), 10)
334
- self.assertEqual(len(response.get_configs()), 2)
335
- # Verify it returns config names as strings
336
- self.assertEqual(response.get_configs()[0], "config1")
337
- self.assertEqual(response.get_configs()[1], "config2")
338
- self.assertIsInstance(response.get_configs()[0], str)
339
-
340
- def test_list_response_merge(self):
341
- """Test ListLogtailPipelineConfigResponse merge for pagination"""
342
- from aliyun.log.logtail_pipeline_config_response import ListLogtailPipelineConfigResponse
343
-
344
- # First page
345
- resp_body1 = {
346
- "count": 2,
347
- "total": 5,
348
- "configs": ["config1", "config2"]
349
- }
350
- headers1 = {"x-log-requestid": "test-request-id-1"}
351
- response1 = ListLogtailPipelineConfigResponse(resp_body1, headers1)
352
-
353
- # Second page
354
- resp_body2 = {
355
- "count": 2,
356
- "total": 5,
357
- "configs": ["config3", "config4"]
358
- }
359
- headers2 = {"x-log-requestid": "test-request-id-2"}
360
- response2 = ListLogtailPipelineConfigResponse(resp_body2, headers2)
361
-
362
- # Merge
363
- response1.merge(response2)
364
-
365
- # Verify merged result
366
- self.assertEqual(response1.get_count(), 4) # 2 + 2
367
- self.assertEqual(response1.get_total(), 5) # Use latest total
368
- self.assertEqual(len(response1.get_configs()), 4)
369
- self.assertEqual(response1.get_configs(), ["config1", "config2", "config3", "config4"])
370
-
371
-
372
- def run_tests():
373
- """Run all tests"""
374
- loader = unittest.TestLoader()
375
- suite = unittest.TestSuite()
376
-
377
- suite.addTests(loader.loadTestsFromTestCase(TestLogtailPipelineConfigDetail))
378
- suite.addTests(loader.loadTestsFromTestCase(TestLogtailPipelineConfigResponse))
379
-
380
- runner = unittest.TextTestRunner(verbosity=2)
381
- result = runner.run(suite)
382
-
383
- return result.wasSuccessful()
384
-
385
-
386
- if __name__ == '__main__':
387
- success = run_tests()
388
- sys.exit(0 if success else 1)
389
-