aliyun-log-python-sdk 0.8.8__tar.gz → 0.8.12__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 (121) hide show
  1. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/PKG-INFO +1 -1
  2. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/gethistogramsrequest.py +53 -1
  3. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/getlogsrequest.py +58 -1
  4. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/getlogsresponse.py +5 -0
  5. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/job.py +33 -3
  6. aliyun-log-python-sdk-0.8.12/aliyun/log/log_logs_pb2.py +297 -0
  7. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/log_logs_raw_pb2.py +72 -60
  8. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/logclient.py +226 -7
  9. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/logclient_operator.py +1 -1
  10. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/logitem.py +84 -69
  11. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/pulllog_response.py +1 -0
  12. aliyun-log-python-sdk-0.8.12/aliyun/log/scheduled_sql.py +317 -0
  13. aliyun-log-python-sdk-0.8.12/aliyun/log/scheduled_sql_response.py +215 -0
  14. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/version.py +1 -1
  15. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun_log_python_sdk.egg-info/PKG-INFO +1 -1
  16. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun_log_python_sdk.egg-info/SOURCES.txt +2 -0
  17. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun_log_python_sdk.egg-info/requires.txt +1 -1
  18. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/setup.py +2 -2
  19. aliyun-log-python-sdk-0.8.8/aliyun/log/log_logs_pb2.py +0 -251
  20. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/README.md +0 -0
  21. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/__init__.py +0 -0
  22. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/__init__.py +0 -0
  23. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/acl_config.py +0 -0
  24. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/acl_response.py +0 -0
  25. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/auth.py +0 -0
  26. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/common_response.py +0 -0
  27. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/consumer/__init__.py +0 -0
  28. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/consumer/checkpoint_tracker.py +0 -0
  29. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/consumer/config.py +0 -0
  30. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/consumer/consumer_client.py +0 -0
  31. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/consumer/exceptions.py +0 -0
  32. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/consumer/fetched_log_group.py +0 -0
  33. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/consumer/heart_beat.py +0 -0
  34. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/consumer/shard_worker.py +0 -0
  35. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/consumer/tasks.py +0 -0
  36. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/consumer/worker.py +0 -0
  37. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/consumer_group_request.py +0 -0
  38. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/consumer_group_response.py +0 -0
  39. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/cursor_response.py +0 -0
  40. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/cursor_time_response.py +0 -0
  41. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/es_migration/__init__.py +0 -0
  42. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/es_migration/doc_logitem_converter.py +0 -0
  43. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/es_migration/index_logstore_mappings.py +0 -0
  44. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/es_migration/mapping_index_converter.py +0 -0
  45. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/es_migration/migration_log.py +0 -0
  46. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/es_migration/migration_manager.py +0 -0
  47. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/es_migration/migration_response.py +0 -0
  48. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/es_migration/migration_task.py +0 -0
  49. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/es_migration/util.py +0 -0
  50. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_config_response.py +0 -0
  51. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/__init__.py +0 -0
  52. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/config_parser.py +0 -0
  53. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/etl_util.py +0 -0
  54. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/exceptions.py +0 -0
  55. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/restrict_config_parser.py +0 -0
  56. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/runner.py +0 -0
  57. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/settings.py +0 -0
  58. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/trans_comp/__init__.py +0 -0
  59. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/trans_comp/trans_base.py +0 -0
  60. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/trans_comp/trans_csv.py +0 -0
  61. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/trans_comp/trans_json.py +0 -0
  62. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/trans_comp/trans_kv.py +0 -0
  63. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/trans_comp/trans_lookup.py +0 -0
  64. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/trans_comp/trans_mv.py +0 -0
  65. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/trans_comp/trans_regex.py +0 -0
  66. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/trans_comp/trans_set_field.py +0 -0
  67. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/transform/__init__.py +0 -0
  68. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/transform/condition_list.py +0 -0
  69. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/transform/condition_transform.py +0 -0
  70. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/transform/condition_util.py +0 -0
  71. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/transform/transform_base.py +0 -0
  72. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/transform/transform_list.py +0 -0
  73. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/etl_core/transform/transform_meta.py +0 -0
  74. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/export_response.py +0 -0
  75. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/ext/__init__.py +0 -0
  76. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/ext/jupyter_magic.py +0 -0
  77. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/ext/syslogclient.py +0 -0
  78. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/external_store_config.py +0 -0
  79. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/external_store_config_response.py +0 -0
  80. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/getcontextlogsresponse.py +0 -0
  81. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/gethistogramsresponse.py +0 -0
  82. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/histogram.py +0 -0
  83. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/index_config.py +0 -0
  84. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/index_config_response.py +0 -0
  85. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/ingestion_response.py +0 -0
  86. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/listlogstoresrequest.py +0 -0
  87. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/listlogstoresresponse.py +0 -0
  88. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/listtopicsrequest.py +0 -0
  89. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/listtopicsresponse.py +0 -0
  90. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/logclient_core.py +0 -0
  91. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/logexception.py +0 -0
  92. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/logger_hanlder.py +0 -0
  93. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/logrequest.py +0 -0
  94. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/logresponse.py +0 -0
  95. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/logstore_config_response.py +0 -0
  96. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/logtail_config_detail.py +0 -0
  97. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/logtail_config_response.py +0 -0
  98. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/machine_group_detail.py +0 -0
  99. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/machinegroup_response.py +0 -0
  100. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/odps_sink.py +0 -0
  101. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/oss_sink.py +0 -0
  102. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/pluralize.py +0 -0
  103. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/project_response.py +0 -0
  104. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/putlogsrequest.py +0 -0
  105. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/putlogsresponse.py +0 -0
  106. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/queriedlog.py +0 -0
  107. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/resource_params.py +0 -0
  108. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/resource_response.py +0 -0
  109. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/shard_response.py +0 -0
  110. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/shipper_config.py +0 -0
  111. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/shipper_response.py +0 -0
  112. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/sink.py +0 -0
  113. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/sql_instance_response.py +0 -0
  114. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/substore_config_response.py +0 -0
  115. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/tag_response.py +0 -0
  116. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/topostore_params.py +0 -0
  117. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/topostore_response.py +0 -0
  118. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun/log/util.py +0 -0
  119. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun_log_python_sdk.egg-info/dependency_links.txt +0 -0
  120. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/aliyun_log_python_sdk.egg-info/top_level.txt +0 -0
  121. {aliyun-log-python-sdk-0.8.8 → aliyun-log-python-sdk-0.8.12}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: aliyun-log-python-sdk
