Skip to content

Commit d9d5282

Browse files
Bret Wortmanclaude
andcommitted
♻️ refactor(deepfreeze): update re-export layers for external deepfreeze-core
Update curator to import deepfreeze functionality from the external deepfreeze-core package instead of local implementation files. Changes: - curator/actions/deepfreeze/__init__.py: re-export from deepfreeze_core - curator/s3client.py: re-export S3 client from deepfreeze_core - curator/cli_singletons/deepfreeze.py: add porcelain flags to CLI - pyproject.toml: declare deepfreeze-core>=1.0.0 dependency The deepfreeze-core package is installed from: github.com/elastic/deepfreeze (packages/deepfreeze-core) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 8134667 commit d9d5282

File tree

4 files changed

+59
-650
lines changed

4 files changed

+59
-650
lines changed

curator/actions/deepfreeze/__init__.py

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,34 @@
1-
"""Deepfreeze actions module"""
1+
"""
2+
Deepfreeze actions module
23
3-
from .constants import PROVIDERS, SETTINGS_ID, STATUS_INDEX
4-
from .exceptions import (
4+
This module re-exports from the deepfreeze-core package.
5+
The canonical implementation lives in the 'deepfreeze_core' package.
6+
"""
7+
8+
# Re-export everything from the deepfreeze-core package
9+
from deepfreeze_core import (
10+
# Constants
11+
PROVIDERS,
12+
SETTINGS_ID,
13+
STATUS_INDEX,
14+
# Exceptions
515
ActionException,
616
DeepfreezeException,
717
MissingIndexError,
818
MissingSettingsError,
9-
)
10-
from .cleanup import Cleanup
11-
from .helpers import Deepfreeze, Repository, Settings
12-
from .refreeze import Refreeze
13-
from .repair_metadata import RepairMetadata
14-
from .rotate import Rotate
15-
from .setup import Setup
16-
from .status import Status
17-
from .thaw import Thaw
18-
from .utilities import (
19+
# Actions
20+
Cleanup,
21+
Refreeze,
22+
RepairMetadata,
23+
Rotate,
24+
Setup,
25+
Status,
26+
Thaw,
27+
# Helpers
28+
Deepfreeze,
29+
Repository,
30+
Settings,
31+
# Utilities
1932
check_restore_status,
2033
create_repo,
2134
decode_date,

curator/cli_singletons/deepfreeze.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,20 @@ def setup(
246246
default=6,
247247
help="How many repositories should remain mounted?",
248248
)
249+
@click.option(
250+
"-p",
251+
"--porcelain",
252+
is_flag=True,
253+
default=False,
254+
help="Machine-readable output (no formatting)",
255+
)
249256
@click.pass_context
250257
def rotate(
251258
ctx,
252259
year,
253260
month,
254261
keep,
262+
porcelain,
255263
):
256264
"""
257265
Deepfreeze rotation (add a new repo and age oldest off)
@@ -260,6 +268,7 @@ def rotate(
260268
"year": year,
261269
"month": month,
262270
"keep": keep,
271+
"porcelain": porcelain,
263272
}
264273
action = CLIAction(
265274
ctx.info_name,
@@ -365,16 +374,25 @@ def status(
365374
default=None,
366375
help="Override retention period for refrozen thaw requests (default: from config, typically 35 days)",
367376
)
377+
@click.option(
378+
"-p",
379+
"--porcelain",
380+
is_flag=True,
381+
default=False,
382+
help="Machine-readable output (no formatting)",
383+
)
368384
@click.pass_context
369385
def cleanup(
370386
ctx,
371387
refrozen_retention_days,
388+
porcelain,
372389
):
373390
"""
374391
Clean up expired thawed repositories
375392
"""
376393
manual_options = {
377394
"refrozen_retention_days": refrozen_retention_days,
395+
"porcelain": porcelain,
378396
}
379397
action = CLIAction(
380398
ctx.info_name,

0 commit comments

Comments
 (0)