Skip to content

Commit 48d4a66

Browse files
Philip ZeyligerPhilip Langdale
Philip Zeyliger
authored and
Philip Langdale
committed
Adding roles to collect diagnostics data.
New API supports restricting log/metric information to specific roles; this extends support for that. Note that the _45 method name is an odd thing here, since we had an odd break then, and we deprecated the method with the nicer name. I'm just going with it.
1 parent 8250dfb commit 48d4a66

File tree

1 file changed

+4
-2
lines changed
  • python/src/cm_api/endpoints

1 file changed

+4
-2
lines changed

python/src/cm_api/endpoints/cms.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,18 +189,20 @@ def collect_diagnostic_data(self, start_datetime, end_datetime, includeInfoLog=F
189189
}
190190
return self._cmd('collectDiagnosticData', data=args)
191191

192-
def collect_diagnostic_data_45(self, end_datetime, bundle_size_bytes, cluster_name=None):
192+
def collect_diagnostic_data_45(self, end_datetime, bundle_size_bytes, cluster_name=None, roles=None):
193193
"""
194194
Issue the command to collect diagnostic data.
195195
196196
@param end_datetime: The end of the collection period. Type datetime.
197197
@param bundle_size_bytes: The target size for the support bundle in bytes
198198
@param cluster_name: The cluster to collect or None for all clusters
199+
@param roles: Role ids of roles to restrict log and metric collection to. Valid since v10.
199200
"""
200201
args = {
201202
'endTime': end_datetime.isoformat(),
202203
'bundleSizeBytes': bundle_size_bytes,
203-
'clusterName': cluster_name
204+
'clusterName': cluster_name,
205+
'roles': roles
204206
}
205207
return self._cmd('collectDiagnosticData', data=args)
206208

0 commit comments

Comments
 (0)