From e7e4ad228ad4a51468d92974487c0284eeb7aa99 Mon Sep 17 00:00:00 2001 From: CodyCBakerPhD Date: Thu, 15 Aug 2024 11:26:44 -0400 Subject: [PATCH] add all detected values --- src/dandi_s3_log_parser/_globals.py | 31 ++++++++++++++++----------- src/dandi_s3_log_parser/_log_utils.py | 1 + 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/dandi_s3_log_parser/_globals.py b/src/dandi_s3_log_parser/_globals.py index 092278e..ea29373 100644 --- a/src/dandi_s3_log_parser/_globals.py +++ b/src/dandi_s3_log_parser/_globals.py @@ -2,21 +2,13 @@ import re _KNOWN_OPERATION_TYPES = ( - "REST.GET.OBJECT", - "REST.PUT.OBJECT", - "REST.HEAD.OBJECT", - "REST.POST.OBJECT", - "REST.COPY.PART", - "REST.COPY.OBJECT_GET", - "REST.DELETE.OBJECT", - "REST.OPTIONS.PREFLIGHT", - "BATCH.DELETE.OBJECT", - "WEBSITE.GET.OBJECT", - "REST.GET.BUCKETVERSIONS", - "REST.GET.BUCKET", "BATCH.DELETE.OBJECT", + "REST.COPY.OBJECT", "REST.COPY.OBJECT_GET", "REST.COPY.PART", + "REST.DELETE.BUCKET", + "REST.DELETE.BUCKETPOLICY", + "REST.DELETE.LIFECYCLE", "REST.DELETE.OBJECT", "REST.DELETE.OBJECT_TAGGING", "REST.DELETE.UPLOAD", @@ -39,16 +31,21 @@ "REST.GET.OBJECT_LOCK_CONFIGURATION", "REST.GET.OBJECT_TAGGING", "REST.GET.OWNERSHIP_CONTROLS", + "REST.GET.PART", "REST.GET.POLICY_STATUS", "REST.GET.PUBLIC_ACCESS_BLOCK", "REST.GET.REPLICATION", "REST.GET.REQUEST_PAYMENT", "REST.GET.TAGGING", "REST.GET.UPLOAD", + "REST.GET.UPLOADS", "REST.GET.VERSIONING", "REST.GET.WEBSITE", "REST.HEAD.BUCKET", + "REST.HEAD.BUCKETVERSIONS", "REST.HEAD.OBJECT", + "REST.HEAD.PART", + "REST.HEAD.UPLOADS", "REST.OPTIONS.PREFLIGHT", "REST.POST.BUCKET", "REST.POST.MULTI_OBJECT_DELETE", @@ -56,10 +53,20 @@ "REST.POST.UPLOAD", "REST.POST.UPLOADS", "REST.PUT.ACL", + "REST.PUT.BUCKET", "REST.PUT.BUCKETPOLICY", + "REST.PUT.CORS", + "REST.PUT.INVENTORY", + "REST.PUT.LIFECYCLE", + "REST.PUT.LOGGING_STATUS", + "REST.PUT.METRICS", + "REST.PUT.NOTIFICATION", "REST.PUT.OBJECT", "REST.PUT.OWNERSHIP_CONTROLS", "REST.PUT.PART", + "REST.PUT.VERSIONING", + "WEBSITE.GET.OBJECT", + # "objects;" # Unsure about this last one; it showed up in a scan of all 7-th string elements ) _IS_OPERATION_TYPE_KNOWN = collections.defaultdict(bool) diff --git a/src/dandi_s3_log_parser/_log_utils.py b/src/dandi_s3_log_parser/_log_utils.py index 8dc7550..2b5a1aa 100644 --- a/src/dandi_s3_log_parser/_log_utils.py +++ b/src/dandi_s3_log_parser/_log_utils.py @@ -26,6 +26,7 @@ def find_all_known_operation_types( desc="Extracting operation types from log files...", position=0, leave=True, + smoothing=0, ): operation_types_per_file = { raw_log_line.split(" ")[7]