3
- Version: 0.8.8
3
+ Version: 0.8.12
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
@@ -27,15 +27,24 @@ class GetHistogramsRequest(LogRequest):
27
27
 
28
28
  :type query: string
29
29
  :param query: user defined query
30
+
31
+ :type from_time_nano_part: int
32
+ :param from_time_nano_part: nano part of query begin time
33
+
34
+ :type to_time_nano_part: int
35
+ :param to_time_nano_part: nano part of query end time
30
36
  """
31
37
 
32
- def __init__(self, project=None, logstore=None, fromTime=None, toTime=None, topic=None, query=None):
38
+ def __init__(self, project=None, logstore=None, fromTime=None, toTime=None, topic=None, query=None, accurate_query=False, from_time_nano_part=0 ,to_time_nano_part=0):
33
39
  LogRequest.__init__(self, project)
34
40
  self.logstore = logstore
35
41
  self.fromTime = parse_timestamp(fromTime)
36
42
  self.toTime = parse_timestamp(toTime)
37
43
  self.topic = topic
38
44
  self.query = query
45
+ self.accurate_query = accurate_query
46
+ self.from_time_nano_part = from_time_nano_part
47
+ self.to_time_nano_part = to_time_nano_part
39
48
 
40
49
  def get_logstore(self):
41
50
  """ Get logstore name
@@ -111,3 +120,46 @@ class GetHistogramsRequest(LogRequest):
111
120
  :param query: user defined query
112
121
  """
113
122
  self.query = query
123
+
124
+ def get_accurate_query(self):
125
+ """ Get user defined accurate_query
126
+ :return: string, user defined accurate_query
127
+ """
128
+ return self.accurate_query
129
+
130
+ def set_accurate_query(self, accurate_query):
131
+ """ Set user defined accurate_query
132
+ :type accurate_query: string
133
+ :param accurate_query: user defined accurate_query
134
+ """
135
+ self.accurate_query = accurate_query
136
+
137
+ def get_from_time_nano_part(self):
138
+ """ Get request from_time_nano_part
139
+
140
+ :return: int, from_time_nano_part
141
+ """
142
+ return self.from_time_nano_part
143
+
144
+ def set_from_time_nano_part(self, from_time_nano_part):
145
+ """ Set request from_time_nano_part
146
+
147
+ :type from_time_nano_part: int
148
+ :param from_time_nano_part: from_time_nano_part part of query begin time
149
+ """
150
+ self.from_time_nano_part = from_time_nano_part
151
+
152
+ def get_to_time_nano_part(self):
153
+ """ Get request to_time_nano_part
154
+
155
+ :return: int, to_time_nano_part
156
+ """
157
+ return self.to_time_nano_part
158
+
159
+ def set_to_time_nano_part(self, to_time_nano_part):
160
+ """ Set request to_time_nano_part
161
+
162
+ :type to_time_nano_part: int
163
+ :param to_time_nano_part: to_time_nano_part part of query end time
164
+ """
165
+ self.to_time_nano_part = to_time_nano_part
@@ -45,10 +45,19 @@ class GetLogsRequest(LogRequest):
45
45
 
46
46
  :type forward: bool
47
47
  :param forward: only for scan query, if forward is set to true, the query will get next page, otherwise previous page
48
+
49
+ :type accurate_query: bool
50
+ :param accurate_query: if accurate_query is set to true, the query will run global ordered time mode
51
+
52
+ :type from_time_nano_part: int
53
+ :param from_time_nano_part: nano part of query begin time
54
+
55
+ :type to_time_nano_part: int
56
+ :param to_time_nano_part: nano part of query end time
48
57
  """
49
58
 
50
59
  def __init__(self, project=None, logstore=None, fromTime=None, toTime=None, topic=None,
51
- query=None, line=100, offset=0, reverse=False, power_sql=False, scan=False, forward=True):
60
+ query=None, line=100, offset=0, reverse=False, power_sql=False, scan=False, forward=True, accurate_query=False, from_time_nano_part=0, to_time_nano_part=0):
52
61
  LogRequest.__init__(self, project)
53
62
  self.logstore = logstore
54
63
  self.fromTime = fromTime
@@ -61,6 +70,9 @@ class GetLogsRequest(LogRequest):
61
70
  self.power_sql = power_sql
62
71
  self.scan = scan
63
72
  self.forward = forward
73
+ self.accurate_query = accurate_query
74
+ self.from_time_nano_part = from_time_nano_part
75
+ self.to_time_nano_part = to_time_nano_part
64
76
 
65
77
  def get_logstore(self):
66
78
  """ Get logstore name
@@ -227,6 +239,51 @@ class GetLogsRequest(LogRequest):
227
239
  """
228
240
  self.forward = forward
229
241
 
242
+ def get_accurate_query(self):
243
+ """ Get request accurate_query flag
244
+
245
+ :return: bool, accurate_query flag
246
+ """
247
+ return self.accurate_query
248
+
249
+ def set_accurate_query(self, accurate_query):
250
+ """ Set request accurate_query flag
251
+
252
+ :type accurate_query: bool
253
+ :param accurate_query: accurate_query flag
254
+ """
255
+ self.accurate_query = accurate_query
256
+
257
+ def get_from_time_nano_part(self):
258
+ """ Get request from_time_nano_part
259
+
260
+ :return: int, from_time_nano_part
261
+ """
262
+ return self.from_time_nano_part
263
+
264
+ def set_from_time_nano_part(self, from_time_nano_part):
265
+ """ Set request from_time_nano_part
266
+
267
+ :type from_time_nano_part: int
268
+ :param from_time_nano_part: from_time_nano_part part of query begin time
269
+ """
270
+ self.from_time_nano_part = from_time_nano_part
271
+
272
+ def get_to_time_nano_part(self):
273
+ """ Get request to_time_nano_part
274
+
275
+ :return: int, to_time_nano_part
276
+ """
277
+ return self.to_time_nano_part
278
+
279
+ def set_to_time_nano_part(self, to_time_nano_part):
280
+ """ Set request to_time_nano_part
281
+
282
+ :type to_time_nano_part: int
283
+ :param to_time_nano_part: to_time_nano_part part of query end time
284
+ """
285
+ self.to_time_nano_part = to_time_nano_part
286
+
230
287
  class GetProjectLogsRequest(LogRequest):
231
288
  """ The request used to get logs by a query from log cross multiple logstores.
232
289
 
@@ -185,6 +185,11 @@ class GetLogsResponse(LogResponse):
185
185
  log.log_print()
186
186
  print('\n')
187
187
 
188
+ def get_log_list(self):
189
+ print('count:', self.get_count())
190
+ print('progress:', self.progress)
191
+ return self.logs
192
+
188
193
  def merge(self, response):
189
194
  if not isinstance(response, GetLogsResponse):
190
195
  raise ValueError("passed response is not a GetLogsResponse: " + str(type(response)))
@@ -78,7 +78,7 @@ class ExportConfiguration(object):
78
78
  def getSink(self):
79
79
  return self.__sink
80
80
 
81
- def setSink(self, sink: DataSink):
81
+ def setSink(self, sink):
82
82
  self.__sink = sink
83
83
 
84
84
  def getParameters(self):
@@ -88,7 +88,7 @@ class ExportConfiguration(object):
88
88
  self.__parameters = parameters
89
89
 
90
90
 
91
- class AbstractJob(metaclass=abc.ABCMeta):
91
+ class AbstractJob(object):
92
92
 
93
93
  def getName(self):
94
94
  return self.__name
@@ -134,6 +134,32 @@ class AbstractJob(metaclass=abc.ABCMeta):
134
134
 
135
135
 
136
136
  class JobSchedule(object):
137
+ def __init__(self):
138
+ self.__id = None
139
+ self.__displayName = None
140
+ self.__jobName = None
141
+ self.__type = None
142
+ self.__interval = None
143
+ self.__cronExpression = None
144
+ self.__delay = None
145
+ self.__dayOfWeek = None
146
+ self.__hour = None
147
+ self.__timeZone = None
148
+
149
+ def jobScheduleToDict(self):
150
+ config = {
151
+ 'id': self.getId(),
152
+ 'displayName': self.getDisplayName(),
153
+ 'jobName': self.getJobName(),
154
+ 'type': self.getType(),
155
+ 'interval': self.getInterval(),
156
+ 'cronExpression': self.getCronExpression(),
157
+ 'delay': self.getDelay(),
158
+ 'dayOfWeek': self.getDayOfWeek(),
159
+ 'hour': self.getHour(),
160
+ 'timeZone': self.getTimeZone()
161
+ }
162
+ return config
137
163
 
138
164
  def getId(self):
139
165
  return self.__id
@@ -151,7 +177,7 @@ class JobSchedule(object):
151
177
  return self.__jobName
152
178
 
153
179
  def setJobName(self, jobName):
154
- self.jobName = jobName
180
+ self.__jobName = jobName
155
181
 
156
182
  def getType(self):
157
183
  return self.__type
@@ -251,6 +277,9 @@ class JobSchedule(object):
251
277
 
252
278
 
253
279
  class ScheduledJob(AbstractJob):
280
+ def __init__(self):
281
+ self.__status = None
282
+ self.__schedule = JobSchedule()
254
283
 
255
284
  def getStatus(self):
256
285
  return self.__status
@@ -267,6 +296,7 @@ class ScheduledJob(AbstractJob):
267
296
 
268
297
  class Export(ScheduledJob):
269
298
  def __init__(self):
299
+ self.configuration = None
270
300
  self.setType(JobType.EXPORT)
271
301
  schedule = JobSchedule()
272
302
  schedule.setType(JobScheduleType.RESIDENT)
@@ -0,0 +1,297 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: log_logs.proto
4
+ """Generated protocol buffer code."""
5
+ from google.protobuf import descriptor as _descriptor
6
+ from google.protobuf import message as _message
7
+ from google.protobuf import reflection as _reflection
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ # @@protoc_insertion_point(imports)
10
+
11
+ _sym_db = _symbol_database.Default()
12
+
13
+
14
+
15
+
16
+ DESCRIPTOR = _descriptor.FileDescriptor(
17
+ name='log_logs.proto',
18
+ package='',
19
+ syntax='proto2',
20
+ serialized_options=None,
21
+ create_key=_descriptor._internal_create_key,
22
+ serialized_pb=b'\n\x0elog_logs.proto\"k\n\x03Log\x12\x0c\n\x04Time\x18\x01 \x02(\r\x12\x1e\n\x08\x43ontents\x18\x02 \x03(\x0b\x32\x0c.Log.Content\x12\x0f\n\x07Time_ns\x18\x04 \x01(\x07\x1a%\n\x07\x43ontent\x12\x0b\n\x03Key\x18\x01 \x02(\t\x12\r\n\x05Value\x18\x02 \x02(\t\"$\n\x06LogTag\x12\x0b\n\x03Key\x18\x01 \x02(\t\x12\r\n\x05Value\x18\x02 \x02(\t\"~\n\x08LogGroup\x12\x12\n\x04Logs\x18\x01 \x03(\x0b\x32\x04.Log\x12\x10\n\x08Reserved\x18\x02 \x01(\t\x12\r\n\x05Topic\x18\x03 \x01(\t\x12\x0e\n\x06Source\x18\x04 \x01(\t\x12\x13\n\x0bMachineUUID\x18\x05 \x01(\t\x12\x18\n\x07LogTags\x18\x06 \x03(\x0b\x32\x07.LogTag\",\n\x0cLogGroupList\x12\x1c\n\tLogGroups\x18\x01 \x03(\x0b\x32\t.LogGroup'
23
+ )
24
+
25
+
26
+
27
+
28
+ _LOG_CONTENT = _descriptor.Descriptor(
29
+ name='Content',
30
+ full_name='Log.Content',
31
+ filename=None,
32
+ file=DESCRIPTOR,
33
+ containing_type=None,
34
+ create_key=_descriptor._internal_create_key,
35
+ fields=[
36
+ _descriptor.FieldDescriptor(
37
+ name='Key', full_name='Log.Content.Key', index=0,
38
+ number=1, type=9, cpp_type=9, label=2,
39
+ has_default_value=False, default_value=b"".decode('utf-8'),
40
+ message_type=None, enum_type=None, containing_type=None,
41
+ is_extension=False, extension_scope=None,
42
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
43
+ _descriptor.FieldDescriptor(
44
+ name='Value', full_name='Log.Content.Value', index=1,
45
+ number=2, type=9, cpp_type=9, label=2,
46
+ has_default_value=False, default_value=b"".decode('utf-8'),
47
+ message_type=None, enum_type=None, containing_type=None,
48
+ is_extension=False, extension_scope=None,
49
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
50
+ ],
51
+ extensions=[
52
+ ],
53
+ nested_types=[],
54
+ enum_types=[
55
+ ],
56
+ serialized_options=None,
57
+ is_extendable=False,
58
+ syntax='proto2',
59
+ extension_ranges=[],
60
+ oneofs=[
61
+ ],
62
+ serialized_start=88,
63
+ serialized_end=125,
64
+ )
65
+
66
+ _LOG = _descriptor.Descriptor(
67
+ name='Log',
68
+ full_name='Log',
69
+ filename=None,
70
+ file=DESCRIPTOR,
71
+ containing_type=None,
72
+ create_key=_descriptor._internal_create_key,
73
+ fields=[
74
+ _descriptor.FieldDescriptor(
75
+ name='Time', full_name='Log.Time', index=0,
76
+ number=1, type=13, cpp_type=3, label=2,
77
+ has_default_value=False, default_value=0,
78
+ message_type=None, enum_type=None, containing_type=None,
79
+ is_extension=False, extension_scope=None,
80
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
81
+ _descriptor.FieldDescriptor(
82
+ name='Contents', full_name='Log.Contents', index=1,
83
+ number=2, type=11, cpp_type=10, label=3,
84
+ has_default_value=False, default_value=[],
85
+ message_type=None, enum_type=None, containing_type=None,
86
+ is_extension=False, extension_scope=None,
87
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
88
+ _descriptor.FieldDescriptor(
89
+ name='Time_ns', full_name='Log.Time_ns', index=2,
90
+ number=4, type=7, cpp_type=3, label=1,
91
+ has_default_value=False, default_value=0,
92
+ message_type=None, enum_type=None, containing_type=None,
93
+ is_extension=False, extension_scope=None,
94
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
95
+ ],
96
+ extensions=[
97
+ ],
98
+ nested_types=[_LOG_CONTENT, ],
99
+ enum_types=[
100
+ ],
101
+ serialized_options=None,
102
+ is_extendable=False,
103
+ syntax='proto2',
104
+ extension_ranges=[],
105
+ oneofs=[
106
+ ],
107
+ serialized_start=18,
108
+ serialized_end=125,
109
+ )
110
+
111
+
112
+ _LOGTAG = _descriptor.Descriptor(
113
+ name='LogTag',
114
+ full_name='LogTag',
115
+ filename=None,
116
+ file=DESCRIPTOR,
117
+ containing_type=None,
118
+ create_key=_descriptor._internal_create_key,
119
+ fields=[
120
+ _descriptor.FieldDescriptor(
121
+ name='Key', full_name='LogTag.Key', index=0,
122
+ number=1, type=9, cpp_type=9, label=2,
123
+ has_default_value=False, default_value=b"".decode('utf-8'),
124
+ message_type=None, enum_type=None, containing_type=None,
125
+ is_extension=False, extension_scope=None,
126
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
127
+ _descriptor.FieldDescriptor(
128
+ name='Value', full_name='LogTag.Value', index=1,
129
+ number=2, type=9, cpp_type=9, label=2,
130
+ has_default_value=False, default_value=b"".decode('utf-8'),
131
+ message_type=None, enum_type=None, containing_type=None,
132
+ is_extension=False, extension_scope=None,
133
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
134
+ ],
135
+ extensions=[
136
+ ],
137
+ nested_types=[],
138
+ enum_types=[
139
+ ],
140
+ serialized_options=None,
141
+ is_extendable=False,
142
+ syntax='proto2',
143
+ extension_ranges=[],
144
+ oneofs=[
145
+ ],
146
+ serialized_start=127,
147
+ serialized_end=163,
148
+ )
149
+
150
+
151
+ _LOGGROUP = _descriptor.Descriptor(
152
+ name='LogGroup',
153
+ full_name='LogGroup',
154
+ filename=None,
155
+ file=DESCRIPTOR,
156
+ containing_type=None,
157
+ create_key=_descriptor._internal_create_key,
158
+ fields=[
159
+ _descriptor.FieldDescriptor(
160
+ name='Logs', full_name='LogGroup.Logs', index=0,
161
+ number=1, type=11, cpp_type=10, label=3,
162
+ has_default_value=False, default_value=[],
163
+ message_type=None, enum_type=None, containing_type=None,
164
+ is_extension=False, extension_scope=None,
165
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
166
+ _descriptor.FieldDescriptor(
167
+ name='Reserved', full_name='LogGroup.Reserved', index=1,
168
+ number=2, type=9, cpp_type=9, label=1,
169
+ has_default_value=False, default_value=b"".decode('utf-8'),
170
+ message_type=None, enum_type=None, containing_type=None,
171
+ is_extension=False, extension_scope=None,
172
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
173
+ _descriptor.FieldDescriptor(
174
+ name='Topic', full_name='LogGroup.Topic', index=2,
175
+ number=3, type=9, cpp_type=9, label=1,
176
+ has_default_value=False, default_value=b"".decode('utf-8'),
177
+ message_type=None, enum_type=None, containing_type=None,
178
+ is_extension=False, extension_scope=None,
179
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
180
+ _descriptor.FieldDescriptor(
181
+ name='Source', full_name='LogGroup.Source', index=3,
182
+ number=4, type=9, cpp_type=9, label=1,
183
+ has_default_value=False, default_value=b"".decode('utf-8'),
184
+ message_type=None, enum_type=None, containing_type=None,
185
+ is_extension=False, extension_scope=None,
186
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
187
+ _descriptor.FieldDescriptor(
188
+ name='MachineUUID', full_name='LogGroup.MachineUUID', index=4,
189
+ number=5, type=9, cpp_type=9, label=1,
190
+ has_default_value=False, default_value=b"".decode('utf-8'),
191
+ message_type=None, enum_type=None, containing_type=None,
192
+ is_extension=False, extension_scope=None,
193
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
194
+ _descriptor.FieldDescriptor(
195
+ name='LogTags', full_name='LogGroup.LogTags', index=5,
196
+ number=6, type=11, cpp_type=10, label=3,
197
+ has_default_value=False, default_value=[],
198
+ message_type=None, enum_type=None, containing_type=None,
199
+ is_extension=False, extension_scope=None,
200
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
201
+ ],
202
+ extensions=[
203
+ ],
204
+ nested_types=[],
205
+ enum_types=[
206
+ ],
207
+ serialized_options=None,
208
+ is_extendable=False,
209
+ syntax='proto2',
210
+ extension_ranges=[],
211
+ oneofs=[
212
+ ],
213
+ serialized_start=165,
214
+ serialized_end=291,
215
+ )
216
+
217
+
218
+ _LOGGROUPLIST = _descriptor.Descriptor(
219
+ name='LogGroupList',
220
+ full_name='LogGroupList',
221
+ filename=None,
222
+ file=DESCRIPTOR,
223
+ containing_type=None,
224
+ create_key=_descriptor._internal_create_key,
225
+ fields=[
226
+ _descriptor.FieldDescriptor(
227
+ name='LogGroups', full_name='LogGroupList.LogGroups', index=0,
228
+ number=1, type=11, cpp_type=10, label=3,
229
+ has_default_value=False, default_value=[],
230
+ message_type=None, enum_type=None, containing_type=None,
231
+ is_extension=False, extension_scope=None,
232
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
233
+ ],
234
+ extensions=[
235
+ ],
236
+ nested_types=[],
237
+ enum_types=[
238
+ ],
239
+ serialized_options=None,
240
+ is_extendable=False,
241
+ syntax='proto2',
242
+ extension_ranges=[],
243
+ oneofs=[
244
+ ],
245
+ serialized_start=293,
246
+ serialized_end=337,
247
+ )
248
+
249
+ _LOG_CONTENT.containing_type = _LOG
250
+ _LOG.fields_by_name['Contents'].message_type = _LOG_CONTENT
251
+ _LOGGROUP.fields_by_name['Logs'].message_type = _LOG
252
+ _LOGGROUP.fields_by_name['LogTags'].message_type = _LOGTAG
253
+ _LOGGROUPLIST.fields_by_name['LogGroups'].message_type = _LOGGROUP
254
+ DESCRIPTOR.message_types_by_name['Log'] = _LOG
255
+ DESCRIPTOR.message_types_by_name['LogTag'] = _LOGTAG
256
+ DESCRIPTOR.message_types_by_name['LogGroup'] = _LOGGROUP
257
+ DESCRIPTOR.message_types_by_name['LogGroupList'] = _LOGGROUPLIST
258
+ _sym_db.RegisterFileDescriptor(DESCRIPTOR)
259
+
260
+ Log = _reflection.GeneratedProtocolMessageType('Log', (_message.Message,), {
261
+
262
+ 'Content' : _reflection.GeneratedProtocolMessageType('Content', (_message.Message,), {
263
+ 'DESCRIPTOR' : _LOG_CONTENT,
264
+ '__module__' : 'log_logs_pb2'
265
+ # @@protoc_insertion_point(class_scope:Log.Content)
266
+ })
267
+ ,
268
+ 'DESCRIPTOR' : _LOG,
269
+ '__module__' : 'log_logs_pb2'
270
+ # @@protoc_insertion_point(class_scope:Log)
271
+ })
272
+ _sym_db.RegisterMessage(Log)
273
+ _sym_db.RegisterMessage(Log.Content)
274
+
275
+ LogTag = _reflection.GeneratedProtocolMessageType('LogTag', (_message.Message,), {
276
+ 'DESCRIPTOR' : _LOGTAG,
277
+ '__module__' : 'log_logs_pb2'
278
+ # @@protoc_insertion_point(class_scope:LogTag)
279
+ })
280
+ _sym_db.RegisterMessage(LogTag)
281
+
282
+ LogGroup = _reflection.GeneratedProtocolMessageType('LogGroup', (_message.Message,), {
283
+ 'DESCRIPTOR' : _LOGGROUP,
284
+ '__module__' : 'log_logs_pb2'
285
+ # @@protoc_insertion_point(class_scope:LogGroup)
286
+ })
287
+ _sym_db.RegisterMessage(LogGroup)
288
+
289
+ LogGroupList = _reflection.GeneratedProtocolMessageType('LogGroupList', (_message.Message,), {
290
+ 'DESCRIPTOR' : _LOGGROUPLIST,
291
+ '__module__' : 'log_logs_pb2'
292
+ # @@protoc_insertion_point(class_scope:LogGroupList)
293
+ })
294
+ _sym_db.RegisterMessage(LogGroupList)
295
+
296
+
297
+ # @@protoc_insertion_point(module_scope)